Screen input mode types

Updated: April 19, 2023

Types of input modes for devices and sessions

Synopsis:

#include <screen/screen.h>
enum {
    SCREEN_INPUT_MODE_RAW = 4,
    SCREEN_INPUT_MODE_POINTER = 5,
    SCREEN_INPUT_MODE_BEZEL = 6,
    SCREEN_INPUT_MODE_GESTURE = 7
};

Data:

SCREEN_INPUT_MODE_RAW
Used when you want minimal filtering.
The only filtering is to focus the event, such as checking the (x,y) position to direct the event to the session. Applicable to the following device and session types:
SCREEN_INPUT_MODE_POINTER
The displacement is converted into a pointer event.
In this mode, all the pointer movements are clipped to the input region (defined by SCREEN_PROPERTY_SIZE and SCREEN_PROPERTY_POSITION of the session) of your session. It's not recommended that you use this mode if you have other pointer devices on the same system because the interactions can become quite complicated. Applicable to the following session types:
SCREEN_INPUT_MODE_BEZEL
Used to handle touch events that would otherwise be ignored because they originate off-screen.

Typically, you use this mode for a session that's not associated with a window, but has size and position that's off-screen. For example, a session with SCREEN_INPUT_MODE_BEZEL can be used to handle edge swipes. This mode is applicable only for the SCREEN_EVENT_MTOUCH_TOUCH session type, and not applicable at all to devices.

SCREEN_INPUT_MODE_GESTURE
All input events are converted to SCREEN_EVENT_GESTURE events.
A displacement is generated, and this displacement is converted into a gesture. Applicable to the following device and session types:

Library:

libscreen