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>
Fri, 27 Jan 2023 05:04:07 +0000 (14:04 +0900)
Change-Id: Ic45f60fd95ab7835fa92064c9badb46fe9164695

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

index 8c7f744d9660a4cb38805db8cabaa8327bc55392..d299230b205d266c11be3f14210bb0c802992b27 100644 (file)
@@ -1095,6 +1095,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 7768900e45c38ffaa35b4481db9349be9d7a5e33..154add7b303d9697755a32e8deaa7a5cd55ebea5 100644 (file)
@@ -586,6 +586,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 5ce9cac0304ac14c2be1e0a7e19f946d09c27fff..4c2ce15066ed447a646dd76e5733c839256429ee 100644 (file)
@@ -4416,6 +4416,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 f69979cfe7168211956fb23fc08c93cae4cad926..22f9ebcc7c17939ad44983b28632cb2117c63dcb 100644 (file)
@@ -5590,6 +5590,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 c2adaf8c8e94086d827c38ae9110e4c6b5af8606..989d6d85c668b82aaf7ab8575aff2215e894cb80 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;