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/20160330.042424^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fff61092fc51eacf653189d19f76b3f2c8ec8f92;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 1ba81ad8..11fdb737 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -1205,6 +1205,12 @@ evdev_init_natural_scroll(struct evdev_device *device) device->base.config.natural_scroll = &device->scroll.config_natural; } +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 *device) { diff --git a/src/evdev.h b/src/evdev.h index a1feabde..85cbaa94 100644 --- a/src/evdev.h +++ b/src/evdev.h @@ -323,6 +323,9 @@ evdev_pointer_notify_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_post_scroll(struct evdev_device *device, uint64_t time, diff --git a/src/libinput.c b/src/libinput.c index f9ae1ed5..9ebc6899 100644 --- a/src/libinput.c +++ b/src/libinput.c @@ -2012,6 +2012,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 08deb47a..77921864 100644 --- a/src/libinput.h +++ b/src/libinput.h @@ -2460,6 +2460,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 e96c9ec4..d17fb14a 100644 --- a/src/libinput.sym +++ b/src/libinput.sym @@ -26,6 +26,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_modes; libinput_device_config_send_events_get_mode;