libei: API for sender clients

libei 1.4.0 A library for Emulated Input

Functions
API for sender clients
🍦 EIS - The server API

This API is available only on clients that are eis_client_is_sender(). More...

## Functions
uint32_t | eis_event_emulating_get_sequence (struct eis_event *event)
| For an event of type EIS_EVENT_DEVICE_START_EMULATING, return the sequence number set by the ei client implementation.
double | eis_event_pointer_get_dx (struct eis_event *event)
| For an event of type EIS_EVENT_POINTER_MOTION return the relative x movement in logical pixels or mm, depending on the device type.
double | eis_event_pointer_get_dy (struct eis_event *event)
| For an event of type EIS_EVENT_POINTER_MOTION return the relative y movement in logical pixels or mm, depending on the device type.
double | eis_event_pointer_get_absolute_x (struct eis_event *event)
| For an event of type EIS_EVENT_POINTER_MOTION_ABSOLUTE return the x position in logical pixels or mm, depending on the device type.
double | eis_event_pointer_get_absolute_y (struct eis_event *event)
| For an event of type EIS_EVENT_POINTER_MOTION_ABSOLUTE return the y position in logical pixels or mm, depending on the device type.
uint32_t | eis_event_button_get_button (struct eis_event *event)
| For an event of type EIS_EVENT_BUTTON_BUTTON return the button code as defined in linux/input-event-codes.h.
bool | eis_event_button_get_is_press (struct eis_event *event)
| For an event of type EIS_EVENT_BUTTON_BUTTON return true if the event is a button press, false for a release.
double | eis_event_scroll_get_dx (struct eis_event *event)
| For an event of type EIS_EVENT_SCROLL_DELTA return the x scroll distance in logical pixels or mm, depending on the device type.
double | eis_event_scroll_get_dy (struct eis_event *event)
| For an event of type EIS_EVENT_SCROLL_DELTA return the y scroll distance in logical pixels or mm, depending on the device type.
bool | eis_event_scroll_get_stop_x (struct eis_event *event)
| For an event of type EIS_EVENT_SCROLL_STOP return whether the x axis has stopped scrolling.
bool | eis_event_scroll_get_stop_y (struct eis_event *event)
| For an event of type EIS_EVENT_SCROLL_STOP return whether the y axis has stopped scrolling.
int32_t | eis_event_scroll_get_discrete_dx (struct eis_event *event)
| For an event of type EIS_EVENT_SCROLL_DISCRETE return the x scroll distance in fractions or multiples of 120.
int32_t | eis_event_scroll_get_discrete_dy (struct eis_event *event)
| For an event of type EIS_EVENT_SCROLL_DISCRETE return the y scroll distance in fractions or multiples of 120.
uint32_t | eis_event_keyboard_get_key (struct eis_event *event)
| For an event of type EIS_EVENT_KEYBOARD_KEY return the key code (as defined in include/linux/input-event-codes.h).
bool | eis_event_keyboard_get_key_is_press (struct eis_event *event)
| For an event of type EIS_EVENT_KEYBOARD_KEY return true if the event is a key down, false for a release.
uint32_t | eis_event_touch_get_id (struct eis_event *event)
| For an event of type EIS_EVENT_TOUCH_DOWN, EIS_EVENT_TOUCH_MOTION, or EIS_EVENT_TOUCH_UP, return the tracking ID of the touch.
double | eis_event_touch_get_x (struct eis_event *event)
| For an event of type EIS_EVENT_TOUCH_DOWN, or EIS_EVENT_TOUCH_MOTION, return the x coordinate of the touch in logical pixels or mm, depending on the device type.
double | eis_event_touch_get_y (struct eis_event *event)
| For an event of type EIS_EVENT_TOUCH_DOWN, or EIS_EVENT_TOUCH_MOTION, return the y coordinate of the touch in logical pixels or mm, depending on the device type.
bool | eis_event_touch_get_is_cancel (struct eis_event *event)
| For an event of type EIS_EVENT_TOUCH_UP return true if the touch was cancelled instead of logically released.

## Detailed Description

This API is available only on clients that are eis_client_is_sender().

For those clients the EIS implemententation creates devices and but it is the libei client that sends events to EIS implementation. IOW the EIS implementation acts as the receiver. The primary use-case is input emulation from a client, akin to xdotool.

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

## Function Documentation

## ◆ eis_event_button_get_button()

uint32_t eis_event_button_get_button | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_BUTTON_BUTTON return the button code as defined in linux/input-event-codes.h.

## ◆ eis_event_button_get_is_press()

bool eis_event_button_get_is_press | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_BUTTON_BUTTON return true if the event is a button press, false for a release.

## ◆ eis_event_emulating_get_sequence()

uint32_t eis_event_emulating_get_sequence | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_DEVICE_START_EMULATING, return the sequence number set by the ei client implementation.

See ei_device_start_emulating() for details.

## ◆ eis_event_keyboard_get_key()

uint32_t eis_event_keyboard_get_key | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_KEYBOARD_KEY return the key code (as defined in include/linux/input-event-codes.h).

## ◆ eis_event_keyboard_get_key_is_press()

bool eis_event_keyboard_get_key_is_press | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_KEYBOARD_KEY return true if the event is a key down, false for a release.

## ◆ eis_event_pointer_get_absolute_x()

double eis_event_pointer_get_absolute_x | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_POINTER_MOTION_ABSOLUTE return the x position in logical pixels or mm, depending on the device type.

## ◆ eis_event_pointer_get_absolute_y()

double eis_event_pointer_get_absolute_y | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_POINTER_MOTION_ABSOLUTE return the y position in logical pixels or mm, depending on the device type.

## ◆ eis_event_pointer_get_dx()

double eis_event_pointer_get_dx | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_POINTER_MOTION return the relative x movement in logical pixels or mm, depending on the device type.

## ◆ eis_event_pointer_get_dy()

double eis_event_pointer_get_dy | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_POINTER_MOTION return the relative y movement in logical pixels or mm, depending on the device type.

## ◆ eis_event_scroll_get_discrete_dx()

int32_t eis_event_scroll_get_discrete_dx | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_SCROLL_DISCRETE return the x scroll distance in fractions or multiples of 120.

## ◆ eis_event_scroll_get_discrete_dy()

int32_t eis_event_scroll_get_discrete_dy | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_SCROLL_DISCRETE return the y scroll distance in fractions or multiples of 120.

## ◆ eis_event_scroll_get_dx()

double eis_event_scroll_get_dx | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_SCROLL_DELTA return the x scroll distance in logical pixels or mm, depending on the device type.

## ◆ eis_event_scroll_get_dy()

double eis_event_scroll_get_dy | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_SCROLL_DELTA return the y scroll distance in logical pixels or mm, depending on the device type.

## ◆ eis_event_scroll_get_stop_x()

bool eis_event_scroll_get_stop_x | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_SCROLL_STOP return whether the x axis has stopped scrolling.

For an event of type EIS_EVENT_SCROLL_CANCEL return whether the x axis has cancelled scrolling.

## ◆ eis_event_scroll_get_stop_y()

bool eis_event_scroll_get_stop_y | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_SCROLL_STOP return whether the y axis has stopped scrolling.

For an event of type EIS_EVENT_SCROLL_CANCEL return whether the y axis has cancelled scrolling.

## ◆ eis_event_touch_get_id()

uint32_t eis_event_touch_get_id | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_TOUCH_DOWN, EIS_EVENT_TOUCH_MOTION, or EIS_EVENT_TOUCH_UP, return the tracking ID of the touch.

The tracking ID is a unique identifier for a touch and is valid from touch down through to touch up but may be re-used in the future. The tracking ID is randomly assigned to a touch, a client must not expect any specific value.

## ◆ eis_event_touch_get_is_cancel()

bool eis_event_touch_get_is_cancel | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_TOUCH_UP return true if the touch was cancelled instead of logically released.

Support for touch cancellation requires the EIS implementation and client to support version 2 or later of the ei_touchscreen protocol interface.

## ◆ eis_event_touch_get_x()

double eis_event_touch_get_x | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_TOUCH_DOWN, or EIS_EVENT_TOUCH_MOTION, return the x coordinate of the touch in logical pixels or mm, depending on the device type.

## ◆ eis_event_touch_get_y()

double eis_event_touch_get_y | ( | struct eis_event * | event | ) |

For an event of type EIS_EVENT_TOUCH_DOWN, or EIS_EVENT_TOUCH_MOTION, return the y coordinate of the touch in logical pixels or mm, depending on the device type.