/**
* @defgroup Elput_Touch_Group Configuration of touch devices
*
- * Functions related to configuration of touch devic
+ * Functions related to configuration of touch devices
*/
/**
* tap-and-drag will immediately stop the drag.
*
* @param device
- * @param enable
+ * @param enabled
*
* @return EINA_TRUE on sucess, EINA_FALSE otherwise
*
*/
EAPI Eina_Bool elput_touch_drag_lock_enabled_get(Elput_Device *device);
+/**
+ * Enable or disable touchpad dwt (disable-while-typing) feature. When enabled, the
+ * device will be disabled while typing and for a short period after.
+ *
+ * @param device
+ * @param enabled
+ *
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ *
+ * @ingroup Elput_Touch_Group
+ * @since 1.19
+ */
+EAPI Eina_Bool elput_touch_dwt_enabled_set(Elput_Device *device, Eina_Bool enabled);
+
+/**
+ * Get if touchpad dwt (disable-while-typing) is enabled.
+ *
+ * @param device
+ *
+ * @return EINA_TRUE if enabled, EINA_FALSE otherwise
+ *
+ * @ingroup Elput_Touch_Group
+ * @since 1.19
+ */
+EAPI Eina_Bool elput_touch_dwt_enabled_get(Elput_Device *device);
+
# endif
# undef EAPI
return libinput_device_config_tap_get_drag_lock_enabled(device->device);
}
+
+EAPI Eina_Bool
+elput_touch_dwt_enabled_set(Elput_Device *device, Eina_Bool enabled)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
+
+ if (!libinput_device_config_dwt_is_available(device->device))
+ return EINA_FALSE;
+
+ if (enabled)
+ {
+ ret =
+ libinput_device_config_dwt_set_enabled(device->device,
+ LIBINPUT_CONFIG_DWT_ENABLED);
+ }
+ else
+ {
+ ret =
+ libinput_device_config_dwt_set_enabled(device->device,
+ LIBINPUT_CONFIG_DWT_DISABLED);
+ }
+
+ return ret;
+}
+
+EAPI Eina_Bool
+elput_touch_dwt_enabled_get(Elput_Device *device)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
+
+ if (!libinput_device_config_dwt_is_available(device->device))
+ return EINA_FALSE;
+
+ return libinput_device_config_dwt_get_enabled(device->device);
+}