Class Toolkit
Provides static access to all OpenTK platform abstraction interfaces. This is the main way to access the OpenTK PAL2 api.
Inherited Members
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public static class Toolkit
Properties
Clipboard
Interface for getting and setting clipboard data.
Declaration
public static IClipboardComponent Clipboard { get; }
Property Value
Type | Description |
---|---|
IClipboardComponent |
Cursor
Interface for creating, interacting with, and deleting mouse cursor images.
Declaration
public static ICursorComponent Cursor { get; }
Property Value
Type | Description |
---|---|
ICursorComponent |
Dialog
Interface for opening system dialogs such as file open dialogs.
Declaration
public static IDialogComponent Dialog { get; }
Property Value
Type | Description |
---|---|
IDialogComponent |
Display
Interface for querying information about displays attached to the system.
Declaration
public static IDisplayComponent Display { get; }
Property Value
Type | Description |
---|---|
IDisplayComponent |
Icon
Interface for creating, interacting with, and deleting window icon images.
Declaration
public static IIconComponent Icon { get; }
Property Value
Type | Description |
---|---|
IIconComponent |
Joystick
Interface for getting joystick input.
Declaration
public static IJoystickComponent Joystick { get; }
Property Value
Type | Description |
---|---|
IJoystickComponent |
Keyboard
Declaration
public static IKeyboardComponent Keyboard { get; }
Property Value
Type | Description |
---|---|
IKeyboardComponent |
Mouse
Interface for getting and setting the mouse position, and getting mouse button information.
Declaration
public static IMouseComponent Mouse { get; }
Property Value
Type | Description |
---|---|
IMouseComponent |
OpenGL
Interface for creating, interacting with, and deleting OpenGL contexts.
Declaration
public static IOpenGLComponent OpenGL { get; }
Property Value
Type | Description |
---|---|
IOpenGLComponent |
Shell
Interface for shell functions such as battery information, preferred theme, etc.
Declaration
public static IShellComponent Shell { get; }
Property Value
Type | Description |
---|---|
IShellComponent |
Surface
Interface for creating, interacting with, and deleting surfaces.
Declaration
public static ISurfaceComponent Surface { get; }
Property Value
Type | Description |
---|---|
ISurfaceComponent |
Vulkan
Interface for opening system dialogs such as file open dialogs.
Declaration
public static IVulkanComponent Vulkan { get; }
Property Value
Type | Description |
---|---|
IVulkanComponent |
Window
Interface for creating, interacting with, and deleting windows.
Declaration
public static IWindowComponent Window { get; }
Property Value
Type | Description |
---|---|
IWindowComponent |
Methods
Init(ToolkitOptions)
Initialize OpenTK with the given settings. This function must be called before trying to use the OpenTK API.
Declaration
public static void Init(ToolkitOptions options)
Parameters
Type | Name | Description |
---|---|---|
ToolkitOptions | options | The options to initialize with. |
See Also
Uninit()
Uninitialize OpenTK. This frees any native resources held. All allocated windows, opengl contexts, etc should be closed before calling this function. This function does not need to be called when exiting the application. This function is only useful if the application will keep running after OpenTK has been uninitialized.
Declaration
public static void Uninit()
Remarks
There are some irreversible settings on some platforms that cannot be undone once OpenTK has been initialized. What follows is a list of things that cannot be undone:
- DPI awareness in windows is a per process setting that can only be set once.