Delegate WindowEventHandler
Event handler delegate for processing window events.
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public delegate void WindowEventHandler(WindowHandle handle, PlatformEventType type, WindowEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
WindowHandle | handle | The window handle receiving the event. |
PlatformEventType | type | The type of the event. |
WindowEventArgs | args | Arguments associated with the event. |
Examples
void MyWindowEventHandler(WindowHandle handle, WindowEventType type, WindowEventArgs args)
{
switch(type)
{
case WindowEventType.Move:
// Implementation of which is left as an exercise to the reader:
MyMoveEventHandler(handle, (WindowMoveEventArgs)args);
break;
default:
OpenTK.Platform.Window.DefaultEventHandler(handle, type, args);
break;
}
}
// Usage:
OpenTK.Platform.Window.ProcessEvents(handle, MyWindowEventHandler);