plugin-api: deviced: Add display state set attribute 54/297254/4 accepted/tizen/unified/20230818.183535 accepted/tizen/unified/riscv/20230817.113312
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 16 Aug 2023 02:18:29 +0000 (11:18 +0900)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 16 Aug 2023 02:19:09 +0000 (11:19 +0900)
 - DEVICED_DISPLAY_ATTR_TUPLE2_SET_CURRENT_STATE
  : Attribute for setting display state. It requires two parameter,
    each type of enum deviced_display_state and enum deviced_event.
    The first one designates state to be changed and the latter one
    specifies reason why the state change has been triggered.

When it comes to the state setter, it is necessary to reset screen
timeout of the changed state. Therefore the below values have been
added.
 - DEVICED_EVENT_DISPLAY_SCREEN_TIMEOUT
  : Event for screen timeout expiration

 - DEVICED_DISPLAY_SCREEN_TIMEOUT_INFINITE
  : Magic number for setting infinite screen timeout

Change-Id: I616a5ecd009dfb8c5aa4710ed68f2b09f5fe2981
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/plugin-api/deviced/include/syscommon-plugin-deviced-common-interface.h
src/plugin-api/deviced/include/syscommon-plugin-deviced-display-interface.h

index 2ffd792a6b7d304d0184c7190822890b5299ab3c..5300c78deac83ded962ca77c2566e6b68a45daa0 100644 (file)
@@ -51,6 +51,7 @@ enum deviced_event {
        DEVICED_EVENT_DISPLAY,
        DEVICED_EVENT_DISPLAY_AMBIENT,
        DEVICED_EVENT_DISPLAY_LOCK,
+       DEVICED_EVENT_DISPLAY_SCREEN_TIMEOUT,
 
        /* battery */
        DEVICED_EVENT_BATTERY,
index 1082c4059f929ea6a675ae677c020bec2c8553cb..eec2f4265cd25e3dd42f6d4e5a87ce682c5cccf4 100644 (file)
@@ -31,6 +31,7 @@ extern "C" {
 
 #define DEVICED_DISPLAY_ATTR_INT_GET_MAX_BRIGHTNESS            (1ULL << 0)
 #define DEVICED_DISPLAY_ATTR_INT_GET_CURRENT_STATE             (1ULL << 1)
+#define DEVICED_DISPLAY_ATTR_TUPLE2_SET_CURRENT_STATE          (1ULL << 2)
 
 enum deviced_display_state {
        DEVICED_DISPLAY_STATE_START,
@@ -41,6 +42,8 @@ enum deviced_display_state {
        DEVICED_DISPLAY_STATE_END,
 };
 
+#define DEVICED_DISPLAY_SCREEN_TIMEOUT_INFINITE                        ((~0) >> 1)
+
 #ifdef __cplusplus
 }
 #endif