From: Gustavo Lima Chaves Date: Thu, 26 Dec 2013 15:42:24 +0000 (-0200) Subject: Add 'pulse' property to progressbar edje-external object API. X-Git-Tag: upstream/1.20.0~7116^2~14^2~3554 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=561a6d53a097c467d5e293b3eb585d98855377d2;p=platform%2Fupstream%2Fefl.git Add 'pulse' property to progressbar edje-external object API. --- diff --git a/legacy/elementary/src/edje_externals/elm_progressbar.c b/legacy/elementary/src/edje_externals/elm_progressbar.c index c202fb4..9d5b502 100644 --- a/legacy/elementary/src/edje_externals/elm_progressbar.c +++ b/legacy/elementary/src/edje_externals/elm_progressbar.c @@ -14,6 +14,8 @@ typedef struct _Elm_Params_Progressbar Eina_Bool inverted_exists:1; Eina_Bool horizontal:1; Eina_Bool horizontal_exists:1; + Eina_Bool pulse:1; + Eina_Bool pulse_exists:1; } Elm_Params_Progressbar; static void @@ -39,6 +41,8 @@ external_progressbar_state_set(void *data __UNUSED__, Evas_Object *obj, const vo elm_progressbar_horizontal_set(obj, p->horizontal); if (p->unit) elm_progressbar_unit_format_set(obj, p->unit); + if (p->pulse_exists) + elm_progressbar_pulse(obj, p->pulse); } static Eina_Bool @@ -78,6 +82,14 @@ external_progressbar_param_set(void *data __UNUSED__, Evas_Object *obj, const Ed return EINA_TRUE; } } + else if (!strcmp(param->name, "pulse")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + elm_progressbar_pulse(obj, param->i); + return EINA_TRUE; + } + } else if (!strcmp(param->name, "inverted")) { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) @@ -141,6 +153,14 @@ external_progressbar_param_get(void *data __UNUSED__, const Evas_Object *obj, Ed return EINA_TRUE; } } + else if (!strcmp(param->name, "pulse")) + { + if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) + { + param->i = elm_progressbar_pulse_get(obj); + return EINA_TRUE; + } + } else if (!strcmp(param->name, "inverted")) { if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) @@ -207,6 +227,11 @@ external_progressbar_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUS mem->horizontal = !!param->i; mem->horizontal_exists = EINA_TRUE; } + else if (!strcmp(param->name, "pulse")) + { + mem->pulse = !!param->i; + mem->pulse_exists = EINA_TRUE; + } else if (!strcmp(param->name, "unit format")) mem->unit = eina_stringshare_add(param->s); else if (!strcmp(param->name, "label")) @@ -241,6 +266,7 @@ static Edje_External_Param_Info external_progressbar_params[] = { EDJE_EXTERNAL_PARAM_INFO_STRING("icon"), EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"), EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"), + EDJE_EXTERNAL_PARAM_INFO_BOOL("pulse"), EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"), EDJE_EXTERNAL_PARAM_INFO_INT("span"), EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),