summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2019-12-31 09:53:16 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-12-31 09:53:16 -0500
commit43288c7acec339ccbd8175963501243357258d45 (patch)
tree931dd0aadaa6a9fa773ef763d656d00b01a3f5d9 /src/bin
parent3dc3deba6280349021d877c29362fd80eaed57aa (diff)
Efl.Ui.Animation_View : Change class name to Efl.Ui.Vg_Animation
Summary: Since "View" is a reserved word for MVVM, change the class name appropriately. Efl.Ui.Animation_View => Efl.Ui.Vg_Animation ref T8476 Depends on D10931 Test Plan: elementary_test -> "Vector Graphcis Animation" Reviewers: Hermet, bu5hm4n, kimcinoo, segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8476 Differential Revision: https://phab.enlightenment.org/D10939
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/elementary/meson.build2
-rw-r--r--src/bin/elementary/test.c4
-rw-r--r--src/bin/elementary/test_efl_gfx_vg_value_provider.c38
-rw-r--r--src/bin/elementary/test_efl_ui_vg_animation.c (renamed from src/bin/elementary/test_efl_ui_animation_view.c)36
4 files changed, 40 insertions, 40 deletions
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 27dabe6..2195ded 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -161,7 +161,7 @@ elementary_test_src = [
161 'test_ui_collection_view.c', 161 'test_ui_collection_view.c',
162 'test_ui_items.c', 162 'test_ui_items.c',
163 'test_ui_frame.c', 163 'test_ui_frame.c',
164 'test_efl_ui_animation_view.c', 164 'test_efl_ui_vg_animation.c',
165 'test_efl_gfx_vg_value_provider.c', 165 'test_efl_gfx_vg_value_provider.c',
166 'test.h' 166 'test.h'
167] 167]
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index 4150ab2..94b4b3d 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -407,7 +407,7 @@ void test_efl_ui_collection_view(void *data, Evas_Object *obj, void *event_info)
407void test_efl_ui_item(void *data, Evas_Object *obj, void *event_info); 407void test_efl_ui_item(void *data, Evas_Object *obj, void *event_info);
408void test_ui_frame(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED); 408void test_ui_frame(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
409 409
410void test_efl_ui_animation_view(void *data, Evas_Object *obj, void *event_info); 410void test_efl_ui_vg_animation(void *data, Evas_Object *obj, void *event_info);
411void test_efl_gfx_vg_value_provider(void *data, Evas_Object *obj, void *event_info); 411void test_efl_gfx_vg_value_provider(void *data, Evas_Object *obj, void *event_info);
412 412
413static void _list_udpate(void); 413static void _list_udpate(void);
@@ -1305,7 +1305,7 @@ add_tests:
1305 ADD_TEST_EO(NULL, "Widgets Part", "Part Shadow", test_part_shadow); 1305 ADD_TEST_EO(NULL, "Widgets Part", "Part Shadow", test_part_shadow);
1306 1306
1307 //------------------------------// 1307 //------------------------------//
1308 ADD_TEST_EO(NULL, "Vector Animation", "Animation View", test_efl_ui_animation_view); 1308 ADD_TEST_EO(NULL, "Vector Animation", "Vector Graphics Animation", test_efl_ui_vg_animation);
1309 ADD_TEST_EO(NULL, "Vector Animation", "Value Provider", test_efl_gfx_vg_value_provider); 1309 ADD_TEST_EO(NULL, "Vector Animation", "Value Provider", test_efl_gfx_vg_value_provider);
1310 1310
1311#undef ADD_TEST 1311#undef ADD_TEST
diff --git a/src/bin/elementary/test_efl_gfx_vg_value_provider.c b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
index 22a55d5..697c255 100644
--- a/src/bin/elementary/test_efl_gfx_vg_value_provider.c
+++ b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
@@ -51,7 +51,7 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
51 } 51 }
52 52
53 53
54 efl_ui_animation_view_value_provider_override(anim_view, vp); 54 efl_ui_vg_animation_value_provider_override(anim_view, vp);
55 } 55 }
56 if (!strcmp(type, "StrokeWidth")) 56 if (!strcmp(type, "StrokeWidth"))
57 { 57 {
@@ -61,7 +61,7 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
61 char* v = (char*)efl_text_get(values[0]); 61 char* v = (char*)efl_text_get(values[0]);
62 if (v) width = strtod(v, NULL); 62 if (v) width = strtod(v, NULL);
63 efl_gfx_vg_value_provider_stroke_width_set(vp, width); 63 efl_gfx_vg_value_provider_stroke_width_set(vp, width);
64 efl_ui_animation_view_value_provider_override(anim_view, vp); 64 efl_ui_vg_animation_value_provider_override(anim_view, vp);
65 evas_object_show(anim_view); 65 evas_object_show(anim_view);
66 sprintf(new_path, "%s", path); 66 sprintf(new_path, "%s", path);
67 sprintf(new_type, "StrokeWidth"); 67 sprintf(new_type, "StrokeWidth");
@@ -104,7 +104,7 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
104 { 104 {
105 char buf[255]; 105 char buf[255];
106 //TODO: Even if there is the same path as the existing item, it is added without updating. 106 //TODO: Even if there is the same path as the existing item, it is added without updating.
107 // In efl_ui_animation_view, duplicate paths are managed. 107 // In efl_ui_vg_animation, duplicate paths are managed.
108 // However, animator (lottie) does not have an implementation that manages overridden values. 108 // However, animator (lottie) does not have an implementation that manages overridden values.
109 /*Eina_List *items = (Eina_List*)elm_list_items_get(list); 109 /*Eina_List *items = (Eina_List*)elm_list_items_get(list);
110 Eina_List *l; 110 Eina_List *l;
@@ -153,7 +153,7 @@ static void
153check_changed_cb(void *data, const Efl_Event *event) 153check_changed_cb(void *data, const Efl_Event *event)
154{ 154{
155 Evas_Object *anim_view = data; 155 Evas_Object *anim_view = data;
156 efl_ui_animation_view_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object)); 156 efl_ui_vg_animation_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
157} 157}
158 158
159static void 159static void
@@ -169,18 +169,18 @@ static void
169limit_frame_cb(void *data, const Efl_Event *event) 169limit_frame_cb(void *data, const Efl_Event *event)
170{ 170{
171 Evas_Object *anim_view = data; 171 Evas_Object *anim_view = data;
172 int frame_count = efl_ui_animation_view_frame_count_get(anim_view); 172 int frame_count = efl_ui_vg_animation_frame_count_get(anim_view);
173 printf("Total Frame Count : %d\n", frame_count); 173 printf("Total Frame Count : %d\n", frame_count);
174 if (efl_ui_selectable_selected_get(event->object)) 174 if (efl_ui_selectable_selected_get(event->object))
175 { 175 {
176 efl_ui_animation_view_min_frame_set(anim_view, 5); 176 efl_ui_vg_animation_min_frame_set(anim_view, 5);
177 efl_ui_animation_view_max_frame_set(anim_view, 10); 177 efl_ui_vg_animation_max_frame_set(anim_view, 10);
178 printf("Frames to show 5-10 only\n"); 178 printf("Frames to show 5-10 only\n");
179 } 179 }
180 else 180 else
181 { 181 {
182 efl_ui_animation_view_min_frame_set(anim_view, 0); 182 efl_ui_vg_animation_min_frame_set(anim_view, 0);
183 efl_ui_animation_view_max_frame_set(anim_view, frame_count); 183 efl_ui_vg_animation_max_frame_set(anim_view, frame_count);
184 printf("Showing all frames now\n"); 184 printf("Showing all frames now\n");
185 } 185 }
186} 186}
@@ -188,24 +188,24 @@ limit_frame_cb(void *data, const Efl_Event *event)
188static void 188static void
189update_anim_view_state(Evas_Object *anim_view, Evas_Object *label) 189update_anim_view_state(Evas_Object *anim_view, Evas_Object *label)
190{ 190{
191 Efl_Ui_Animation_View_State state = efl_ui_animation_view_state_get(anim_view); 191 Efl_Ui_Vg_Animation_State state = efl_ui_vg_animation_state_get(anim_view);
192 192
193 switch (state) 193 switch (state)
194 { 194 {
195 case EFL_UI_ANIMATION_VIEW_STATE_NOT_READY: 195 case EFL_UI_VG_ANIMATION_STATE_NOT_READY:
196 efl_text_set(label, "State = Not Ready"); 196 efl_text_set(label, "State = Not Ready");
197 break; 197 break;
198 case EFL_UI_ANIMATION_VIEW_STATE_PLAYING: 198 case EFL_UI_VG_ANIMATION_STATE_PLAYING:
199 efl_text_set(label, "State = Playing"); 199 efl_text_set(label, "State = Playing");
200 break; 200 break;
201 case EFL_UI_ANIMATION_VIEW_STATE_PLAYING_BACKWARDS: 201 case EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS:
202 efl_text_set(label, "State = Playing Backwards"); 202 efl_text_set(label, "State = Playing Backwards");
203 203
204 break; 204 break;
205 case EFL_UI_ANIMATION_VIEW_STATE_PAUSED: 205 case EFL_UI_VG_ANIMATION_STATE_PAUSED:
206 efl_text_set(label, "State = Paused"); 206 efl_text_set(label, "State = Paused");
207 break; 207 break;
208 case EFL_UI_ANIMATION_VIEW_STATE_STOPPED: 208 case EFL_UI_VG_ANIMATION_STATE_STOPPED:
209 efl_text_set(label, "State = Stopped"); 209 efl_text_set(label, "State = Stopped");
210 break; 210 break;
211 } 211 }
@@ -310,7 +310,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
310 310
311 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 311 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
312 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 312 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
313 efl_text_set(efl_added, "Efl_Ui_Animation_View demo"), 313 efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
314 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 314 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
315 315
316 // Create a box in Canvas 316 // Create a box in Canvas
@@ -326,7 +326,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
326 326
327 //Create Animation View to play animation directly from JSON file 327 //Create Animation View to play animation directly from JSON file
328 snprintf(buf, sizeof(buf), "%s/images/three_box.json", elm_app_data_dir_get()); 328 snprintf(buf, sizeof(buf), "%s/images/three_box.json", elm_app_data_dir_get());
329 anim_view = efl_add(EFL_UI_ANIMATION_VIEW_CLASS, win, 329 anim_view = efl_add(EFL_UI_VG_ANIMATION_CLASS, win,
330 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND), 330 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
331 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 331 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
332 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)), 332 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)),
@@ -487,7 +487,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
487 487
488 488
489 //Duration Text 489 //Duration Text
490 snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_animation_view_duration_time_get(anim_view)); 490 snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_vg_animation_duration_time_get(anim_view));
491 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub, 491 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
492 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0), 492 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
493 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 493 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
@@ -584,7 +584,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
584 584
585 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 585 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
586 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 586 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
587 efl_text_set(efl_added, "Efl_Ui_Animation_View demo"), 587 efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
588 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 588 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
589 589
590 // Create a box 590 // Create a box
diff --git a/src/bin/elementary/test_efl_ui_animation_view.c b/src/bin/elementary/test_efl_ui_vg_animation.c
index fe828a7..6ab7a08 100644
--- a/src/bin/elementary/test_efl_ui_animation_view.c
+++ b/src/bin/elementary/test_efl_ui_vg_animation.c
@@ -46,7 +46,7 @@ static void
46check_changed_cb(void *data, const Efl_Event *event) 46check_changed_cb(void *data, const Efl_Event *event)
47{ 47{
48 Evas_Object *anim_view = data; 48 Evas_Object *anim_view = data;
49 efl_ui_animation_view_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object)); 49 efl_ui_vg_animation_autorepeat_set(anim_view, efl_ui_selectable_selected_get(event->object));
50} 50}
51 51
52static void 52static void
@@ -62,18 +62,18 @@ static void
62limit_frame_cb(void *data, const Efl_Event *event) 62limit_frame_cb(void *data, const Efl_Event *event)
63{ 63{
64 Evas_Object *anim_view = data; 64 Evas_Object *anim_view = data;
65 int frame_count = efl_ui_animation_view_frame_count_get(anim_view); 65 int frame_count = efl_ui_vg_animation_frame_count_get(anim_view);
66 printf("Total Frame Count : %d\n", frame_count); 66 printf("Total Frame Count : %d\n", frame_count);
67 if (efl_ui_selectable_selected_get(event->object)) 67 if (efl_ui_selectable_selected_get(event->object))
68 { 68 {
69 efl_ui_animation_view_min_frame_set(anim_view, 5); 69 efl_ui_vg_animation_min_frame_set(anim_view, 5);
70 efl_ui_animation_view_max_frame_set(anim_view, 10); 70 efl_ui_vg_animation_max_frame_set(anim_view, 10);
71 printf("Frames to show 5-10 only\n"); 71 printf("Frames to show 5-10 only\n");
72 } 72 }
73 else 73 else
74 { 74 {
75 efl_ui_animation_view_min_frame_set(anim_view, 0); 75 efl_ui_vg_animation_min_frame_set(anim_view, 0);
76 efl_ui_animation_view_max_frame_set(anim_view, frame_count); 76 efl_ui_vg_animation_max_frame_set(anim_view, frame_count);
77 printf("Showing all frames now\n"); 77 printf("Showing all frames now\n");
78 } 78 }
79} 79}
@@ -81,23 +81,23 @@ limit_frame_cb(void *data, const Efl_Event *event)
81static void 81static void
82update_anim_view_state(Evas_Object *anim_view, Evas_Object *label) 82update_anim_view_state(Evas_Object *anim_view, Evas_Object *label)
83{ 83{
84 Efl_Ui_Animation_View_State state = efl_ui_animation_view_state_get(anim_view); 84 Efl_Ui_Vg_Animation_State state = efl_ui_vg_animation_state_get(anim_view);
85 85
86 switch (state) 86 switch (state)
87 { 87 {
88 case EFL_UI_ANIMATION_VIEW_STATE_NOT_READY: 88 case EFL_UI_VG_ANIMATION_STATE_NOT_READY:
89 efl_text_set(label, "State = Not Ready"); 89 efl_text_set(label, "State = Not Ready");
90 break; 90 break;
91 case EFL_UI_ANIMATION_VIEW_STATE_PLAYING: 91 case EFL_UI_VG_ANIMATION_STATE_PLAYING:
92 efl_text_set(label, "State = Playing"); 92 efl_text_set(label, "State = Playing");
93 break; 93 break;
94 case EFL_UI_ANIMATION_VIEW_STATE_PLAYING_BACKWARDS: 94 case EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS:
95 efl_text_set(label, "State = Playing Backwards"); 95 efl_text_set(label, "State = Playing Backwards");
96 break; 96 break;
97 case EFL_UI_ANIMATION_VIEW_STATE_PAUSED: 97 case EFL_UI_VG_ANIMATION_STATE_PAUSED:
98 efl_text_set(label, "State = Paused"); 98 efl_text_set(label, "State = Paused");
99 break; 99 break;
100 case EFL_UI_ANIMATION_VIEW_STATE_STOPPED: 100 case EFL_UI_VG_ANIMATION_STATE_STOPPED:
101 efl_text_set(label, "State = Stopped"); 101 efl_text_set(label, "State = Stopped");
102 break; 102 break;
103 } 103 }
@@ -144,13 +144,13 @@ _slider_reset(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
144} 144}
145 145
146void 146void
147test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 147test_efl_ui_vg_animation(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
148{ 148{
149 Eo *win, *box, *box2, *box3, *box4, *label, *anim_view, *check, *slider; 149 Eo *win, *box, *box2, *box3, *box4, *label, *anim_view, *check, *slider;
150 char buf[255]; 150 char buf[255];
151 151
152 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 152 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
153 efl_text_set(efl_added, "Efl_Ui_Animation_View demo"), 153 efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
154 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 154 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
155 155
156 // Create a box in Canvas 156 // Create a box in Canvas
@@ -166,7 +166,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
166 166
167 //Create Animation View to play animation directly from JSON file 167 //Create Animation View to play animation directly from JSON file
168 snprintf(buf, sizeof(buf), "%s/images/emoji_wink.json", elm_app_data_dir_get()); 168 snprintf(buf, sizeof(buf), "%s/images/emoji_wink.json", elm_app_data_dir_get());
169 anim_view = efl_add(EFL_UI_ANIMATION_VIEW_CLASS, win, 169 anim_view = efl_add(EFL_UI_VG_ANIMATION_CLASS, win,
170 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND), 170 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
171 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 171 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
172 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)), 172 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)),
@@ -208,7 +208,7 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
208 208
209 209
210 //Duration Text 210 //Duration Text
211 snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_animation_view_duration_time_get(anim_view)); 211 snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_vg_animation_duration_time_get(anim_view));
212 efl_add(EFL_UI_TEXTBOX_CLASS, box2, 212 efl_add(EFL_UI_TEXTBOX_CLASS, box2,
213 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0), 213 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
214 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 214 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
@@ -298,13 +298,13 @@ test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
298#else 298#else
299 299
300void 300void
301test_efl_ui_animation_view(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 301test_efl_ui_vg_animation(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
302{ 302{
303 Eo *win, *box; 303 Eo *win, *box;
304 char buf[255]; 304 char buf[255];
305 305
306 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(), 306 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
307 efl_text_set(efl_added, "Efl_Ui_Animation_View demo"), 307 efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
308 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 308 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
309 309
310 // Create a box 310 // Create a box