From: Sungjin Park Date: Tue, 25 Apr 2023 04:34:17 +0000 (+0900) Subject: e_input: added internal APIs to set/get relative_motion_hander X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d64d4c20590956a8ee7e8416f7fd3718ac4048dd;p=platform%2Fupstream%2Fenlightenment.git e_input: added internal APIs to set/get relative_motion_hander Signed-off-by: Sungjin Park --- diff --git a/src/bin/e_input.c b/src/bin/e_input.c index 4da5d38e8e..958e062b5d 100644 --- a/src/bin/e_input.c +++ b/src/bin/e_input.c @@ -259,4 +259,23 @@ e_input_touch_max_count_set(unsigned int max_count) { if (e_input) e_input->touch_max_count = max_count; +} + +EINTERN Eina_Bool +e_input_relative_motion_handler_set(e_input_pointer_relative_motion_cb handler) +{ + if (!e_input) + return EINA_FALSE; + + e_input->relative_motion_handler = handler; + return EINA_TRUE; +} + +EINTERN e_input_pointer_relative_motion_cb +e_input_relative_motion_handler_get(void) +{ + if (e_input) + return e_input->relative_motion_handler; + + return NULL; } \ No newline at end of file diff --git a/src/bin/e_input.h b/src/bin/e_input.h index 16ae632d15..b5f7ea8204 100644 --- a/src/bin/e_input.h +++ b/src/bin/e_input.h @@ -36,6 +36,8 @@ typedef struct _E_Input_Evdev E_Input_Evdev; typedef struct _E_Input_Seat E_Input_Seat; typedef struct _E_Input_Coord E_Input_Coord; +typedef void (*e_input_pointer_relative_motion_cb)(double dx[2], double dy[2], uint64_t time_us); + struct _E_Input { Ecore_Window window; @@ -47,6 +49,8 @@ struct _E_Input Eina_Bool use_thread : 1; unsigned int touch_max_count; unsigned int touch_device_count; + + e_input_pointer_relative_motion_cb relative_motion_handler; }; struct _E_Input_Device @@ -121,5 +125,8 @@ EINTERN Eina_Bool e_input_device_output_name_set(E_Input_Device *dev, const char EINTERN const char *e_input_device_output_name_get(E_Input_Device *dev, const char *input); EINTERN Eina_Bool e_input_device_seat_name_set(E_Input_Device *dev, const char *input, const char *seat_name); + +EINTERN Eina_Bool e_input_relative_motion_handler_set(e_input_pointer_relative_motion_cb handler); +EINTERN e_input_pointer_relative_motion_cb e_input_relative_motion_handler_get(void); #endif #endif