summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_touch.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2016-12-13 13:22:29 -0500
committerChris Michael <cp.michael@samsung.com>2016-12-14 09:18:14 -0500
commit6eb34e2199e45a3f8c0784206d82746ae5face07 (patch)
tree855ea8115408b46ebb66fd1f424a43dcdd2f304c /src/lib/elput/elput_touch.c
parent0b2a32212a3e56d52a1d88c08edd646caa93a333 (diff)
elput: Add API functions to enable/disable drag-lock on touch devices
This patch adds API functions to get or set if drag-lock is enabled on touch devices. @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 330a1c5ebb..46b134ed88 100644
--- a/src/lib/elput/elput_touch.c
+++ b/src/lib/elput/elput_touch.c
@@ -30,3 +30,34 @@ elput_touch_drag_enabled_get(Elput_Device *device)
30 30
31 return libinput_device_config_tap_get_drag_enabled(device->device); 31 return libinput_device_config_tap_get_drag_enabled(device->device);
32} 32}
33
34EAPI Eina_Bool
35elput_touch_drag_lock_enabled_set(Elput_Device *device, Eina_Bool enabled)
36{
37 Eina_Bool ret = EINA_FALSE;
38
39 EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
40
41 if (enabled)
42 {
43 ret =
44 libinput_device_config_tap_set_drag_lock_enabled(device->device,
45 LIBINPUT_CONFIG_DRAG_LOCK_ENABLED);
46 }
47 else
48 {
49 ret =
50 libinput_device_config_tap_set_drag_lock_enabled(device->device,
51 LIBINPUT_CONFIG_DRAG_LOCK_DISABLED);
52 }
53
54 return ret;
55}
56
57EAPI Eina_Bool
58elput_touch_drag_lock_enabled_get(Elput_Device *device)
59{
60 EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
61
62 return libinput_device_config_tap_get_drag_lock_enabled(device->device);
63}