From: JengHyun Kang Date: Thu, 24 Mar 2016 11:50:02 +0000 (+0900) Subject: Add a new API to return wheel click angle value X-Git-Tag: accepted/tizen/unified/20240105.013022~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc4eb0ef1f7ed98bf155b12170806f5ab70a79e3;p=platform%2Fupstream%2Flibinput.git Add a new API to return wheel click angle value Change-Id: Ic45f60fd95ab7835fa92064c9badb46fe9164695 --- diff --git a/src/evdev.c b/src/evdev.c index ba7ba1f3..6eb2ed6a 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1093,6 +1093,12 @@ evdev_print_event(struct evdev_device *device, } } +int +evdev_scroll_get_wheel_click_angle(struct evdev_device *device) +{ + return device->scroll.wheel_click_angle.x; +} + static inline void evdev_process_event(struct evdev_device *device, struct input_event *e) { diff --git a/src/evdev.h b/src/evdev.h index e89b4d41..f926cbc0 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -585,6 +585,9 @@ evdev_pointer_notify_physical_button(struct evdev_device *device, void evdev_init_natural_scroll(struct evdev_device *device); +int +evdev_scroll_get_wheel_click_angle(struct evdev_device *device); + void evdev_init_button_scroll(struct evdev_device *device, void (*change_scroll_method)(struct evdev_device *)); diff --git a/src/libinput.c b/src/libinput.c index 72321087..2e7d7f9e 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -4544,6 +4544,12 @@ libinput_device_config_scroll_get_default_natural_scroll_enabled(struct libinput return device->config.natural_scroll->get_default_enabled(device); } +LIBINPUT_EXPORT int +libinput_device_config_scroll_get_wheel_click_angle(struct libinput_device *device) +{ + return evdev_scroll_get_wheel_click_angle((struct evdev_device *) device); +} + LIBINPUT_EXPORT int libinput_device_config_left_handed_is_available(struct libinput_device *device) { diff --git a/src/libinput.h b/src/libinput.h index b3695c2f..b3b9c315 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -5769,6 +5769,9 @@ libinput_device_config_scroll_get_natural_scroll_enabled(struct libinput_device int libinput_device_config_scroll_get_default_natural_scroll_enabled(struct libinput_device *device); +int +libinput_device_config_scroll_get_wheel_click_angle(struct libinput_device *device); + /** * @ingroup config * diff --git a/src/libinput.sym b/src/libinput.sym index 294392f8..3fdf821f 100644 --- a/src/libinput.sym +++ b/src/libinput.sym @@ -30,6 +30,7 @@ global: libinput_device_config_scroll_set_button; libinput_device_config_scroll_set_method; libinput_device_config_scroll_set_natural_scroll_enabled; + libinput_device_config_scroll_get_wheel_click_angle; libinput_device_config_send_events_get_default_mode; libinput_device_config_send_events_get_mode; libinput_device_config_send_events_get_modes;