summaryrefslogtreecommitdiff
path: root/src/edje_external
diff options
context:
space:
mode:
authorMichaël Bouchaud (yoz) <yoz@efl.so>2016-09-02 01:58:27 +0200
committerMichaël Bouchaud (yoz) <yoz@efl.so>2016-09-02 02:13:19 +0200
commita9a9240421e9f99f3f7a6d0ac45bea875c070e5d (patch)
tree3f5faee68ac02b3b4aa26d4474ceb1239d1d8796 /src/edje_external
parent8f966466056464b1d5cae2fa4b94bbcc8ba4ddcd (diff)
elementary: Introduce a new edje_external param to the progressbar widget.
This widget was lacking an edje_external param to notify the widget to start or stop pulsing from edje. @fix Now the edje_external progressbar test works as expected.
Diffstat (limited to 'src/edje_external')
-rw-r--r--src/edje_external/elementary/elm_progressbar.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/edje_external/elementary/elm_progressbar.c b/src/edje_external/elementary/elm_progressbar.c
index d044a6a..28148b5 100644
--- a/src/edje_external/elementary/elm_progressbar.c
+++ b/src/edje_external/elementary/elm_progressbar.c
@@ -16,6 +16,8 @@ typedef struct _Elm_Params_Progressbar
16 Eina_Bool horizontal_exists:1; 16 Eina_Bool horizontal_exists:1;
17 Eina_Bool pulse:1; 17 Eina_Bool pulse:1;
18 Eina_Bool pulse_exists:1; 18 Eina_Bool pulse_exists:1;
19 Eina_Bool pulsing:1;
20 Eina_Bool pulsing_exists:1;
19} Elm_Params_Progressbar; 21} Elm_Params_Progressbar;
20 22
21static void 23static void
@@ -45,6 +47,8 @@ external_progressbar_state_set(void *data EINA_UNUSED, Evas_Object *obj,
45 elm_progressbar_unit_format_set(obj, p->unit); 47 elm_progressbar_unit_format_set(obj, p->unit);
46 if (p->pulse_exists) 48 if (p->pulse_exists)
47 elm_progressbar_pulse_set(obj, p->pulse); 49 elm_progressbar_pulse_set(obj, p->pulse);
50 if (p->pulsing_exists)
51 elm_progressbar_pulse(obj, p->pulsing);
48} 52}
49 53
50static Eina_Bool 54static Eina_Bool
@@ -85,7 +89,7 @@ external_progressbar_param_set(void *data EINA_UNUSED, Evas_Object *obj,
85 return EINA_TRUE; 89 return EINA_TRUE;
86 } 90 }
87 } 91 }
88 else if (!strcmp(param->name, "pulse")) 92 else if (!strcmp(param->name, "pulse"))
89 { 93 {
90 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 94 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
91 { 95 {
@@ -93,6 +97,14 @@ external_progressbar_param_set(void *data EINA_UNUSED, Evas_Object *obj,
93 return EINA_TRUE; 97 return EINA_TRUE;
94 } 98 }
95 } 99 }
100 else if (!strcmp(param->name, "pulsing"))
101 {
102 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
103 {
104 elm_progressbar_pulse(obj, param->i);
105 return EINA_TRUE;
106 }
107 }
96 else if (!strcmp(param->name, "inverted")) 108 else if (!strcmp(param->name, "inverted"))
97 { 109 {
98 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 110 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
@@ -165,6 +177,14 @@ external_progressbar_param_get(void *data EINA_UNUSED, const Evas_Object *obj,
165 return EINA_TRUE; 177 return EINA_TRUE;
166 } 178 }
167 } 179 }
180 else if (!strcmp(param->name, "pulsing"))
181 {
182 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
183 {
184 param->i = elm_progressbar_is_pulsing_get(obj);
185 return EINA_TRUE;
186 }
187 }
168 else if (!strcmp(param->name, "inverted")) 188 else if (!strcmp(param->name, "inverted"))
169 { 189 {
170 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 190 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
@@ -238,6 +258,11 @@ external_progressbar_params_parse(void *data EINA_UNUSED,
238 mem->pulse = !!param->i; 258 mem->pulse = !!param->i;
239 mem->pulse_exists = EINA_TRUE; 259 mem->pulse_exists = EINA_TRUE;
240 } 260 }
261 else if (!strcmp(param->name, "pulsing"))
262 {
263 mem->pulsing = !!param->i;
264 mem->pulsing_exists = EINA_TRUE;
265 }
241 else if (!strcmp(param->name, "unit format")) 266 else if (!strcmp(param->name, "unit format"))
242 mem->unit = eina_stringshare_add(param->s); 267 mem->unit = eina_stringshare_add(param->s);
243 else if (!strcmp(param->name, "label")) 268 else if (!strcmp(param->name, "label"))
@@ -274,6 +299,7 @@ static Edje_External_Param_Info external_progressbar_params[] = {
274 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"), 299 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
275 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"), 300 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
276 EDJE_EXTERNAL_PARAM_INFO_BOOL("pulse"), 301 EDJE_EXTERNAL_PARAM_INFO_BOOL("pulse"),
302 EDJE_EXTERNAL_PARAM_INFO_BOOL("pulsing"),
277 EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"), 303 EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"),
278 EDJE_EXTERNAL_PARAM_INFO_INT("span"), 304 EDJE_EXTERNAL_PARAM_INFO_INT("span"),
279 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"), 305 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),