From 01b6308b10000b0f28bddc6100d5addc2d0e001e Mon Sep 17 00:00:00 2001 From: Youngjae Cho Date: Thu, 17 Aug 2023 21:12:59 +0900 Subject: [PATCH] plugin-api: deviced: Add display DPMS attribute and enum New attribute: - id: DEVICED_DISPLAY_ATTR_INT_DPMS_STATE - type: SYSCOMMON_RESMAN_DATA_TYPE_INT - setter: O - getter: O It sets/gets DPMS value type of enum deviced_dpms_state. New attribute: - id: DEVICED_DISPLAY_ATTR_TUPLE2_SET_DISPLAY_DIRECT - type: SYSCOMMON_RESMAN_DATA_TYPE_UINT64_UINT64 - setter: O - getter: X - 1st param: enum deviced_dpms_state - 2nd param: enum deviced_event It bypasses display state transition routine. Instead it sets DPMS directly. Change-Id: I077c4066288f8e0f8856e4f78bbc6e7e1283f3e6 Signed-off-by: Youngjae Cho --- .../syscommon-plugin-deviced-display-interface.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 eec2f42..7f1ae86 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 @@ -32,6 +32,8 @@ 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) +#define DEVICED_DISPLAY_ATTR_INT_DPMS_STATE (1ULL << 3) +#define DEVICED_DISPLAY_ATTR_TUPLE2_SET_DISPLAY_DIRECT (1ULL << 4) enum deviced_display_state { DEVICED_DISPLAY_STATE_START, @@ -42,6 +44,15 @@ enum deviced_display_state { DEVICED_DISPLAY_STATE_END, }; +enum deviced_dpms_state { + DEVICED_DPMS_ON, /* In use */ + DEVICED_DPMS_STANDBY, /* Blanked, low power */ + DEVICED_DPMS_SUSPEND, /* Blanked, lower power */ + DEVICED_DPMS_OFF, /* Shut off, awaiting activity */ + DEVICED_DPMS_FORCE_OFF,/* Force Shut off */ + DEVICED_DPMS_DETACH, /* Display detached */ +}; + #define DEVICED_DISPLAY_SCREEN_TIMEOUT_INFINITE ((~0) >> 1) #ifdef __cplusplus -- 2.34.1