Add "inject touch" control message

Add a control message type in the protocol to forward touch events to
the device.
This commit is contained in:
Romain Vimont
2019-09-15 16:16:17 +02:00
parent d90549d1e6
commit 77f876e29c
6 changed files with 140 additions and 7 deletions

View File

@@ -19,6 +19,7 @@ enum control_msg_type {
CONTROL_MSG_TYPE_INJECT_KEYCODE,
CONTROL_MSG_TYPE_INJECT_TEXT,
CONTROL_MSG_TYPE_INJECT_MOUSE_EVENT,
CONTROL_MSG_TYPE_INJECT_TOUCH_EVENT,
CONTROL_MSG_TYPE_INJECT_SCROLL_EVENT,
CONTROL_MSG_TYPE_BACK_OR_SCREEN_ON,
CONTROL_MSG_TYPE_EXPAND_NOTIFICATION_PANEL,
@@ -50,6 +51,12 @@ struct control_msg {
enum android_motionevent_buttons buttons;
struct position position;
} inject_mouse_event;
struct {
enum android_motionevent_action action;
uint64_t pointer_id;
struct position position;
float pressure;
} inject_touch_event;
struct {
struct position position;
int32_t hscroll;