Class EventQueue
Event queue for interacting with platform events.
Implements
Inherited Members
Namespace: OpenTK.Platform
Assembly: OpenTK.Platform.dll
Syntax
public class EventQueue : IDisposable
Properties
FilteredHandle
Indicates which handle the queue is filtered for.
Declaration
public PalHandle? FilteredHandle { get; }
Property Value
Type | Description |
---|---|
PalHandle |
InQueue
The number of events currently in queue.
Declaration
public int InQueue { get; }
Property Value
Type | Description |
---|---|
int |
Methods
DispatchEvents()
Dispatch all the events from the queue.
Declaration
public void DispatchEvents()
DispatchOne()
Dispatch one event from the queue, if available.
Declaration
public void DispatchOne()
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
Raise(PalHandle?, PlatformEventType, EventArgs)
Raise an event.
Declaration
public static void Raise(PalHandle? handle, PlatformEventType type, EventArgs args)
Parameters
Type | Name | Description |
---|---|---|
PalHandle | handle | Handle generating the event. |
PlatformEventType | type | Type of the event. |
EventArgs | args | Arguments associated with the event. |
Subscribe(PalHandle?)
Subscribe to an instance of the event queue.
Declaration
public static EventQueue Subscribe(PalHandle? handle = null)
Parameters
Type | Name | Description |
---|---|---|
PalHandle | handle | Filter received events to the given handle. |
Returns
Type | Description |
---|---|
EventQueue | The queue instance. |
Events
EventDispatched
Invoked when a queued event is dispatched.
Declaration
public event PlatformEventHandler? EventDispatched
Event Type
Type | Description |
---|---|
PlatformEventHandler |
EventRaised
Invoke when an event is raised.
Declaration
public static event PlatformEventHandler? EventRaised
Event Type
Type | Description |
---|---|
PlatformEventHandler |
Remarks
This event handler is potentially called across threads. If thread safety is required, or you would like to control when events are dispatched, use Subscribe(PalHandle?) instead.