summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_touch.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-14 08:59:56 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-14 09:18:14 -0500
commit0f81e32433d1dedf5daf128ece3423f2b2a56098 (patch)
tree13a273daa23c2c24a80207c00ccce0f331cbb15f /src/lib/elput/elput_touch.c
parent68e1c9e0a008497fe42d43c8908b84810bf06a78 (diff)
elput: Add API functions to get/set the scroll method for a touchpad
device This patch adds API functions which can be used to get or set the scroll method used for a given device. Scroll method defines when to generate scroll axis events @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/elput/elput_touch.c')
-rw-r--r--src/lib/elput/elput_touch.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/lib/elput/elput_touch.c b/src/lib/elput/elput_touch.c
index f26318d3c9..821d33df6f 100644
--- a/src/lib/elput/elput_touch.c
+++ b/src/lib/elput/elput_touch.c
@@ -98,3 +98,23 @@ elput_touch_dwt_enabled_get(Elput_Device *device)
98 98
99 return libinput_device_config_dwt_get_enabled(device->device); 99 return libinput_device_config_dwt_get_enabled(device->device);
100} 100}
101
102EAPI Eina_Bool
103elput_touch_scroll_method_set(Elput_Device *device, int method)
104{
105 EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
106
107 if (libinput_device_config_scroll_set_method(device->device, method) ==
108 LIBINPUT_CONFIG_STATUS_SUCCESS)
109 return EINA_TRUE;
110
111 return EINA_FALSE;
112}
113
114EAPI int
115elput_touch_scroll_method_get(Elput_Device *device)
116{
117 EINA_SAFETY_ON_NULL_RETURN_VAL(device, -1);
118
119 return libinput_device_config_scroll_get_method(device->device);
120}