From 2684295b939ffc566dbf82c89ca8c8586499eafd Mon Sep 17 00:00:00 2001 From: JengHyun Kang Date: Thu, 24 Mar 2016 20:47:42 +0900 Subject: [PATCH] Add a new API for get wheel click angle value Change-Id: I4c828fc97b7b8806a102fbd4f0e4928036fa6f6c --- src/lib/ecore_drm/Ecore_Drm.h | 1 + src/lib/ecore_drm/ecore_drm_evdev.c | 7 +++++++ src/lib/ecore_wayland/ecore_wl_input.c | 6 ++++++ 3 files changed, 14 insertions(+) mode change 100755 => 100644 src/lib/ecore_drm/Ecore_Drm.h diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h old mode 100755 new mode 100644 index a8dc02c..690bc92 --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h @@ -1034,6 +1034,7 @@ EAPI const char *ecore_drm_evdev_name_get(Ecore_Drm_Evdev *evdev); EAPI const char *ecore_drm_evdev_sysname_get(Ecore_Drm_Evdev *evdev); EAPI Eina_Bool ecore_drm_evdev_key_remap_enable(Ecore_Drm_Evdev *edev, Eina_Bool enable); EAPI Eina_Bool ecore_drm_evdev_key_remap_set(Ecore_Drm_Evdev *edev, int *from_keys, int *to_keys, int num); +EAPI int ecore_drm_evdev_wheel_click_angle_get(Ecore_Drm_Evdev *dev); typedef void (*Ecore_Drm_VBlank_Cb)(void *data); EAPI Eina_Bool ecore_drm_output_wait_vblank(Ecore_Drm_Output *output, int interval, Ecore_Drm_VBlank_Cb func, void *data); diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c b/src/lib/ecore_drm/ecore_drm_evdev.c index aed7c5e..563ce79 100644 --- a/src/lib/ecore_drm/ecore_drm_evdev.c +++ b/src/lib/ecore_drm/ecore_drm_evdev.c @@ -1182,3 +1182,10 @@ ecore_drm_evdev_key_remap_set(Ecore_Drm_Evdev *edev, int *from_keys, int *to_key return EINA_TRUE; } + +EAPI int +ecore_drm_evdev_wheel_click_angle_get(Ecore_Drm_Evdev *dev) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(dev, -1); + return libinput_device_config_scroll_get_wheel_click_angle(dev->device); +} diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index b72e52f..c88cc22 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -2036,6 +2036,12 @@ _ecore_wl_input_device_cb_axis(void *data EINA_UNUSED, struct tizen_input_device case TIZEN_INPUT_DEVICE_AXIS_TYPE_ANGLE: input->last_angle = dvalue; break; + case TIZEN_INPUT_DEVICE_AXIS_TYPE_DETENT: + /* Do something after get detent event. + * value 1 is clockwise, + * value -1 is counterclockwise, + */ + break; default: WRN("Invalid type(%d) is ignored.\n", axis_type); break; -- 2.7.4