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_EFFECT_COMPLETE Dispatched to the window manager indicating that a rotation effect has completed.
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_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.