Show / Hide Table of Contents

Delegate WindowEventHandler

Event handler delegate for processing window events.

Namespace: OpenTK.Core.Platform
Assembly: OpenTK.Core.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.Core.Platform.Window.DefaultEventHandler(handle, type, args);
            break;
    }
}

// Usage:
OpenTK.Core.Platform.Window.ProcessEvents(handle, MyWindowEventHandler);
In this article
Back to top Generated by DocFX