From: Sungjin Park Date: Tue, 25 Apr 2023 11:36:53 +0000 (+0900) Subject: e_input: added internal APIs to set/get pointer relative motion handler X-Git-Tag: accepted/tizen/7.0/unified/20230502.051241~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F10%2F292010%2F1;p=platform%2Fupstream%2Fenlightenment.git e_input: added internal APIs to set/get pointer relative motion handler Change-Id: I5e95285611c1f52b9531b1388dc96e3fd325bc40 Signed-off-by: Sungjin Park --- diff --git a/src/bin/e_input.c b/src/bin/e_input.c index 4da5d38e8e..f55d814bb8 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; -} \ No newline at end of file +} + +EINTERN Eina_Bool +e_input_relative_motion_handler_set(e_input_relative_motion_cb handler) +{ + if (!e_input) + return EINA_FALSE; + + e_input->relative_motion_handler = handler; + return EINA_TRUE; +} + +EINTERN e_input_relative_motion_cb +e_input_relative_motion_handler_get(void) +{ + if (e_input) + return e_input->relative_motion_handler; + + return NULL; +} diff --git a/src/bin/e_input.h b/src/bin/e_input.h index 16ae632d15..77238cef6b 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_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_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_relative_motion_cb handler); +EINTERN e_input_relative_motion_cb e_input_relative_motion_handler_get(void); #endif #endif