Add a new API to return wheel click angle value
authorJengHyun Kang <jhyuni.kang@samsung.com>
Thu, 24 Mar 2016 11:50:02 +0000 (20:50 +0900)
committerJengHyun Kang <jhyuni.kang@samsung.com>
Tue, 24 Oct 2017 07:04:33 +0000 (16:04 +0900)
Change-Id: Ic45f60fd95ab7835fa92064c9badb46fe9164695

src/evdev.c
src/evdev.h
src/libinput.c
src/libinput.h
src/libinput.sym

index 0181b9980004f1daebb55493abed23c509008c81..9d5e030e475c92c214537df4f2978a22e9b0eb98 100644 (file)
@@ -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)
 {
index 6e7adc4d1b8f54fe2890c8197ec6262637259221..96a2e1cc24c8108d09fbfa981d909194d0477287 100644 (file)
@@ -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,
index ace5378cc4cc2a914459d50ffe31cc1d0b9d1815..dc73c69b98a8c6a89235c2228cbc3c794d9d5677 100644 (file)
@@ -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)
 {
index 635a64c469f4e742a9164967f187bfce705eca8a..c7fbf8cea25265773b6efc72e86c4db2b59f9f9b 100644 (file)
@@ -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
  *
index 1a13caac1d6aac9b6f1af2accb0b4d448e881199..8afe8b20a57b2eaa5e24960bca7a36a4680c646d 100644 (file)
@@ -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;