From: Youngjae Cho Date: Wed, 16 Aug 2023 02:18:29 +0000 (+0900) Subject: plugin-api: deviced: Add display state set attribute X-Git-Tag: accepted/tizen/unified/riscv/20230817.113312^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e7168ca61d776669b678d24e2db797d841f4799;p=platform%2Fcore%2Fsystem%2Flibsyscommon.git plugin-api: deviced: Add display state set attribute - 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 --- diff --git a/src/plugin-api/deviced/include/syscommon-plugin-deviced-common-interface.h b/src/plugin-api/deviced/include/syscommon-plugin-deviced-common-interface.h index 2ffd792..5300c78 100644 --- a/src/plugin-api/deviced/include/syscommon-plugin-deviced-common-interface.h +++ b/src/plugin-api/deviced/include/syscommon-plugin-deviced-common-interface.h @@ -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, diff --git a/src/plugin-api/deviced/include/syscommon-plugin-deviced-display-interface.h b/src/plugin-api/deviced/include/syscommon-plugin-deviced-display-interface.h index 1082c40..eec2f42 100644 --- a/src/plugin-api/deviced/include/syscommon-plugin-deviced-display-interface.h +++ b/src/plugin-api/deviced/include/syscommon-plugin-deviced-display-interface.h @@ -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