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)
committerDuna Oh <duna.oh@samsung.com>
Mon, 7 Feb 2022 11:52:21 +0000 (20:52 +0900)
Change-Id: Ic45f60fd95ab7835fa92064c9badb46fe9164695

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

index d5d607dbe94bd6a60345cb0d5b4a673a461ea507..eb6ac43ff3c69bf420d36cd7d9f5debd7a89bbc0 100644 (file)
@@ -1005,6 +1005,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)
 {
index bf56cd91285b8c00105fc5d76dee118732805d46..258afa0192b6841c58041425d55f1bd8c985491c 100644 (file)
@@ -584,6 +584,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 *));
index 1f755aeba1e56081eca8d3f26de6ef2d26009b60..9542b3ac5fecdf1a1e0a9657ba790b79792d6190 100644 (file)
@@ -4205,6 +4205,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 74bca6332ccd8ee4361fd2fcef5423d3af9922d8..589341808f3f6e224408338682815c5366d9d675 100644 (file)
@@ -5393,6 +5393,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 1e6a3240cd071f3848dacf1066fbcace5a5f3c23..3591629088e27ffa50b1e5f13d4a6924b20794c8 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;