libei 1.6.0
A library for Emulated Input
API for receiver clients

The receiver API is available only to clients that are not eis_client_is_sender(). More...

Functions

void eis_device_text_keysym (struct eis_device *device, uint32_t keysym, bool is_press)
 see ei_device_text_keysym
void eis_device_text_utf8 (struct eis_device *device, const char *utf8)
 see ei_device_text_utf8
void eis_device_text_utf8_with_length (struct eis_device *device, const char *text, size_t length)
 see ei_device_text_utf8_with_length
void eis_device_start_emulating (struct eis_device *device, uint32_t sequence)
 see ei_device_start_emulating
void eis_device_stop_emulating (struct eis_device *device)
 see ei_device_stop_emulating
void eis_device_frame (struct eis_device *device, uint64_t time)
 see ei_device_frame
void eis_device_pointer_motion (struct eis_device *device, double x, double y)
 see ei_device_pointer_motion
void eis_device_pointer_motion_absolute (struct eis_device *device, double x, double y)
 see ei_device_pointer_motion_absolute
void eis_device_button_button (struct eis_device *device, uint32_t button, bool is_press)
 see ei_device_button_button
void eis_device_scroll_delta (struct eis_device *device, double x, double y)
 see ei_device_scroll_delta
void eis_device_scroll_discrete (struct eis_device *device, int32_t x, int32_t y)
 see ei_device_scroll_discrete
void eis_device_scroll_stop (struct eis_device *device, bool stop_x, bool stop_y)
 see ei_device_scroll_stop
void eis_device_scroll_cancel (struct eis_device *device, bool cancel_x, bool cancel_y)
 see ei_device_scroll_cancel
void eis_device_keyboard_key (struct eis_device *device, uint32_t keycode, bool is_press)
 see ei_device_keyboard_key
struct eis_toucheis_device_touch_new (struct eis_device *device)
 see ei_device_touch_new
void eis_touch_down (struct eis_touch *touch, double x, double y)
 see ei_touch_down
void eis_touch_motion (struct eis_touch *touch, double x, double y)
 see ei_touch_motion
void eis_touch_up (struct eis_touch *touch)
 see ei_touch_up
void eis_touch_cancel (struct eis_touch *touch)
 see ei_touch_cancel
struct eis_toucheis_touch_ref (struct eis_touch *touch)
 see ei_touch_ref
struct eis_toucheis_touch_unref (struct eis_touch *touch)
 see ei_touch_unref
void eis_touch_set_user_data (struct eis_touch *touch, void *user_data)
 see ei_touch_set_user_data
void * eis_touch_get_user_data (struct eis_touch *touch)
 see ei_touch_get_user_data
struct eis_deviceeis_touch_get_device (struct eis_touch *touch)
 see ei_touch_get_device
void eis_device_swipe_begin (struct eis_device *device, uint32_t nfingers)
 Begin a new swipe gesture on a device with the EIS_DEVICE_CAP_GESTURES capability.
void eis_device_swipe_update (struct eis_device *device, double dx, double dy)
 Update the current swipe gesture's position by the given relative delta.
void eis_device_swipe_end (struct eis_device *device)
 End the current swipe gesture.
void eis_device_swipe_cancel (struct eis_device *device)
 Cancel the current swipe gesture.
void eis_device_pinch_begin (struct eis_device *device, uint32_t nfingers)
 Begin a new pinch gesture on a device with the EIS_DEVICE_CAP_GESTURES capability.
void eis_device_pinch_update (struct eis_device *device, double dx, double dy, double scale, double rotation)
 Update the current pinch gesture's position by the given relative delta, with the given absolute scale and relative rotation.
void eis_device_pinch_end (struct eis_device *device)
 End the current pinch gesture.
void eis_device_pinch_cancel (struct eis_device *device)
 Cancel the current pinch gesture.
void eis_device_hold_begin (struct eis_device *device, uint32_t nfingers)
 Begin a new hold gesture on a device with the EIS_DEVICE_CAP_GESTURES capability.
void eis_device_hold_end (struct eis_device *device)
 End the current hold gesture.
void eis_device_hold_cancel (struct eis_device *device)
 Cancel the current hold gesture.
void eis_device_configure_stylus_capability (struct eis_device *device, enum eis_stylus_capability cap)
 Configure a single stylus capability offered by the server for this device.
void eis_device_stylus_proximity_in (struct eis_device *device)
 Notify the client that the stylus has entered proximity of its digitizer.
void eis_device_stylus_proximity_out (struct eis_device *device)
 Notify the client that the stylus has left proximity of its digitizer.
void eis_device_stylus_erase_start (struct eis_device *device)
 Notify the client that the stylus eraser feature has been activated.
void eis_device_stylus_erase_stop (struct eis_device *device)
 Notify the client that the stylus eraser feature has been deactivated.
void eis_device_stylus_tip_down (struct eis_device *device)
 Notify the client that the stylus has come into logical contact with its digitizer.
void eis_device_stylus_tip_up (struct eis_device *device)
 Notify the client that the stylus has left logical contact with its digitizer.
void eis_device_stylus_motion (struct eis_device *device, double x, double y)
 Notify the client that the stylus has moved to the given absolute position.
void eis_device_stylus_pressure (struct eis_device *device, double pressure)
 Notify the client of the stylus pressure as a normalized value in the range [0.0, 1.0].
void eis_device_stylus_distance (struct eis_device *device, double distance)
 Notify the client of the distance between the stylus and its digitizer as a normalized value in the range [0.0, 1.0].
void eis_device_stylus_tilt (struct eis_device *device, double tilt_x, double tilt_y)
 Notify the client of the stylus tilt angles in degrees, each in the range [-90.0, +90.0].
void eis_device_stylus_rotation (struct eis_device *device, double rotation)
 Notify the client of the stylus barrel rotation angle in degrees, in the range [0.0, 360.0).
void eis_device_stylus_airbrush_flow (struct eis_device *device, double flow)
 Notify the client of the airbrush flow control position as a normalized value in the range [0.0, 1.0].

Detailed Description

The receiver API is available only to clients that are not eis_client_is_sender().

For those clients the EIS implementation creates devices and sends events to the libei client. IOW the EIS implementation acts as the sender. The primary use-case for this is input capturing, e.g. InputLeap.

It is a client bug to call any of these functions for a client created with ei_new_sender().

Function Documentation

◆ eis_device_button_button()

void eis_device_button_button ( struct eis_device * device,
uint32_t button,
bool is_press )

◆ eis_device_configure_stylus_capability()

void eis_device_configure_stylus_capability ( struct eis_device * device,
enum eis_stylus_capability cap )

Configure a single stylus capability offered by the server for this device.

This function may be called multiple times to add more than one capability.

This function must be called while the device is in the NEW state, i.e. before eis_device_add().

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
capA single eis_stylus_capability flag
Since
1.7

◆ eis_device_frame()

void eis_device_frame ( struct eis_device * device,
uint64_t time )

◆ eis_device_hold_begin()

void eis_device_hold_begin ( struct eis_device * device,
uint32_t nfingers )

Begin a new hold gesture on a device with the EIS_DEVICE_CAP_GESTURES capability.

Only one hold gesture may be active at a time.

This method is only available on an eis receiver context.

Parameters
deviceA device with EIS_DEVICE_CAP_GESTURES capability
nfingersThe number of fingers, must be between 1 and 5 (inclusive)
Since
1.7

◆ eis_device_hold_cancel()

void eis_device_hold_cancel ( struct eis_device * device)

Cancel the current hold gesture.

This ends the gesture with the is_cancelled flag set.

This method is only available on an eis receiver context.

If no gesture is currently in progress, this is a noop.

Since
1.7

◆ eis_device_hold_end()

void eis_device_hold_end ( struct eis_device * device)

End the current hold gesture.

Since
1.7

◆ eis_device_keyboard_key()

void eis_device_keyboard_key ( struct eis_device * device,
uint32_t keycode,
bool is_press )

◆ eis_device_pinch_begin()

void eis_device_pinch_begin ( struct eis_device * device,
uint32_t nfingers )

Begin a new pinch gesture on a device with the EIS_DEVICE_CAP_GESTURES capability.

Only one pinch gesture may be active at a time.

This method is only available on an eis receiver context.

Parameters
deviceA device with EIS_DEVICE_CAP_GESTURES capability
nfingersThe number of fingers, must be between 2 and 5 (inclusive)
Since
1.7

◆ eis_device_pinch_cancel()

void eis_device_pinch_cancel ( struct eis_device * device)

Cancel the current pinch gesture.

This ends the gesture with the is_cancelled flag set.

This method is only available on an eis receiver context.

If no gesture is currently in progress, this is a noop.

Since
1.7

◆ eis_device_pinch_end()

void eis_device_pinch_end ( struct eis_device * device)

End the current pinch gesture.

Since
1.7

◆ eis_device_pinch_update()

void eis_device_pinch_update ( struct eis_device * device,
double dx,
double dy,
double scale,
double rotation )

Update the current pinch gesture's position by the given relative delta, with the given absolute scale and relative rotation.

Since
1.7

◆ eis_device_pointer_motion()

void eis_device_pointer_motion ( struct eis_device * device,
double x,
double y )

◆ eis_device_pointer_motion_absolute()

void eis_device_pointer_motion_absolute ( struct eis_device * device,
double x,
double y )

◆ eis_device_scroll_cancel()

void eis_device_scroll_cancel ( struct eis_device * device,
bool cancel_x,
bool cancel_y )

◆ eis_device_scroll_delta()

void eis_device_scroll_delta ( struct eis_device * device,
double x,
double y )

◆ eis_device_scroll_discrete()

void eis_device_scroll_discrete ( struct eis_device * device,
int32_t x,
int32_t y )

◆ eis_device_scroll_stop()

void eis_device_scroll_stop ( struct eis_device * device,
bool stop_x,
bool stop_y )

◆ eis_device_start_emulating()

void eis_device_start_emulating ( struct eis_device * device,
uint32_t sequence )

◆ eis_device_stop_emulating()

void eis_device_stop_emulating ( struct eis_device * device)

◆ eis_device_stylus_airbrush_flow()

void eis_device_stylus_airbrush_flow ( struct eis_device * device,
double flow )

Notify the client of the airbrush flow control position as a normalized value in the range [0.0, 1.0].

The EIS_STYLUS_CAP_AIRBRUSH_FLOW capability must be configured on this device.

see ei_device_stylus_airbrush_flow

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
flowThe airbrush flow, normalized to [0.0, 1.0]
Since
1.7

◆ eis_device_stylus_distance()

void eis_device_stylus_distance ( struct eis_device * device,
double distance )

Notify the client of the distance between the stylus and its digitizer as a normalized value in the range [0.0, 1.0].

The EIS_STYLUS_CAP_DISTANCE capability must be configured on this device.

see ei_device_stylus_distance

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
distanceThe distance, normalized to [0.0, 1.0]
Since
1.7

◆ eis_device_stylus_erase_start()

void eis_device_stylus_erase_start ( struct eis_device * device)

Notify the client that the stylus eraser feature has been activated.

The EIS_STYLUS_CAP_ERASE capability must be configured on this device.

see ei_device_stylus_erase_start

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
Since
1.7

◆ eis_device_stylus_erase_stop()

void eis_device_stylus_erase_stop ( struct eis_device * device)

Notify the client that the stylus eraser feature has been deactivated.

The EIS_STYLUS_CAP_ERASE capability must be configured on this device.

see ei_device_stylus_erase_stop

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
Since
1.7

◆ eis_device_stylus_motion()

void eis_device_stylus_motion ( struct eis_device * device,
double x,
double y )

Notify the client that the stylus has moved to the given absolute position.

see ei_device_stylus_motion

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
xThe absolute x position
yThe absolute y position
Since
1.7

◆ eis_device_stylus_pressure()

void eis_device_stylus_pressure ( struct eis_device * device,
double pressure )

Notify the client of the stylus pressure as a normalized value in the range [0.0, 1.0].

The EIS_STYLUS_CAP_PRESSURE capability must be configured on this device.

see ei_device_stylus_pressure

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
pressureThe pressure, normalized to [0.0, 1.0]
Since
1.7

◆ eis_device_stylus_proximity_in()

void eis_device_stylus_proximity_in ( struct eis_device * device)

Notify the client that the stylus has entered proximity of its digitizer.

see ei_device_stylus_proximity_in

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
Since
1.7

◆ eis_device_stylus_proximity_out()

void eis_device_stylus_proximity_out ( struct eis_device * device)

Notify the client that the stylus has left proximity of its digitizer.

see ei_device_stylus_proximity_out

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
Since
1.7

◆ eis_device_stylus_rotation()

void eis_device_stylus_rotation ( struct eis_device * device,
double rotation )

Notify the client of the stylus barrel rotation angle in degrees, in the range [0.0, 360.0).

The EIS_STYLUS_CAP_ROTATION capability must be configured on this device.

see ei_device_stylus_rotation

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
rotationThe barrel rotation, in degrees
Since
1.7

◆ eis_device_stylus_tilt()

void eis_device_stylus_tilt ( struct eis_device * device,
double tilt_x,
double tilt_y )

Notify the client of the stylus tilt angles in degrees, each in the range [-90.0, +90.0].

The EIS_STYLUS_CAP_TILT capability must be configured on this device.

see ei_device_stylus_tilt

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
tilt_xThe tilt along the X axis, in degrees
tilt_yThe tilt along the Y axis, in degrees
Since
1.7

◆ eis_device_stylus_tip_down()

void eis_device_stylus_tip_down ( struct eis_device * device)

Notify the client that the stylus has come into logical contact with its digitizer.

see ei_device_stylus_tip_down

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
Since
1.7

◆ eis_device_stylus_tip_up()

void eis_device_stylus_tip_up ( struct eis_device * device)

Notify the client that the stylus has left logical contact with its digitizer.

see ei_device_stylus_tip_up

Parameters
deviceA device with EIS_DEVICE_CAP_STYLUS capability
Since
1.7

◆ eis_device_swipe_begin()

void eis_device_swipe_begin ( struct eis_device * device,
uint32_t nfingers )

Begin a new swipe gesture on a device with the EIS_DEVICE_CAP_GESTURES capability.

Only one swipe gesture may be active at a time.

This method is only available on an eis receiver context.

Parameters
deviceA device with EIS_DEVICE_CAP_GESTURES capability
nfingersThe number of fingers, must be between 1 and 5 (inclusive)
Since
1.7

◆ eis_device_swipe_cancel()

void eis_device_swipe_cancel ( struct eis_device * device)

Cancel the current swipe gesture.

This ends the gesture with the is_cancelled flag set.

This method is only available on an eis receiver context.

If no gesture is currently in progress, this is a noop.

Since
1.7

◆ eis_device_swipe_end()

void eis_device_swipe_end ( struct eis_device * device)

End the current swipe gesture.

Since
1.7

◆ eis_device_swipe_update()

void eis_device_swipe_update ( struct eis_device * device,
double dx,
double dy )

Update the current swipe gesture's position by the given relative delta.

Since
1.7

◆ eis_device_text_keysym()

void eis_device_text_keysym ( struct eis_device * device,
uint32_t keysym,
bool is_press )

see ei_device_text_keysym

Since
1.6

◆ eis_device_text_utf8()

void eis_device_text_utf8 ( struct eis_device * device,
const char * utf8 )

see ei_device_text_utf8

Since
1.6

◆ eis_device_text_utf8_with_length()

void eis_device_text_utf8_with_length ( struct eis_device * device,
const char * text,
size_t length )

◆ eis_device_touch_new()

struct eis_touch * eis_device_touch_new ( struct eis_device * device)

◆ eis_touch_cancel()

void eis_touch_cancel ( struct eis_touch * touch)

◆ eis_touch_down()

void eis_touch_down ( struct eis_touch * touch,
double x,
double y )

◆ eis_touch_get_device()

struct eis_device * eis_touch_get_device ( struct eis_touch * touch)

◆ eis_touch_get_user_data()

void * eis_touch_get_user_data ( struct eis_touch * touch)

◆ eis_touch_motion()

void eis_touch_motion ( struct eis_touch * touch,
double x,
double y )

◆ eis_touch_ref()

struct eis_touch * eis_touch_ref ( struct eis_touch * touch)

◆ eis_touch_set_user_data()

void eis_touch_set_user_data ( struct eis_touch * touch,
void * user_data )

◆ eis_touch_unref()

struct eis_touch * eis_touch_unref ( struct eis_touch * touch)

◆ eis_touch_up()

void eis_touch_up ( struct eis_touch * touch)