diff options
author | Sung-jae Park <nicesj.park@samsung.com> | 2015-04-15 17:18:52 +0900 |
---|---|---|
committer | Sung-jae Park <nicesj.park@samsung.com> | 2015-04-15 17:18:52 +0900 |
commit | 519f2bd61b5dd37e75cdf687fa31f3eb141ccb69 (patch) | |
tree | b570fb59c4a1ebc06231273b167600346ffd91f1 /src | |
parent | c62ca5b93d5f85313507564dd893448f338829ae (diff) | |
download | widget-service-519f2bd61b5dd37e75cdf687fa31f3eb141ccb69.tar.gz widget-service-519f2bd61b5dd37e75cdf687fa31f3eb141ccb69.tar.bz2 widget-service-519f2bd61b5dd37e75cdf687fa31f3eb141ccb69.zip |
Add new conf handler: visibility_change_delay.
Used by viewer_evas.
Make a visibility state changes after given delay.
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]
Change-Id: Iba4e9a6d8f56a0a071ea67e463b5d0dfe86f7c71
Diffstat (limited to 'src')
-rw-r--r-- | src/widget_conf.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/widget_conf.c b/src/widget_conf.c index 612e94d..dfa6eed 100644 --- a/src/widget_conf.c +++ b/src/widget_conf.c @@ -113,6 +113,7 @@ static const int CONF_DEFAULT_SLAVE_AUTO_CACHE_FLUSH = 0; static const int CONF_DEFAULT_REACTIVATE_ON_PAUSE = 1; static const double CONF_DEFAULT_FAULT_DETECT_IN_TIME = 0.0f; static const int CONF_DEFAULT_FAULT_DETECT_COUNT = 0; +static const double CONF_DEFAULT_VISIBILITY_CHANGE_DELAY = 0.0f; #define CONF_PATH_FORMAT "/usr/share/data-provider-master/%dx%d/conf.ini" @@ -216,6 +217,7 @@ struct widget_conf { int fault_detect_count; int reactivate_on_pause; char *app_abi; + double visibility_change_delay; }; static struct widget_conf s_conf; @@ -226,6 +228,14 @@ static struct info { .conf_loaded = 0, }; +static void visibility_change_delay_handler(char *buffer) +{ + if (sscanf(buffer, "%lf", &s_conf.visibility_change_delay) != 1) { + ErrPrint("Unable to parse the visibility change delay [%s]\n", buffer); + s_conf.visibility_change_delay = 0.0f; + } +} + static void app_abi_handler(char *buffer) { s_conf.app_abi = strdup(buffer); @@ -905,6 +915,7 @@ EAPI void widget_conf_init(void) s_conf.fault_detect_in_time = CONF_DEFAULT_FAULT_DETECT_IN_TIME; s_conf.reactivate_on_pause = CONF_DEFAULT_REACTIVATE_ON_PAUSE; s_conf.app_abi = (char *)CONF_DEFAULT_APP_ABI; + s_conf.visibility_change_delay = CONF_DEFAULT_VISIBILITY_CHANGE_DELAY; } /* @@ -1178,6 +1189,10 @@ EAPI int widget_conf_load(void) .handler = app_abi_handler, }, { + .name = "visibility_change_delay", + .handler = visibility_change_delay_handler, + }, + { .name = NULL, .handler = NULL, }, @@ -1890,4 +1905,9 @@ EAPI const char * const widget_conf_app_abi(void) return s_conf.app_abi; } +EAPI double widget_conf_visibility_change_delay(void) +{ + return s_conf.visibility_change_delay; +} + /* End of a file */ |