*/
int device_touchscreen_disable(touchscreen_pending_cb cb);
+/**
+ * @brief Combines the touchscreen off operation with the display off operation.
+ * @details This sets the option that follows the display off operation.
+ * If the @a mode is true, the touchscreen will be turned off when the display is turned off.
+ * If the @a mode is false, the touchscreen ignores off operation when the display is turned off.
+ * After this set operation, the touchscreen off operation policy will be applied.
+ * @since_tizen 7.0
+ * @privilege %http://tizen.org/privilege/display
+ * @param[in] mode The value to set the touchscreen off operation policy.
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #DEVICE_ERROR_NONE Successful
+ * @retval #DEVICE_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #DEVICE_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #DEVICE_ERROR_OPERATION_FAILED Operation failed
+ * @code
+ * #include <device/touchscreen-internal.h>
+ * ...
+ * int main(void)
+ * {
+ * int ret = 0;
+ * // This sets the touchscreen off operation policy to follow the display off operation.
+ * ret = device_touchscreen_set_off_bind_with_display(true);
+ * ...
+ * // This sets the touchscreen off operation policy to ignore the display off operation.
+ * ret = device_touchscreen_set_off_bind_with_display(false);
+ * ...
+ * return 0;
+ * }
+ * ...
+ * @endcode
+ * @see device_touchscreen_enable()
+ * @see device_touchscreen_disable()
+ */
+int device_touchscreen_set_off_bind_with_display(bool mode);
+
#endif
#define METHOD_TOUCHSCREEN_ENABLE "Enable"
#define METHOD_TOUCHSCREEN_DISABLE "Disable"
+#define METHOD_TOUCHSCREEN_SET_OFF_MODE "StayTouchScreenOff"
//LCOV_EXCL_START Not tested API
int device_touchscreen_enable(dbus_pending_cb cb)
return errno_to_device_error(ret_dbus);
}
//LCOV_EXCL_STOP
+
+int device_touchscreen_set_off_bind_with_display(bool mode)
+{
+ int ret = 0;
+
+ ret = gdbus_call_sync_with_reply(DEVICED_BUS_NAME,
+ DEVICED_PATH_DISPLAY,
+ DEVICED_INTERFACE_DISPLAY,
+ METHOD_TOUCHSCREEN_SET_OFF_MODE,
+ g_variant_new("(i)", (int)mode),
+ NULL);
+
+ return errno_to_device_error(ret);
+}
\ No newline at end of file