Show / Hide Table of Contents

Class WindowComponent

Win32 implementation of IWindowComponent.

Inheritance
object
WindowComponent
Implements
IWindowComponent
IPalComponent
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: OpenTK.Platform.Native.Windows
Assembly: OpenTK.Platform.dll
Syntax
public class WindowComponent : IWindowComponent, IPalComponent

Fields

CLASS_NAME

Class name used to create windows.

Declaration
public const string CLASS_NAME = "OpenTK Window"
Field Value
Type Description
string

HInstance

The applications HInstance.

Declaration
public static readonly nint HInstance
Field Value
Type Description
nint

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
SetCursorCaptureMode(WindowHandle, CursorCaptureMode)

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
GetDisplay(WindowHandle)

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
SetCursor(WindowHandle, CursorHandle)

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
SetIcon(WindowHandle, IconHandle)
GetIcon(WindowHandle)

HelperHWnd

The helper window used in part to load wgl extensions.

Declaration
public static nint HelperHWnd { get; }
Property Value
Type Description
nint

Logger

The logger that this component uses to log diagnostic messages.

Declaration
public ILogger? Logger { get; set; }
Property Value
Type Description
ILogger
See Also
ILogger
Logger

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
FramebufferToClient(WindowHandle, Vector2, out Vector2)
ClientToScreen(WindowHandle, Vector2, out Vector2)

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
ScreenToClient(WindowHandle, Vector2, out Vector2)
ClientToFramebuffer(WindowHandle, Vector2, out Vector2)

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
Destroy(WindowHandle)

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
Create(GraphicsApiHints)
IsWindowDestroyed(WindowHandle)

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
IsFocused(WindowHandle)
RequestAttention(WindowHandle)

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
ClientToFramebuffer(WindowHandle, Vector2, out Vector2)
ClientToScreen(WindowHandle, Vector2, out Vector2)

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.

See Also
SetBorderStyle(WindowHandle, WindowBorderStyle)

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
CanCaptureCursor
SetCursorCaptureMode(WindowHandle, CursorCaptureMode)

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
CanGetDisplay

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 window, out DisplayHandle? display)
Parameters
Type Name Description
WindowHandle window
DisplayHandle display

The display where the window is fullscreen or null if the window is not fullscreen.

Returns
Type Description
bool

true if the window was fullscreen, false otherwise.

See Also
SetMode(WindowHandle, WindowMode)
SetFullscreenDisplay(WindowHandle, DisplayHandle)
SetFullscreenDisplay(WindowHandle, DisplayHandle, VideoMode)

GetHWND(WindowHandle)

Returns the underlying win32 HWND for the specified window. Modifying things about the window outside of OpenTK functions may cause inconsistent behaviour of OpenTK functions.

Declaration
public nint GetHWND(WindowHandle handle)
Parameters
Type Name Description
WindowHandle handle

The window to get the HWND from.

Returns
Type Description
nint

The HWND of the window.

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
CanSetIcon
SetIcon(WindowHandle, IconHandle)

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.

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
SetPosition(WindowHandle, Vector2i)

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
WindowScaleChangeEventArgs

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
SetTitle(WindowHandle, string)

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
WindowTransparencyMode
SetTransparencyMode(WindowHandle, WindowTransparencyMode, float)
SupportsFramebufferTransparency(WindowHandle)

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
ToolkitOptions
Init(ToolkitOptions)

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
SetAlwaysOnTop(WindowHandle, bool)

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
FocusWindow(WindowHandle)
RequestAttention(WindowHandle)

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
Create(GraphicsApiHints)
Destroy(WindowHandle)

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
FocusWindow(WindowHandle)

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
ClientToScreen(WindowHandle, Vector2, out Vector2)
ClientToFramebuffer(WindowHandle, Vector2, out Vector2)

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
IsAlwaysOnTop(WindowHandle)

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

style is an invalid value.

PlatformNotSupportedException

Backend does not support the value set by style. See SupportedStyles.

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
CanSetCursor

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
CanCaptureCursor
SetCursorCaptureMode(WindowHandle, CursorCaptureMode)

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 window, DisplayHandle? display)
Parameters
Type Name Description
WindowHandle window
DisplayHandle display

The display to make the window fullscreen on.

Remarks

To make an 'exclusive fullscreen' window see SetFullscreenDisplay(WindowHandle, DisplayHandle, VideoMode).

See Also
SetMode(WindowHandle, WindowMode)

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 window, DisplayHandle display, VideoMode videoMode)
Parameters
Type Name Description
WindowHandle window
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
SetFullscreenDisplay(WindowHandle, DisplayHandle)
SetMode(WindowHandle, WindowMode)

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
HitTest
HitType

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
CanSetIcon
GetIcon(WindowHandle)

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

mode is an invalid value.

PlatformNotSupportedException

Backend does not support the value set by mode. See SupportedModes.

See Also
SetFullscreenDisplay(WindowHandle, DisplayHandle)
SetFullscreenDisplay(WindowHandle, DisplayHandle, VideoMode)

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
GetTitle(WindowHandle)

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 transparencyMode is not TransparentWindow.

See Also
WindowTransparencyMode
SupportsFramebufferTransparency(WindowHandle)
GetTransparencyMode(WindowHandle, out float)

SupportsFramebufferTransparency(WindowHandle)

Returns true if TransparentFramebuffer is supported for this window.

Win32Always returns true.
macOSAlways returns true.
Linux/X11Returns 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
SetTransparencyMode(WindowHandle, WindowTransparencyMode, float)
SupportTransparentFramebufferX11
SupportsFramebufferTransparency
WindowTransparencyMode

Uninitialize()

Uninitialize the component. Frees any native resources used by the component.

Declaration
public void Uninitialize()
See Also
Uninit()

Implements

IWindowComponent
IPalComponent
In this article
Back to top Generated by DocFX