Event types

The event type is used to determine what caused the event to be dispatched. You can query the event type by calling the screen_get_event_property_iv(), specifying the SCREEN_PROPERTY_TYPE constant.

int type;

screen_event_t screen_ev;

screen_get_event(screen_ctx, screen_ev, -1);
screen_get_event_property_iv(screen_ev, SCREEN_PROPERTY_TYPE, &type);

The following event types are supported by the Screen API.

Event Description
SCREEN_EVENT_NONE A blocking event indicating that no events are currently in the queue.
SCREEN_EVENT_CREATE Dispatched when a child window is created.
SCREEN_EVENT_PROPERTY Dispatched when a property is set.
SCREEN_EVENT_CLOSE Dispatched when a child window is destroyed.
SCREEN_EVENT_INPUT Dispatched when an unknown input event occurs.
SCREEN_EVENT_JOG Dispatched when a jog dial input event occurs.
SCREEN_EVENT_POINTER Dispatched when a pointer input event occurs.
SCREEN_EVENT_KEYBOARD Dispatched when a keyboard input event occurs.
SCREEN_EVENT_USER Dispatched when a user event is detected.
SCREEN_EVENT_POST Dispatched when a child window has posted its first frame.
SCREEN_EVENT_DISPLAY Dispatched when an external display is detected.
SCREEN_EVENT_IDLE Dispatched when the window enters idle state.
SCREEN_EVENT_UNREALIZE Dispatched when a handle to a window is lost.
SCREEN_EVENT_GAMEPAD Dispatched when a gamepad input event occurs.
SCREEN_EVENT_JOYSTICK Dispatched when a joystick input event occurs.
SCREEN_EVENT_DEVICE Dispatched when an input device is detected.
SCREEN_EVENT_INPUT_CONTROL Dispatched when changes to the input state require that a notification be sent to the application for the event processing to be performed correctly.
SCREEN_EVENT_MTOUCH_PRETOUCH Dispatched when a multi-touch event is detected before it can be properly resolved. This event is used to help reduce latency when touch processing requires several samples before a touch can be even formulated. Any handling of delayed touch events should keep in mind that the event is very likely to be aborted by an input control event.
SCREEN_EVENT_MTOUCH_TOUCH Dispatched when a multi-touch event is detected.
SCREEN_EVENT_MTOUCH_MOVE Dispatched when a multi-touch move event is detected, for example when the user moves their fingers to make an input gesture.
SCREEN_EVENT_MTOUCH_RELEASE Dispatched when a multi-touch release event occurs, or when the user completes the multi-touch gesture.

Last modified: 2015-03-31

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus