static enum device_ops_status status = DEVICE_OPS_STATUS_UNINIT;
-static struct state states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
+static struct syscommon_deviced_display_state_info states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
{ SYSCOMMON_DEVICED_DISPLAY_STATE_START, "SYSCOMMON_DEVICED_DISPLAY_STATE_START", NULL, NULL, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_ON, "SYSCOMMON_DEVICED_DISPLAY_STATE_ON", NULL, NULL, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_DIM, "SYSCOMMON_DEVICED_DISPLAY_STATE_DIM", NULL, NULL, NULL, NULL },
return &display_conf;
}
-inline struct state* state_st(enum syscommon_deviced_display_state state)
+inline struct syscommon_deviced_display_state_info* state_st(enum syscommon_deviced_display_state state)
{
return &states[state];
}
static enum device_ops_status status = DEVICE_OPS_STATUS_UNINIT;
-static struct state states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
+static struct syscommon_deviced_display_state_info states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
{ SYSCOMMON_DEVICED_DISPLAY_STATE_START, "SYSCOMMON_DEVICED_DISPLAY_STATE_START", NULL, NULL, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_ON, "SYSCOMMON_DEVICED_DISPLAY_STATE_ON", NULL, NULL, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_DIM, "SYSCOMMON_DEVICED_DISPLAY_STATE_DIM", NULL, NULL, NULL, NULL },
return &display_conf;
}
-inline struct state* state_st(enum syscommon_deviced_display_state state)
+inline struct syscommon_deviced_display_state_info* state_st(enum syscommon_deviced_display_state state)
{
return &states[state];
}
static enum device_ops_status status = DEVICE_OPS_STATUS_UNINIT;
-static struct state states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
+static struct syscommon_deviced_display_state_info states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
{ SYSCOMMON_DEVICED_DISPLAY_STATE_START, "SYSCOMMON_DEVICED_DISPLAY_STATE_START", NULL, NULL, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_ON, "SYSCOMMON_DEVICED_DISPLAY_STATE_ON", NULL, NULL, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_DIM, "SYSCOMMON_DEVICED_DISPLAY_STATE_DIM", NULL, NULL, NULL, NULL },
return &display_conf;
}
-inline struct state* state_st(enum syscommon_deviced_display_state state)
+inline struct syscommon_deviced_display_state_info* state_st(enum syscommon_deviced_display_state state)
{
return &states[state];
}
static int default_trans(int evt);
static int default_action(int timeout);
-static struct state states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
+static struct syscommon_deviced_display_state_info states[SYSCOMMON_DEVICED_DISPLAY_STATE_END] = {
{ SYSCOMMON_DEVICED_DISPLAY_STATE_START, "SYSCOMMON_DEVICED_DISPLAY_STATE_START", NULL, NULL, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_ON, "SYSCOMMON_DEVICED_DISPLAY_STATE_ON", default_trans, default_action, NULL, NULL },
{ SYSCOMMON_DEVICED_DISPLAY_STATE_DIM, "SYSCOMMON_DEVICED_DISPLAY_STATE_DIM", default_trans, default_action, NULL, NULL },
return &display_conf;
}
-inline struct state *state_st(enum syscommon_deviced_display_state state)
+inline struct syscommon_deviced_display_state_info *state_st(enum syscommon_deviced_display_state state)
{
return &states[state];
}
static gboolean timer_refresh_cb(gpointer data)
{
- struct state *st;
+ struct syscommon_deviced_display_state_info *st;
int v, ret;
ret = vconf_get_int(VCONFKEY_HOMESCREEN_WATCHFACE_VISIBILITY, &v);
int custom_lcdon(int timeout)
{
- struct state *st;
+ struct syscommon_deviced_display_state_info *st;
int ret, update;
int tutorial = 0;
int custom_lcdoff(enum device_flags flag)
{
- struct state *st;
+ struct syscommon_deviced_display_state_info *st;
if (display_lock_is_state_locked(SYSCOMMON_DEVICED_DISPLAY_STATE_ON) || display_lock_is_state_locked(SYSCOMMON_DEVICED_DISPLAY_STATE_DIM)) {
/*
int display_on_by_reason(const char *reason, int timeout)
{
- struct state *st;
+ struct syscommon_deviced_display_state_info *st;
int flag;
int str_len;
int display_off_by_reason(const char *reason)
{
- struct state *st;
+ struct syscommon_deviced_display_state_info *st;
int flag;
int str_len;
*/
static int default_trans(int evt)
{
- struct state *st = &states[get_pm_cur_state()];
+ struct syscommon_deviced_display_state_info *st = &states[get_pm_cur_state()];
int ret;
enum syscommon_deviced_display_state next_state;
#define MAX_LOG_COUNT 250
#endif
-/*
- * @brief State structure
- */
-struct state {
- enum syscommon_deviced_display_state state; /**< state number */
- const char *name; /**< state name (string) */
- int (*trans) (int evt); /**< transition function pointer */
- int (*action) (int timeout); /**< enter action */
- int (*check) (int curr, int next); /**< transition check function */
- GSourceFunc timeout_cb;
- int timeout;
-};
-
-struct state *state_st(enum syscommon_deviced_display_state state);
+struct syscommon_deviced_display_state_info *state_st(enum syscommon_deviced_display_state state);
/*
* Global variables
unsigned int timeout2;
} PMMsg;
-extern struct state state[SYSCOMMON_DEVICED_DISPLAY_STATE_END];
+extern struct syscommon_deviced_display_state_info state[SYSCOMMON_DEVICED_DISPLAY_STATE_END];
/* setting.c */
int get_lock_screen_bg_state(void);
struct syscommon_deviced_display_config *config;
struct display_backlight_ops *backlight;
- struct state* display_states[SYSCOMMON_DEVICED_DISPLAY_STATE_END];
+ struct syscommon_deviced_display_state_info* display_states[SYSCOMMON_DEVICED_DISPLAY_STATE_END];
};
extern struct display_plugin g_display_plugin;