summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-03-21 18:01:17 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-03-21 18:01:58 +0900
commit1f169c0d5fff52e250f8b13bcd325d4243d2c15a (patch)
tree5e699152d33a208f0552b5e6ee3f273e4f46f287
parent4e556b226a37add4773a7047cebbad9cb0e7caaa (diff)
Add a bunch of examples and Gifs + test image filters
Some may not work!
-rw-r--r--examples/3deffect_iamarock.cfgbin1331 -> 1336 bytes
-rw-r--r--examples/alphabump.cfgbin0 -> 864 bytes
-rw-r--r--examples/auto_displace_bad.cfgbin0 -> 1011 bytes
-rw-r--r--examples/blur_compare_double_box.cfgbin0 -> 982 bytes
-rw-r--r--examples/center_stroke.cfgbin840 -> 749 bytes
-rw-r--r--examples/displace_bad_fire.cfgbin0 -> 1595 bytes
-rw-r--r--examples/displace_repeat.cfgbin0 -> 770 bytes
-rw-r--r--examples/displace_with_fire.cfgbin0 -> 928 bytes
-rw-r--r--examples/displace_yet_another_one.cfgbin0 -> 983 bytes
-rw-r--r--examples/fire-animated-2.gifbin0 -> 1666726 bytes
-rw-r--r--examples/fire-animated-3.gifbin0 -> 185453 bytes
-rw-r--r--examples/fire-animated.gifbin0 -> 2307127 bytes
-rw-r--r--examples/fireplace_nice.cfgbin0 -> 673 bytes
-rw-r--r--examples/flip.cfgbin1028 -> 1000 bytes
-rw-r--r--examples/gradient_bump.cfgbin931 -> 933 bytes
-rw-r--r--examples/gradient_contour.cfgbin855 -> 845 bytes
-rw-r--r--examples/gradient_simple.cfgbin780 -> 770 bytes
-rw-r--r--examples/logo_bump.cfgbin0 -> 1208 bytes
-rw-r--r--examples/test_textblock_padding.cfgbin0 -> 760 bytes
-rw-r--r--examples/transluent_with_glow.cfgbin0 -> 881 bytes
-rw-r--r--main.c74
21 files changed, 70 insertions, 4 deletions
diff --git a/examples/3deffect_iamarock.cfg b/examples/3deffect_iamarock.cfg
index c064222..be44157 100644
--- a/examples/3deffect_iamarock.cfg
+++ b/examples/3deffect_iamarock.cfg
Binary files differ
diff --git a/examples/alphabump.cfg b/examples/alphabump.cfg
new file mode 100644
index 0000000..23736aa
--- /dev/null
+++ b/examples/alphabump.cfg
Binary files differ
diff --git a/examples/auto_displace_bad.cfg b/examples/auto_displace_bad.cfg
new file mode 100644
index 0000000..bbca746
--- /dev/null
+++ b/examples/auto_displace_bad.cfg
Binary files differ
diff --git a/examples/blur_compare_double_box.cfg b/examples/blur_compare_double_box.cfg
new file mode 100644
index 0000000..175c0dc
--- /dev/null
+++ b/examples/blur_compare_double_box.cfg
Binary files differ
diff --git a/examples/center_stroke.cfg b/examples/center_stroke.cfg
index d15d1c5..b6b5878 100644
--- a/examples/center_stroke.cfg
+++ b/examples/center_stroke.cfg
Binary files differ
diff --git a/examples/displace_bad_fire.cfg b/examples/displace_bad_fire.cfg
new file mode 100644
index 0000000..c911c53
--- /dev/null
+++ b/examples/displace_bad_fire.cfg
Binary files differ
diff --git a/examples/displace_repeat.cfg b/examples/displace_repeat.cfg
new file mode 100644
index 0000000..55adff2
--- /dev/null
+++ b/examples/displace_repeat.cfg
Binary files differ
diff --git a/examples/displace_with_fire.cfg b/examples/displace_with_fire.cfg
new file mode 100644
index 0000000..88410ca
--- /dev/null
+++ b/examples/displace_with_fire.cfg
Binary files differ
diff --git a/examples/displace_yet_another_one.cfg b/examples/displace_yet_another_one.cfg
new file mode 100644
index 0000000..fe10e37
--- /dev/null
+++ b/examples/displace_yet_another_one.cfg
Binary files differ
diff --git a/examples/fire-animated-2.gif b/examples/fire-animated-2.gif
new file mode 100644
index 0000000..1f396ca
--- /dev/null
+++ b/examples/fire-animated-2.gif
Binary files differ
diff --git a/examples/fire-animated-3.gif b/examples/fire-animated-3.gif
new file mode 100644
index 0000000..24a64ba
--- /dev/null
+++ b/examples/fire-animated-3.gif
Binary files differ
diff --git a/examples/fire-animated.gif b/examples/fire-animated.gif
new file mode 100644
index 0000000..06c66fa
--- /dev/null
+++ b/examples/fire-animated.gif
Binary files differ
diff --git a/examples/fireplace_nice.cfg b/examples/fireplace_nice.cfg
new file mode 100644
index 0000000..5af7ea0
--- /dev/null
+++ b/examples/fireplace_nice.cfg
Binary files differ
diff --git a/examples/flip.cfg b/examples/flip.cfg
index 7b9db20..231f226 100644
--- a/examples/flip.cfg
+++ b/examples/flip.cfg
Binary files differ
diff --git a/examples/gradient_bump.cfg b/examples/gradient_bump.cfg
index 16d5c06..5f81522 100644
--- a/examples/gradient_bump.cfg
+++ b/examples/gradient_bump.cfg
Binary files differ
diff --git a/examples/gradient_contour.cfg b/examples/gradient_contour.cfg
index e8e9b98..f3abfb9 100644
--- a/examples/gradient_contour.cfg
+++ b/examples/gradient_contour.cfg
Binary files differ
diff --git a/examples/gradient_simple.cfg b/examples/gradient_simple.cfg
index d0665ad..c5cd64f 100644
--- a/examples/gradient_simple.cfg
+++ b/examples/gradient_simple.cfg
Binary files differ
diff --git a/examples/logo_bump.cfg b/examples/logo_bump.cfg
new file mode 100644
index 0000000..90c7dcb
--- /dev/null
+++ b/examples/logo_bump.cfg
Binary files differ
diff --git a/examples/test_textblock_padding.cfg b/examples/test_textblock_padding.cfg
new file mode 100644
index 0000000..89ad4cc
--- /dev/null
+++ b/examples/test_textblock_padding.cfg
Binary files differ
diff --git a/examples/transluent_with_glow.cfg b/examples/transluent_with_glow.cfg
new file mode 100644
index 0000000..a60c162
--- /dev/null
+++ b/examples/transluent_with_glow.cfg
Binary files differ
diff --git a/main.c b/main.c
index 1e5b0ad..bbc4036 100644
--- a/main.c
+++ b/main.c
@@ -55,6 +55,7 @@ Eo *textblockview = NULL;
55Eo *textblockeditor = NULL; 55Eo *textblockeditor = NULL;
56Eo *size_spinner = NULL; 56Eo *size_spinner = NULL;
57Eo *frameflip = NULL; 57Eo *frameflip = NULL;
58Eo *imageview = NULL;
58Ecore_Timer *timer = NULL; 59Ecore_Timer *timer = NULL;
59 60
60#define VIDEO_PROXY_ID IMAGE_COUNT 61#define VIDEO_PROXY_ID IMAGE_COUNT
@@ -114,6 +115,7 @@ _image_set(int k, const char *path)
114 char buf[32]; 115 char buf[32];
115 sprintf(buf, "image%d", k + 1); 116 sprintf(buf, "image%d", k + 1);
116 eo_do(textview, evas_obj_text_filter_source_set(buf, source)); 117 eo_do(textview, evas_obj_text_filter_source_set(buf, source));
118 eo_do(imageview, evas_obj_image_filter_source_set(buf, source));
117#endif 119#endif
118 120
119 _textblock_proxies_bind(); 121 _textblock_proxies_bind();
@@ -170,6 +172,7 @@ _video_set(const char *path)
170 172
171#ifdef HAS_FILTER_CHAIN 173#ifdef HAS_FILTER_CHAIN
172 eo_do(textview, evas_obj_text_filter_source_set("emotion", source)); 174 eo_do(textview, evas_obj_text_filter_source_set("emotion", source));
175 eo_do(imageview, evas_obj_image_filter_source_set("emotion", source));
173#endif 176#endif
174} 177}
175 178
@@ -527,8 +530,9 @@ _style_apply(void)
527 stylestr = elm_object_text_get(styleentry); 530 stylestr = elm_object_text_get(styleentry);
528 stylestr_utf8 = elm_entry_markup_to_utf8(stylestr); 531 stylestr_utf8 = elm_entry_markup_to_utf8(stylestr);
529 532
530 // Evas_Object_Text 533 // Evas Text and Image
531 eo_do(textview, evas_obj_text_filter_program_set(stylestr_utf8)); 534 eo_do(textview, evas_obj_text_filter_program_set(stylestr_utf8));
535 eo_do(imageview, evas_obj_image_filter_program_set(stylestr_utf8));
532 for (int k = 0; k < IMAGE_COUNT; k++) 536 for (int k = 0; k < IMAGE_COUNT; k++)
533 { 537 {
534 char buf[32]; 538 char buf[32];
@@ -537,6 +541,7 @@ _style_apply(void)
537 sprintf(buf, "image%d", k + 1); 541 sprintf(buf, "image%d", k + 1);
538 elm_image_file_get(proxyimages[k], &path, NULL); 542 elm_image_file_get(proxyimages[k], &path, NULL);
539 eo_do(textview, evas_obj_text_filter_source_set(buf, (path && *path) ? proxies[k] : NULL)); 543 eo_do(textview, evas_obj_text_filter_source_set(buf, (path && *path) ? proxies[k] : NULL));
544 eo_do(imageview, evas_obj_image_filter_source_set(buf, (path && *path) ? proxies[k] : NULL));
540 } 545 }
541 546
542 free(stylestr_utf8); 547 free(stylestr_utf8);
@@ -699,7 +704,7 @@ _home_dir_get(void)
699EAPI_MAIN int 704EAPI_MAIN int
700elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED) 705elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
701{ 706{
702 Eo *win, *panes, *panes2, *vbox, *o, *vb, *flip; 707 Eo *win, *panes, *panes2, *panes3, *vbox, *o, *vb, *flip;
703 const char *title, *elm_engine; 708 const char *title, *elm_engine;
704 Eina_Bool ok; 709 Eina_Bool ok;
705 Evas *evas; 710 Evas *evas;
@@ -775,13 +780,21 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
775 elm_panes_content_left_size_set(panes2, (double) PANE_V_TOP / 100.); 780 elm_panes_content_left_size_set(panes2, (double) PANE_V_TOP / 100.);
776 elm_object_part_content_set(fr, "default", panes2); 781 elm_object_part_content_set(fr, "default", panes2);
777 782
783 // Split AGAIN between text and image
784 panes3 = elm_panes_add(panes2);
785 elm_panes_horizontal_set(panes3, EINA_FALSE);
786 elm_panes_fixed_set(panes3, EINA_FALSE);
787 evas_object_size_hint_weight_set(panes3, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
788 evas_object_size_hint_align_set(panes3, EVAS_HINT_FILL, EVAS_HINT_FILL);
789 elm_panes_content_left_size_set(panes3, 0.8);
790
778 // Evas_Object_Text 791 // Evas_Object_Text
779 vbox = elm_box_add(fr); 792 vbox = elm_box_add(fr);
780 elm_box_horizontal_set(vbox, EINA_FALSE); 793 elm_box_horizontal_set(vbox, EINA_FALSE);
781 evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 794 evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
782 evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL); 795 evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
783 evas_object_show(vbox); 796 evas_object_show(vbox);
784 elm_object_part_content_set(panes2, "left", vbox); 797 elm_object_part_content_set(panes3, "left", vbox);
785 798
786 o = evas_object_text_add(fr); 799 o = evas_object_text_add(fr);
787 evas_object_show(o); 800 evas_object_show(o);
@@ -792,7 +805,60 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
792 elm_box_pack_start(vbox, o); 805 elm_box_pack_start(vbox, o);
793 textview = o; 806 textview = o;
794 807
795 _spacer_add(vbox); 808 // Evas_Object_Image
809 //o = evas_object_image_filled_add(evas);
810 vbox = elm_box_add(fr);
811 elm_box_horizontal_set(vbox, 1);
812 evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
813 evas_object_size_hint_align_set(vbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
814 elm_object_part_content_set(panes3, "right", vbox);
815 evas_object_show(vbox);
816
817 char imgpath[PATH_MAX];
818 sprintf(imgpath, "%s/logo.png", _home_dir_get());
819 //sprintf(imgpath, "%s/displace_bad_with_alpha.png", _home_dir_get());
820
821 const Eina_Bool USE_ELM_IMAGE = 0;
822 const Eina_Bool USE_FILLED_IMAGE = 1;
823 if (!USE_ELM_IMAGE)
824 {
825 int w, h;
826 int l = 0, r = 0, t = 0, b = 0;
827 if (USE_FILLED_IMAGE)
828 {
829 o = evas_object_image_filled_add(evas);
830 l = r = t = b = 30;
831 }
832 else
833 {
834 o = evas_object_image_add(evas);
835 }
836 evas_object_image_file_set(o, imgpath, NULL);
837 evas_object_image_preload(o, EINA_FALSE);
838 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
839 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
840 evas_object_image_size_get(o, &w, &h);
841 if (!USE_FILLED_IMAGE)
842 evas_object_image_fill_set(o, 0, 0, w + l + r, h + t + b);
843 elm_box_pack_end(vbox, o);
844 evas_object_show(o);
845 imageview = o;
846 }
847 else
848 {
849 o = elm_image_add(fr);
850 elm_image_file_set(o, imgpath, NULL);
851 evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
852 evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
853 evas_object_size_hint_max_set(o, 128, 128);
854 elm_box_pack_end(vbox, o);
855 evas_object_show(o);
856 imageview = elm_image_object_get(o);
857 }
858
859 elm_object_part_content_set(panes2, "left", panes3);
860
861 //_spacer_add(vbox);
796 862
797 // Vbox with: string + edit entries 863 // Vbox with: string + edit entries
798 vbox = elm_box_add(fr); 864 vbox = elm_box_add(fr);