VkGLFW3  0.3.0
Vulkan-focused C# 7 object-oriented window/input system based on GLFW3
Public Member Functions | Public Attributes | Protected Member Functions | Properties | Events | List of all members
VkGLFW3.Window Class Reference

Represents a native window handle and acts as the main entry point for all GLFW functionality, excluding Init and Terminate. More...

Inheritance diagram for VkGLFW3.Window:
Inheritance graph
[legend]
Collaboration diagram for VkGLFW3.Window:
Collaboration graph
[legend]

Public Member Functions

 Window (int initialWidth, int initialHeight, string title)
 Creates a window meant to be used with Vulkan (aka there is no associated OpenGL context) and initialize event callbacks. More...
 
void Show ()
 This function makes the specified window visible if it was previously hidden. If the window is already visible or is in full screen mode, this function does nothing. More...
 
void Hide ()
 This function hides the specified window if it was previously visible. If the window is already hidden or is in full screen mode, this function does nothing. More...
 
bool Visible ()
 Not implemented. Indicates whether the specified window is visible. More...
 
bool Decorated ()
 Not implemented. Indicates whether the specified window has decorations such as a border, a close widget, etc. More...
 
bool Resizable ()
 Not implemented. Indicates whether the specified window is resizable by the user. More...
 
bool Focused ()
 Not implemented. Indicates whether the specified window has input focus. More...
 
bool Minimized ()
 Not implemented. Indicates whether the specified window is iconified (either manually by the user or via window.Minimize()). More...
 
void PollEvents ()
 Processes all pending events. More...
 
void SetSize (int width, int height)
 Sets the size of the client area of the specified window. More...
 
unsafe void SetIcon (ImageDescriptor?image)
 Set the icon for the window. More...
 
static int GetPhysicalDevicePresentationSupport (IntPtr instance, IntPtr device, uint queuefamily)
 
void Dispose ()
 Destroys the specified window and its context. More...
 

Public Attributes

IntPtr Handle
 
bool ShouldClose => Convert.ToBoolean(WindowShouldClose(Handle))
 Indicated whether the window should be closed. More...
 
int width
 Retrieves the size of the client area of the specified window. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

string Title [get, set]
 

Events

EventHandler< SizeChangedEventArgsSizeChanged
 Will be called if the Size of the window has been changed More...
 
EventHandler< KeyEventArgsKeyChanged
 Will be called if a key has been pressed More...
 

Detailed Description

Represents a native window handle and acts as the main entry point for all GLFW functionality, excluding Init and Terminate.

Definition at line 15 of file Window.cs.

Constructor & Destructor Documentation

VkGLFW3.Window.Window ( int  initialWidth,
int  initialHeight,
string  title 
)

Creates a window meant to be used with Vulkan (aka there is no associated OpenGL context) and initialize event callbacks.

Parameters
initialWidthInitial window width
initialHeightInitial window height
titleWindow title
Returns
Exceptions
InvalidOperationException

Definition at line 59 of file Window.cs.

Member Function Documentation

bool VkGLFW3.Window.Decorated ( )

Not implemented. Indicates whether the specified window has decorations such as a border, a close widget, etc.

virtual void VkGLFW3.Window.Dispose ( bool  disposing)
protectedvirtual

Definition at line 325 of file Window.cs.

void VkGLFW3.Window.Dispose ( )

Destroys the specified window and its context.

This function destroys the specified window and its context. On calling this function, no further callbacks will be called for that window.

Definition at line 346 of file Window.cs.

bool VkGLFW3.Window.Focused ( )

Not implemented. Indicates whether the specified window has input focus.

static int VkGLFW3.Window.GetPhysicalDevicePresentationSupport ( IntPtr  instance,
IntPtr  device,
uint  queuefamily 
)
void VkGLFW3.Window.Hide ( )

This function hides the specified window if it was previously visible. If the window is already hidden or is in full screen mode, this function does nothing.

bool VkGLFW3.Window.Minimized ( )

Not implemented. Indicates whether the specified window is iconified (either manually by the user or via window.Minimize()).

void VkGLFW3.Window.PollEvents ( )

Processes all pending events.

This function processes only those events that are already in the event queue and then returns immediately. Processing events will cause the window and input callbacks associated with those events to be called. On some platforms, a window move, resize or menu operation will cause event processing to block. On some platforms, certain events are sent directly to the application without going through the event queue, causing callbacks to be called outside of a call to one of the event processing functions.

Definition at line 143 of file Window.cs.

bool VkGLFW3.Window.Resizable ( )

Not implemented. Indicates whether the specified window is resizable by the user.

Returns
unsafe void VkGLFW3.Window.SetIcon ( ImageDescriptor image)

Set the icon for the window.

This function sets the icon of the specified window. If no image (null) is specified, the window reverts to its default icon.

Definition at line 188 of file Window.cs.

void VkGLFW3.Window.SetSize ( int  width,
int  height 
)

Sets the size of the client area of the specified window.

This function sets the size, in screen coordinates, of the client area of the specified window. For full screen windows, this function updates the resolution of its desired video mode and switches to the video mode closest to it, without affecting the window's context. As the context is unaffected, the bit depths of the framebuffer remain unchanged.

Parameters
widthWidth, in screen coordinates
heightHeight, in screen coordinates

Definition at line 176 of file Window.cs.

void VkGLFW3.Window.Show ( )

This function makes the specified window visible if it was previously hidden. If the window is already visible or is in full screen mode, this function does nothing.

bool VkGLFW3.Window.Visible ( )

Not implemented. Indicates whether the specified window is visible.

Member Data Documentation

IntPtr VkGLFW3.Window.Handle

Definition at line 17 of file Window.cs.

bool VkGLFW3.Window.ShouldClose => Convert.ToBoolean(WindowShouldClose(Handle))

Indicated whether the window should be closed.

Definition at line 23 of file Window.cs.

int VkGLFW3.Window.width

Retrieves the size of the client area of the specified window.

This function retrieves the size, in screen coordinates, of the client area of the specified window.

Definition at line 154 of file Window.cs.

Property Documentation

string VkGLFW3.Window.Title
getset

Definition at line 26 of file Window.cs.

Event Documentation

EventHandler<KeyEventArgs> VkGLFW3.Window.KeyChanged

Will be called if a key has been pressed

Definition at line 48 of file Window.cs.

EventHandler<SizeChangedEventArgs> VkGLFW3.Window.SizeChanged

Will be called if the Size of the window has been changed

Definition at line 43 of file Window.cs.


The documentation for this class was generated from the following file: