Class X11WindowComponent
Inherited Members
Namespace: OpenTK.Platform.Native.X11
Assembly: OpenTK.Platform.dll
Syntax
public class X11WindowComponent : IWindowComponent, IPalComponent
Properties
CanCaptureCursor
true when the driver supports capturing the cursor in a window using SetCursorCaptureMode(WindowHandle, CursorCaptureMode).
Declaration
public bool CanCaptureCursor { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
CanGetDisplay
true when the driver can provide the display the window is in using GetDisplay(WindowHandle).
Declaration
public bool CanGetDisplay { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
CanSetCursor
true when the driver supports setting the cursor of the window using SetCursor(WindowHandle, CursorHandle?).
Declaration
public bool CanSetCursor { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
CanSetIcon
true when the driver supports setting and getting the window icon using SetIcon(WindowHandle, IconHandle) and GetIcon(WindowHandle).
Declaration
public bool CanSetIcon { get; }
Property Value
Type | Description |
---|---|
bool |
See Also
FreedesktopWindowManagerName
The name of the Freedesktop manager.
Declaration
public string? FreedesktopWindowManagerName { get; }
Property Value
Type | Description |
---|---|
string |
IsWindowManagerFreedesktop
When true, indicates the current window manager is Freedesktop compliant.
Declaration
public bool IsWindowManagerFreedesktop { get; }
Property Value
Type | Description |
---|---|
bool |
Logger
The logger that this component uses to log diagnostic messages.
Declaration
public ILogger? Logger { get; set; }
Property Value
Type | Description |
---|---|
ILogger |
See Also
Name
Name of the abstraction layer component.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Provides
Specifies which PAL components this object provides.
Declaration
public PalComponents Provides { get; }
Property Value
Type | Description |
---|---|
PalComponents |
SupportedEvents
Read-only list of event types the driver supports.
Declaration
public IReadOnlyList<PlatformEventType> SupportedEvents { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<PlatformEventType> |
SupportedModes
Read-only list of window modes the driver supports.
Declaration
public IReadOnlyList<WindowMode> SupportedModes { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<WindowMode> |
SupportedStyles
Read-only list of window styles the driver supports.
Declaration
public IReadOnlyList<WindowBorderStyle> SupportedStyles { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<WindowBorderStyle> |
Methods
ClientToFramebuffer(WindowHandle, Vector2, out Vector2)
Converts window relative coordinates to framebuffer coordinates.
Declaration
public void ClientToFramebuffer(WindowHandle handle, Vector2 client, out Vector2 framebuffer)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle of the window whose coordinate system to use. |
Vector2 | client | The client coordinate. |
Vector2 | framebuffer | The framebuffer coordinate. |
Remarks
On platforms that support non-integer screen and client space coordinates (macOS) this function will return full precision results, on integer based platforms (win32 and X11) the input coordinates will (if necessary) be truncated to ints before conversion.
See Also
ClientToScreen(WindowHandle, Vector2, out Vector2)
Converts window relative coordinates to screen coordinates.
Declaration
public void ClientToScreen(WindowHandle handle, Vector2 client, out Vector2 screen)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window handle. |
Vector2 | client | The client coordinate. |
Vector2 | screen | The screen coordinate. |
Remarks
On platforms that support non-integer screen and client space coordinates (macOS) this function will return full precision results, on integer based platforms (win32 and X11) the input coordinates will (if necessary) be truncated to ints before conversion.
See Also
Create(GraphicsApiHints)
Create a window object.
Declaration
public WindowHandle Create(GraphicsApiHints hints)
Parameters
Type | Name | Description |
---|---|---|
GraphicsApiHints | hints | Graphics API hints to be passed to the operating system. |
Returns
Type | Description |
---|---|
WindowHandle | Handle to the new window object. |
See Also
DemandAttention(WindowHandle)
Indicates that this window demands immediate attention. On Ubuntu, this means a popup indicating that the application is ready.
Declaration
public void DemandAttention(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Destroy(WindowHandle)
Destroy a window object. After a window has been destroyed the handle should no longer be used in any function other than IsWindowDestroyed(WindowHandle).
Declaration
public void Destroy(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window object. |
See Also
FocusWindow(WindowHandle)
Gives the window input focus.
Declaration
public void FocusWindow(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to the window to focus. |
See Also
FramebufferToClient(WindowHandle, Vector2, out Vector2)
Converts framebuffer coordinates to framebuffer coordinates.
Declaration
public void FramebufferToClient(WindowHandle handle, Vector2 framebuffer, out Vector2 client)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle of the window whose coordinate system to use. |
Vector2 | framebuffer | The framebuffer coordinate. |
Vector2 | client | The client coordinate. |
Remarks
On platforms that support non-integer screen and client space coordinates (macOS) this function will return full precision results, on integer based platforms (win32 and X11) the input coordinates will (if necessary) be truncated to ints before conversion.
See Also
GetBorderStyle(WindowHandle)
Get the border style of a window.
Declaration
public WindowBorderStyle GetBorderStyle(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to window. |
Returns
Type | Description |
---|---|
WindowBorderStyle | The border style of the window. |
Remarks
Calling this in rapid succession after SetBorderStyle(WindowHandle, WindowBorderStyle) will likely report the wrong style as the X server hasn't updated the state of the window yet. We could add a delay where we wait for the server to change the window, but for now we leave it as it is.
See Also
GetBounds(WindowHandle, out int, out int, out int, out int)
Get the bounds of the window.
Declaration
public void GetBounds(WindowHandle handle, out int x, out int y, out int width, out int height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int | x | X coordinate of the window. |
int | y | Y coordinate of the window. |
int | width | Width of the window in screen coordinates. |
int | height | Height of the window in screen coordinates. |
GetClientBounds(WindowHandle, out int, out int, out int, out int)
Get the client area bounds (drawing area) of a window.
Declaration
public void GetClientBounds(WindowHandle handle, out int x, out int y, out int width, out int height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int | x | X coordinate of the client area. |
int | y | Y coordinate of the client area. |
int | width | Width of the client area in pixels. |
int | height | Height of the client area in pixels. |
GetClientPosition(WindowHandle, out Vector2i)
Get the position of the client area (drawing area) of a window.
Declaration
public void GetClientPosition(WindowHandle handle, out Vector2i clientPosition)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | clientPosition | The coordinate of the client area in screen coordinates. |
GetClientSize(WindowHandle, out Vector2i)
Get the size of the client area (drawing area) of a window.
Declaration
public void GetClientSize(WindowHandle handle, out Vector2i clientSize)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | clientSize | Size of the client area in screen coordinates. |
GetCursorCaptureMode(WindowHandle)
Gets the current cursor capture mode. See SetCursorCaptureMode(WindowHandle, CursorCaptureMode) for more details.
Declaration
public CursorCaptureMode GetCursorCaptureMode(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Returns
Type | Description |
---|---|
CursorCaptureMode | The current cursor capture mode. |
See Also
GetDisplay(WindowHandle)
Get the display handle a window is in.
Declaration
public DisplayHandle GetDisplay(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Returns
Type | Description |
---|---|
DisplayHandle | The display handle the window is in. |
Exceptions
Type | Condition |
---|---|
PalNotImplementedException | Backend does not support finding the window display. CanGetDisplay. |
See Also
GetFramebufferSize(WindowHandle, out Vector2i)
Get the size of the window framebuffer in pixels. Use this value when calls to graphics APIs that want pixels, e.g. GL.Viewport().
Declaration
public void GetFramebufferSize(WindowHandle handle, out Vector2i framebufferSize)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | framebufferSize | Size in pixels of the window framebuffer. |
GetFullscreenDisplay(WindowHandle, out DisplayHandle?)
Gets the display that the specified window is fullscreen on, if the window is fullscreen.
Declaration
public bool GetFullscreenDisplay(WindowHandle handle, out DisplayHandle? display)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window handle. |
DisplayHandle | display | The display where the window is fullscreen or null if the window is not fullscreen. |
Returns
Type | Description |
---|---|
bool |
See Also
GetIcon(WindowHandle)
Get a handle to the window icon object.
Declaration
public IconHandle? GetIcon(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Returns
Type | Description |
---|---|
IconHandle | Handle to the windows icon object, or null if none is set. |
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | Backend does not support getting the window icon. See CanSetIcon. |
See Also
GetIconifiedTitle(WindowHandle)
Gets the iconified title of the window using either _NET_WM_ICON_NAME
or WM_ICON_NAME
.
Declaration
public string GetIconifiedTitle(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | A handle to the window to get the iconified title of. |
Returns
Type | Description |
---|---|
string | The title of the window when it's iconified. |
GetMaxClientSize(WindowHandle, out int?, out int?)
Gets the maximum size of the client area.
Declaration
public void GetMaxClientSize(WindowHandle handle, out int? width, out int? height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int? | width | The maximum width of the client area of the window, or null if no limit is set. |
int? | height | The maximum height of the client area of the window, or null if no limit is set. |
GetMinClientSize(WindowHandle, out int?, out int?)
Gets the minimum size of the client area.
Declaration
public void GetMinClientSize(WindowHandle handle, out int? width, out int? height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int? | width | The minimum width of the client area of the window, or null if no limit is set. |
int? | height | The minimum height of the client area of the window, or null if no limit is set. |
GetMode(WindowHandle)
Get the mode of a window.
Declaration
public WindowMode GetMode(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Returns
Type | Description |
---|---|
WindowMode | The mode of the window. |
Remarks
Calling this in rapid succession after SetMode(WindowHandle, WindowMode) will likely report the wrong mode as the X server hasn't updated the state of the window yet. We could add a delay where we wait for the server to change the window, but for now we leave it as it is.
GetPosition(WindowHandle, out Vector2i)
Get the window position in display coordinates (top left origin).
Declaration
public void GetPosition(WindowHandle handle, out Vector2i position)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | position | Coordinate of the window in screen coordinates. |
See Also
GetScaleFactor(WindowHandle, out float, out float)
Returns the current scale factor of this window.
Declaration
public void GetScaleFactor(WindowHandle handle, out float scaleX, out float scaleY)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window handle. |
float | scaleX | The x scale factor of the window. |
float | scaleY | The y scale factor of the window. |
See Also
GetSize(WindowHandle, out Vector2i)
Get the size of the window.
Declaration
public void GetSize(WindowHandle handle, out Vector2i size)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | size | Size of the window in screen coordinates. |
GetTitle(WindowHandle)
Get the title of a window.
Declaration
public string GetTitle(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Returns
Type | Description |
---|---|
string | The title of the window. |
See Also
GetTransparencyMode(WindowHandle, out float)
Gets the transparency mode of the specified window.
Declaration
public WindowTransparencyMode GetTransparencyMode(WindowHandle handle, out float opacity)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window to query the transparency mode of. |
float | opacity | The window opacity if the transparency mode was TransparentWindow, 0 otherwise. |
Returns
Type | Description |
---|---|
WindowTransparencyMode | The transparency mode of the specified window. |
See Also
GetX11Display()
Returns the X11 Display
used by OpenTK.
Declaration
public nint GetX11Display()
Returns
Type | Description |
---|---|
nint | The X11 |
GetX11Window(WindowHandle)
Returns the X11 Window
handle associated with this window.
Declaration
public nint GetX11Window(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window handle to get the associated X11 |
Returns
Type | Description |
---|---|
nint | The X11 |
Initialize(ToolkitOptions)
Initialize the component.
Declaration
public void Initialize(ToolkitOptions options)
Parameters
Type | Name | Description |
---|---|---|
ToolkitOptions | options | The options to initialize the component with. |
See Also
IsAlwaysOnTop(WindowHandle)
Gets if the current window is always on top or not.
Declaration
public bool IsAlwaysOnTop(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | A handle to the window to get whether or not is always on top. |
Returns
Type | Description |
---|---|
bool | Whether the window is always on top or not. |
See Also
IsFocused(WindowHandle)
Returns true if the given window has input focus.
Declaration
public bool IsFocused(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Returns
Type | Description |
---|---|
bool | If the window has input focus. |
See Also
IsWindowDestroyed(WindowHandle)
Checks if Destroy(WindowHandle) has been called on this handle.
Declaration
public bool IsWindowDestroyed(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window handle to check if it's destroyed or not. |
Returns
Type | Description |
---|---|
bool | If Destroy(WindowHandle) was called with the window handle. |
See Also
ProcessEvents(bool)
Processes platform events and sends them to the EventQueue.
Declaration
public void ProcessEvents(bool waitForEvents)
Parameters
Type | Name | Description |
---|---|---|
bool | waitForEvents | Specifies if this function should wait for events or return immediately if there are no events. |
RequestAttention(WindowHandle)
Requests that the user pay attention to the window. Usually by flashing the window icon.
Declaration
public void RequestAttention(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | A handle to the window that requests attention. |
See Also
ScreenToClient(WindowHandle, Vector2, out Vector2)
Converts screen coordinates to window relative coordinates.
Declaration
public void ScreenToClient(WindowHandle handle, Vector2 screen, out Vector2 client)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window handle. |
Vector2 | screen | The screen coordinate. |
Vector2 | client | The client coordinate. |
Remarks
On platforms that support non-integer screen and client space coordinates (macOS) this function will return full precision results, on integer based platforms (win32 and X11) the input coordinates will (if necessary) be truncated to ints before conversion.
See Also
SetAlwaysOnTop(WindowHandle, bool)
Set if the window is an always on top window or not.
Declaration
public void SetAlwaysOnTop(WindowHandle handle, bool floating)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | A handle to the window to make always on top. |
bool | floating | Whether the window should be always on top or not. |
See Also
SetBorderStyle(WindowHandle, WindowBorderStyle)
Set the border style of a window.
Declaration
public void SetBorderStyle(WindowHandle handle, WindowBorderStyle style)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
WindowBorderStyle | style | The new border style of the window. |
Exceptions
Type | Condition |
---|---|
InvalidEnumArgumentException |
|
PlatformNotSupportedException | Backend does not support the value set by |
SetBounds(WindowHandle, int, int, int, int)
Set the bounds of the window.
Declaration
public void SetBounds(WindowHandle handle, int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int | x | New X coordinate of the window. |
int | y | New Y coordinate of the window. |
int | width | New width of the window in screen coordinates. |
int | height | New height of the window in screen coordinates. |
SetClientBounds(WindowHandle, int, int, int, int)
Set the client area bounds (drawing area) of a window.
Declaration
public void SetClientBounds(WindowHandle handle, int x, int y, int width, int height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int | x | New X coordinate of the client area. |
int | y | New Y coordinate of the client area. |
int | width | New width of the client area in pixels. |
int | height | New height of the client area in pixels. |
SetClientPosition(WindowHandle, Vector2i)
Set the position of the client area (drawing area) of a window.
Declaration
public void SetClientPosition(WindowHandle handle, Vector2i newClientPosition)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | newClientPosition | New coordinate of the client area in screen coordinates. |
SetClientSize(WindowHandle, Vector2i)
Set the size of the client area (drawing area) of a window.
Declaration
public void SetClientSize(WindowHandle handle, Vector2i newClientSize)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | newClientSize | New size of the client area in screen coordinates. |
SetCursor(WindowHandle, CursorHandle?)
Set the cursor object for a window.
Declaration
public void SetCursor(WindowHandle handle, CursorHandle? cursor)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
CursorHandle | cursor | Handle to a cursor object, or null for hidden cursor. |
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | Backend does not support setting the window mouse cursor. See CanSetCursor. |
See Also
SetCursorCaptureMode(WindowHandle, CursorCaptureMode)
Sets the cursor capture mode of the window. A cursor can be confined to the bounds of the window, or locked to the center of the window.
Declaration
public void SetCursorCaptureMode(WindowHandle handle, CursorCaptureMode mode)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
CursorCaptureMode | mode | The cursor capture mode. |
See Also
SetFullscreenDisplay(WindowHandle, DisplayHandle?)
Put a window into 'windowed fullscreen' on a specified display or the display the window is displayed on.
If display
is null
then the window will be made fullscreen on the 'nearest' display.
Declaration
public void SetFullscreenDisplay(WindowHandle handle, DisplayHandle? display)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window to make fullscreen. |
DisplayHandle | display | The display to make the window fullscreen on. |
Remarks
To make an 'exclusive fullscreen' window see SetFullscreenDisplay(WindowHandle, DisplayHandle, VideoMode).
See Also
SetFullscreenDisplay(WindowHandle, DisplayHandle, VideoMode)
Put a window into 'exclusive fullscreen' on a specified display and change the video mode to the specified video mode. Only video modes accuired using GetSupportedVideoModes(DisplayHandle) are expected to work.
Declaration
public void SetFullscreenDisplay(WindowHandle handle, DisplayHandle display, VideoMode videoMode)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window to make fullscreen. |
DisplayHandle | display | The display to make the window fullscreen on. |
VideoMode | videoMode | The video mode to use when making the window fullscreen. |
Remarks
To make a 'windowed fullscreen' window see SetFullscreenDisplay(WindowHandle, DisplayHandle?).
See Also
SetHitTestCallback(WindowHandle, HitTest?)
Sets a delegate that is used for hit testing. Hit testing allows the user to specify if a click should start a drag or resize operation on the window.
Hit testing is not always done in respone to the user clicking the mouse. The operating system can do hit testing for any reason and doesn't need to be in respose to some user action. It is recommended to keep this code efficient as it will be called often.
Declaration
public void SetHitTestCallback(WindowHandle handle, HitTest? test)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window for which this hit test delegate should be used for. |
HitTest | test | The hit test delegate. |
See Also
SetIcon(WindowHandle, IconHandle)
Set window icon object handle.
Declaration
public void SetIcon(WindowHandle handle, IconHandle icon)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
IconHandle | icon | Handle to an icon object. |
Exceptions
Type | Condition |
---|---|
PlatformNotSupportedException | Backend does not support setting the window icon. See CanSetIcon. |
See Also
SetIconifiedTitle(WindowHandle, string)
Sets the iconified title of the window using both _NET_WM_ICON_NAME
and WM_ICON_NAME
.
Declaration
public void SetIconifiedTitle(WindowHandle handle, string iconTitle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | A handle to the window to set the iconified title of. |
string | iconTitle | The new iconified title. |
SetMaxClientSize(WindowHandle, int?, int?)
Sets the maximum size of the client area.
Declaration
public void SetMaxClientSize(WindowHandle handle, int? width, int? height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int? | width | New maximum width of the client area of the window, or null to remove limit. |
int? | height | New maximum height of the client area of the window, or null to remove limit. |
SetMinClientSize(WindowHandle, int?, int?)
Sets the minimum size of the client area.
Declaration
public void SetMinClientSize(WindowHandle handle, int? width, int? height)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
int? | width | New minimum width of the client area of the window, or null to remove limit. |
int? | height | New minimum height of the client area of the window, or null to remove limit. |
SetMode(WindowHandle, WindowMode)
Set the mode of a window.
Declaration
public void SetMode(WindowHandle handle, WindowMode mode)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
WindowMode | mode | The new mode of the window. |
Remarks
Setting WindowedFullscreen or ExclusiveFullscreen will make the window fullscreen in the nearest monitor to the window location. Use SetFullscreenDisplay(WindowHandle, DisplayHandle?) or SetFullscreenDisplay(WindowHandle, DisplayHandle, VideoMode) to explicitly set the monitor.
Exceptions
Type | Condition |
---|---|
InvalidEnumArgumentException |
|
PlatformNotSupportedException | Backend does not support the value set by |
See Also
SetPosition(WindowHandle, Vector2i)
Set the window position in display coordinates (top left origin).
Declaration
public void SetPosition(WindowHandle handle, Vector2i newPosition)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | newPosition | New position of the window in screen coordinates. |
SetSize(WindowHandle, Vector2i)
Set the size of the window.
Declaration
public void SetSize(WindowHandle handle, Vector2i newSize)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
Vector2i | newSize | New size of the window in screen coordinates. |
SetTitle(WindowHandle, string)
Set the title of a window.
Declaration
public void SetTitle(WindowHandle handle, string title)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | Handle to a window. |
string | title | New window title string. |
See Also
SetTransparencyMode(WindowHandle, WindowTransparencyMode, float)
Sets the transparency mode of the specified window.
Declaration
public void SetTransparencyMode(WindowHandle handle, WindowTransparencyMode transparencyMode, float opacity = 0.5)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window to set the transparency mode of. |
WindowTransparencyMode | transparencyMode | The transparency mode to apply to the window. |
float | opacity | The whole window opacity. Ignored if |
See Also
SupportsFramebufferTransparency(WindowHandle)
Returns true if TransparentFramebuffer is supported for this window.
Win32 | Always returns true. |
macOS | Always returns true. |
Linux/X11 | Returns true if the selected ContextValues had SupportsFramebufferTransparencytrue. |
Declaration
public bool SupportsFramebufferTransparency(WindowHandle handle)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window to query framebuffer transparency support for. |
Returns
Type | Description |
---|---|
bool | If SetTransparencyMode(WindowHandle, WindowTransparencyMode, float) with TransparentFramebuffer would work. |
See Also
Uninitialize()
Uninitialize the component. Frees any native resources used by the component.
Declaration
public void Uninitialize()