summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_touch.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-14 09:11:50 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-14 09:18:14 -0500
commitb27ebc6294af07c6a95eefdc8a910973a14fcdc1 (patch)
treed76171a32131148557ca70ba0be0b8e276d2d30b /src/lib/elput/elput_touch.c
parent73a074498a18dfe5217c3eedec8be9cf1388a1dd (diff)
elput: Add API functions to get/set if tap-to-click is enabled
This patch adds API functions to get or set if tap-to-click is enabled on a touchpad device @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.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lib/elput/elput_touch.c b/src/lib/elput/elput_touch.c
index 58576a2991..f761ca56bf 100644
--- a/src/lib/elput/elput_touch.c
+++ b/src/lib/elput/elput_touch.c
@@ -138,3 +138,34 @@ elput_touch_click_method_get(Elput_Device *device)
138 138
139 return libinput_device_config_click_get_method(device->device); 139 return libinput_device_config_click_get_method(device->device);
140} 140}
141
142EAPI Eina_Bool
143elput_touch_tap_enabled_set(Elput_Device *device, Eina_Bool enabled)
144{
145 Eina_Bool ret = EINA_FALSE;
146
147 EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
148
149 if (enabled)
150 {
151 ret =
152 libinput_device_config_tap_set_enabled(device->device,
153 LIBINPUT_CONFIG_TAP_ENABLED);
154 }
155 else
156 {
157 ret =
158 libinput_device_config_tap_set_enabled(device->device,
159 LIBINPUT_CONFIG_TAP_DISABLED);
160 }
161
162 return ret;
163}
164
165EAPI Eina_Bool
166elput_touch_tap_enabled_get(Elput_Device *device)
167{
168 EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
169
170 return libinput_device_config_tap_get_enabled(device->device);
171}