summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYeongJong Lee <yj34.lee@samsung.com>2018-02-26 21:22:08 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2018-02-26 21:22:26 +0900
commit403c014bd25e399b4d4fa6c17f9a2f1583250070 (patch)
treea8b20665a01c77d923c3bebe5067efcd249d4920
parent160b6d202f9a978271df8f530aca8530aa5d20b0 (diff)
efl.ui.progressbar: change signal name for icon/text
Summary: see also 73f8b3b78f0ff92ddfc1c16426bf7c176f10293a Test Plan: 1. elementary_test -to progressbar and elementary_test -to efl.ui.progressbar 2. check that icon and text are visible Reviewers: cedric, woohyun, Jaehyun_Cho Reviewed By: Jaehyun_Cho Differential Revision: https://phab.enlightenment.org/D5818
-rw-r--r--data/elementary/themes/edc/efl/progress.edc1392
-rw-r--r--src/Makefile_Elementary.am1
-rw-r--r--src/bin/elementary/test_ui_progressbar.c7
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c119
-rw-r--r--src/lib/elementary/efl_ui_progressbar.eo2
-rw-r--r--src/lib/elementary/efl_ui_progressbar_legacy.eo3
-rw-r--r--src/lib/elementary/efl_ui_progressbar_legacy_part.eo8
7 files changed, 1485 insertions, 47 deletions
diff --git a/data/elementary/themes/edc/efl/progress.edc b/data/elementary/themes/edc/efl/progress.edc
index 2cb11b29db..049724207b 100644
--- a/data/elementary/themes/edc/efl/progress.edc
+++ b/data/elementary/themes/edc/efl/progress.edc
@@ -1,20 +1,1402 @@
1group { "efl/progressbar/horizontal"; 1group { "efl/progressbar/horizontal";
2 inherit: "elm/progressbar/horizontal/default"; 2 images.image: "inset_bar_horiz_base.png" COMP;
3 images.image: "inset_bar_horiz_light.png" COMP;
4 images.image: "inset_bar_horiz_inside_base.png" COMP;
5 images.image: "inset_bar_horiz_inside_light.png" COMP;
6 images.image: "inset_bar_horiz_glow_base.png" COMP;
7 images.image: "inset_bar_horiz_glow_light.png" COMP;
8 images.image: "inset_bar_horiz_glow_inv_base.png" COMP;
9 images.image: "inset_bar_horiz_glow_inv_light.png" COMP;
10 images.image: "inset_bar_horiz_glow_mid_base.png" COMP;
11 images.image: "inset_bar_horiz_glow_mid_light.png" COMP;
12#define ICON 1
13#define LABEL 2
14#define DISABLE 4
15 script {
16 public slmode;
17 public eval_mode(m) {
18 new ic = m & ICON;
19 new l = m & LABEL;
20 new d = m & DISABLE;
21 if (l) {
22 if (!d) {
23 set_state(PART:"elm.text", "visible", 0.0);
24 } else {
25 set_state(PART:"elm.text", "disabled_visible", 0.0);
26 }
27 } else {
28 set_state(PART:"elm.text", "default", 0.0);
29 }
30 if (ic) {
31 set_state(PART:"elm.swallow.content", "visible", 0.0);
32 set_state(PART:"sizer.content", "visible", 0.0);
33 } else {
34 set_state(PART:"elm.swallow.content", "default", 0.0);
35 set_state(PART:"sizer.content", "default", 0.0);
36 }
37 if (!d) {
38 set_state(PART:"dis_clip", "default", 0.0);
39 } else {
40 set_state(PART:"dis_clip", "disabled", 0.0);
41 }
42 }
43 }
44 parts {
45 part { name: "dis_clip"; type: RECT;
46 description { state: "default" 0.0;
47 rel1.to: "elm.swallow.content";
48 rel2.to: "elm.swallow.content";
49 }
50 description { state: "disabled" 0.0;
51 inherit: "default" 0.0;
52 color: 255 255 255 64;
53 }
54 }
55 part { name: "pulse_clip"; type: RECT;
56 description { state: "default" 0.0;
57 rel1.relative: -2.0 -2.0;
58 rel2.relative: 3.0 3.0;
59 visible: 0;
60 }
61 description { state: "pulse" 0.0;
62 inherit: "default" 0.0;
63 visible: 1;
64 }
65 }
66 part { name: "fract_clip"; type: RECT;
67 description { state: "default" 0.0;
68 rel1.relative: -2.0 -2.0;
69 rel2.relative: 3.0 3.0;
70 }
71 description { state: "pulse" 0.0;
72 inherit: "default" 0.0;
73 visible: 0;
74 }
75 }
76 part { name: "elm.swallow.content"; type: SWALLOW;
77 clip_to: "dis_clip";
78 required;
79 description { state: "default" 0.0;
80 visible: 0;
81 align: 0.0 0.5;
82 fixed: 1 0;
83 rel1.offset: 0 2;
84 rel2.offset: -1 -3;
85 rel2.relative: 0.0 1.0;
86 }
87 description { state: "visible" 0.0;
88 inherit: "default" 0.0;
89 visible: 1;
90 aspect: 1.0 1.0; aspect_preference: VERTICAL;
91 rel1.offset: 2 2;
92 rel2.offset: 2 -3;
93 }
94 }
95 part { name: "sizer.content"; type: TEXT; mouse_events: 0;
96 scale: 1;
97 description { state: "default" 0.0;
98 fixed: 1 1;
99 visible: 0;
100 text { font: FN; size: 10;
101 min: 0 0;
102 text_class: "progressbar_text";
103 }
104 }
105 description { state: "visible" 0.0;
106 inherit: "default" 0.0;
107 rel1.to: "elm.swallow.content";
108 rel2.to: "elm.swallow.content";
109 text {
110 min: 1 1;
111 ellipsis: -1;
112 text: "M";
113 }
114 }
115 }
116 part { name: "elm.text"; type: TEXT; mouse_events: 0;
117 effect: SHADOW BOTTOM;
118 scale: 1;
119 required;
120 description { state: "default" 0.0;
121 fixed: 1 1;
122 align: 0.0 0.5;
123 rel1.to_x: "elm.swallow.content";
124 rel1.relative: 1.0 0.0;
125 rel1.offset: -1 2;
126 rel2.to_x: "elm.swallow.content";
127 rel2.relative: 1.0 1.0;
128 rel2.offset: -1 -3;
129 color: FN_COL_DEFAULT;
130 color_class: "progressbar_text";
131 text { font: FN; size: 10;
132 text_class: "progressbar";
133 min: 0 0;
134 align: 0.0 0.5;
135 }
136 visible: 0;
137 }
138 description { state: "visible" 0.0;
139 inherit: "default" 0.0;
140 fixed: 1 0;
141 visible: 1;
142 rel1.offset: 2 2;
143 rel2.offset: 2 -3;
144 text.min: 1 1;
145 text.ellipsis: -1;
146 }
147 description { state: "disabled_visible" 0.0;
148 inherit: "visible" 0.0;
149 color_class: "progressbar_text_disabled";
150 color: FN_COL_DISABLE_LIGHTER_SHADOW;
151 }
152 }
153 part { name: "bg-hi";
154 description { state: "default" 0.0;
155 rel1.to: "bg";
156 rel1.offset: 0 1;
157 rel2.to: "bg";
158 rel2.offset: -1 0;
159 image.normal: "inset_bar_horiz_light.png";
160 image.border: 32 32 0 0;
161 image.border_scale_by: 0.25; image.border_scale: 1;
162 }
163 }
164 part { name: "bg";
165 scale: 1;
166 description { state: "default" 0.0;
167 min: 16 16;
168 max: -1 16;
169 rel1.to_x: "elm.text";
170 rel1.relative: 1.0 0.0;
171 rel1.offset: 3 3;
172 rel2.offset: -4 -4;
173 image.normal: "inset_bar_horiz_base.png";
174 image.border: 32 32 0 0;
175 image.border_scale_by: 0.25; image.border_scale: 1;
176 }
177 }
178 part { name: "ins0"; type: SPACER;
179 scale: 1;
180 description { state: "default" 0.0;
181 fixed: 1 0;
182 rel1.to: "bg";
183 rel2.to: "bg";
184 rel2.relative: 0.0 1.0;
185 min: 5 16;
186 align: 0.0 0.5;
187 }
188 }
189 part { name: "ins1"; type: SPACER;
190 scale: 1;
191 description { state: "default" 0.0;
192 fixed: 1 0;
193 rel1.to: "bg";
194 rel1.relative: 1.0 0.0;
195 rel2.to: "bg";
196 min: 5 16;
197 align: 1.0 0.5;
198 }
199 }
200 part { name: "inside-hi";
201 scale: 1;
202 description { state: "default" 0.0;
203 rel1.to: "inside";
204 rel1.offset: 0 1;
205 rel2.to: "inside";
206 rel2.offset: -1 0;
207 image.normal: "inset_bar_horiz_inside_light.png";
208 image.border: 8 8 0 0;
209 image.border_scale_by: 0.25; image.border_scale: 1;
210 }
211 }
212 part { name: "inside";
213 scale: 1;
214 description { state: "default" 0.0;
215 min: 4 4;
216 rel1.to: "ins0";
217 rel1.relative: 1.0 (6/16);
218 rel2.to: "ins1";
219 rel2.relative: 0.0 (10/16);
220 image.normal: "inset_bar_horiz_inside_base.png";
221 image.border: 8 8 0 0;
222 image.border_scale_by: 0.25; image.border_scale: 1;
223 }
224 }
225 part { name: "elm.swallow.bar"; type: SWALLOW; mouse_events: 0;
226 description { state: "default" 0.0;
227 rel1.to: "inside";
228 rel2.to: "inside";
229 }
230 }
231 part { name: "elm.cur.progressbar"; mouse_events: 0; type: SPACER;
232 scale: 1;
233 dragable.confine: "inside";
234 dragable.x: 1 1 1;
235 dragable.y: 0 0 0;
236 description { state: "default" 0.0;
237 fixed: 1 1;
238 min: 8 4;
239 max: 8 4;
240 rel1.to: "inside";
241 rel2.to: "inside";
242 }
243 }
244 part { name: "barend"; type: SPACER;
245 scale: 1;
246 description { state: "default" 0.0;
247 fixed: 1 0;
248 min: 14 16;
249 rel1.to_x: "elm.cur.progressbar";
250 rel1.relative: 1.0 0.0;
251 rel2.to_x: "elm.cur.progressbar";
252 rel2.relative: 1.0 1.0;
253 align: 0.0 0.5;
254 }
255 description { state: "inv" 0.0;
256 inherit: "default" 0.0;
257 rel1.relative: 0.0 0.0;
258 rel2.relative: 0.0 1.0;
259 align: 1.0 0.5;
260 }
261 }
262 part { name: "bar";
263 clip_to: "fract_clip";
264 scale: 1;
265 description { state: "default" 0.0;
266 rel1.to_x: "ins0";
267 rel1.to_y: "bg";
268 rel1.relative: (12/16) -0.25;
269 rel2.to_x: "barend";
270 rel2.to_y: "bg";
271 rel2.relative: 1.0 1.25;
272 image.normal: "inset_bar_horiz_glow_base.png";
273 image.border: 0 72 0 0;
274 image.border_scale_by: 0.25; image.border_scale: 1;
275 }
276 description { state: "inv" 0.0;
277 inherit: "default" 0.0;
278 rel1.to_x: "barend";
279 rel1.relative: 0.0 -0.25;
280 rel2.to_x: "ins1";
281 rel2.relative: (4/16) 1.25;
282 image.normal: "inset_bar_horiz_glow_inv_base.png";
283 image.border: 72 0 0 0;
284 }
285 }
286 part { name: "insidep0"; type: SPACER;
287 scale: 1;
288 description { state: "default" 0.0;
289 fixed: 1 0;
290 min: 20 16;
291 rel1.to_x: "inside";
292 rel1.relative: 0.0 0.0;
293 rel2.to_x: "inside";
294 rel2.relative: 0.0 1.0;
295 align: 1.0 0.5;
296 }
297 }
298 part { name: "insidep1"; type: SPACER;
299 scale: 1;
300 description { state: "default" 0.0;
301 fixed: 1 0;
302 min: 20 16;
303 rel1.to_x: "inside";
304 rel1.relative: 1.0 0.0;
305 rel2.to_x: "inside";
306 rel2.relative: 1.0 1.0;
307 align: 0.0 0.5;
308 }
309 }
310 part { name: "pulse";
311 clip_to: "pulse_clip";
312 scale: 1;
313 description { state: "default" 0.0;
314 fixed: 1 1;
315 min: 64 24;
316 max: 64 24;
317 rel1.to_x: "insidep0";
318 rel1.to_y: "bar";
319 rel1.relative: 0.0 0.0;
320 rel2.to_x: "insidep1";
321 rel2.to_y: "bar";
322 rel2.relative: 1.0 1.0;
323 image.normal: "inset_bar_horiz_glow_mid_base.png";
324 align: 0.0 0.5;
325 }
326 description { state: "end" 0.0;
327 inherit: "default" 0.0;
328 align: 1.0 0.5;
329 }
330 }
331 part { name: "elm.text.status"; type: TEXT; mouse_events: 0;
332 scale: 1;
333 effect: GLOW;
334 description { state: "default" 0.0;
335 fixed: 1 1;
336 rel1.to: "inside";
337 rel2.to: "inside";
338 color_class: "progress_status";
339 align: 1.0 0.5;
340 text { font: FN; size: 10;
341 min: 0 1;
342 text_class: "progress_status";
343 align: 1.0 0.5;
344 }
345 color: FN_COL_HIGHLIGHT_CLICKED;
346 visible: 1;
347 }
348 description { state: "hidden" 0.0;
349 inherit: "default" 0.0;
350 visible: 0;
351 }
352 }
353 part { name: "pulse2";
354 clip_to: "pulse_clip";
355 scale: 1;
356 description { state: "default" 0.0;
357 fixed: 1 1;
358 min: 36 14;
359 max: 36 14;
360 rel1.to: "pulse";
361 rel2.to: "pulse";
362 image.normal: "inset_bar_horiz_glow_mid_light.png";
363 color: 255 255 255 0;
364 }
365 description { state: "glow" 0.0;
366 inherit: "default" 0.0;
367 color: 255 255 255 255;
368 }
369 }
370 part { name: "light";
371 clip_to: "fract_clip";
372 scale: 1;
373 description { state: "default" 0.0;
374 max: 36 11;
375 rel1.to_x: "bar";
376 rel1.to_y: "bar";
377 rel1.relative: 0.0 (26/96);
378 rel2.to_x: "barend";
379 rel2.to_y: "bar";
380 rel2.relative: 0.2 ((26+44)/96);
381 align: 1.0 0.0;
382 image.normal: "inset_bar_horiz_glow_light.png";
383 image.border: 0 20 0 0;
384 image.border_scale_by: 0.25; image.border_scale: 1;
385 color: 255 255 255 0;
386 }
387 description { state: "inv" 0.0;
388 inherit: "default" 0.0;
389 rel1.to_x: "barend";
390 rel1.to_y: "bar";
391 rel1.relative: 0.8 (26/96);
392 rel2.to_x: "bar";
393 rel2.to_y: "bar";
394 rel2.relative: 1.0 ((26+44)/96);
395 align: 0.0 0.0;
396 image.normal: "inset_bar_horiz_glow_inv_light.png";
397 image.border: 20 0 0 0;
398 }
399 }
400 }
401 programs {
402 program { name: "inverted-on";
403 signal: "elm,state,inverted,on"; source: "elm";
404 action: STATE_SET "inv" 0.0;
405 target: "bar";
406 target: "barend";
407 target: "light";
408 }
409 program { name: "inverted-off";
410 signal: "elm,state,inverted,off"; source: "elm";
411 action: STATE_SET "default" 0.0;
412 target: "bar";
413 target: "barend";
414 target: "light";
415 }
416 program { name: "drag-set";
417 signal: "drag,set"; source: "elm.cur.progressbar";
418 script {
419 new a, Float:dx, Float:dy, Float:vl, st[20];
420
421 get_drag(PART:"elm.cur.progressbar", dx, dy);
422 get_state(PART:"bar", st, 19, vl);
423 if (!strcmp(st, "inv")) {
424 a = round(((1.0 - dx) * 255) / 0.2);
425 custom_state(PART:"light", "inv", 0.0);
426 } else {
427 a = round((dx * 255) / 0.2);
428 custom_state(PART:"light", "default", 0.0);
429 }
430 if (a > 255) { a = 255; }
431 set_state_val(PART:"light", STATE_COLOR, 255, 255, 255, a);
432 set_state(PART:"light", "custom", 0.0);
433 }
434 }
435 program { name: "pulse-mode0";
436 signal: "elm,state,pulse"; source: "elm";
437 action: STATE_SET "hidden" 0.0;
438 target: "elm.text.status";
439 after: "pulse-mode1";
440 }
441 program { name: "pulse-mode1";
442 signal: "elm,state,pulse,start"; source: "elm";
443 action: STATE_SET "pulse" 0.0;
444 target: "fract_clip";
445 }
446 program { name: "pulse-start";
447 signal: "elm,state,pulse,start"; source: "elm";
448 action: STATE_SET "pulse" 0.0;
449 target: "pulse_clip";
450 target: "fract_clip";
451 after: "pulse0";
452 after: "pulse0.1";
453 }
454 program { name: "pulse0.1";
455 action: STATE_SET "glow" 0.0;
456 transition: ACCELERATE 0.4;
457 target: "pulse2";
458 after: "pulse0.2";
459 }
460 program { name: "pulse0.2";
461 action: STATE_SET "default" 0.0;
462 transition: DECELERATE 0.4;
463 target: "pulse2";
464 }
465 program { name: "pulse0";
466 action: STATE_SET "end" 0.0;
467 transition: SINUSOIDAL 0.8;
468 target: "pulse";
469 after: "pulse1";
470 after: "pulse0.1";
471 }
472 program { name: "pulse1";
473 action: STATE_SET "default" 0.0;
474 transition: SINUSOIDAL 0.8;
475 target: "pulse";
476 after: "pulse0";
477 after: "pulse0.1";
478 }
479 program { name: "fraction";
480 signal: "elm,state,fraction"; source: "elm";
481 action: STATE_SET "default" 0.0;
482 target: "elm.text.status";
483 after: "pulse-stop";
484 }
485 program { name: "elmpulse-stop";
486 signal: "elm,state,pulse,stop"; source: "elm";
487 action: ACTION_STOP;
488 target: "pulse0";
489 target: "pulse1";
490 after: "pulse-stop";
491 }
492 program { name: "pulse-stop";
493 action: STATE_SET "default" 0.0;
494 target: "pulse_clip";
495 }
496 program { name: "units-visible";
497 signal: "elm,state,units,visible"; source: "elm";
498 action: STATE_SET "default" 0.0;
499 target: "elm.text.status";
500 }
501 program { name: "units-hidden";
502 signal: "elm,state,units,hidden"; source: "elm";
503 action: STATE_SET "hidden" 0.0;
504 target: "elm.text.status";
505 }
506 program { name: "text-visible";
507 signal: "elm,state,elm.text,set"; source: "elm";
508 script {
509 new m = get_int(slmode);
510 m |= LABEL; set_int(slmode, m);
511 eval_mode(m);
512 }
513 }
514 program { name: "text-hidden";
515 signal: "elm,state,elm.text,unset"; source: "elm";
516 script {
517 new m = get_int(slmode);
518 m &= ~LABEL; set_int(slmode, m);
519 eval_mode(m);
520 }
521 }
522 program { name: "icon-visible";
523 signal: "elm,state,content,set"; source: "elm";
524 script {
525 new m = get_int(slmode);
526 m |= ICON; set_int(slmode, m);
527 eval_mode(m);
528 }
529 }
530 program { name: "icon-hidden";
531 signal: "elm,state,content,unset"; source: "elm";
532 script {
533 new m = get_int(slmode);
534 m &= ~ICON; set_int(slmode, m);
535 eval_mode(m);
536 }
537 }
538 program { name: "state-disabled";
539 signal: "elm,state,disabled"; source: "elm";
540 script {
541 new m = get_int(slmode);
542 m |= DISABLE; set_int(slmode, m);
543 eval_mode(m);
544 }
545 }
546 program { name: "state-enabled";
547 signal: "elm,state,enabled"; source: "elm";
548 script {
549 new m = get_int(slmode);
550 m &= ~DISABLE; set_int(slmode, m);
551 eval_mode(m);
552 }
553 }
554 }
555#undef ICON
556#undef LABEL
557#undef UNITS
558#undef DISABLE
3} 559}
4 560
5group { "efl/progressbar/vertical"; 561group { "efl/progressbar/vertical";
6 inherit: "elm/progressbar/vertical/default"; 562 images.image: "inset_bar_vert_base.png" COMP;
563 images.image: "inset_bar_vert_light.png" COMP;
564 images.image: "inset_bar_vert_inside_base.png" COMP;
565 images.image: "inset_bar_vert_inside_light.png" COMP;
566 images.image: "inset_bar_vert_glow_base.png" COMP;
567 images.image: "inset_bar_vert_glow_light.png" COMP;
568 images.image: "inset_bar_vert_glow_inv_base.png" COMP;
569 images.image: "inset_bar_vert_glow_inv_light.png" COMP;
570 images.image: "inset_bar_vert_glow_mid_base.png" COMP;
571 images.image: "inset_bar_vert_glow_mid_light.png" COMP;
572#define ICON 1
573#define LABEL 2
574#define DISABLE 4
575 script {
576 public slmode;
577 public eval_mode(m) {
578 new ic = m & ICON;
579 new l = m & LABEL;
580 new d = m & DISABLE;
581 if (l) {
582 if (!d) {
583 set_state(PART:"elm.text", "visible", 0.0);
584 } else {
585 set_state(PART:"elm.text", "disabled_visible", 0.0);
586 }
587 } else {
588 set_state(PART:"elm.text", "default", 0.0);
589 }
590 if (ic) {
591 set_state(PART:"elm.swallow.content", "visible", 0.0);
592 set_state(PART:"sizer.content", "visible", 0.0);
593 } else {
594 set_state(PART:"elm.swallow.content", "default", 0.0);
595 set_state(PART:"sizer.content", "default", 0.0);
596 }
597 if (!d) {
598 set_state(PART:"dis_clip", "default", 0.0);
599 } else {
600 set_state(PART:"dis_clip", "disabled", 0.0);
601 }
602 }
603 }
604 parts {
605 part { name: "dis_clip"; type: RECT;
606 description { state: "default" 0.0;
607 rel1.to: "elm.swallow.content";
608 rel2.to: "elm.swallow.content";
609 }
610 description { state: "disabled" 0.0;
611 inherit: "default" 0.0;
612 color: 255 255 255 64;
613 }
614 }
615 part { name: "pulse_clip"; type: RECT;
616 description { state: "default" 0.0;
617 rel1.relative: -2.0 -2.0;
618 rel2.relative: 3.0 3.0;
619 visible: 0;
620 }
621 description { state: "pulse" 0.0;
622 inherit: "default" 0.0;
623 visible: 1;
624 }
625 }
626 part { name: "fract_clip"; type: RECT;
627 description { state: "default" 0.0;
628 rel1.relative: -2.0 -2.0;
629 rel2.relative: 3.0 3.0;
630 }
631 description { state: "pulse" 0.0;
632 inherit: "default" 0.0;
633 visible: 0;
634 }
635 }
636 part { name: "elm.swallow.content"; type: SWALLOW;
637 clip_to: "dis_clip";
638 required;
639 description { state: "default" 0.0;
640 visible: 0;
641 align: 0.5 0.0;
642 fixed: 0 1;
643 rel1.offset: 2 0;
644 rel2.offset: -3 -1;
645 rel2.relative: 1.0 0.0;
646 }
647 description { state: "visible" 0.0;
648 inherit: "default" 0.0;
649 visible: 1;
650 aspect: 1.0 1.0; aspect_preference: HORIZONTAL;
651 rel1.offset: 2 2;
652 rel2.offset: -3 2;
653 }
654 }
655 part { name: "sizer.content"; type: TEXT; mouse_events: 0;
656 scale: 1;
657 description { state: "default" 0.0;
658 fixed: 1 1;
659 visible: 0;
660 text { font: FN; size: 10;
661 min: 0 0;
662 text_class: "progressbar_text";
663 }
664 }
665 description { state: "visible" 0.0;
666 inherit: "default" 0.0;
667 rel1.to: "elm.swallow.content";
668 rel2.to: "elm.swallow.content";
669 text {
670 min: 1 1;
671 ellipsis: -1;
672 text: "M";
673 }
674 }
675 }
676 part { name: "elm.text"; type: TEXT; mouse_events: 0;
677 effect: SHADOW BOTTOM;
678 scale: 1;
679 required;
680 description { state: "default" 0.0;
681 fixed: 1 1;
682 align: 0.5 0.0;
683 rel1.to_y: "elm.swallow.content";
684 rel1.relative: 0.0 1.0;
685 rel1.offset: 2 -1;
686 rel2.to_y: "elm.swallow.content";
687 rel2.relative: 1.0 1.0;
688 rel2.offset: -3 -1;
689 color: FN_COL_DEFAULT;
690 color_class: "progressbar_text";
691 text { font: FN; size: 10;
692 text_class: "progressbar";
693 min: 0 0;
694 align: 0.5 0.0;
695 }
696 visible: 0;
697 }
698 description { state: "visible" 0.0;
699 inherit: "default" 0.0;
700 fixed: 0 1;
701 visible: 1;
702 rel1.offset: 2 2;
703 rel2.offset: -3 2;
704 text.min: 1 1;
705 text.ellipsis: -1;
706 }
707 description { state: "disabled_visible" 0.0;
708 inherit: "visible" 0.0;
709 color_class: "progressbar_text_disabled";
710 color: FN_COL_DISABLE_LIGHTER_SHADOW;
711 }
712 }
713 part { name: "bg-hi";
714 description { state: "default" 0.0;
715 rel1.to: "bg";
716 rel1.offset: 0 1;
717 rel2.to: "bg";
718 rel2.offset: -1 0;
719 image.normal: "inset_bar_vert_light.png";
720 image.border: 0 0 32 32;
721 image.border_scale_by: 0.25; image.border_scale: 1;
722 }
723 }
724 part { name: "bg";
725 scale: 1;
726 description { state: "default" 0.0;
727 min: 16 16;
728 max: 16 -1;
729 rel1.to_y: "elm.text";
730 rel1.relative: 0.0 1.0;
731 rel1.offset: 3 3;
732 rel2.offset: -4 -4;
733 image.normal: "inset_bar_vert_base.png";
734 image.border: 0 0 32 32;
735 image.border_scale_by: 0.25; image.border_scale: 1;
736 }
737 }
738 part { name: "ins0"; type: SPACER;
739 scale: 1;
740 description { state: "default" 0.0;
741 fixed: 0 1;
742 rel1.to: "bg";
743 rel2.to: "bg";
744 rel2.relative: 1.0 0.0;
745 min: 16 5;
746 align: 0.5 0.0;
747 }
748 }
749 part { name: "ins1"; type: SPACER;
750 scale: 1;
751 description { state: "default" 0.0;
752 fixed: 0 1;
753 rel1.to: "bg";
754 rel1.relative: 0.0 1.0;
755 rel2.to: "bg";
756 min: 16 5;
757 align: 0.5 1.0;
758 }
759 }
760 part { name: "inside-hi";
761 scale: 1;
762 description { state: "default" 0.0;
763 rel1.to: "inside";
764 rel1.offset: 0 1;
765 rel2.to: "inside";
766 rel2.offset: -1 0;
767 image.normal: "inset_bar_vert_inside_light.png";
768 image.border: 0 0 8 8;
769 image.border_scale_by: 0.25; image.border_scale: 1;
770 }
771 }
772 part { name: "inside";
773 scale: 1;
774 description { state: "default" 0.0;
775 min: 4 4;
776 rel1.to: "ins0";
777 rel1.relative: (6/16) 1.0;
778 rel2.to: "ins1";
779 rel2.relative: (10/16) 0.0;
780 image.normal: "inset_bar_vert_inside_base.png";
781 image.border: 0 0 8 8;
782 image.border_scale_by: 0.25; image.border_scale: 1;
783 }
784 }
785 part { name: "elm.swallow.bar"; type: SWALLOW; mouse_events: 0;
786 description { state: "default" 0.0;
787 rel1.to: "inside";
788 rel2.to: "inside";
789 }
790 }
791 part { name: "elm.cur.progressbar"; mouse_events: 0; type: SPACER;
792 scale: 1;
793 dragable.confine: "inside";
794 dragable.x: 0 0 0;
795 dragable.y: 1 1 1;
796 description { state: "default" 0.0;
797 fixed: 1 1;
798 min: 4 8;
799 max: 4 8;
800 rel1.to: "inside";
801 rel2.to: "inside";
802 }
803 }
804 part { name: "barend"; type: SPACER;
805 scale: 1;
806 description { state: "default" 0.0;
807 fixed: 0 1;
808 min: 16 14;
809 rel1.to_y: "elm.cur.progressbar";
810 rel1.relative: 0.0 1.0;
811 rel2.to_y: "elm.cur.progressbar";
812 rel2.relative: 1.0 1.0;
813 align: 0.5 0.0;
814 }
815 description { state: "inv" 0.0;
816 inherit: "default" 0.0;
817 rel1.relative: 0.0 0.0;
818 rel2.relative: 1.0 0.0;
819 align: 0.5 1.0;
820 }
821 }
822 part { name: "bar";
823 clip_to: "fract_clip";
824 scale: 1;
825 description { state: "default" 0.0;
826 rel1.to_y: "ins0";
827 rel1.to_x: "bg";
828 rel1.relative: -0.25 (12/16);
829 rel2.to_y: "barend";
830 rel2.to_x: "bg";
831 rel2.relative: 1.25 1.0;
832 image.normal: "inset_bar_vert_glow_base.png";
833 image.border: 0 0 0 72;
834 image.border_scale_by: 0.25; image.border_scale: 1;
835 }
836 description { state: "inv" 0.0;
837 inherit: "default" 0.0;
838 rel1.to_y: "barend";
839 rel1.relative: -0.25 0.0;
840 rel2.to_y: "ins1";
841 rel2.relative: 1.25 (4/16);
842 image.normal: "inset_bar_vert_glow_inv_base.png";
843 image.border: 0 0 72 0;
844 }
845 }
846 part { name: "insidep0"; type: SPACER;
847 scale: 1;
848 description { state: "default" 0.0;
849 fixed: 0 1;
850 min: 16 20;
851 rel1.to_y: "inside";
852 rel1.relative: 0.0 0.0;
853 rel2.to_y: "inside";
854 rel2.relative: 1.0 0.0;
855 align: 0.5 1.0;
856 }
857 }
858 part { name: "insidep1"; type: SPACER;
859 scale: 1;
860 description { state: "default" 0.0;
861 fixed: 0 1;
862 min: 16 20;
863 rel1.to_y: "inside";
864 rel1.relative: 0.0 1.0;
865 rel2.to_y: "inside";
866 rel2.relative: 1.0 1.0;
867 align: 0.5 0.0;
868 }
869 }
870 part { name: "pulse";
871 clip_to: "pulse_clip";
872 scale: 1;
873 description { state: "default" 0.0;
874 fixed: 1 1;
875 min: 24 64;
876 max: 24 64;
877 rel1.to_y: "insidep0";
878 rel1.to_x: "bar";
879 rel1.relative: 0.0 0.0;
880 rel2.to_y: "insidep1";
881 rel2.to_x: "bar";
882 rel2.relative: 1.0 1.0;
883 image.normal: "inset_bar_vert_glow_mid_base.png";
884 align: 0.5 0.0;
885 }
886 description { state: "end" 0.0;
887 inherit: "default" 0.0;
888 align: 0.5 1.0;
889 }
890 }
891 part { name: "statbox"; type: SPACER;
892 scale: 1;
893 description { state: "default" 0.0;
894 fixed: 1 1;
895 rel1.to: "inside";
896 rel2.to: "inside";
897 aspect: 1.0 1.0; aspect_preference: NONE;
898 }
899 }
900 part { name: "elm.text.status"; type: TEXT; mouse_events: 0;
901 scale: 1;
902 effect: GLOW;
903 description { state: "default" 0.0;
904 fixed: 1 1;
905 rel1.to: "statbox";
906 rel2.to: "statbox";
907 color_class: "progress_status";
908 align: 1.0 0.5;
909 text { font: FN; size: 10;
910 min: 0 1;
911 text_class: "progress_status";
912 align: 1.0 0.5;
913 }
914 color: FN_COL_HIGHLIGHT_CLICKED;
915 visible: 1;
916 map.on: 1;
917 map.smooth: 0;
918 map.rotation.center: "statbox";
919 map.rotation.z: 90;
920 }
921 description { state: "hidden" 0.0;
922 inherit: "default" 0.0;
923 visible: 0;
924 }
925 }
926 part { name: "pulse2";
927 clip_to: "pulse_clip";
928 scale: 1;
929 description { state: "default" 0.0;
930 fixed: 1 1;
931 min: 14 36;
932 max: 14 36;
933 rel1.to: "pulse";
934 rel2.to: "pulse";
935 image.normal: "inset_bar_vert_glow_mid_light.png";
936 color: 255 255 255 0;
937 }
938 description { state: "glow" 0.0;
939 inherit: "default" 0.0;
940 color: 255 255 255 255;
941 }
942 }
943 part { name: "light";
944 clip_to: "fract_clip";
945 scale: 1;
946 description { state: "default" 0.0;
947 max: 11 36;
948 rel1.to_y: "bar";
949 rel1.to_x: "bar";
950 rel1.relative: (26/96) 0.0;
951 rel2.to_y: "barend";
952 rel2.to_x: "bar";
953 rel2.relative: ((26+44)/96) 0.2;
954 align: 0.0 1.0;
955 image.normal: "inset_bar_vert_glow_light.png";
956 image.border: 0 0 0 20;
957 image.border_scale_by: 0.25; image.border_scale: 1;
958 color: 255 255 255 0;
959 }
960 description { state: "inv" 0.0;
961 inherit: "default" 0.0;
962 rel1.to_y: "barend";
963 rel1.to_x: "bar";
964 rel1.relative: (26/96) 0.8;
965 rel2.to_y: "bar";
966 rel2.to_x: "bar";
967 rel2.relative: ((26+44)/96) 1.0;
968 align: 0.0 0.0;
969 image.normal: "inset_bar_vert_glow_inv_light.png";
970 image.border: 0 0 20 0;
971 }
972 }
973 }
974 programs {
975 program { name: "inverted-on";
976 signal: "elm,state,inverted,on"; source: "elm";
977 action: STATE_SET "inv" 0.0;
978 target: "bar";
979 target: "barend";
980 target: "light";
981 }
982 program { name: "inverted-off";
983 signal: "elm,state,inverted,off"; source: "elm";
984 action: STATE_SET "default" 0.0;
985 target: "bar";
986 target: "barend";
987 target: "light";
988 }
989 program { name: "drag-set";
990 signal: "drag,set"; source: "elm.cur.progressbar";
991 script {
992 new a, Float:dx, Float:dy, Float:vl, st[20];
993
994 get_drag(PART:"elm.cur.progressbar", dx, dy);
995 get_state(PART:"bar", st, 19, vl);
996 if (!strcmp(st, "inv")) {
997 a = round(((1.0 - dy) * 255) / 0.2);
998 custom_state(PART:"light", "inv", 0.0);
999 } else {
1000 a = round((dy * 255) / 0.2);
1001 custom_state(PART:"light", "default", 0.0);
1002 }
1003 if (a > 255) { a = 255; }
1004 set_state_val(PART:"light", STATE_COLOR, 255, 255, 255, a);
1005 set_state(PART:"light", "custom", 0.0);
1006 }
1007 }
1008 program { name: "pulse-mode0";
1009 signal: "elm,state,pulse"; source: "elm";
1010 action: STATE_SET "hidden" 0.0;
1011 target: "elm.text.status";
1012 after: "pulse-mode1";
1013 }
1014 program { name: "pulse-mode1";
1015 signal: "elm,state,pulse,start"; source: "elm";
1016 action: STATE_SET "pulse" 0.0;
1017 target: "fract_clip";
1018 }
1019 program { name: "pulse-start";
1020 signal: "elm,state,pulse,start"; source: "elm";
1021 action: STATE_SET "pulse" 0.0;
1022 target: "pulse_clip";
1023 target: "fract_clip";
1024 after: "pulse0";
1025 after: "pulse0.1";
1026 }
1027 program { name: "pulse0.1";
1028 action: STATE_SET "glow" 0.0;
1029 transition: ACCELERATE 0.4;
1030 target: "pulse2";
1031 after: "pulse0.2";
1032 }
1033 program { name: "pulse0.2";
1034 action: STATE_SET "default" 0.0;
1035 transition: DECELERATE 0.4;
1036 target: "pulse2";
1037 }
1038 program { name: "pulse0";
1039 action: STATE_SET "end" 0.0;
1040 transition: SINUSOIDAL 0.8;
1041 target: "pulse";
1042 after: "pulse1";
1043 after: "pulse0.1";
1044 }
1045 program { name: "pulse1";
1046 action: STATE_SET "default" 0.0;
1047 transition: SINUSOIDAL 0.8;
1048 target: "pulse";
1049 after: "pulse0";
1050 after: "pulse0.1";
1051 }
1052 program { name: "fraction";
1053 signal: "elm,state,fraction"; source: "elm";
1054 action: STATE_SET "default" 0.0;
1055 target: "elm.text.status";
1056 after: "pulse-stop";
1057 }
1058 program { name: "elmpulsestop";
1059 signal: "elm,state,pulse,stop"; source: "elm";
1060 action: ACTION_STOP;
1061 target: "pulse0";
1062 target: "pulse1";
1063 after: "pulse-stop";
1064 }
1065 program { name: "pulse-stop";
1066 action: STATE_SET "default" 0.0;
1067 target: "pulse_clip";
1068 }
1069 program { name: "unit-visible";
1070 signal: "elm,state,units,visible"; source: "elm";
1071 action: STATE_SET "default" 0.0;
1072 target: "elm.text.status";
1073 }
1074 program { name: "unit-hidden";
1075 signal: "elm,state,units,hidden"; source: "elm";
1076 action: STATE_SET "hidden" 0.0;
1077 target: "elm.text.status";
1078 }
1079 program { name: "text-visible";
1080 signal: "elm,state,elm.text,set"; source: "elm";
1081 script {
1082 new m = get_int(slmode);
1083 m |= LABEL; set_int(slmode, m);
1084 eval_mode(m);
1085 }
1086 }
1087 program { name: "text-hidden";
1088 signal: "elm,state,elm.text,unset"; source: "elm";
1089 script {
1090 new m = get_int(slmode);
1091 m &= ~LABEL; set_int(slmode, m);
1092 eval_mode(m);
1093 }
1094 }
1095 program { name: "icon-visible";
1096 signal: "elm,state,content,set"; source: "elm";
1097 script {
1098 new m = get_int(slmode);
1099 m |= ICON; set_int(slmode, m);
1100 eval_mode(m);
1101 }
1102 }
1103 program { name: "icon-hidden";
1104 signal: "elm,state,content,unset"; source: "elm";
1105 script {
1106 new m = get_int(slmode);
1107 m &= ~ICON; set_int(slmode, m);
1108 eval_mode(m);
1109 }
1110 }
1111 program { name: "elmdisabled";
1112 signal: "elm,state,disabled"; source: "elm";
1113 script {
1114 new m = get_int(slmode);
1115 m |= DISABLE; set_int(slmode, m);
1116 eval_mode(m);
1117 }
1118 }
1119 program { name: "elmenabled";
1120 signal: "elm,state,enabled"; source: "elm";
1121 script {
1122 new m = get_int(slmode);
1123 m &= ~DISABLE; set_int(slmode, m);
1124 eval_mode(m);
1125 }
1126 }
1127 }
1128#undef ICON
1129#undef LABEL
1130#undef UNITS
1131#undef DISABLE
7} 1132}
8 1133
9group { "efl/progressbar/horizontal:wheel"; 1134group { "efl/progressbar/horizontal:wheel";
10 inherit: "elm/progressbar/horizontal/wheel";
11 alias: "efl/progressbar/vertical:wheel"; 1135 alias: "efl/progressbar/vertical:wheel";
1136 images.image: "knob_round_busy.png" COMP;
1137 images.image: "glow_round_corners.png" COMP;
1138 parts {
1139 part { name: "elm.swallow.bar" ; type: SWALLOW; mouse_events: 0;
1140 description { state: "default" 0.0;
1141 min: 0 0;
1142 max: 0 0;
1143 visible: 0;
1144 }
1145 }
1146 part { name: "elm.swallow.content"; type: SWALLOW;
1147 description { state: "default" 0.0;
1148 min: 0 0;
1149 max: 0 0;
1150 visible: 0;
1151 }
1152 }
1153 part { name: "busy_clip"; type: RECT;
1154 description { state: "default" 0.0;
1155 visible: 0;
1156 color: 255 255 255 0;
1157 }
1158 description { state: "active" 0.0;
1159 visible: 1;
1160 color: 255 255 255 255;
1161 }
1162 }
1163 part { name: "knob"; mouse_events: 0;
1164 scale: 1;
1165 description { state: "default" 0.0;
1166 image.normal: "knob_round_busy.png";
1167 min: 40 40;
1168 max: 40 40;
1169 }
1170 }
1171 part { name: "knob_spinner"; mouse_events: 0;
1172 clip_to: "busy_clip";
1173 description { state: "default" 0.0;
1174 fixed: 1 1;
1175 rel1.to: "knob";
1176 rel2.to: "knob";
1177 image.normal: "glow_round_corners.png";
1178 map.on: 1;
1179 map.smooth: 1;
1180 map.rotation.center: "knob";
1181 }
1182 description { state: "spin" 0.0;
1183 inherit: "default" 0.0;
1184 map.rotation.z: 360;
1185 }
1186 }
1187 }
1188 programs {
1189 program { name: "spin";
1190 signal: "elm,state,pulse,start"; source: "elm";
1191 action: STATE_SET "spin" 0.0;
1192 transition: LINEAR 1.0;
1193 target: "knob_spinner";
1194 after: "spin2";
1195 }
1196 program { name: "spin2";
1197 action: STATE_SET "default" 0.0;
1198 target: "knob_spinner";
1199 after: "spin";
1200 }
1201 program {
1202 signal: "elm,state,pulse,start"; source: "elm";
1203 action: STATE_SET "active" 0.0;
1204 transition: SINUSOIDAL 0.25;
1205 target: "busy_clip";
1206 }
1207 program {
1208 signal: "elm,state,pulse,stop"; source: "elm";
1209 action: STATE_SET "default" 0.0;
1210 transition: SINUSOIDAL 1.0;
1211 target: "busy_clip";
1212 after: "spin3";
1213 }
1214 program { name: "spin3";
1215 action: ACTION_STOP;
1216 target: "spin";
1217 target: "spin2";
1218 after: "spin4";
1219 }
1220 program { name: "spin4";
1221 action: STATE_SET "default" 0.0;
1222 target: "knob_spinner";
1223 }
1224 }
12} 1225}
13 1226
14group { "efl/progressbar/horizontal:double"; 1227group { "efl/progressbar/horizontal:double";
15 inherit: "elm/progressbar/horizontal/double"; 1228 inherit: "efl/progressbar/horizontal";
1229 images {
1230 image: "inset_bar_horiz_glow_base_double.png" COMP;
1231 image: "inset_bar_horiz_glow_inv_base_double.png" COMP;
1232 }
1233 parts {
1234 part { name: "elm.cur.progressbar1"; mouse_events: 0; type: SPACER;
1235 insert_after: "inside";
1236 scale: 1;
1237 dragable.confine: "inside";
1238 dragable.x: 1 1 1;
1239 dragable.y: 0 0 0;
1240 description { state: "default" 0.0;
1241 fixed: 1 1;
1242 min: 8 4;
1243 max: 8 4;
1244 rel1.to: "inside";
1245 rel2.to: "inside";
1246 }
1247 }
1248 part { name: "barend1"; type: SPACER;
1249 scale: 1;
1250 description { state: "default" 0.0;
1251 fixed: 1 0;
1252 min: 14 16;
1253 rel1.to_x: "elm.cur.progressbar1";
1254 rel1.relative: 1.0 0.0;
1255 rel2.to_x: "elm.cur.progressbar1";
1256 rel2.relative: 1.0 1.0;
1257 align: 0.0 0.5;
1258 }
1259 description { state: "inv" 0.0;
1260 inherit: "default" 0.0;
1261 rel1.relative: 0.0 0.0;
1262 rel2.relative: 0.0 1.0;
1263 align: 1.0 0.5;
1264 }
1265 }
1266 part { name: "bar1";
1267 insert_after: "barend";
1268 clip_to: "fract_clip";
1269 scale: 1;
1270 description { state: "default" 0.0;
1271 rel1.to_x: "ins0";
1272 rel1.to_y: "bg";
1273 rel1.relative: (12/16) -0.25;
1274 rel2.to_x: "barend1";
1275 rel2.to_y: "bg";
1276 rel2.relative: 1.0 1.25;
1277 image.normal: "inset_bar_horiz_glow_base_double.png";
1278 image.border: 0 72 0 0;
1279 image.border_scale_by: 0.25; image.border_scale: 1;
1280 color: 51 153 255 128;
1281 }
1282 description { state: "inv" 0.0;
1283 inherit: "default" 0.0;
1284 rel1.to_x: "barend";
1285 rel1.relative: 0.0 -0.25;
1286 rel2.to_x: "ins1";
1287 rel2.relative: (4/16) 1.25;
1288 image.normal: "inset_bar_horiz_glow_inv_base_double.png";
1289 image.border: 72 0 0 0;
1290 }
1291 }
1292 }
1293 programs {
1294 program { name: "inverted-on";
1295 signal: "elm,state,inverted,on"; source: "elm";
1296 action: STATE_SET "inv" 0.0;
1297 target: "bar";
1298 target: "bar1";
1299 target: "barend";
1300 target: "barend1";
1301 target: "light";
1302 }
1303 program
1304 { name: "inverted-off";
1305 signal: "elm,state,inverted,off"; source: "elm";
1306 action: STATE_SET "default" 0.0;
1307 target: "bar";
1308 target: "bar1";
1309 target: "barend";
1310 target: "barend1";
1311 target: "light";
1312 }
1313 }
16} 1314}
17 1315
18group { "efl/progressbar/vertical:double"; 1316group { "efl/progressbar/vertical:double";
19 inherit: "elm/progressbar/vertical/double"; 1317 inherit: "efl/progressbar/vertical";
1318 images {
1319 image: "inset_bar_vert_glow_base_double.png" COMP;
1320 image: "inset_bar_vert_glow_inv_base_double.png" COMP;
1321 }
1322 parts {
1323 part { name: "elm.cur.progressbar1"; mouse_events: 0; type: SPACER;
1324 insert_after: "inside";
1325 scale: 1;
1326 dragable.confine: "inside";
1327 dragable.x: 0 0 0;
1328 dragable.y: 1 1 1;
1329 description { state: "default" 0.0;
1330 fixed: 1 1;
1331 min: 4 8;
1332 max: 4 8;
1333 rel1.to: "inside";
1334 rel2.to: "inside";
1335 }
1336 }
1337 part { name: "barend1"; type: SPACER;
1338 scale: 1;
1339 description { state: "default" 0.0;
1340 fixed: 0 1;
1341 min: 16 14;
1342 rel1.to_y: "elm.cur.progressbar1";
1343 rel1.relative: 0.0 1.0;
1344 rel2.to_y: "elm.cur.progressbar1";
1345 rel2.relative: 1.0 1.0;
1346 align: 0.5 0.0;
1347 }
1348 description { state: "inv" 0.0;
1349 inherit: "default" 0.0;
1350 rel1.relative: 0.0 0.0;
1351 rel2.relative: 1.0 0.0;
1352 align: 0.5 1.0;
1353 }
1354 }
1355 part { name: "bar1";
1356 insert_after: "barend";
1357 clip_to: "fract_clip";
1358 scale: 1;
1359 description { state: "default" 0.0;
1360 rel1.to_y: "ins0";
1361 rel1.to_x: "bg";
1362 rel1.relative: -0.25 (12/16);
1363 rel2.to_y: "barend1";
1364 rel2.to_x: "bg";
1365 rel2.relative: 1.25 1.0;
1366 image.normal: "inset_bar_vert_glow_base_double.png";
1367 image.border: 0 0 0 72;
1368 image.border_scale_by: 0.25; image.border_scale: 1;
1369 color: 51 153 255 128;
1370 }
1371 description { state: "inv" 0.0;
1372 inherit: "default" 0.0;
1373 rel1.to_y: "barend1";
1374 rel1.relative: -0.25 0.0;
1375 rel2.to_y: "ins1";
1376 rel2.relative: 1.25 (4/16);
1377 image.normal: "inset_bar_vert_glow_inv_base_double.png";
1378 image.border: 0 0 72 0;
1379 }
1380 }
1381 }
1382 programs {
1383 program { name: "inverted-on";
1384 signal: "elm,state,inverted,on"; source: "elm";
1385 action: STATE_SET "inv" 0.0;
1386 target: "bar";
1387 target: "barend";
1388 target: "light";
1389 target: "bar1";
1390 target: "barend1";
1391 }
1392 program { name: "inverted-off";
1393 signal: "elm,state,inverted,off"; source: "elm";
1394 action: STATE_SET "default" 0.0;
1395 target: "bar";
1396 target: "barend";
1397 target: "light";
1398 target: "bar1";
1399 target: "barend1";
1400 }
1401 }
20} 1402}
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 27cab7b3ae..a2e82a5f71 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -109,6 +109,7 @@ elm_public_eolian_files += \
109 lib/elementary/efl_ui_button_legacy_part.eo \ 109 lib/elementary/efl_ui_button_legacy_part.eo \
110 lib/elementary/efl_ui_radio_legacy_part.eo \ 110 lib/elementary/efl_ui_radio_legacy_part.eo \
111 lib/elementary/efl_ui_check_legacy_part.eo \ 111 lib/elementary/efl_ui_check_legacy_part.eo \
112 lib/elementary/efl_ui_progressbar_legacy_part.eo \
112 lib/elementary/elm_spinner.eo \ 113 lib/elementary/elm_spinner.eo \
113 lib/elementary/elm_multibuttonentry_item.eo \ 114 lib/elementary/elm_multibuttonentry_item.eo \
114 lib/elementary/elm_interface_scrollable.eo \ 115 lib/elementary/elm_interface_scrollable.eo \
diff --git a/src/bin/elementary/test_ui_progressbar.c b/src/bin/elementary/test_ui_progressbar.c
index e1391421b1..0af6c6aaad 100644
--- a/src/bin/elementary/test_ui_progressbar.c
+++ b/src/bin/elementary/test_ui_progressbar.c
@@ -113,6 +113,7 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
113{ 113{
114 Eo *win, *bx, *btbx; 114 Eo *win, *bx, *btbx;
115 pbdata *pd; 115 pbdata *pd;
116 char buf[PATH_MAX];
116 117
117 pd = (pbdata *)calloc(1, sizeof(pbdata)); 118 pd = (pbdata *)calloc(1, sizeof(pbdata));
118 119
@@ -135,6 +136,12 @@ test_ui_progressbar(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_inf
135 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(250, 20)) 136 efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(250, 20))
136 ); 137 );
137 138
139 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
140 efl_add(EFL_UI_IMAGE_CLASS, pd->pb1,
141 efl_file_set(efl_added, buf, NULL),
142 efl_content_set(pd->pb1, efl_added)
143 );
144
138 pd->pb2 = efl_add(EFL_UI_PROGRESSBAR_CLASS, bx, 145 pd->pb2 = efl_add(EFL_UI_PROGRESSBAR_CLASS, bx,
139 efl_pack(bx, efl_added), 146 efl_pack(bx, efl_added),
140 efl_text_set(efl_added, "10-100"), 147 efl_text_set(efl_added, "10-100"),
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index 40a6a66a1b..64c0f22643 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -169,41 +169,6 @@ _efl_ui_progressbar_elm_layout_sizing_eval(Eo *obj, Efl_Ui_Progressbar_Data *_pd
169 evas_object_size_hint_max_set(obj, -1, -1); 169 evas_object_size_hint_max_set(obj, -1, -1);
170} 170}
171 171
172/* FIXME: replicated from elm_layout just because progressbar's icon
173 * spot is elm.swallow.content, not elm.swallow.icon. Fix that
174 * whenever we can changed the theme API */
175static void
176_icon_signal_emit(Evas_Object *obj)
177{
178 char buf[64];
179
180 if (!elm_widget_resize_object_get(obj)) return;
181 snprintf(buf, sizeof(buf), "elm,state,icon,%s",
182 elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
183
184 elm_layout_signal_emit(obj, buf, "elm");
185}
186
187EOLIAN static Eina_Bool
188_efl_ui_progressbar_efl_ui_widget_widget_sub_object_del(Eo *obj, Efl_Ui_Progressbar_Data *pd EINA_UNUSED, Evas_Object *sobj)
189{
190 if (!efl_ui_widget_sub_object_del(efl_super(obj, MY_CLASS), sobj))
191 return EINA_FALSE;
192
193 _icon_signal_emit(obj);
194 return EINA_TRUE;
195}
196
197static Eina_Bool
198_efl_ui_progressbar_efl_ui_widget_widget_sub_object_add(Eo *obj, Efl_Ui_Progressbar_Data *pd EINA_UNUSED, Evas_Object *sobj)
199{
200 if (!efl_ui_widget_sub_object_add(efl_super(obj, MY_CLASS), sobj))
201 return EINA_FALSE;
202
203 _icon_signal_emit(obj);
204 return EINA_TRUE;
205}
206
207//TODO: efl_ui_slider also use this. 172//TODO: efl_ui_slider also use this.
208static const char * 173static const char *
209_theme_group_modify_pos_get(const char *cur_group, const char *search, size_t len, Eina_Bool is_legacy) 174_theme_group_modify_pos_get(const char *cur_group, const char *search, size_t len, Eina_Bool is_legacy)
@@ -307,11 +272,6 @@ _efl_ui_progressbar_efl_ui_widget_theme_apply(Eo *obj, Efl_Ui_Progressbar_Data *
307 _units_set(obj); 272 _units_set(obj);
308 _val_set(obj); 273 _val_set(obj);
309 274
310 /* FIXME: replicated from elm_layout just because progressbar's
311 * icon spot is elm.swallow.content, not elm.swallow.icon. Fix that
312 * whenever we can changed the theme API */
313 _icon_signal_emit(obj);
314
315 edje_object_message_signal_process(wd->resize_obj); 275 edje_object_message_signal_process(wd->resize_obj);
316 276
317 elm_layout_sizing_eval(obj); 277 elm_layout_sizing_eval(obj);
@@ -745,6 +705,7 @@ ELM_LAYOUT_TEXT_ALIASES_IMPLEMENT(efl_ui_progressbar)
745#include "efl_ui_progressbar.eo.c" 705#include "efl_ui_progressbar.eo.c"
746 706
747#include "efl_ui_progressbar_legacy.eo.h" 707#include "efl_ui_progressbar_legacy.eo.h"
708#include "efl_ui_progressbar_legacy_part.eo.h"
748 709
749#define MY_CLASS_NAME_LEGACY "elm_progressbar" 710#define MY_CLASS_NAME_LEGACY "elm_progressbar"
750 711
@@ -762,6 +723,84 @@ _efl_ui_progressbar_legacy_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
762 return obj; 723 return obj;
763} 724}
764 725
726/* FIXME: replicated from elm_layout just because progressbar's icon spot
727 * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
728 * can changed the theme API */
729static void
730_icon_signal_emit(Evas_Object *obj)
731{
732 char buf[64];
733
734 if (!elm_widget_resize_object_get(obj)) return;
735 snprintf(buf, sizeof(buf), "elm,state,icon,%s",
736 elm_layout_content_get(obj, "icon") ? "visible" : "hidden");
737
738 elm_layout_signal_emit(obj, buf, "elm");
739 edje_object_message_signal_process(elm_layout_edje_get(obj));
740 elm_layout_sizing_eval(obj);
741}
742
743/* FIXME: replicated from elm_layout just because progressbar's icon spot
744 * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
745 * can changed the theme API */
746EOLIAN static Efl_Ui_Theme_Apply
747_efl_ui_progressbar_legacy_efl_ui_widget_theme_apply(Eo *obj, void *_pd EINA_UNUSED)
748{
749 Efl_Ui_Theme_Apply int_ret = EFL_UI_THEME_APPLY_FAILED;
750
751 int_ret = efl_ui_widget_theme_apply(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS));
752 if (!int_ret) return EFL_UI_THEME_APPLY_FAILED;
753 _icon_signal_emit(obj);
754
755 return int_ret;
756}
757
758/* FIXME: replicated from elm_layout just because progressbar's icon spot
759 * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
760 * can changed the theme API */
761EOLIAN static Eina_Bool
762_efl_ui_progressbar_legacy_efl_ui_widget_widget_sub_object_del(Eo *obj, void *_pd EINA_UNUSED, Evas_Object *sobj)
763{
764 Eina_Bool int_ret = EINA_FALSE;
765
766 int_ret = elm_widget_sub_object_del(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS), sobj);
767 if (!int_ret) return EINA_FALSE;
768
769 _icon_signal_emit(obj);
770
771 return EINA_TRUE;
772}
773
774/* FIXME: replicated from elm_layout just because progressbar's icon spot
775 * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
776 * can changed the theme API */
777static Eina_Bool
778_efl_ui_progressbar_legacy_content_set(Eo *obj, void *_pd EINA_UNUSED, const char *part, Evas_Object *content)
779{
780 Eina_Bool int_ret = EINA_FALSE;
781
782 int_ret = efl_content_set(efl_part(efl_super(obj, EFL_UI_PROGRESSBAR_LEGACY_CLASS), part), content);
783 if (!int_ret) return EINA_FALSE;
784
785 _icon_signal_emit(obj);
786
787 return EINA_TRUE;
788}
789
790/* Efl.Part for legacy begin */
791
792static Eina_Bool
793_part_is_efl_ui_progressbar_legacy_part(const Eo *obj EINA_UNUSED, const char *part)
794{
795 return eina_streq(part, "elm.swallow.content");
796}
797
798ELM_PART_OVERRIDE_PARTIAL(efl_ui_progressbar_legacy, EFL_UI_PROGRESSBAR_LEGACY, void, _part_is_efl_ui_progressbar_legacy_part)
799ELM_PART_OVERRIDE_CONTENT_SET(efl_ui_progressbar_legacy, EFL_UI_PROGRESSBAR_LEGACY, void)
800#include "efl_ui_progressbar_legacy_part.eo.c"
801
802/* Efl.Part for legacy end */
803
765EAPI Evas_Object * 804EAPI Evas_Object *
766elm_progressbar_add(Evas_Object *parent) 805elm_progressbar_add(Evas_Object *parent)
767{ 806{
diff --git a/src/lib/elementary/efl_ui_progressbar.eo b/src/lib/elementary/efl_ui_progressbar.eo
index c8c16f1d31..4187d9c55b 100644
--- a/src/lib/elementary/efl_ui_progressbar.eo
+++ b/src/lib/elementary/efl_ui_progressbar.eo
@@ -51,8 +51,6 @@ class Efl.Ui.Progressbar (Efl.Ui.Layout, Efl.Ui.Range, Efl.Ui.Format,
51 implements { 51 implements {
52 Efl.Object.constructor; 52 Efl.Object.constructor;
53 Efl.Ui.Widget.theme_apply; 53 Efl.Ui.Widget.theme_apply;
54 Efl.Ui.Widget.widget_sub_object_add;
55 Efl.Ui.Widget.widget_sub_object_del;
56 Efl.Ui.Range.range_value { get; set; } 54 Efl.Ui.Range.range_value { get; set; }
57 Efl.Ui.Range.range_min_max {get; set; } 55 Efl.Ui.Range.range_min_max {get; set; }
58 Efl.Ui.Direction.direction { get; set; } 56 Efl.Ui.Direction.direction { get; set; }
diff --git a/src/lib/elementary/efl_ui_progressbar_legacy.eo b/src/lib/elementary/efl_ui_progressbar_legacy.eo
index b6bf882c24..fab761f3bb 100644
--- a/src/lib/elementary/efl_ui_progressbar_legacy.eo
+++ b/src/lib/elementary/efl_ui_progressbar_legacy.eo
@@ -5,5 +5,8 @@ class Efl.Ui.Progressbar_Legacy (Efl.Ui.Progressbar, Efl.Ui.Legacy)
5 implements { 5 implements {
6 class.constructor; 6 class.constructor;
7 Efl.Object.constructor; 7 Efl.Object.constructor;
8 Efl.Ui.Widget.theme_apply;
9 Efl.Ui.Widget.widget_sub_object_del;
10 Efl.Part.part;
8 } 11 }
9} 12}
diff --git a/src/lib/elementary/efl_ui_progressbar_legacy_part.eo b/src/lib/elementary/efl_ui_progressbar_legacy_part.eo
new file mode 100644
index 0000000000..18a713d851
--- /dev/null
+++ b/src/lib/elementary/efl_ui_progressbar_legacy_part.eo
@@ -0,0 +1,8 @@
1class Efl.Ui.Progressbar_Legacy.Part (Efl.Ui.Layout.Part_Content)
2{
3 [[Elementary progressbar internal part class]]
4 data: null;
5 implements {
6 Efl.Content.content { set; }
7 }
8}