2 #define COMMON_EXTERNAL_UNDER \
5 description { state: "default" 0.0; \
8 part { name: "under"; \
11 description { state: "default" 0.0; \
13 aspect: 2.6255 2.6255; \
14 image.normal: "sky.jpg"; \
18 #define COMMON_EXTERNAL_OVER \
19 part { name: "over"; \
22 description { state: "default" 0.0; \
30 relative: 1.84722 1.0; \
34 image.normal: "clo.png"; \
36 description { state: "drift" 0.0; \
37 inherit: "default" 0.0; \
40 relative: 1.84722 0.0; \
44 relative: 1.84722 1.0; \
51 #define COMMON_EXTERNAL_PROGRAM \
52 program { name: "anim1"; \
55 action: STATE_SET "drift" 0.0; \
56 transition: LINEAR 10.0; \
60 program { name: "anim2"; \
61 action: STATE_SET "default" 0.0; \
67 image: "sky.jpg" COMP;
68 image: "clo.png" LOSSY 60;
72 group { name: "external/button";
75 part { name: "ext_label1";
79 description { state: "default" 0.0;
83 string: "label" "<b>Label and Buttons are edje externals</>\
84 <br>Click buttons to perform edje animations.<br><b>BUG</>: disabled style.";
88 part { name: "ext_button1";
92 description { state: "default" 0.0;
97 string: "label" "icon + label";
98 string: "icon" "home";
102 part { name: "ext_button2";
104 source: "elm/button";
106 description { state: "default" 0.0;
111 string: "label" "only label";
115 part { name: "ext_button3";
117 source: "elm/button";
119 description { state: "default" 0.0;
124 string: "icon" "home";
127 description { state: "left" 0.0;
128 inherit: "default" 0.0;
131 description { state: "right" 0.0;
132 inherit: "default" 0.0;
136 part { name: "ext_button4";
138 source: "elm/button";
140 description { state: "default" 0.0;
145 string: "label" "anchor style";
146 string: "style" "anchor";
150 part { name: "ext_button5";
152 source: "elm/button";
154 description { state: "default" 0.0;
159 string: "label" "disabled";
160 string: "icon" "home";
168 COMMON_EXTERNAL_PROGRAM
169 program { name: "btn1_click";
171 source: "ext_button1";
172 action: STATE_SET "left" 0.0;
173 transition: SINUSOIDAL 0.6 CURRENT;
174 target: "ext_button3";
176 program { name: "btn2_click";
178 source: "ext_button2";
179 action: STATE_SET "right" 0.0;
180 transition: SINUSOIDAL 0.6 CURRENT;
181 target: "ext_button3";
183 program { name: "btn4_click";
185 source: "ext_button4";
186 action: STATE_SET "default" 0.0;
187 transition: SINUSOIDAL 0.6 CURRENT;
188 target: "ext_button3";
192 group { name: "external/slider";
194 COMMON_EXTERNAL_UNDER
195 part { name: "ext_label1";
199 description { state: "default" 0.0;
203 string: "label" "<b>All the Widgets and the Interaction are pure edje</>\
204 <br>The first one is linked with the 3 verticals.<br><b>BUG</>: vertical+disabled.";
208 part { name: "ext_slider1";
210 source: "elm/slider";
212 description { state: "default" 0.0;
217 string: "label" "Horizontal";
218 string: "icon" "home";
219 string: "unit format" "%.1f units";
220 string: "indicator format" "%.0f";
221 double: "min" -100.0;
226 part { name: "ext_slider2";
228 source: "elm/slider";
230 description { state: "default" 0.0;
235 string: "label" "Disabled";
236 string: "icon" "home";
242 part { name: "ext_slider3";
244 source: "elm/slider";
246 description { state: "default" 0.0;
251 string: "label" "Inverted";
256 part { name: "ext_slider4";
258 source: "elm/slider";
260 description { state: "default" 0.0;
265 string: "label" "Horizontal";
266 string: "icon" "home";
267 bool: "horizontal" 0;
268 string: "unit format" "%.0f u";
269 string: "indicator format" "%.3f";
270 double: "min" -100.0;
274 description { state: "anim" 0.0;
275 inherit: "default" 0.0;
276 rel1.offset: 140 160;
279 part { name: "ext_slider5";
281 source: "elm/slider";
283 description { state: "default" 0.0;
288 string: "label" "Inverted";
289 string: "icon" "home";
290 bool: "horizontal" 0;
292 string: "unit format" "%.0f u";
293 string: "indicator format" "%.3f";
294 double: "min" -100.0;
298 description { state: "anim" 0.0;
299 inherit: "default" 0.0;
300 rel1.offset: 200 160;
303 part { name: "ext_slider6";
305 source: "elm/slider";
307 description { state: "default" 0.0;
310 rel1.offset: 140 160;
312 string: "label" "Disabled";
313 string: "icon" "home";
317 bool: "horizontal" 0;
320 description { state: "anim" 0.0;
321 inherit: "default" 0.0;
322 rel1.offset: 260 160;
325 part { name: "ext_button1";
327 source: "elm/button";
329 description { state: "default" 0.0;
332 rel1.offset: 200 230;
334 string: "label" "reset all";
337 description { state: "anim" 0.0;
338 inherit: "default" 0.0;
342 part { name: "ext_button2";
344 source: "elm/button";
346 description { state: "default" 0.0;
349 rel1.offset: 200 270;
351 string: "label" "animate";
354 description { state: "anim" 0.0;
355 inherit: "default" 0.0;
359 part { name: "ext_check1";
363 description { state: "default" 0.0;
366 rel1.offset: 200 310;
368 string: "label" "disable first";
371 description { state: "anim" 0.0;
372 inherit: "default" 0.0;
379 COMMON_EXTERNAL_PROGRAM
380 program { name: "link";
382 source: "ext_slider1";
383 action: PARAM_COPY "ext_slider1" "value" "ext_slider4" "value";
386 program { name: "link2";
387 action: PARAM_COPY "ext_slider1" "value" "ext_slider5" "value";
390 program { name: "link3";
391 action: PARAM_COPY "ext_slider1" "value" "ext_slider6" "value";
393 program { name: "reset";
395 source: "ext_button1";
396 action: PARAM_SET "ext_slider1" "value" 0.0;
399 program { name: "reset2";
400 action: PARAM_SET "ext_slider2" "value" 0.0;
403 program { name: "reset3";
404 action: PARAM_SET "ext_slider3" "value" 0.0;
407 program { name: "reset4";
408 action: PARAM_SET "ext_slider4" "value" 0.0;
411 program { name: "reset5";
412 action: PARAM_SET "ext_slider5" "value" 0.0;
415 program { name: "reset6";
416 action: PARAM_SET "ext_slider6" "value" 0.0;
418 program { name: "disable_first";
420 source: "ext_check1";
421 action: PARAM_COPY "ext_check1" "state" "ext_slider1" "disabled";
423 program { name: "animate";
425 source: "ext_button2";
426 filter: "ext_slider4" "default" 0.0;
427 action: STATE_SET "anim" 0.0;
428 transition: SPRING 1.5 0.0 5.0;
429 target: "ext_slider4";
430 target: "ext_slider5";
431 target: "ext_slider6";
432 target: "ext_button1";
433 target: "ext_button2";
434 target: "ext_check1";
436 program { name: "animate_reverse";
438 source: "ext_button2";
439 filter: "ext_slider4" "anim" 0.0;
440 action: STATE_SET "default" 0.0;
441 transition: BOUNCE 1.5 0.0 5.0;
442 target: "ext_slider4";
443 target: "ext_slider5";
444 target: "ext_slider6";
445 target: "ext_button1";
446 target: "ext_button2";
447 target: "ext_check1";
451 group { name: "external/scroller";
453 COMMON_EXTERNAL_UNDER
454 part { name: "ext_label1";
458 description { state: "default" 0.0;
462 string: "label" "<b>All the Widgets and the Interaction are pure edje</>\
463 <br>This is not a real test, just an experiment<br><b>BUG</>: clip issue, slider drag, lots of warning, ...";
467 part { name: "ext_scroller1";
469 source: "elm/scroller";
471 description { state: "default" 0.0;
480 string: "content" "external/slider";
484 part { name: "ext_button1";
486 source: "elm/button";
488 description { state: "default" 0.0;
494 string: "label" "content 1";
498 part { name: "ext_button2";
500 source: "elm/button";
502 description { state: "default" 0.0;
508 string: "label" "content 2";
512 part { name: "ext_button3";
514 source: "elm/button";
516 description { state: "default" 0.0;
522 string: "label" "content unset";
529 COMMON_EXTERNAL_PROGRAM
530 program { name: "bt1_click";
532 source: "ext_button1";
533 action: PARAM_SET "ext_scroller1" "content" "external/button";
536 program { name: "bt2_click";
538 source: "ext_button2";
539 action: PARAM_SET "ext_scroller1" "content" "external/slider";
541 program { name: "bt3_click";
543 source: "ext_button3";
544 action: PARAM_SET "ext_scroller1" "content" "";
548 group { name: "external/pbar";
550 COMMON_EXTERNAL_UNDER
551 part { name: "ext_label1";
555 description { state: "default" 0.0;
559 string: "label" "<b>All the Widgets are edje external</>\
560 <br>This test show how you can access external widgets from <br>\
561 embryo script and from C code.";
566 part { name: "ext_pbar1";
568 source: "elm/progressbar";
570 description { state: "default" 0.0;
575 string: "unit format" "%.0f %%";
580 part { name: "ext_pbar2";
582 source: "elm/progressbar";
584 description { state: "default" 0.0;
589 string: "label" "infinite bouce";
590 string: "unit format" "";
594 part { name: "ext_pbar3";
596 source: "elm/progressbar";
598 description { state: "default" 0.0;
603 string: "label" "inverted";
604 string: "icon" "home";
606 string: "unit format" "%.3f units";
610 part { name: "ext_pbar4";
612 source: "elm/progressbar";
614 description { state: "default" 0.0;
620 string: "label" "percent";
621 bool: "horizontal" 0;
625 part { name: "ext_pbar5";
627 source: "elm/progressbar";
629 description { state: "default" 0.0;
635 string: "label" "infinite bouce";
636 bool: "horizontal" 0;
637 string: "unit format" "";
641 part { name: "ext_pbar6";
643 source: "elm/progressbar";
645 description { state: "default" 0.0;
651 string: "label" "inverted";
652 string: "icon" "home";
653 bool: "horizontal" 0;
659 part { name: "ext_pbar7";
661 source: "elm/progressbar";
663 description { state: "default" 0.0;
669 string: "style" "wheel";
673 part { name: "ext_button1";
675 source: "elm/button";
677 description { state: "default" 0.0;
683 string: "label" "anim with edje";
687 part { name: "ext_button2";
689 source: "elm/button";
691 description { state: "default" 0.0;
697 string: "label" "...with embryo";
701 part { name: "ext_button3";
703 source: "elm/button";
705 description { state: "default" 0.0;
711 string: "label" "...or from C";
718 COMMON_EXTERNAL_PROGRAM
719 program { name: "anim_with_edje";
721 source: "ext_button1";
722 action: PARAM_SET "ext_pbar1" "value" 0.0;
723 after: "disable_button1";
725 program { name: "disable_button1";
726 action: PARAM_SET "ext_button1" "disabled" 1;
727 after: "disable_button2";
729 program { name: "disable_button2";
730 action: PARAM_SET "ext_button2" "disabled" 1;
731 after: "disable_button3";
733 program { name: "disable_button3";
734 action: PARAM_SET "ext_button3" "disabled" 1;
737 program { name: "anim_0";
738 action: PARAM_SET "ext_pbar1" "value" 0.0;
741 program { name: "anim_1";
743 action: PARAM_SET "ext_pbar1" "value" 0.1;
746 program { name: "anim_2";
748 action: PARAM_SET "ext_pbar1" "value" 0.2;
751 program { name: "anim_3";
753 action: PARAM_SET "ext_pbar1" "value" 0.3;
756 program { name: "anim_4";
758 action: PARAM_SET "ext_pbar1" "value" 0.4;
761 program { name: "anim_5";
763 action: PARAM_SET "ext_pbar1" "value" 0.5;
766 program { name: "anim_6";
768 action: PARAM_SET "ext_pbar1" "value" 0.6;
771 program { name: "anim_7";
773 action: PARAM_SET "ext_pbar1" "value" 0.7;
776 program { name: "anim_8";
778 action: PARAM_SET "ext_pbar1" "value" 0.8;
781 program { name: "anim_9";
783 action: PARAM_SET "ext_pbar1" "value" 0.9;
786 program { name: "anim_10";
788 action: PARAM_SET "ext_pbar1" "value" 1.0;
789 after: "reenable_button1";
791 program { name: "reenable_button1";
792 action: PARAM_SET "ext_button1" "disabled" 0;
793 after: "reenable_button2";
795 program { name: "reenable_button2";
796 action: PARAM_SET "ext_button2" "disabled" 0;
797 after: "reenable_button3";
799 program { name: "reenable_button3";
800 action: PARAM_SET "ext_button3" "disabled" 0;
804 public timer_cb(unused) {
805 external_param_set_float(PART:"ext_pbar1", "value", get_float(my_value));
806 external_param_set_float(PART:"ext_pbar3", "value", get_float(my_value));
807 external_param_set_float(PART:"ext_pbar4", "value", get_float(my_value));
808 external_param_set_float(PART:"ext_pbar6", "value", get_float(my_value));
809 if (get_float(my_value) < 1.0)
811 set_float(my_value, get_float(my_value) + 0.0123);
812 timer(0.1, "timer_cb", unused);
816 external_param_set_bool(PART:"ext_button1", "disabled", 0);
817 external_param_set_bool(PART:"ext_button2", "disabled", 0);
818 external_param_set_bool(PART:"ext_button3", "disabled", 0);
822 program { name: "bt2_click";
824 source: "ext_button2";
826 set_float(my_value, 0.0);
827 external_param_set_bool(PART:"ext_button1", "disabled", 1);
828 external_param_set_bool(PART:"ext_button2", "disabled", 1);
829 external_param_set_bool(PART:"ext_button3", "disabled", 1);
835 group { name: "external/video";
837 COMMON_EXTERNAL_UNDER
838 part { name: "ext_label1";
842 description { state: "default" 0.0;
846 string: "label" "<b>Simple videoplayer in pure edje</>\
847 <br>Just choose a video file, click 'play' and enjoy your movie :)<br>\
848 <b>BUGS:</> Video don't emit signals, some external props are missing.";
852 part { name: "ext_video1";
856 description { state: "default" 0.0;
862 part { name: "ext_button1";
864 source: "elm/button";
866 description { state: "default" 0.0;
874 string: "label" "play";
879 part { name: "ext_button2";
881 source: "elm/button";
883 description { state: "default" 0.0;
891 string: "label" "pause";
896 part { name: "ext_button3";
898 source: "elm/button";
900 description { state: "default" 0.0;
908 string: "label" "stop";
913 part { name: "ext_slider1";
915 source: "elm/slider";
917 description { state: "default" 0.0;
925 string: "label" "Volume";
926 string: "indicator format" "%.3f";
931 part { name: "ext_slider2";
933 source: "elm/slider";
935 description { state: "default" 0.0;
943 string: "label" "Position";
944 string: "indicator format" "%.1f sec";
949 part { name: "ext_fsentry";
951 source: "elm/fileselector_entry";
953 description { state: "default" 0.0;
959 string: "label" "choose file";
966 COMMON_EXTERNAL_PROGRAM
967 program { name: "play_clicked";
969 source: "ext_button1";
970 action: PARAM_SET "ext_video1" "play" 1;
972 program { name: "pause_click";
974 source: "ext_button2";
975 action: PARAM_SET "ext_video1" "pause" 1;
977 program { name: "stop_clicked";
979 source: "ext_button3";
980 action: PARAM_SET "ext_video1" "stop" 1;
982 program { name: "volume_slider";
984 source: "ext_slider1";
985 action: PARAM_COPY "ext_slider1" "value" "ext_video1" "audio level";
987 program { name: "position_slider";
989 source: "ext_slider2";
991 new Float:len = external_param_get_float(PART:"ext_video1", "play length");
992 new Float:val = external_param_get_float(PART:"ext_slider2", "value");
993 external_param_set_float(PART:"ext_slider2", "max", len);
994 external_param_set_float(PART:"ext_video1", "play position", val);
997 program { name: "file_chosen";
998 signal: "file,chosen";
999 source: "ext_fsentry";
1000 action: PARAM_COPY "ext_fsentry" "path" "ext_video1" "uri";
1001 after: "enable_bt1";
1002 after: "enable_bt2";
1003 after: "enable_bt3";
1004 after: "enable_sl1";
1005 after: "enable_sl2";
1006 after: "update_volume_slider";
1008 program { name: "enable_bt1";
1009 action: PARAM_SET "ext_button1" "disabled" 0;
1011 program { name: "enable_bt2";
1012 action: PARAM_SET "ext_button2" "disabled" 0;
1014 program { name: "enable_bt3";
1015 action: PARAM_SET "ext_button3" "disabled" 0;
1017 program { name: "enable_sl1";
1018 action: PARAM_SET "ext_slider1" "disabled" 0;
1020 program { name: "enable_sl2";
1021 action: PARAM_SET "ext_slider2" "disabled" 0;
1023 program { name: "update_volume_slider";
1024 action: PARAM_COPY "ext_video1" "audio level" "ext_slider1" "value";