Screen event types

Types of events

Synopsis:

#include <screen/screen.h>
enum {
    SCREEN_EVENT_NONE = 0,
    SCREEN_EVENT_CREATE = 1,
    SCREEN_EVENT_PROPERTY = 2,
    SCREEN_EVENT_CLOSE = 3,
    SCREEN_EVENT_INPUT = 4,
    SCREEN_EVENT_JOG = 5,
    SCREEN_EVENT_POINTER = 6,
    SCREEN_EVENT_KEYBOARD = 7,
    SCREEN_EVENT_USER = 8,
    SCREEN_EVENT_POST = 9,
    SCREEN_EVENT_DISPLAY = 11,
    SCREEN_EVENT_IDLE = 12,
    SCREEN_EVENT_UNREALIZE = 13,
    SCREEN_EVENT_GAMEPAD = 14,
    SCREEN_EVENT_JOYSTICK = 15,
    SCREEN_EVENT_DEVICE = 16,
    SCREEN_EVENT_INPUT_CONTROL = 17,
    SCREEN_EVENT_GESTURE = 18,
    SCREEN_EVENT_MANAGER = 19,
    SCREEN_EVENT_MTOUCH_PRETOUCH = 99,
    SCREEN_EVENT_MTOUCH_TOUCH = 100,
    SCREEN_EVENT_MTOUCH_MOVE = 101,
    SCREEN_EVENT_MTOUCH_RELEASE = 102
};

Data:

SCREEN_EVENT_NONE
A blocking event indicating that there are currently no events in the queue.
SCREEN_EVENT_CREATE
Dispatched when:
  • a window or session is created
  • permissions to an object are gained
  • a window joins a group, or window group
Screen may locally allocate resources to track the object that's associated with this event when you retrieve an event of this type by calling screen_get_event(). When the object that's associated with this event is one of the following, Screen allocates local resources:
  • group
  • pixmap
  • session
  • stream
  • window
SCREEN_EVENT_PROPERTY
Dispatched when a property is set.
SCREEN_EVENT_CLOSE
Dispatched when:
  • a window or session is destroyed
  • permissions to an object are lost
  • a window leaves a group, or window group
Screen frees local resources, if any, that it used track the object that's associated with this event when you retrieve an event of this type by calling screen_get_event(). When the object that's associated with this event is one of the following, Screen frees the local resources:
  • group
  • pixmap
  • session
  • stream
  • window

However, if at one time in your context, you acquire a handle to the object that's associated with this event (e.g., by calling screen_get_*_property_pv()), Screen doesn't free the local resources. You must call the appropriate screen_destroy_*() function to free these resources when you no longer need to use the object in your local context.

SCREEN_EVENT_INPUT
Dispatched when an unknown input event occurs.
SCREEN_EVENT_JOG
Used to describe various Screen API objects:
  • device: represents a device with a jog input, such as a jog dial or jog wheel
  • event: dispatched when a jog input event occurs, such as from a jog dial or jog wheel
  • session: a session that receives input from a device with jog input, such as a jog dial or jog wheel
SCREEN_EVENT_POINTER
Used to describe various Screen API objects:
  • device: represents a pointer device
  • event: dispatched when a pointer input event occurs
  • session: a session that receives input from a pointer device
SCREEN_EVENT_KEYBOARD
Used to describe various Screen API objects:
  • device: represents a keyboard
  • event: dispatched when a keyboard input event occurs
  • session: a session that receives input from a keyboard
SCREEN_EVENT_USER
Dispatched when a user event is detected.
SCREEN_EVENT_POST
Dispatched when you call screen_post_window() or screen_post_stream() for a window or stream respectively for the first time.
SCREEN_EVENT_DISPLAY
Dispatched when an external display is detected.
SCREEN_EVENT_IDLE
Dispatched when the window enters an idle state.
SCREEN_EVENT_UNREALIZE
Dispatched when a handle to a window is lost.
SCREEN_EVENT_GAMEPAD
Used to describe various Screen API objects:
  • device: represents a gamepad
  • event: dispatched when a gamepad input event occurs
  • session: a session that receives input from a gamepad
SCREEN_EVENT_JOYSTICK
Used to describe various Screen API objects:
  • device: represents a joystick
  • event: dispatched when a joystick input event occurs
  • session: a session that receives input from a joystick
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.

This includes gestures that may start without a touch or button press; or end without a release.

SCREEN_EVENT_GESTURE
Used to describe a device or event API object:
  • device: represents a gesture-based input event occurs or when gesture recognition is enabled on a touch or pointer device
  • event: dispatched when a gesture-based input event occurs or when gesture recognition is enabled on a touch or pointer device
  • session: represents a valid input session type; used for a session object's SCREEN_PROPERTY_TYPE
SCREEN_EVENT_MANAGER
Used for communication directly between applications and the specified manager.

This event is dispatched through use of screen_inject_event(). The screen_display parameter should be set to 0, and the SCREEN_PROPERTY_WINDOW of the event must be set to either the source window (in the case of a message to the manager,) or the destination window (in the case of a message from the manager). This event is never dispatched directly by Screen. If the manager isn't available, the error ENOSYS is returned.

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 event can be 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
Used to describe various Screen API objects:
  • device: represents a multi-touch device
  • event: dispatched when a multi-touch event is detected
  • session: a session that receives input from a multi-touch device
SCREEN_EVENT_MTOUCH_MOVE
Dispatched when a multi-touch move event is detected.

For example, when the user moves his or her 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.

Library:

libscreen