summaryrefslogtreecommitdiff
path: root/src/edje_externals
diff options
context:
space:
mode:
authorGustavo Lima Chaves <gustavo.lima.chaves@intel.com>2013-12-26 13:42:24 -0200
committerGustavo Lima Chaves <gustavo.lima.chaves@intel.com>2013-12-26 13:42:24 -0200
commit04afaac604a884f525af936eff953a670951efcf (patch)
tree7beaa23915c0a9d3c9f57a6ff26f2df143395fbc /src/edje_externals
parent186da989b4988b3e09d35fec409484ec8912c829 (diff)
Add 'pulse' property to progressbar edje-external object API.
Diffstat (limited to 'src/edje_externals')
-rw-r--r--src/edje_externals/elm_progressbar.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/edje_externals/elm_progressbar.c b/src/edje_externals/elm_progressbar.c
index c202fb489..9d5b502cb 100644
--- a/src/edje_externals/elm_progressbar.c
+++ b/src/edje_externals/elm_progressbar.c
@@ -14,6 +14,8 @@ typedef struct _Elm_Params_Progressbar
14 Eina_Bool inverted_exists:1; 14 Eina_Bool inverted_exists:1;
15 Eina_Bool horizontal:1; 15 Eina_Bool horizontal:1;
16 Eina_Bool horizontal_exists:1; 16 Eina_Bool horizontal_exists:1;
17 Eina_Bool pulse:1;
18 Eina_Bool pulse_exists:1;
17} Elm_Params_Progressbar; 19} Elm_Params_Progressbar;
18 20
19static void 21static void
@@ -39,6 +41,8 @@ external_progressbar_state_set(void *data __UNUSED__, Evas_Object *obj, const vo
39 elm_progressbar_horizontal_set(obj, p->horizontal); 41 elm_progressbar_horizontal_set(obj, p->horizontal);
40 if (p->unit) 42 if (p->unit)
41 elm_progressbar_unit_format_set(obj, p->unit); 43 elm_progressbar_unit_format_set(obj, p->unit);
44 if (p->pulse_exists)
45 elm_progressbar_pulse(obj, p->pulse);
42} 46}
43 47
44static Eina_Bool 48static Eina_Bool
@@ -78,6 +82,14 @@ external_progressbar_param_set(void *data __UNUSED__, Evas_Object *obj, const Ed
78 return EINA_TRUE; 82 return EINA_TRUE;
79 } 83 }
80 } 84 }
85 else if (!strcmp(param->name, "pulse"))
86 {
87 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
88 {
89 elm_progressbar_pulse(obj, param->i);
90 return EINA_TRUE;
91 }
92 }
81 else if (!strcmp(param->name, "inverted")) 93 else if (!strcmp(param->name, "inverted"))
82 { 94 {
83 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 95 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
@@ -141,6 +153,14 @@ external_progressbar_param_get(void *data __UNUSED__, const Evas_Object *obj, Ed
141 return EINA_TRUE; 153 return EINA_TRUE;
142 } 154 }
143 } 155 }
156 else if (!strcmp(param->name, "pulse"))
157 {
158 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
159 {
160 param->i = elm_progressbar_pulse_get(obj);
161 return EINA_TRUE;
162 }
163 }
144 else if (!strcmp(param->name, "inverted")) 164 else if (!strcmp(param->name, "inverted"))
145 { 165 {
146 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL) 166 if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
@@ -207,6 +227,11 @@ external_progressbar_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUS
207 mem->horizontal = !!param->i; 227 mem->horizontal = !!param->i;
208 mem->horizontal_exists = EINA_TRUE; 228 mem->horizontal_exists = EINA_TRUE;
209 } 229 }
230 else if (!strcmp(param->name, "pulse"))
231 {
232 mem->pulse = !!param->i;
233 mem->pulse_exists = EINA_TRUE;
234 }
210 else if (!strcmp(param->name, "unit format")) 235 else if (!strcmp(param->name, "unit format"))
211 mem->unit = eina_stringshare_add(param->s); 236 mem->unit = eina_stringshare_add(param->s);
212 else if (!strcmp(param->name, "label")) 237 else if (!strcmp(param->name, "label"))
@@ -241,6 +266,7 @@ static Edje_External_Param_Info external_progressbar_params[] = {
241 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"), 266 EDJE_EXTERNAL_PARAM_INFO_STRING("icon"),
242 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"), 267 EDJE_EXTERNAL_PARAM_INFO_DOUBLE("value"),
243 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"), 268 EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
269 EDJE_EXTERNAL_PARAM_INFO_BOOL("pulse"),
244 EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"), 270 EDJE_EXTERNAL_PARAM_INFO_BOOL("inverted"),
245 EDJE_EXTERNAL_PARAM_INFO_INT("span"), 271 EDJE_EXTERNAL_PARAM_INFO_INT("span"),
246 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"), 272 EDJE_EXTERNAL_PARAM_INFO_STRING_DEFAULT("unit format", "%1.2f"),