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: submit/tizen/20171107.103302~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91c379ddb9eb753d606e3ad0d63bd2a8107047c4;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 0181b998..9d5e030e 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1965,6 +1965,12 @@ fallback_dispatch_init_abs(struct fallback_dispatch *dispatch, evdev_device_init_abs_range_warnings(device); } +int +evdev_scroll_get_wheel_click_angle(struct evdev_device *device) +{ + return device->scroll.wheel_click_angle; +} + static struct evdev_dispatch * fallback_dispatch_create(struct libinput_device *libinput_device) { diff --git a/src/evdev.h b/src/evdev.h index 6e7adc4d..96a2e1cc 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -545,6 +545,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_notify_axis(struct evdev_device *device, uint64_t time, diff --git a/src/libinput.c b/src/libinput.c index ace5378c..dc73c69b 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -4108,6 +4108,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 635a64c4..c7fbf8ce 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -4874,6 +4874,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 1a13caac..8afe8b20 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;