summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/ecore_evas/ecore_evas_convert.c2
-rw-r--r--src/bin/edje/edje_cc_handlers.c81
-rw-r--r--src/bin/edje/edje_player.c2
-rw-r--r--src/bin/edje/meson.build2
-rw-r--r--src/bin/efl_mono_msbuild_gen/main.cc15
-rw-r--r--src/bin/efreet/efreet_desktop_cache_create.c21
-rw-r--r--src/bin/efreet/efreetd_ipc.c21
-rw-r--r--src/bin/elementary/meson.build6
-rw-r--r--src/bin/elementary/test.c25
-rw-r--r--src/bin/elementary/test_bg.c4
-rw-r--r--src/bin/elementary/test_calendar.c2
-rw-r--r--src/bin/elementary/test_canvas_textblock.c64
-rw-r--r--src/bin/elementary/test_check.c63
-rw-r--r--src/bin/elementary/test_efl_anim_alpha.c49
-rw-r--r--src/bin/elementary/test_efl_anim_group_parallel.c85
-rw-r--r--src/bin/elementary/test_efl_anim_group_sequential.c90
-rw-r--r--src/bin/elementary/test_efl_anim_interpolator.c101
-rw-r--r--src/bin/elementary/test_efl_anim_pause.c72
-rw-r--r--src/bin/elementary/test_efl_anim_repeat.c110
-rw-r--r--src/bin/elementary/test_efl_anim_rotate.c97
-rw-r--r--src/bin/elementary/test_efl_anim_scale.c96
-rw-r--r--src/bin/elementary/test_efl_anim_start_delay.c59
-rw-r--r--src/bin/elementary/test_efl_anim_translate.c73
-rw-r--r--src/bin/elementary/test_efl_gfx_mapping.c2
-rw-r--r--src/bin/elementary/test_efl_gfx_vg_value_provider.c240
-rw-r--r--src/bin/elementary/test_efl_ui_text.c222
-rw-r--r--src/bin/elementary/test_efl_ui_vg_animation.c (renamed from src/bin/elementary/test_efl_ui_animation_view.c)152
-rw-r--r--src/bin/elementary/test_evas_map.c2
-rw-r--r--src/bin/elementary/test_evas_mask.c2
-rw-r--r--src/bin/elementary/test_evas_snapshot.c2
-rw-r--r--src/bin/elementary/test_event_animation.c396
-rw-r--r--src/bin/elementary/test_events.c2
-rw-r--r--src/bin/elementary/test_gesture_framework.c44
-rw-r--r--src/bin/elementary/test_gfx_filters.c26
-rw-r--r--src/bin/elementary/test_label.c232
-rw-r--r--src/bin/elementary/test_part_bg.c8
-rw-r--r--src/bin/elementary/test_part_shadow.c26
-rw-r--r--src/bin/elementary/test_photocam.c10
-rw-r--r--src/bin/elementary/test_radio.c44
-rw-r--r--src/bin/elementary/test_ui_box_stack.c2
-rw-r--r--src/bin/elementary/test_ui_button.c2
-rw-r--r--src/bin/elementary/test_ui_clock.c6
-rw-r--r--src/bin/elementary/test_ui_collection.c13
-rw-r--r--src/bin/elementary/test_ui_frame.c8
-rw-r--r--src/bin/elementary/test_ui_image.c12
-rw-r--r--src/bin/elementary/test_ui_items.c5
-rw-r--r--src/bin/elementary/test_ui_pager.c2
-rw-r--r--src/bin/elementary/test_ui_pager_scroll.c2
-rw-r--r--src/bin/elementary/test_ui_panel.c4
-rw-r--r--src/bin/elementary/test_ui_panes.c2
-rw-r--r--src/bin/elementary/test_ui_popup.c16
-rw-r--r--src/bin/elementary/test_ui_progressbar.c4
-rw-r--r--src/bin/elementary/test_ui_relative_container.c (renamed from src/bin/elementary/test_ui_relative_layout.c)68
-rw-r--r--src/bin/elementary/test_ui_scroller.c6
-rw-r--r--src/bin/elementary/test_ui_separator.c26
-rw-r--r--src/bin/elementary/test_ui_slider.c16
-rw-r--r--src/bin/elementary/test_ui_slider_interval.c14
-rw-r--r--src/bin/elementary/test_ui_spin.c2
-rw-r--r--src/bin/elementary/test_ui_spin_button.c6
-rw-r--r--src/bin/elementary/test_ui_spotlight.c29
-rw-r--r--src/bin/elementary/test_ui_tab_pager.c4
-rw-r--r--src/bin/elementary/test_ui_table_static.c2
-rw-r--r--src/bin/elementary/test_ui_timepicker.c6
-rw-r--r--src/bin/elementary/test_win_dialog.c10
-rw-r--r--src/bin/elementary/test_win_indicator.c2
-rw-r--r--src/bin/elementary/test_win_stack.c12
-rw-r--r--src/bin/eolian/docs.c2
-rw-r--r--src/bin/eolian/headers.c6
-rw-r--r--src/bin/eolian/main.c2
-rw-r--r--src/bin/eolian/sources.c10
-rw-r--r--src/bin/eolian/types.c16
-rw-r--r--src/bin/eolian_cxx/eolian_cxx.cc15
-rw-r--r--src/bin/eolian_mono/eolian/mono/alias_definition.hh103
-rw-r--r--src/bin/eolian_mono/eolian/mono/async_function_definition.hh49
-rw-r--r--src/bin/eolian_mono/eolian/mono/blacklist.hh25
-rw-r--r--src/bin/eolian_mono/eolian/mono/culture_info.hh61
-rw-r--r--src/bin/eolian_mono/eolian/mono/documentation.hh181
-rw-r--r--src/bin/eolian_mono/eolian/mono/enum_definition.hh37
-rw-r--r--src/bin/eolian_mono/eolian/mono/events.hh240
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_declaration.hh19
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_definition.hh83
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_helpers.hh22
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_pointer.hh48
-rw-r--r--src/bin/eolian_mono/eolian/mono/function_registration.hh17
-rw-r--r--src/bin/eolian_mono/eolian/mono/generation_contexts.hh17
-rw-r--r--src/bin/eolian_mono/eolian/mono/helpers.hh15
-rw-r--r--src/bin/eolian_mono/eolian/mono/klass.hh335
-rw-r--r--src/bin/eolian_mono/eolian/mono/logging.hh15
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_annotation.hh158
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_type.hh15
-rw-r--r--src/bin/eolian_mono/eolian/mono/marshall_type_impl.hh24
-rw-r--r--src/bin/eolian_mono/eolian/mono/name_helpers.hh102
-rw-r--r--src/bin/eolian_mono/eolian/mono/parameter.hh326
-rw-r--r--src/bin/eolian_mono/eolian/mono/part_definition.hh39
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_definition.hh457
-rw-r--r--src/bin/eolian_mono/eolian/mono/struct_fields.hh174
-rw-r--r--src/bin/eolian_mono/eolian/mono/type.hh15
-rw-r--r--src/bin/eolian_mono/eolian/mono/type_impl.hh43
-rw-r--r--src/bin/eolian_mono/eolian/mono/type_match.hh46
-rw-r--r--src/bin/eolian_mono/eolian/mono/using_decl.hh15
-rw-r--r--src/bin/eolian_mono/eolian/mono/utils.hh39
-rw-r--r--src/bin/eolian_mono/eolian/mono/variable_definition.hh21
-rw-r--r--src/bin/eolian_mono/eolian_mono.cc38
103 files changed, 3368 insertions, 2293 deletions
diff --git a/src/bin/ecore_evas/ecore_evas_convert.c b/src/bin/ecore_evas/ecore_evas_convert.c
index 4ec1cab..8b4f19a 100644
--- a/src/bin/ecore_evas/ecore_evas_convert.c
+++ b/src/bin/ecore_evas/ecore_evas_convert.c
@@ -8,7 +8,7 @@
8#include <Ecore_Getopt.h> 8#include <Ecore_Getopt.h>
9#include <Ecore_Evas.h> 9#include <Ecore_Evas.h>
10 10
11#if defined(_WIN32) || defined(EXOTIC_NO_SIGNAL) 11#if defined(_WIN32)
12# define NO_SIGNAL 12# define NO_SIGNAL
13#else 13#else
14# include <signal.h> 14# include <signal.h>
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index c9bbc17..8353d26 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -419,6 +419,8 @@ static void st_collections_group_parts_part_description_text_repch(void);
419static void st_collections_group_parts_part_description_text_size(void); 419static void st_collections_group_parts_part_description_text_size(void);
420static void st_collections_group_parts_part_description_text_size_range(void); 420static void st_collections_group_parts_part_description_text_size_range(void);
421static void st_collections_group_parts_part_description_text_fit(void); 421static void st_collections_group_parts_part_description_text_fit(void);
422static void st_collections_group_parts_part_description_text_fit_step(void);
423static void st_collections_group_parts_part_description_text_fit_size_array(void);
422static void st_collections_group_parts_part_description_text_min(void); 424static void st_collections_group_parts_part_description_text_min(void);
423static void st_collections_group_parts_part_description_text_max(void); 425static void st_collections_group_parts_part_description_text_max(void);
424static void st_collections_group_parts_part_description_text_align(void); 426static void st_collections_group_parts_part_description_text_align(void);
@@ -952,6 +954,8 @@ New_Statement_Handler statement_handlers[] =
952 {"collections.group.parts.part.description.text.size", st_collections_group_parts_part_description_text_size}, 954 {"collections.group.parts.part.description.text.size", st_collections_group_parts_part_description_text_size},
953 {"collections.group.parts.part.description.text.size_range", st_collections_group_parts_part_description_text_size_range}, 955 {"collections.group.parts.part.description.text.size_range", st_collections_group_parts_part_description_text_size_range},
954 {"collections.group.parts.part.description.text.fit", st_collections_group_parts_part_description_text_fit}, 956 {"collections.group.parts.part.description.text.fit", st_collections_group_parts_part_description_text_fit},
957 {"collections.group.parts.part.description.text.fit_step", st_collections_group_parts_part_description_text_fit_step},
958 {"collections.group.parts.part.description.text.fit_size_array", st_collections_group_parts_part_description_text_fit_size_array},
955 {"collections.group.parts.part.description.text.min", st_collections_group_parts_part_description_text_min}, 959 {"collections.group.parts.part.description.text.min", st_collections_group_parts_part_description_text_min},
956 {"collections.group.parts.part.description.text.max", st_collections_group_parts_part_description_text_max}, 960 {"collections.group.parts.part.description.text.max", st_collections_group_parts_part_description_text_max},
957 {"collections.group.parts.part.description.text.align", st_collections_group_parts_part_description_text_align}, 961 {"collections.group.parts.part.description.text.align", st_collections_group_parts_part_description_text_align},
@@ -11654,6 +11658,83 @@ st_collections_group_parts_part_description_text_fit(void)
11654 ed->text.fit_y = parse_bool(1); 11658 ed->text.fit_y = parse_bool(1);
11655} 11659}
11656 11660
11661
11662/**
11663 @page edcref
11664
11665 @property
11666 fit_step
11667 @parameters
11668 [font step size in points (pt)]
11669 @effect
11670 Sets the font step size for the text part. when fitting text
11671
11672 Defaults: 1
11673 @since 1.24.0
11674 @endproperty
11675 */
11676static void
11677st_collections_group_parts_part_description_text_fit_step(void)
11678{
11679 Edje_Part_Description_Text *ed;
11680
11681 check_arg_count(1);
11682
11683 if (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)
11684 {
11685 ERR("parse error %s:%i. text attributes in non-TEXTBLOCK part.",
11686 file_in, line - 1);
11687 exit(-1);
11688 }
11689
11690 ed = (Edje_Part_Description_Text *)current_desc;
11691
11692 ed->text.fit_step = parse_int(0);
11693
11694 if (ed->text.fit_step < 1)
11695 {
11696 ERR("parse error %s:%i. fit step less than 1.",
11697 file_in, line - 1);
11698 exit(-1);
11699 }
11700}
11701
11702/**
11703 @page edcref
11704
11705 @property
11706 fit
11707 @parameters
11708 [Array of font sizes in points]
11709 @effect
11710 Sets the allowed font sizes array for the text part.
11711 @since 1.24.0
11712 @endproperty
11713 */
11714static void
11715st_collections_group_parts_part_description_text_fit_size_array(void)
11716{
11717 int n, argc;
11718 Edje_Part_Description_Text *ed;
11719
11720 if (current_part->type != EDJE_PART_TYPE_TEXTBLOCK)
11721 {
11722 ERR("parse error %s:%i. text attributes in non-TEXTBLOCK part.",
11723 file_in, line - 1);
11724 exit(-1);
11725 }
11726
11727 ed = (Edje_Part_Description_Text *)current_desc;
11728 check_min_arg_count(1);
11729
11730 for (n = 0, argc = get_arg_count(); n < argc; n++)
11731 {
11732 unsigned int *value = malloc(sizeof(unsigned int));
11733 *value = (unsigned int) parse_int(n);
11734 ed->text.fit_size_array = eina_list_append(ed->text.fit_size_array, value);
11735 }
11736}
11737
11657/** 11738/**
11658 @page edcref 11739 @page edcref
11659 11740
diff --git a/src/bin/edje/edje_player.c b/src/bin/edje/edje_player.c
index d3ae0c9..cacfdf2 100644
--- a/src/bin/edje/edje_player.c
+++ b/src/bin/edje/edje_player.c
@@ -842,7 +842,7 @@ _edje_circul(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
842 char *group = data; 842 char *group = data;
843 843
844 part_name = eina_list_data_get(eina_list_last(parts)); 844 part_name = eina_list_data_get(eina_list_last(parts));
845 strncat(buf, part_name, sizeof(buf) - 1); 845 strncpy(buf, part_name, sizeof(buf) - 1);
846 part_name[sizeof(buf) - 1] = 0; 846 part_name[sizeof(buf) - 1] = 0;
847 EINA_LIST_FOREACH(parts, l, part_name) 847 EINA_LIST_FOREACH(parts, l, part_name)
848 { 848 {
diff --git a/src/bin/edje/meson.build b/src/bin/edje/meson.build
index f33193d..0fff2cd 100644
--- a/src/bin/edje/meson.build
+++ b/src/bin/edje/meson.build
@@ -42,7 +42,7 @@ else
42 env = find_program('env', native: true) 42 env = find_program('env', native: true)
43 edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()] 43 edje_cc_exe = [env, 'EFL_RUN_IN_TREE=1', edje_cc.full_path()]
44 endif 44 endif
45 edje_depends = [edje_cc, epp, evas_engine_buffer_mod] 45 edje_depends = [edje_cc, epp, evas_engine_buffer_mod, embryo_cc]
46endif 46endif
47 47
48edje_decc_src = [ 48edje_decc_src = [
diff --git a/src/bin/efl_mono_msbuild_gen/main.cc b/src/bin/efl_mono_msbuild_gen/main.cc
index bf3d4db..d7ab599 100644
--- a/src/bin/efl_mono_msbuild_gen/main.cc
+++ b/src/bin/efl_mono_msbuild_gen/main.cc
@@ -1,3 +1,18 @@
1/*
2 * Copyright 2019 by its authors. See AUTHORS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
1 16
2#include <iostream> 17#include <iostream>
3#include <fstream> 18#include <fstream>
diff --git a/src/bin/efreet/efreet_desktop_cache_create.c b/src/bin/efreet/efreet_desktop_cache_create.c
index ec7553d..8988168 100644
--- a/src/bin/efreet/efreet_desktop_cache_create.c
+++ b/src/bin/efreet/efreet_desktop_cache_create.c
@@ -70,13 +70,22 @@ cache_add(Eet_File *ef, const char *path, const char *file_id, int priority EINA
70 *changed = 1; 70 *changed = 1;
71 INF(" NEW"); 71 INF(" NEW");
72 } 72 }
73 else if (ecore_file_mod_time(desk->orig_path) != desk->load_time) 73 else
74 { 74 {
75 efreet_desktop_free(desk); 75 struct stat st;
76 *changed = 1; 76 if (!stat(desk->orig_path, &st))
77 desk = efreet_desktop_uncached_new(path); 77 {
78 if (desk) INF(" CHANGED"); 78 time_t modtime = st.st_mtime;
79 else INF(" NO UNCACHED"); 79 if (modtime < st.st_ctime) modtime = st.st_ctime;
80 if (modtime != desk->load_time)
81 {
82 efreet_desktop_free(desk);
83 *changed = 1;
84 desk = efreet_desktop_uncached_new(path);
85 if (desk) INF(" CHANGED");
86 else INF(" NO UNCACHED");
87 }
88 }
80 } 89 }
81 if (!desk) return 1; 90 if (!desk) return 1;
82 if (file_id && old_file_ids && !eina_hash_find(old_file_ids->hash, file_id)) 91 if (file_id && old_file_ids && !eina_hash_find(old_file_ids->hash, file_id))
diff --git a/src/bin/efreet/efreetd_ipc.c b/src/bin/efreet/efreetd_ipc.c
index 933abfc..0992345 100644
--- a/src/bin/efreet/efreetd_ipc.c
+++ b/src/bin/efreet/efreetd_ipc.c
@@ -18,6 +18,7 @@ static Ecore_Event_Handler *hnd_add = NULL;
18static Ecore_Event_Handler *hnd_del = NULL; 18static Ecore_Event_Handler *hnd_del = NULL;
19static Ecore_Event_Handler *hnd_data = NULL; 19static Ecore_Event_Handler *hnd_data = NULL;
20static int clients = 0; 20static int clients = 0;
21static Ecore_Timer *quit_timer_start = NULL;
21static Ecore_Timer *quit_timer = NULL; 22static Ecore_Timer *quit_timer = NULL;
22 23
23static Eina_Bool 24static Eina_Bool
@@ -28,6 +29,15 @@ _cb_quit_timer(void *data EINA_UNUSED)
28 return EINA_FALSE; 29 return EINA_FALSE;
29} 30}
30 31
32static Eina_Bool
33_cb_quit_timer_start(void *data EINA_UNUSED)
34{
35 quit_timer_start = NULL;
36 if (quit_timer) ecore_timer_del(quit_timer);
37 quit_timer = ecore_timer_add(10.0, _cb_quit_timer, NULL);
38 return EINA_FALSE;
39}
40
31static void 41static void
32_broadcast(Ecore_Ipc_Server *svr, int major, int minor, void *data, int size) 42_broadcast(Ecore_Ipc_Server *svr, int major, int minor, void *data, int size)
33{ 43{
@@ -101,6 +111,11 @@ _cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
101 ecore_timer_del(quit_timer); 111 ecore_timer_del(quit_timer);
102 quit_timer = NULL; 112 quit_timer = NULL;
103 } 113 }
114 if (quit_timer_start)
115 {
116 ecore_timer_del(quit_timer_start);
117 quit_timer_start = NULL;
118 }
104 clients++; 119 clients++;
105 return ECORE_CALLBACK_DONE; 120 return ECORE_CALLBACK_DONE;
106} 121}
@@ -211,7 +226,7 @@ ipc_init(void)
211 ecore_ipc_shutdown(); 226 ecore_ipc_shutdown();
212 return EINA_FALSE; 227 return EINA_FALSE;
213 } 228 }
214 quit_timer = ecore_timer_add(2.0, _cb_quit_timer, NULL); 229 quit_timer_start = ecore_timer_add(10.0, _cb_quit_timer_start, NULL);
215 hnd_add = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_ADD, 230 hnd_add = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_ADD,
216 _cb_client_add, NULL); 231 _cb_client_add, NULL);
217 hnd_del = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DEL, 232 hnd_del = ecore_event_handler_add(ECORE_IPC_EVENT_CLIENT_DEL,
@@ -228,6 +243,10 @@ ipc_shutdown(void)
228 if (init <= 0) return EINA_TRUE; 243 if (init <= 0) return EINA_TRUE;
229 init--; 244 init--;
230 if (init > 0) return EINA_TRUE; 245 if (init > 0) return EINA_TRUE;
246 if (quit_timer) ecore_timer_del(quit_timer);
247 if (quit_timer_start) ecore_timer_del(quit_timer_start);
248 quit_timer = NULL;
249 quit_timer_start = NULL;
231 ecore_ipc_server_del(ipc); 250 ecore_ipc_server_del(ipc);
232 ecore_event_handler_del(hnd_add); 251 ecore_event_handler_del(hnd_add);
233 ecore_event_handler_del(hnd_del); 252 ecore_event_handler_del(hnd_del);
diff --git a/src/bin/elementary/meson.build b/src/bin/elementary/meson.build
index 502573c..7eddf03 100644
--- a/src/bin/elementary/meson.build
+++ b/src/bin/elementary/meson.build
@@ -139,6 +139,7 @@ elementary_test_src = [
139 'test_ui_table.c', 139 'test_ui_table.c',
140 'test_ui_popup.c', 140 'test_ui_popup.c',
141 'test_ui_textpath.c', 141 'test_ui_textpath.c',
142 'test_canvas_textblock.c',
142 'test_video.c', 143 'test_video.c',
143 'test_weather.c', 144 'test_weather.c',
144 'test_web.c', 145 'test_web.c',
@@ -155,12 +156,13 @@ elementary_test_src = [
155 'test_win_indicator.c', 156 'test_win_indicator.c',
156 'test_gesture_framework.c', 157 'test_gesture_framework.c',
157 'test_ui_tab_pager.c', 158 'test_ui_tab_pager.c',
158 'test_ui_relative_layout.c', 159 'test_ui_relative_container.c',
159 'test_ui_collection.c', 160 'test_ui_collection.c',
160 'test_ui_collection_view.c', 161 'test_ui_collection_view.c',
161 'test_ui_items.c', 162 'test_ui_items.c',
162 'test_ui_frame.c', 163 'test_ui_frame.c',
163 'test_efl_ui_animation_view.c', 164 'test_ui_separator.c',
165 'test_efl_ui_vg_animation.c',
164 'test_efl_gfx_vg_value_provider.c', 166 'test_efl_gfx_vg_value_provider.c',
165 'test.h' 167 'test.h'
166] 168]
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index bcdb484..d522400 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -240,6 +240,7 @@ void test_flip_page_eo(void *data, Evas_Object *obj, void *event_info);
240void test_label(void *data, Evas_Object *obj, void *event_info); 240void test_label(void *data, Evas_Object *obj, void *event_info);
241void test_label_slide(void *data, Evas_Object *obj, void *event_info); 241void test_label_slide(void *data, Evas_Object *obj, void *event_info);
242void test_label_wrap(void *data, Evas_Object *obj, void *event_info); 242void test_label_wrap(void *data, Evas_Object *obj, void *event_info);
243void test_textblock_fit(void *data, Evas_Object *obj, void *event_info);
243void test_label_ellipsis(void *data, Evas_Object *obj, void *event_info); 244void test_label_ellipsis(void *data, Evas_Object *obj, void *event_info);
244void test_label_colors(void *data, Evas_Object *obj, void *event_info); 245void test_label_colors(void *data, Evas_Object *obj, void *event_info);
245void test_label_emoji(void *data, Evas_Object *obj, void *event_info); 246void test_label_emoji(void *data, Evas_Object *obj, void *event_info);
@@ -367,13 +368,13 @@ void test_code_diff_inline(void *data, Evas_Object *obj, void *event_info);
367void test_efl_ui_text(void *data, Evas_Object *obj, void *event_info); 368void test_efl_ui_text(void *data, Evas_Object *obj, void *event_info);
368void test_efl_ui_text_inputfield(void *data, Evas_Object *obj, void *event_info); 369void test_efl_ui_text_inputfield(void *data, Evas_Object *obj, void *event_info);
369void test_efl_ui_text_label(void *data, Evas_Object *obj, void *event_info); 370void test_efl_ui_text_label(void *data, Evas_Object *obj, void *event_info);
370void test_ui_text_item_factory(void *data, Evas_Object *obj, void *event_info);
371void test_evas_mask(void *data, Edje_Object *obj, void *event_info); 371void test_evas_mask(void *data, Edje_Object *obj, void *event_info);
372void test_gfx_filters(void *data, Evas_Object *obj, void *event_info); 372void test_gfx_filters(void *data, Evas_Object *obj, void *event_info);
373void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info); 373void test_evas_snapshot(void *data, Evas_Object *obj, void *event_info);
374void test_evas_map(void *data, Edje_Object *obj, void *event_info); 374void test_evas_map(void *data, Edje_Object *obj, void *event_info);
375void test_efl_gfx_mapping(void *data, Edje_Object *obj, void *event_info); 375void test_efl_gfx_mapping(void *data, Edje_Object *obj, void *event_info);
376void test_ui_textpath(void *data, Edje_Object *obj, void *event_info); 376void test_ui_textpath(void *data, Edje_Object *obj, void *event_info);
377void test_canvas_textblock(void *data, Edje_Object *obj, void *event_info);
377 378
378void test_efl_anim_alpha(void *data, Evas_Object *obj, void *event_info); 379void test_efl_anim_alpha(void *data, Evas_Object *obj, void *event_info);
379void test_efl_anim_rotate(void *data, Evas_Object *obj, void *event_info); 380void test_efl_anim_rotate(void *data, Evas_Object *obj, void *event_info);
@@ -398,7 +399,7 @@ void test_ui_spotlight_stack(void *data, Evas_Object *obj, void *event_info);
398void test_ui_spotlight_plain(void *data, Evas_Object *obj, void *event_info); 399void test_ui_spotlight_plain(void *data, Evas_Object *obj, void *event_info);
399void test_ui_spotlight_scroll(void *data, Evas_Object *obj, void *event_info); 400void test_ui_spotlight_scroll(void *data, Evas_Object *obj, void *event_info);
400 401
401void test_ui_relative_layout(void *data, Evas_Object *obj, void *event_info); 402void test_ui_relative_container(void *data, Evas_Object *obj, void *event_info);
402void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info); 403void test_efl_ui_radio(void *data, Evas_Object *obj, void *event_info);
403void test_efl_ui_collection_list(void *data, Evas_Object *obj, void *event_info); 404void test_efl_ui_collection_list(void *data, Evas_Object *obj, void *event_info);
404void test_efl_ui_collection_grid(void *data, Evas_Object *obj, void *event_info); 405void test_efl_ui_collection_grid(void *data, Evas_Object *obj, void *event_info);
@@ -406,8 +407,9 @@ void test_efl_ui_collection_view(void *data, Evas_Object *obj, void *event_info)
406void 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);
407void 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);
408 409
409void 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);
410void 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);
412void test_ui_separator(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, void *event_info EINA_UNUSED);
411 413
412static void _list_udpate(void); 414static void _list_udpate(void);
413 415
@@ -909,7 +911,7 @@ add_tests:
909 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table", test_ui_table); 911 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table", test_ui_table);
910 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear); 912 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear);
911 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static); 913 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static);
912 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Layout", test_ui_relative_layout); 914 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Relative_Container", test_ui_relative_container);
913 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection List", test_efl_ui_collection_list); 915 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection List", test_efl_ui_collection_list);
914 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection Grid", test_efl_ui_collection_grid); 916 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection Grid", test_efl_ui_collection_grid);
915 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection_View", test_efl_ui_collection_view); 917 ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Collection_View", test_efl_ui_collection_view);
@@ -939,10 +941,9 @@ add_tests:
939 ADD_TEST(NULL, "Entries", "Entry Anchor2", test_entry_anchor2); 941 ADD_TEST(NULL, "Entries", "Entry Anchor2", test_entry_anchor2);
940 ADD_TEST(NULL, "Entries", "Entry Emoticon", test_entry_emoticon); 942 ADD_TEST(NULL, "Entries", "Entry Emoticon", test_entry_emoticon);
941 ADD_TEST(NULL, "Entries", "Entry Password", test_entry_password); 943 ADD_TEST(NULL, "Entries", "Entry Password", test_entry_password);
942 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Text", test_efl_ui_text); 944 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Textbox", test_efl_ui_text);
943 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Text Input Field", test_efl_ui_text_inputfield); 945 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Textbox Input Field", test_efl_ui_text_inputfield);
944 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Text Label", test_efl_ui_text_label); 946 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Textbox Label", test_efl_ui_text_label);
945 ADD_TEST_EO(NULL, "Entries", "Ui.Text Item Factory", test_ui_text_item_factory);
946 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Tags", test_ui_tags); 947 ADD_TEST_EO(NULL, "Entries", "Efl.Ui.Tags", test_ui_tags);
947 948
948 //------------------------------// 949 //------------------------------//
@@ -1151,7 +1152,7 @@ add_tests:
1151 // FIXME: add frame test 1152 // FIXME: add frame test
1152 ADD_TEST(NULL, "Boundaries", "Bubble", test_bubble); 1153 ADD_TEST(NULL, "Boundaries", "Bubble", test_bubble);
1153 ADD_TEST(NULL, "Boundaries", "Separator", test_separator); 1154 ADD_TEST(NULL, "Boundaries", "Separator", test_separator);
1154 1155 ADD_TEST_EO(NULL, "Boundaries", "Separator", test_ui_separator);
1155 //------------------------------// 1156 //------------------------------//
1156 ADD_TEST(NULL, "Range Values", "Spinner", test_spinner); 1157 ADD_TEST(NULL, "Range Values", "Spinner", test_spinner);
1157 ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Spin", test_ui_spin); 1158 ADD_TEST_EO(NULL, "Range Values", "Efl.Ui.Spin", test_ui_spin);
@@ -1208,11 +1209,13 @@ add_tests:
1208 ADD_TEST(NULL, "Text", "Label", test_label); 1209 ADD_TEST(NULL, "Text", "Label", test_label);
1209 ADD_TEST(NULL, "Text", "Label Slide", test_label_slide); 1210 ADD_TEST(NULL, "Text", "Label Slide", test_label_slide);
1210 ADD_TEST(NULL, "Text", "Label Wrap", test_label_wrap); 1211 ADD_TEST(NULL, "Text", "Label Wrap", test_label_wrap);
1212 ADD_TEST(NULL, "Text", "Textblock Fit", test_textblock_fit);
1211 ADD_TEST(NULL, "Text", "Label Ellipsis", test_label_ellipsis); 1213 ADD_TEST(NULL, "Text", "Label Ellipsis", test_label_ellipsis);
1212 ADD_TEST(NULL, "Text", "Label Colors", test_label_colors); 1214 ADD_TEST(NULL, "Text", "Label Colors", test_label_colors);
1213 ADD_TEST(NULL, "Text", "Label Emoji", test_label_emoji); 1215 ADD_TEST(NULL, "Text", "Label Emoji", test_label_emoji);
1214 ADD_TEST(NULL, "Text", "Label Variation Sequnece", test_label_variation_sequence); 1216 ADD_TEST(NULL, "Text", "Label Variation Sequnece", test_label_variation_sequence);
1215 ADD_TEST_EO(NULL, "Text", "Efl.Ui.Textpath", test_ui_textpath); 1217 ADD_TEST_EO(NULL, "Text", "Efl.Ui.Textpath", test_ui_textpath);
1218 ADD_TEST_EO(NULL, "Text", "Efl.Canvas.Textblock style", test_canvas_textblock);
1216 1219
1217 //------------------------------// 1220 //------------------------------//
1218 ADD_TEST(NULL, "Stored Surface Buffer", "Launcher", test_launcher); 1221 ADD_TEST(NULL, "Stored Surface Buffer", "Launcher", test_launcher);
@@ -1303,7 +1306,7 @@ add_tests:
1303 ADD_TEST_EO(NULL, "Widgets Part", "Part Shadow", test_part_shadow); 1306 ADD_TEST_EO(NULL, "Widgets Part", "Part Shadow", test_part_shadow);
1304 1307
1305 //------------------------------// 1308 //------------------------------//
1306 ADD_TEST_EO(NULL, "Vector Animation", "Animation View", test_efl_ui_animation_view); 1309 ADD_TEST_EO(NULL, "Vector Animation", "Vector Graphics Animation", test_efl_ui_vg_animation);
1307 ADD_TEST_EO(NULL, "Vector Animation", "Value Provider", test_efl_gfx_vg_value_provider); 1310 ADD_TEST_EO(NULL, "Vector Animation", "Value Provider", test_efl_gfx_vg_value_provider);
1308 1311
1309#undef ADD_TEST 1312#undef ADD_TEST
@@ -1359,7 +1362,7 @@ add_tests:
1359 } 1362 }
1360 1363
1361 /* set an initial window size */ 1364 /* set an initial window size */
1362 evas_object_resize(win, 480 * elm_config_scale_get(), 480 * elm_config_scale_get()); 1365 evas_object_resize(win, 480 * elm_config_scale_get(), 490 * elm_config_scale_get());
1363 evas_object_show(win); 1366 evas_object_show(win);
1364} 1367}
1365 1368
diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 29fdeec..c4a0b0b 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -332,7 +332,7 @@ test_bg_window(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event
332 Evas_Object *win, *box, *cs; 332 Evas_Object *win, *box, *cs;
333 char buf[PATH_MAX]; 333 char buf[PATH_MAX];
334 334
335 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 335 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
336 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Win)"), 336 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Win)"),
337 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 337 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
338 efl_ui_win_alpha_set(efl_added, 1)); 338 efl_ui_win_alpha_set(efl_added, 1));
@@ -408,7 +408,7 @@ test_bg_scale_type(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
408 Evas_Object *rd, *c; 408 Evas_Object *rd, *c;
409 char buf[PATH_MAX]; 409 char buf[PATH_MAX];
410 410
411 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 411 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
412 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Bg)"), 412 efl_text_set(efl_added, "Bg EOAPI (Efl.Ui.Bg)"),
413 efl_ui_win_autodel_set(efl_added, EINA_TRUE), 413 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
414 efl_ui_win_alpha_set(efl_added, EINA_FALSE)); 414 efl_ui_win_alpha_set(efl_added, EINA_FALSE));
diff --git a/src/bin/elementary/test_calendar.c b/src/bin/elementary/test_calendar.c
index b3f54f5..8c5fc85d 100644
--- a/src/bin/elementary/test_calendar.c
+++ b/src/bin/elementary/test_calendar.c
@@ -433,7 +433,7 @@ test_efl_ui_calendar(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
433 current_date = time(NULL) + SEC_PER_YEAR; 433 current_date = time(NULL) + SEC_PER_YEAR;
434 localtime_r(&current_date, &max_date); 434 localtime_r(&current_date, &max_date);
435 435
436 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 436 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
437 efl_text_set(efl_added, "Efl Ui Calendar"), 437 efl_text_set(efl_added, "Efl Ui Calendar"),
438 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 438 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
439 439
diff --git a/src/bin/elementary/test_canvas_textblock.c b/src/bin/elementary/test_canvas_textblock.c
new file mode 100644
index 0000000..92d2fb0
--- /dev/null
+++ b/src/bin/elementary/test_canvas_textblock.c
@@ -0,0 +1,64 @@
1#ifdef HAVE_CONFIG_H
2# include "elementary_config.h"
3#endif
4#include <Efl_Ui.h>
5#include <Elementary.h>
6
7static void
8_apply_style(const Eo *input, Eo *textblock)
9{
10 const char *style = efl_text_get(input);
11 efl_canvas_textblock_style_apply(textblock, style);
12}
13
14static void
15_style_changed_cb(void *data, const Efl_Event *ev)
16{
17 _apply_style(ev->object, data);
18}
19
20
21void
22test_canvas_textblock(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
23{
24 Eo *win, *box, *textblock, *input;
25 const char *default_style;
26
27 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
28 efl_text_set(efl_added, "Efl.Canvas.Textblock style"),
29 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
30
31 box = efl_add(EFL_UI_BOX_CLASS, win,
32 efl_content_set(win, efl_added),
33 efl_ui_layout_orientation_set(efl_added, EFL_UI_LAYOUT_ORIENTATION_VERTICAL));
34
35 efl_add(EFL_UI_TEXTBOX_CLASS, box,
36 efl_gfx_hint_weight_set(efl_added, 1, 0),
37 efl_text_interactive_selection_allowed_set(efl_added, EINA_FALSE),
38 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
39 efl_text_set(efl_added, "Live style editor. Enter a style string below:"),
40 efl_pack(box, efl_added));
41
42 input = efl_add(EFL_UI_TEXTBOX_CLASS, box,
43 efl_gfx_hint_weight_set(efl_added, 1, 0),
44 efl_text_set(efl_added, "font=Sans font_size=24 color=white"),
45 efl_gfx_hint_size_min_set(efl_added, EINA_SIZE2D(0, 48)),
46 efl_text_multiline_set(efl_added, EINA_TRUE),
47 efl_text_wrap_set(efl_added, EFL_TEXT_FORMAT_WRAP_WORD),
48 efl_pack(box, efl_added));
49 efl_ui_textbox_scrollable_set(input, EINA_TRUE);
50
51 textblock = efl_add(EFL_CANVAS_TEXTBLOCK_CLASS, box,
52 efl_text_multiline_set(efl_added, EINA_TRUE),
53 efl_text_set(efl_added, "This is a sample text block."),
54 efl_pack(box, efl_added));
55
56 efl_event_callback_add(input, EFL_TEXT_INTERACTIVE_EVENT_CHANGED_USER,
57 _style_changed_cb, textblock),
58
59 efl_gfx_entity_size_set(win, EINA_SIZE2D(400, 240));
60
61 default_style = efl_canvas_textblock_all_styles_get(textblock);
62 printf("Default style string: %s\n", default_style);
63 _apply_style(input, textblock);
64}
diff --git a/src/bin/elementary/test_check.c b/src/bin/elementary/test_check.c
index 40ca00d..b47145e 100644
--- a/src/bin/elementary/test_check.c
+++ b/src/bin/elementary/test_check.c
@@ -29,25 +29,18 @@ state_changed_cb2(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EIN
29 elm_object_text_set(obj, "text is visible when check state is true."); 29 elm_object_text_set(obj, "text is visible when check state is true.");
30} 30}
31 31
32void 32static void
33test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 33check_style(Evas_Object *win, Evas_Object *bx, const char *style)
34{ 34{
35 Evas_Object *win, *bx, *ic, *ck, *ck0; 35 Evas_Object *ic, *ck, *ck0;
36 char buf[PATH_MAX]; 36 char buf[PATH_MAX];
37 37
38 win = elm_win_util_standard_add("check", "Check");
39 elm_win_autodel_set(win, EINA_TRUE);
40
41 bx = elm_box_add(win);
42 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
43 elm_win_resize_object_add(win, bx);
44 evas_object_show(bx);
45
46 ic = elm_icon_add(win); 38 ic = elm_icon_add(win);
47 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get()); 39 snprintf(buf, sizeof(buf), "%s/images/logo_small.png", elm_app_data_dir_get());
48 elm_image_file_set(ic, buf, NULL); 40 elm_image_file_set(ic, buf, NULL);
49 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); 41 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
50 ck = elm_check_add(win); 42 ck = elm_check_add(win);
43 elm_object_style_set(ck, style);
51 elm_object_text_set(ck, "Icon sized to check"); 44 elm_object_text_set(ck, "Icon sized to check");
52 elm_object_part_content_set(ck, "icon", ic); 45 elm_object_part_content_set(ck, "icon", ic);
53 elm_check_state_set(ck, EINA_TRUE); 46 elm_check_state_set(ck, EINA_TRUE);
@@ -62,6 +55,7 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
62 elm_image_file_set(ic, buf, NULL); 55 elm_image_file_set(ic, buf, NULL);
63 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE); 56 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
64 ck = elm_check_add(win); 57 ck = elm_check_add(win);
58 elm_object_style_set(ck, style);
65 elm_object_text_set(ck, "Icon not resizable"); 59 elm_object_text_set(ck, "Icon not resizable");
66 elm_object_part_content_set(ck, "icon", ic); 60 elm_object_part_content_set(ck, "icon", ic);
67 elm_box_pack_end(bx, ck); 61 elm_box_pack_end(bx, ck);
@@ -71,17 +65,20 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
71 evas_object_smart_callback_add(ck, "changed", changed_cb, ck0); 65 evas_object_smart_callback_add(ck, "changed", changed_cb, ck0);
72 66
73 ck = elm_check_add(win); 67 ck = elm_check_add(win);
68 elm_object_style_set(ck, style);
74 elm_object_text_set(ck, "Label Only"); 69 elm_object_text_set(ck, "Label Only");
75 elm_box_pack_end(bx, ck); 70 elm_box_pack_end(bx, ck);
76 evas_object_show(ck); 71 evas_object_show(ck);
77 72
78 ck = elm_check_add(win); 73 ck = elm_check_add(win);
74 elm_object_style_set(ck, style);
79 elm_object_text_set(ck, "Use State Pointer"); 75 elm_object_text_set(ck, "Use State Pointer");
80 elm_check_state_pointer_set(ck, &eb); 76 elm_check_state_pointer_set(ck, &eb);
81 elm_box_pack_end(bx, ck); 77 elm_box_pack_end(bx, ck);
82 evas_object_show(ck); 78 evas_object_show(ck);
83 79
84 ck = elm_check_add(win); 80 ck = elm_check_add(win);
81 elm_object_style_set(ck, style);
85 elm_object_text_set(ck, "Print State Pointer Value"); 82 elm_object_text_set(ck, "Print State Pointer Value");
86 elm_box_pack_end(bx, ck); 83 elm_box_pack_end(bx, ck);
87 evas_object_show(ck); 84 evas_object_show(ck);
@@ -92,6 +89,7 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
92 elm_image_file_set(ic, buf, NULL); 89 elm_image_file_set(ic, buf, NULL);
93 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); 90 evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
94 ck = elm_check_add(win); 91 ck = elm_check_add(win);
92 elm_object_style_set(ck, style);
95 elm_object_text_set(ck, "Disabled check"); 93 elm_object_text_set(ck, "Disabled check");
96 elm_object_part_content_set(ck, "icon", ic); 94 elm_object_part_content_set(ck, "icon", ic);
97 elm_check_state_set(ck, EINA_TRUE); 95 elm_check_state_set(ck, EINA_TRUE);
@@ -101,6 +99,7 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
101 evas_object_show(ic); 99 evas_object_show(ic);
102 100
103 ck = elm_check_add(win); 101 ck = elm_check_add(win);
102 elm_object_style_set(ck, style);
104 elm_box_pack_end(bx, ck); 103 elm_box_pack_end(bx, ck);
105 elm_object_disabled_set(ck, EINA_TRUE); 104 elm_object_disabled_set(ck, EINA_TRUE);
106 evas_object_show(ck); 105 evas_object_show(ck);
@@ -110,21 +109,63 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
110 elm_image_file_set(ic, buf, NULL); 109 elm_image_file_set(ic, buf, NULL);
111 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE); 110 elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
112 ck = elm_check_add(win); 111 ck = elm_check_add(win);
112 elm_object_style_set(ck, style);
113 elm_object_part_content_set(ck, "icon", ic); 113 elm_object_part_content_set(ck, "icon", ic);
114 elm_box_pack_end(bx, ck); 114 elm_box_pack_end(bx, ck);
115 evas_object_show(ck); 115 evas_object_show(ck);
116 evas_object_show(ic); 116 evas_object_show(ic);
117 117
118 ck = elm_check_add(win); 118 ck = elm_check_add(win);
119 elm_object_style_set(ck, style);
119 elm_box_pack_end(bx, ck); 120 elm_box_pack_end(bx, ck);
120 evas_object_show(ck); 121 evas_object_show(ck);
121 122
122 ck = elm_check_add(win); 123 ck = elm_check_add(win);
124 elm_object_style_set(ck, style);
123 elm_box_pack_end(bx, ck); 125 elm_box_pack_end(bx, ck);
124 elm_object_text_set(ck, "text is visible when check state is true."); 126 elm_object_text_set(ck, "text is visible when check state is true.");
125 elm_check_state_set(ck, EINA_TRUE); 127 elm_check_state_set(ck, EINA_TRUE);
126 evas_object_show(ck); 128 evas_object_show(ck);
127 evas_object_smart_callback_add(ck, "changed", state_changed_cb2, NULL); 129 evas_object_smart_callback_add(ck, "changed", state_changed_cb2, NULL);
130}
131
132void
133test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
134{
135 Evas_Object *win, *bx, *bx0;
136
137 win = elm_win_util_standard_add("check", "Check");
138 elm_win_autodel_set(win, EINA_TRUE);
139
140 bx0 = elm_box_add(win);
141 evas_object_size_hint_weight_set(bx0, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
142 elm_box_horizontal_set(bx0, EINA_TRUE);
143 elm_win_resize_object_add(win, bx0);
144 evas_object_show(bx0);
145
146 bx = elm_box_add(win);
147 elm_box_horizontal_set(bx, EINA_FALSE);
148 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
149 elm_box_pack_end(bx0, bx);
150 evas_object_show(bx);
151
152 check_style(win, bx, "default");
153
154 bx = elm_box_add(win);
155 elm_box_horizontal_set(bx, EINA_FALSE);
156 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
157 elm_box_pack_end(bx0, bx);
158 evas_object_show(bx);
159
160 check_style(win, bx, "plain");
161
162 bx = elm_box_add(win);
163 elm_box_horizontal_set(bx, EINA_FALSE);
164 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
165 elm_box_pack_end(bx0, bx);
166 evas_object_show(bx);
167
168 check_style(win, bx, "icon");
128 169
129 evas_object_show(win); 170 evas_object_show(win);
130} 171}
diff --git a/src/bin/elementary/test_efl_anim_alpha.c b/src/bin/elementary/test_efl_anim_alpha.c
index d75733f..3c5f62c 100644
--- a/src/bin/elementary/test_efl_anim_alpha.c
+++ b/src/bin/elementary/test_efl_anim_alpha.c
@@ -7,31 +7,38 @@ typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *show_anim; 8 Efl_Canvas_Animation *show_anim;
9 Efl_Canvas_Animation *hide_anim; 9 Efl_Canvas_Animation *hide_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 10 Elm_Button *button;
11 11
12 Eina_Bool is_btn_visible; 12 Eina_Bool is_btn_visible;
13} App_Data; 13} App_Data;
14 14
15static void 15static void
16_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 16_anim_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
17{ 17{
18 printf("Animation has been started!\n"); 18 Eo *anim = event->info;
19}
20 19
21static void 20 if (anim)
22_anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 21 {
23{ 22 printf("Animation has been started!\n");
24 printf("Animation has been ended!\n"); 23 }
24 else
25 {
26 printf("Animation has been ended!\n");
27 }
25} 28}
26 29
27static void 30static void
28_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 31_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
29{ 32{
30 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 33 double *progress = event->info;
31 double progress = event_running->progress; 34 printf("Animation is running! Current progress(%lf)\n", *progress);
32 printf("Animation is running! Current progress(%lf)\n", progress);
33} 35}
34 36
37EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
38 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
39 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
40)
41
35static void 42static void
36_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 43_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
37{ 44{
@@ -42,18 +49,17 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
42 if (ad->is_btn_visible) 49 if (ad->is_btn_visible)
43 { 50 {
44 //Create Animation Object from Animation 51 //Create Animation Object from Animation
45 efl_animation_player_animation_set(ad->anim_obj, ad->show_anim); 52 efl_canvas_object_animation_start(ad->button, ad->show_anim, 1.0, 0.0);
46 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0"); 53 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0");
47 } 54 }
48 else 55 else
49 { 56 {
50 //Create Animation Object from Animation 57 //Create Animation Object from Animation
51 efl_animation_player_animation_set(ad->anim_obj, ad->hide_anim); 58 efl_canvas_object_animation_start(ad->button, ad->hide_anim, 1.0, 0.0);
52 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0"); 59 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0");
53 } 60 }
54 61
55 //Let Animation Object start animation 62 //Let Animation Object start animation
56 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
57} 63}
58 64
59static void 65static void
@@ -81,15 +87,16 @@ test_efl_anim_alpha(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
81 evas_object_resize(btn, 200, 200); 87 evas_object_resize(btn, 200, 200);
82 evas_object_move(btn, 100, 50); 88 evas_object_move(btn, 100, 50);
83 evas_object_show(btn); 89 evas_object_show(btn);
90 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
84 91
85 //Show Animation 92 //Show Animation
86 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 93 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
87 efl_animation_alpha_set(show_anim, 0.0, 1.0); 94 efl_animation_alpha_set(show_anim, 0.0, 1.0);
88 efl_animation_duration_set(show_anim, 1.0); 95 efl_animation_duration_set(show_anim, 1.0);
89 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 96 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
90 97
91 //Hide Animation 98 //Hide Animation
92 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 99 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
93 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 100 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
94 efl_animation_duration_set(hide_anim, 1.0); 101 efl_animation_duration_set(hide_anim, 1.0);
95 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 102 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
@@ -97,16 +104,8 @@ test_efl_anim_alpha(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
97 //Initialize App Data 104 //Initialize App Data
98 ad->show_anim = show_anim; 105 ad->show_anim = show_anim;
99 ad->hide_anim = hide_anim; 106 ad->hide_anim = hide_anim;
100 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
101 efl_animation_player_target_set(efl_added, btn));
102
103 //Register callback called when animation starts
104 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
105 //Register callback called when animation ends
106 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
107 //Register callback called while animation is executed
108 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
109 ad->is_btn_visible = EINA_TRUE; 107 ad->is_btn_visible = EINA_TRUE;
108 ad->button = btn;
110 109
111 //Button to start animation 110 //Button to start animation
112 Evas_Object *btn2 = elm_button_add(win); 111 Evas_Object *btn2 = elm_button_add(win);
diff --git a/src/bin/elementary/test_efl_anim_group_parallel.c b/src/bin/elementary/test_efl_anim_group_parallel.c
index 6283e22..d560023 100644
--- a/src/bin/elementary/test_efl_anim_group_parallel.c
+++ b/src/bin/elementary/test_efl_anim_group_parallel.c
@@ -5,34 +5,39 @@
5 5
6typedef struct _App_Data 6typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *parallel_show_anim;
9 Efl_Canvas_Animation *parallel_hide_anim; 8 Efl_Canvas_Animation *parallel_hide_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 9 Elm_Button *button;
11 10
12 Eina_Bool is_btn_visible; 11 Eina_Bool is_btn_visible;
13} App_Data; 12} App_Data;
14 13
15static void 14static void
16_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 15_anim_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
17{ 16{
18 printf("Animation has been started!\n"); 17 Eo *anim = event->info;
19}
20
21static void
22_anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
23{
24 printf("Animation has been ended!\n");
25 18
19 if (anim)
20 {
21 printf("Animation has been started!\n");
22 }
23 else
24 {
25 printf("Animation has been ended!\n");
26 }
26} 27}
27 28
28static void 29static void
29_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 30_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
30{ 31{
31 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 32 double *progress = event->info;
32 double progress = event_running->progress; 33 printf("Animation is running! Current progress(%lf)\n", *progress);
33 printf("Animation is running! Current progress(%lf)\n", progress);
34} 34}
35 35
36EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
37 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
38 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
39)
40
36static void 41static void
37_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 42_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
38{ 43{
@@ -43,18 +48,16 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
43 if (ad->is_btn_visible) 48 if (ad->is_btn_visible)
44 { 49 {
45 //Create Animation Object from Animation 50 //Create Animation Object from Animation
46 efl_animation_player_animation_set(ad->anim_obj, ad->parallel_show_anim); 51 efl_canvas_object_animation_start(ad->button, ad->parallel_hide_anim, -1.0, 0.0);
47 efl_text_set(obj, "Start Parallel Group Animation to hide button"); 52 efl_text_set(obj, "Start Parallel Group Animation to hide button");
48 } 53 }
49 else 54 else
50 { 55 {
51 //Create Animation Object from Animation 56 //Create Animation Object from Animation
52 efl_animation_player_animation_set(ad->anim_obj, ad->parallel_hide_anim); 57 efl_canvas_object_animation_start(ad->button, ad->parallel_hide_anim, 1.0, 0.0);
53 efl_text_set(obj, "Start Parallel Group Animation to show button"); 58 efl_text_set(obj, "Start Parallel Group Animation to show button");
54 } 59 }
55 60
56 //Let Animation Object start animation
57 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
58} 61}
59 62
60static void 63static void
@@ -82,45 +85,22 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
82 evas_object_resize(btn, 150, 150); 85 evas_object_resize(btn, 150, 150);
83 evas_object_move(btn, 125, 100); 86 evas_object_move(btn, 125, 100);
84 evas_object_show(btn); 87 evas_object_show(btn);
85 88 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
86
87 //Show Animation
88 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
89 efl_animation_alpha_set(show_anim, 0.0, 1.0);
90
91 //Rotate from 45 to 0 degrees Animation
92 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
93 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
94
95 //Scale Animation to zoom out
96 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
97 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
98
99 //Show Parallel Group Animation
100 Efl_Canvas_Animation *parallel_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win);
101 efl_animation_duration_set(parallel_show_anim, 1.0);
102 efl_animation_final_state_keep_set(parallel_show_anim, EINA_TRUE);
103
104 //Add animations to group animation
105 efl_animation_group_animation_add(parallel_show_anim, show_anim);
106 efl_animation_group_animation_add(parallel_show_anim, ccw_45_degrees_anim);
107 efl_animation_group_animation_add(parallel_show_anim, scale_half_anim);
108
109 89
110 //Hide Animation 90 //Hide Animation
111 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 91 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
112 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 92 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
113 93
114 //Rotate from 0 to 45 degrees Animation 94 //Rotate from 0 to 45 degrees Animation
115 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 95 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
116 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5); 96 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, EINA_VECTOR2(0.5, 0.5));
117 97
118 //Scale Animation to zoom in 98 //Scale Animation to zoom in
119 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 99 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
120 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 100 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
121 101
122 //Hide Parallel Group Animation 102 //Hide Parallel Group Animation
123 Efl_Canvas_Animation *parallel_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_PARALLEL_CLASS, win); 103 Efl_Canvas_Animation *parallel_hide_anim = efl_add(EFL_CANVAS_PARALLEL_GROUP_ANIMATION_CLASS, win);
124 efl_animation_duration_set(parallel_hide_anim, 1.0); 104 efl_animation_duration_set(parallel_hide_anim, 1.0);
125 efl_animation_final_state_keep_set(parallel_hide_anim, EINA_TRUE); 105 efl_animation_final_state_keep_set(parallel_hide_anim, EINA_TRUE);
126 106
@@ -131,17 +111,8 @@ test_efl_anim_group_parallel(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
131 111
132 112
133 //Initialize App Data 113 //Initialize App Data
134 ad->parallel_show_anim = parallel_show_anim;
135 ad->parallel_hide_anim = parallel_hide_anim; 114 ad->parallel_hide_anim = parallel_hide_anim;
136 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 115 ad->button = btn;
137 efl_animation_player_target_set(efl_added, btn));
138
139 //Register callback called when animation starts
140 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
141 //Register callback called when animation ends
142 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, NULL);
143 //Register callback called while animation is executed
144 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
145 116
146 ad->is_btn_visible = EINA_TRUE; 117 ad->is_btn_visible = EINA_TRUE;
147 118
diff --git a/src/bin/elementary/test_efl_anim_group_sequential.c b/src/bin/elementary/test_efl_anim_group_sequential.c
index 3488149..62b00a6 100644
--- a/src/bin/elementary/test_efl_anim_group_sequential.c
+++ b/src/bin/elementary/test_efl_anim_group_sequential.c
@@ -5,33 +5,39 @@
5 5
6typedef struct _App_Data 6typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *sequential_show_anim;
9 Efl_Canvas_Animation *sequential_hide_anim; 8 Efl_Canvas_Animation *sequential_hide_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 9 Elm_Button *button;
11 10
12 Eina_Bool is_btn_visible; 11 Eina_Bool is_btn_visible;
13} App_Data; 12} App_Data;
14 13
15static void 14static void
16_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 15_anim_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
17{ 16{
18 printf("Animation has been started!\n"); 17 Eo *anim = event->info;
19}
20 18
21static void 19 if (anim)
22_anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 20 {
23{ 21 printf("Animation has been started!\n");
24 printf("Animation has been ended!\n"); 22 }
23 else
24 {
25 printf("Animation has been ended!\n");
26 }
25} 27}
26 28
27static void 29static void
28_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 30_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
29{ 31{
30 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 32 double *progress = event->info;
31 double progress = event_running->progress; 33 printf("Animation is running! Current progress(%lf)\n", *progress);
32 printf("Animation is running! Current progress(%lf)\n", progress);
33} 34}
34 35
36EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
37 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
38 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
39)
40
35static void 41static void
36_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 42_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
37{ 43{
@@ -42,18 +48,15 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
42 if (ad->is_btn_visible) 48 if (ad->is_btn_visible)
43 { 49 {
44 //Create Animation Object from Animation 50 //Create Animation Object from Animation
45 efl_animation_player_animation_set(ad->anim_obj, ad->sequential_show_anim); 51 efl_canvas_object_animation_start(ad->button, ad->sequential_hide_anim, -1.0, 0.0);
46 efl_text_set(obj, "Start Sequential Group Animation to hide button"); 52 efl_text_set(obj, "Start Sequential Group Animation to hide button");
47 } 53 }
48 else 54 else
49 { 55 {
50 //Create Animation Object from Animation 56 //Create Animation Object from Animation
51 efl_animation_player_animation_set(ad->anim_obj, ad->sequential_hide_anim); 57 efl_canvas_object_animation_start(ad->button, ad->sequential_hide_anim, 1.0, 0.0);
52 efl_text_set(obj, "Start Sequential Group Animation to show button"); 58 efl_text_set(obj, "Start Sequential Group Animation to show button");
53 } 59 }
54
55 //Let Animation Object start animation
56 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
57} 60}
58 61
59static void 62static void
@@ -81,23 +84,24 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
81 evas_object_resize(btn, 150, 150); 84 evas_object_resize(btn, 150, 150);
82 evas_object_move(btn, 125, 100); 85 evas_object_move(btn, 125, 100);
83 evas_object_show(btn); 86 evas_object_show(btn);
87 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
84 88
85 89
86 /* Animations to hide button */ 90 /* Animations to hide button */
87 //Rotate from 0 to 45 degrees Animation 91 //Rotate from 0 to 45 degrees Animation
88 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 92 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
89 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, 0.5, 0.5); 93 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, EINA_VECTOR2(0.5, 0.5));
90 94
91 //Scale Animation to zoom in 95 //Scale Animation to zoom in
92 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 96 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
93 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 97 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
94 98
95 //Hide Animation 99 //Hide Animation
96 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 100 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
97 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 101 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
98 102
99 //Hide Sequential Group Animation 103 //Hide Sequential Group Animation
100 Efl_Canvas_Animation *sequential_hide_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS, win); 104 Efl_Canvas_Animation *sequential_hide_anim = efl_add(EFL_CANVAS_SEQUENTIAL_GROUP_ANIMATION_CLASS, win);
101 efl_animation_duration_set(sequential_hide_anim, 1.0); 105 efl_animation_duration_set(sequential_hide_anim, 1.0);
102 efl_animation_final_state_keep_set(sequential_hide_anim, EINA_TRUE); 106 efl_animation_final_state_keep_set(sequential_hide_anim, EINA_TRUE);
103 107
@@ -106,47 +110,9 @@ test_efl_anim_group_sequential(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
106 efl_animation_group_animation_add(sequential_hide_anim, scale_double_anim); 110 efl_animation_group_animation_add(sequential_hide_anim, scale_double_anim);
107 efl_animation_group_animation_add(sequential_hide_anim, hide_anim); 111 efl_animation_group_animation_add(sequential_hide_anim, hide_anim);
108 112
109
110 /* Animations to show button */
111 //Show Animation
112 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win);
113 efl_animation_alpha_set(show_anim, 0.0, 1.0);
114 efl_animation_duration_set(show_anim, 1.0);
115
116 //Scale Animation to zoom out
117 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win);
118 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5);
119 efl_animation_duration_set(scale_half_anim, 1.0);
120
121 //Rotate from 45 to 0 degrees Animation
122 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win);
123 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5);
124 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
125
126 //Show Sequential Group Animation
127 Efl_Canvas_Animation *sequential_show_anim = efl_add(EFL_CANVAS_ANIMATION_GROUP_SEQUENTIAL_CLASS, win);
128 efl_animation_final_state_keep_set(sequential_show_anim, EINA_TRUE);
129 //efl_animation_duration_set() is called for each animation not to set the same duration
130
131 //Add animations to group animation
132 //First, parallel_hide_anim is added with duration 0 to set the initial state
133 efl_animation_group_animation_add(sequential_show_anim, show_anim);
134 efl_animation_group_animation_add(sequential_show_anim, scale_half_anim);
135 efl_animation_group_animation_add(sequential_show_anim, ccw_45_degrees_anim);
136
137
138 //Initialize App Data 113 //Initialize App Data
139 ad->sequential_show_anim = sequential_show_anim;
140 ad->sequential_hide_anim = sequential_hide_anim; 114 ad->sequential_hide_anim = sequential_hide_anim;
141 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 115 ad->button = btn;
142 efl_animation_player_target_set(efl_added, btn));
143
144 //Register callback called when animation starts
145 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
146 //Register callback called when animation ends
147 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, NULL);
148 //Register callback called while animation is executed
149 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
150 116
151 ad->is_btn_visible = EINA_TRUE; 117 ad->is_btn_visible = EINA_TRUE;
152 118
diff --git a/src/bin/elementary/test_efl_anim_interpolator.c b/src/bin/elementary/test_efl_anim_interpolator.c
index be177d7..e6c42b7 100644
--- a/src/bin/elementary/test_efl_anim_interpolator.c
+++ b/src/bin/elementary/test_efl_anim_interpolator.c
@@ -13,7 +13,7 @@
13typedef struct _App_Data 13typedef struct _App_Data
14{ 14{
15 Efl_Canvas_Animation *anim[INTERP_NUM]; 15 Efl_Canvas_Animation *anim[INTERP_NUM];
16 Efl_Canvas_Animation_Player *anim_obj[INTERP_NUM]; 16 Efl_Ui_Button *btns[INTERP_NUM];
17 17
18 Evas_Object *btn[INTERP_NUM]; 18 Evas_Object *btn[INTERP_NUM];
19 Evas_Object *start_all_btn; 19 Evas_Object *start_all_btn;
@@ -33,78 +33,84 @@ _interpolator_create(int index, Evas_Object *win)
33 else if (index == 1) 33 else if (index == 1)
34 { 34 {
35 interp = efl_add(EFL_SINUSOIDAL_INTERPOLATOR_CLASS, win); 35 interp = efl_add(EFL_SINUSOIDAL_INTERPOLATOR_CLASS, win);
36 efl_sinusoidal_interpolator_factor_set(interp, 1.0); 36 efl_sinusoidal_interpolator_slope_set(interp, 1.0);
37 } 37 }
38 else if (index == 2) 38 else if (index == 2)
39 { 39 {
40 interp = efl_add(EFL_DECELERATE_INTERPOLATOR_CLASS, win); 40 interp = efl_add(EFL_DECELERATE_INTERPOLATOR_CLASS, win);
41 efl_decelerate_interpolator_factor_set(interp, 1.0); 41 efl_decelerate_interpolator_slope_set(interp, 1.0);
42 } 42 }
43 else if (index == 3) 43 else if (index == 3)
44 { 44 {
45 interp = efl_add(EFL_ACCELERATE_INTERPOLATOR_CLASS, win); 45 interp = efl_add(EFL_ACCELERATE_INTERPOLATOR_CLASS, win);
46 efl_accelerate_interpolator_factor_set(interp, 1.0); 46 efl_accelerate_interpolator_slope_set(interp, 1.0);
47 } 47 }
48 else if (index == 4) 48 else if (index == 4)
49 { 49 {
50 interp = efl_add(EFL_DIVISOR_INTERPOLATOR_CLASS, win); 50 interp = efl_add(EFL_DIVISOR_INTERPOLATOR_CLASS, win);
51 efl_divisor_interpolator_factors_set(interp, 1.0, 1.0); 51 efl_divisor_interpolator_divisor_set(interp, 1.0);
52 efl_divisor_interpolator_power_set(interp, 1);
52 } 53 }
53 else if (index == 5) 54 else if (index == 5)
54 { 55 {
55 interp = efl_add(EFL_BOUNCE_INTERPOLATOR_CLASS, win); 56 interp = efl_add(EFL_BOUNCE_INTERPOLATOR_CLASS, win);
56 efl_bounce_interpolator_factors_set(interp, 1.0, 1.0); 57 efl_bounce_interpolator_rigidness_set(interp, 1.0);
58 efl_bounce_interpolator_bounces_set(interp, 1);
57 } 59 }
58 else if (index == 6) 60 else if (index == 6)
59 { 61 {
60 interp = efl_add(EFL_SPRING_INTERPOLATOR_CLASS, win); 62 interp = efl_add(EFL_SPRING_INTERPOLATOR_CLASS, win);
61 efl_spring_interpolator_factors_set(interp, 1.0, 1.0); 63 efl_spring_interpolator_decay_set(interp, 1.0);
64 efl_spring_interpolator_oscillations_set(interp, 1);
62 } 65 }
63 66
64 return interp; 67 return interp;
65} 68}
66 69
67static void 70static void
68_anim_started_cb(void *data, const Efl_Event *event EINA_UNUSED) 71_anim_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
69{ 72{
73 Eo *anim = event->info;
70 App_Data *ad = data; 74 App_Data *ad = data;
71 75
72 printf("Animation has been started!\n"); 76 if (anim)
73 77 {
74 ad->running_anim_cnt++; 78 printf("Animation has been started!\n");
75} 79 ad->running_anim_cnt++;
76 80 }
77static void 81 else
78_anim_ended_cb(void *data, const Efl_Event *event) 82 {
79{ 83 int i;
80 App_Data *ad = data;
81 int i;
82
83 printf("Animation has been ended!\n");
84 84
85 ad->running_anim_cnt--; 85 printf("Animation has been ended!\n");
86 ad->running_anim_cnt--;
86 87
87 for (i = 0; i < INTERP_NUM; i++) 88 for (i = 0; i < INTERP_NUM; i++)
88 {
89 if (ad->anim_obj[i] == event->object)
90 { 89 {
91 elm_object_disabled_set(ad->btn[i], EINA_FALSE); 90 if (ad->btns[i] == event->object)
92 break; 91 {
92 elm_object_disabled_set(ad->btn[i], EINA_FALSE);
93 break;
94 }
93 } 95 }
94 }
95 96
96 if (ad->running_anim_cnt == 0) 97 if (ad->running_anim_cnt == 0)
97 elm_object_disabled_set(ad->start_all_btn, EINA_FALSE); 98 elm_object_disabled_set(ad->start_all_btn, EINA_FALSE);
99 }
98} 100}
99 101
100static void 102static void
101_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 103_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
102{ 104{
103 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 105 double *progress = event->info;
104 double progress = event_running->progress; 106 printf("Animation is running! Current progress(%lf)\n", *progress);
105 printf("Animation is running! Current progress(%lf)\n", progress);
106} 107}
107 108
109EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
110 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
111 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
112)
113
108static void 114static void
109_anim_start(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 115_anim_start(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
110{ 116{
@@ -113,7 +119,7 @@ _anim_start(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
113 int index = (uintptr_t)evas_object_data_get(obj, "index"); 119 int index = (uintptr_t)evas_object_data_get(obj, "index");
114 120
115 //Let Animation Object start animation 121 //Let Animation Object start animation
116 efl_player_playing_set(ad->anim_obj[index], EINA_TRUE); 122 efl_canvas_object_animation_start(ad->btns[index], ad->anim[index], 1.0, 0.0);
117 123
118 elm_object_disabled_set(obj, EINA_TRUE); 124 elm_object_disabled_set(obj, EINA_TRUE);
119 elm_object_disabled_set(ad->start_all_btn, EINA_TRUE); 125 elm_object_disabled_set(ad->start_all_btn, EINA_TRUE);
@@ -128,7 +134,7 @@ _anim_start_all(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
128 for (i = 0; i < INTERP_NUM; i++) 134 for (i = 0; i < INTERP_NUM; i++)
129 { 135 {
130 //Let Animation Object start animation 136 //Let Animation Object start animation
131 efl_player_playing_set(ad->anim_obj[i], EINA_TRUE); 137 efl_canvas_object_animation_start(ad->btns[i], ad->anim[i], 1.0, 0.0);
132 elm_object_disabled_set(ad->btn[i], EINA_TRUE); 138 elm_object_disabled_set(ad->btn[i], EINA_TRUE);
133 } 139 }
134 140
@@ -144,9 +150,7 @@ _win_del_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUS
144 for (i = 0; i < INTERP_NUM; i++) 150 for (i = 0; i < INTERP_NUM; i++)
145 { 151 {
146 //Unregister callback called when window deletes 152 //Unregister callback called when window deletes
147 efl_event_callback_del(ad->anim_obj[i], 153 efl_event_callback_array_del(ad->btns[i], animation_stats_cb(), ad);
148 EFL_ANIMATION_PLAYER_EVENT_ENDED,
149 _anim_ended_cb, ad);
150 } 154 }
151 155
152 free(ad); 156 free(ad);
@@ -198,8 +202,8 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
198 ad->btn[i] = btn; 202 ad->btn[i] = btn;
199 203
200 Efl_Canvas_Animation *anim = 204 Efl_Canvas_Animation *anim =
201 efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); 205 efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
202 efl_animation_translate_set(anim, 0, 0, (WIN_W - BTN_W), 0); 206 efl_animation_translate_set(anim, EINA_POSITION2D(0, 0), EINA_POSITION2D((WIN_W - BTN_W), 0));
203 efl_animation_duration_set(anim, 2.0); 207 efl_animation_duration_set(anim, 2.0);
204 efl_animation_final_state_keep_set(anim, EINA_FALSE); 208 efl_animation_final_state_keep_set(anim, EINA_FALSE);
205 209
@@ -208,23 +212,8 @@ test_efl_anim_interpolator(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
208 ad->anim[i] = anim; 212 ad->anim[i] = anim;
209 213
210 //Create Animation Object from Animation 214 //Create Animation Object from Animation
211 Efl_Canvas_Animation_Player *anim_obj = 215 ad->btns[i] = btn;
212 efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 216 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
213 efl_animation_player_animation_set(efl_added, anim),
214 efl_animation_player_target_set(efl_added, btn));
215 ad->anim_obj[i] = anim_obj;
216
217 //Register callback called when animation starts
218 efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED,
219 _anim_started_cb, ad);
220
221 //Register callback called when animation ends
222 efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED,
223 _anim_ended_cb, ad);
224
225 //Register callback called while animation is executed
226 efl_event_callback_add(anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING,
227 _anim_running_cb, NULL);
228 } 217 }
229 218
230 ad->running_anim_cnt = 0; 219 ad->running_anim_cnt = 0;
diff --git a/src/bin/elementary/test_efl_anim_pause.c b/src/bin/elementary/test_efl_anim_pause.c
index 3730db3..8585b38 100644
--- a/src/bin/elementary/test_efl_anim_pause.c
+++ b/src/bin/elementary/test_efl_anim_pause.c
@@ -7,7 +7,7 @@ typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *show_anim; 8 Efl_Canvas_Animation *show_anim;
9 Efl_Canvas_Animation *hide_anim; 9 Efl_Canvas_Animation *hide_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 10 Elm_Button *button;
11 11
12 Evas_Object *pause_btn; 12 Evas_Object *pause_btn;
13 13
@@ -16,60 +16,54 @@ typedef struct _App_Data
16} App_Data; 16} App_Data;
17 17
18static void 18static void
19_anim_started_cb(void *data, const Efl_Event *event EINA_UNUSED) 19_anim_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
20{ 20{
21 Eo *anim = event->info;
21 App_Data *ad = data; 22 App_Data *ad = data;
22 23
23 printf("Animation has been started!\n"); 24 if (anim)
24 25 {
25 elm_object_disabled_set(ad->pause_btn, EINA_FALSE); 26 printf("Animation has been started!\n");
26} 27 elm_object_disabled_set(ad->pause_btn, EINA_FALSE);
27 28 }
28static void 29 else
29_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) 30 {
30{ 31 printf("Animation has been ended!\n");
31 App_Data *ad = data; 32 elm_object_disabled_set(ad->pause_btn, EINA_TRUE);
32 33 }
33 printf("Animation has been ended!\n");
34
35 elm_object_disabled_set(ad->pause_btn, EINA_TRUE);
36} 34}
37 35
38static void 36static void
39_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 37_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
40{ 38{
41 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 39 double *progress = event->info;
42 double progress = event_running->progress; 40 printf("Animation is running! Current progress(%lf)\n", *progress);
43 printf("Animation is running! Current progress(%lf)\n", progress);
44} 41}
45 42
43EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
44 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
45 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
46)
47
46static void 48static void
47_start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 49_start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
48{ 50{
49 App_Data *ad = data; 51 App_Data *ad = data;
50 52
51 if (ad->anim_obj)
52 {
53 ad->is_anim_paused = EINA_FALSE;
54 elm_object_text_set(ad->pause_btn, "Pause Animation");
55 }
56
57 ad->is_btn_visible = !(ad->is_btn_visible); 53 ad->is_btn_visible = !(ad->is_btn_visible);
58 54
59 if (ad->is_btn_visible) 55 if (ad->is_btn_visible)
60 { 56 {
61 //Create Animation Object from Animation 57 //Create Animation Object from Animation
62 efl_animation_player_animation_set(ad->anim_obj, ad->show_anim); 58 efl_canvas_object_animation_start(ad->button, ad->show_anim, 1.0, 0.0);
63 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0"); 59 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0");
64 } 60 }
65 else 61 else
66 { 62 {
67 //Create Animation Object from Animation 63 //Create Animation Object from Animation
68 efl_animation_player_animation_set(ad->anim_obj, ad->hide_anim); 64 efl_canvas_object_animation_start(ad->button, ad->hide_anim, 1.0, 0.0);
69 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0"); 65 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0");
70 } 66 }
71 //Let Animation Object start animation
72 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
73} 67}
74 68
75static void 69static void
@@ -82,13 +76,13 @@ _pause_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED
82 if (ad->is_anim_paused) 76 if (ad->is_anim_paused)
83 { 77 {
84 //Pause animation 78 //Pause animation
85 efl_player_paused_set(ad->anim_obj, EINA_TRUE); 79 efl_canvas_object_animation_pause_set(ad->button, EINA_TRUE);
86 elm_object_text_set(obj, "Resume Animation"); 80 elm_object_text_set(obj, "Resume Animation");
87 } 81 }
88 else 82 else
89 { 83 {
90 //Resume animation 84 //Resume animation
91 efl_player_paused_set(ad->anim_obj, EINA_FALSE); 85 efl_canvas_object_animation_pause_set(ad->button, EINA_FALSE);
92 elm_object_text_set(obj, "Pause Animation"); 86 elm_object_text_set(obj, "Pause Animation");
93 } 87 }
94} 88}
@@ -118,15 +112,16 @@ test_efl_anim_pause(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
118 evas_object_resize(btn, 200, 200); 112 evas_object_resize(btn, 200, 200);
119 evas_object_move(btn, 100, 50); 113 evas_object_move(btn, 100, 50);
120 evas_object_show(btn); 114 evas_object_show(btn);
115 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
121 116
122 //Show Animation 117 //Show Animation
123 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 118 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
124 efl_animation_alpha_set(show_anim, 0.0, 1.0); 119 efl_animation_alpha_set(show_anim, 0.0, 1.0);
125 efl_animation_duration_set(show_anim, 2.0); 120 efl_animation_duration_set(show_anim, 2.0);
126 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 121 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
127 122
128 //Hide Animation 123 //Hide Animation
129 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 124 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
130 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 125 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
131 efl_animation_duration_set(hide_anim, 2.0); 126 efl_animation_duration_set(hide_anim, 2.0);
132 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 127 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
@@ -152,25 +147,14 @@ test_efl_anim_pause(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
152 //Pause button becomes enabled only if the animation is started 147 //Pause button becomes enabled only if the animation is started
153 elm_object_disabled_set(pause_btn, EINA_TRUE); 148 elm_object_disabled_set(pause_btn, EINA_TRUE);
154 149
155
156 //Initialize App Data 150 //Initialize App Data
157 ad->show_anim = show_anim; 151 ad->show_anim = show_anim;
158 ad->hide_anim = hide_anim; 152 ad->hide_anim = hide_anim;
159 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 153 ad->button = btn;
160 efl_animation_player_target_set(efl_added, btn));
161
162 //Register callback called when animation starts
163 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, ad);
164 //Register callback called when animation ends
165 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
166 //Register callback called while animation is executed
167 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
168
169 ad->pause_btn = pause_btn; 154 ad->pause_btn = pause_btn;
170 ad->is_btn_visible = EINA_TRUE; 155 ad->is_btn_visible = EINA_TRUE;
171 ad->is_anim_paused = EINA_FALSE; 156 ad->is_anim_paused = EINA_FALSE;
172 157
173
174 evas_object_resize(win, 400, 450); 158 evas_object_resize(win, 400, 450);
175 evas_object_show(win); 159 evas_object_show(win);
176} 160}
diff --git a/src/bin/elementary/test_efl_anim_repeat.c b/src/bin/elementary/test_efl_anim_repeat.c
index 55bf98c..26e3d3f 100644
--- a/src/bin/elementary/test_efl_anim_repeat.c
+++ b/src/bin/elementary/test_efl_anim_repeat.c
@@ -7,10 +7,10 @@ typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *show_anim; 8 Efl_Canvas_Animation *show_anim;
9 Efl_Canvas_Animation *hide_anim; 9 Efl_Canvas_Animation *hide_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 10 Elm_Button *button;
11 11
12 Evas_Object *start_btn; 12 Evas_Object *start_btn;
13 Evas_Object *repeat_count_spin; 13 Evas_Object *play_count_spin;
14 Evas_Object *repeat_mode_spin; 14 Evas_Object *repeat_mode_spin;
15 15
16 Eina_Bool is_btn_visible; 16 Eina_Bool is_btn_visible;
@@ -27,46 +27,50 @@ _anim_repeat_mode_get(Evas_Object *spinner)
27 return EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE; 27 return EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE;
28} 28}
29 29
30static void
31_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
32{
33 printf("Animation has been started!\n");
34}
35 30
36static void 31static void
37_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED) 32_anim_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
38{ 33{
34 Eo *anim = event->info;
39 App_Data *ad = data; 35 App_Data *ad = data;
40 36
41 printf("Animation has been ended!\n"); 37 if (anim)
42 38 {
43 Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin); 39 printf("Animation has been started!\n");
44 if (repeat_mode == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE) 40 }
41 else
45 { 42 {
46 int repeat_count = elm_spinner_value_get(ad->repeat_count_spin); 43 printf("Animation has been ended!\n");
47 if (repeat_count % 2 == 1) 44 Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin);
45 if (repeat_mode == EFL_CANVAS_ANIMATION_REPEAT_MODE_REVERSE)
48 { 46 {
49 ad->is_btn_visible = !(ad->is_btn_visible); 47 int play_count = elm_spinner_value_get(ad->play_count_spin);
50 48 if (play_count % 2 == 0)
51 if (ad->is_btn_visible) 49 {
52 elm_object_text_set(ad->start_btn, "Start Alpha Animation from 1.0 to 0.0"); 50 ad->is_btn_visible = !(ad->is_btn_visible);
53 else 51 if (ad->is_btn_visible)
54 elm_object_text_set(ad->start_btn, "Start Alpha Animation from 0.0 to 1.0"); 52 elm_object_text_set(ad->start_btn, "Start Alpha Animation from 1.0 to 0.0");
53 else
54 elm_object_text_set(ad->start_btn, "Start Alpha Animation from 0.0 to 1.0");
55 }
55 } 56 }
57 elm_object_disabled_set(ad->play_count_spin, EINA_FALSE);
58 elm_object_disabled_set(ad->repeat_mode_spin, EINA_FALSE);
56 } 59 }
57
58 elm_object_disabled_set(ad->repeat_count_spin, EINA_FALSE);
59 elm_object_disabled_set(ad->repeat_mode_spin, EINA_FALSE);
60} 60}
61 61
62static void 62static void
63_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 63_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
64{ 64{
65 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 65 double *progress = event->info;
66 double progress = event_running->progress; 66 printf("Animation is running! Current progress(%lf)\n", *progress);
67 printf("Animation is running! Current progress(%lf)\n", progress);
68} 67}
69 68
69EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
70 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
71 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
72)
73
70static void 74static void
71_start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 75_start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
72{ 76{
@@ -74,39 +78,36 @@ _start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED
74 78
75 ad->is_btn_visible = !(ad->is_btn_visible); 79 ad->is_btn_visible = !(ad->is_btn_visible);
76 80
77 int repeat_count = elm_spinner_value_get(ad->repeat_count_spin); 81 int play_count = elm_spinner_value_get(ad->play_count_spin);
78 elm_object_disabled_set(ad->repeat_count_spin, EINA_TRUE); 82 elm_object_disabled_set(ad->play_count_spin, EINA_TRUE);
79 83
80 Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin); 84 Efl_Canvas_Animation_Repeat_Mode repeat_mode = _anim_repeat_mode_get(ad->repeat_mode_spin);
81 elm_object_disabled_set(ad->repeat_mode_spin, EINA_TRUE); 85 elm_object_disabled_set(ad->repeat_mode_spin, EINA_TRUE);
82 86
83 if (ad->is_btn_visible) 87 if (ad->is_btn_visible)
84 { 88 {
85 //Set animation repeat count 89 //Set animation play count
86 efl_animation_repeat_count_set(ad->show_anim, repeat_count); 90 efl_animation_play_count_set(ad->show_anim, play_count);
87 91
88 //Set animation repeat mode 92 //Set animation repeat mode
89 efl_animation_repeat_mode_set(ad->show_anim, repeat_mode); 93 efl_animation_repeat_mode_set(ad->show_anim, repeat_mode);
90 94
91 //Create Animation Object from Animation 95 //Create Animation Object from Animation
92 efl_animation_player_animation_set(ad->anim_obj, ad->show_anim); 96 efl_canvas_object_animation_start(ad->button, ad->show_anim, 1.0, 0.0);
93 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0"); 97 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0");
94 } 98 }
95 else 99 else
96 { 100 {
97 //Set animation repeat count 101 //Set animation repeat count
98 efl_animation_repeat_count_set(ad->hide_anim, repeat_count); 102 efl_animation_play_count_set(ad->hide_anim, play_count);
99 103
100 //Set animation repeat mode 104 //Set animation repeat mode
101 efl_animation_repeat_mode_set(ad->hide_anim, repeat_mode); 105 efl_animation_repeat_mode_set(ad->hide_anim, repeat_mode);
102 106
103 //Create Animation Object from Animation 107 //Create Animation Object from Animation
104 efl_animation_player_animation_set(ad->anim_obj, ad->hide_anim); 108 efl_canvas_object_animation_start(ad->button, ad->hide_anim, 1.0, 0.0);
105 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0"); 109 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0");
106 } 110 }
107
108 //Let Animation Object start animation
109 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
110} 111}
111 112
112static void 113static void
@@ -133,15 +134,16 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
133 evas_object_resize(btn, 200, 200); 134 evas_object_resize(btn, 200, 200);
134 evas_object_move(btn, 100, 50); 135 evas_object_move(btn, 100, 50);
135 evas_object_show(btn); 136 evas_object_show(btn);
137 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
136 138
137 //Show Animation 139 //Show Animation
138 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 140 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
139 efl_animation_alpha_set(show_anim, 0.0, 1.0); 141 efl_animation_alpha_set(show_anim, 0.0, 1.0);
140 efl_animation_duration_set(show_anim, 1.0); 142 efl_animation_duration_set(show_anim, 1.0);
141 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 143 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
142 144
143 //Hide Animation 145 //Hide Animation
144 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 146 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
145 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 147 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
146 efl_animation_duration_set(hide_anim, 1.0); 148 efl_animation_duration_set(hide_anim, 1.0);
147 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 149 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
@@ -156,15 +158,15 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
156 evas_object_move(start_btn, 100, 300); 158 evas_object_move(start_btn, 100, 300);
157 evas_object_show(start_btn); 159 evas_object_show(start_btn);
158 160
159 //Spinner to set animation repeat count 161 //Spinner to set animation play count
160 Evas_Object *repeat_count_spin = elm_spinner_add(win); 162 Evas_Object *play_count_spin = elm_spinner_add(win);
161 elm_spinner_label_format_set(repeat_count_spin, "Repeat Count: %d"); 163 elm_spinner_label_format_set(play_count_spin, "Play Count (0 is infinite): %d");
162 elm_spinner_editable_set(repeat_count_spin, EINA_FALSE); 164 elm_spinner_editable_set(play_count_spin, EINA_FALSE);
163 elm_spinner_min_max_set(repeat_count_spin, 0, 3); 165 elm_spinner_min_max_set(play_count_spin, 0, 3);
164 elm_spinner_value_set(repeat_count_spin, 0); 166 elm_spinner_value_set(play_count_spin, 1);
165 evas_object_resize(repeat_count_spin, 200, 50); 167 evas_object_resize(play_count_spin, 200, 50);
166 evas_object_move(repeat_count_spin, 100, 350); 168 evas_object_move(play_count_spin, 100, 350);
167 evas_object_show(repeat_count_spin); 169 evas_object_show(play_count_spin);
168 170
169 //Spinner to set animation repeat mode 171 //Spinner to set animation repeat mode
170 Evas_Object *repeat_mode_spin = elm_spinner_add(win); 172 Evas_Object *repeat_mode_spin = elm_spinner_add(win);
@@ -178,24 +180,14 @@ test_efl_anim_repeat(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
178 evas_object_move(repeat_mode_spin, 100, 400); 180 evas_object_move(repeat_mode_spin, 100, 400);
179 evas_object_show(repeat_mode_spin); 181 evas_object_show(repeat_mode_spin);
180 182
181
182 //Initialize App Data 183 //Initialize App Data
183 ad->show_anim = show_anim; 184 ad->show_anim = show_anim;
184 ad->hide_anim = hide_anim; 185 ad->hide_anim = hide_anim;
185 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
186 efl_animation_player_target_set(efl_added, btn));
187 //Register callback called when animation starts
188 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
189 //Register callback called when animation ends
190 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
191 //Register callback called while animation is executed
192 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
193
194 ad->start_btn = start_btn; 186 ad->start_btn = start_btn;
195 ad->repeat_count_spin = repeat_count_spin; 187 ad->play_count_spin = play_count_spin;
196 ad->repeat_mode_spin = repeat_mode_spin; 188 ad->repeat_mode_spin = repeat_mode_spin;
197 ad->is_btn_visible = EINA_TRUE; 189 ad->is_btn_visible = EINA_TRUE;
198 190 ad->button = btn;
199 191
200 evas_object_resize(win, 400, 500); 192 evas_object_resize(win, 400, 500);
201 evas_object_show(win); 193 evas_object_show(win);
diff --git a/src/bin/elementary/test_efl_anim_rotate.c b/src/bin/elementary/test_efl_anim_rotate.c
index 10df8ca..4e3434c 100644
--- a/src/bin/elementary/test_efl_anim_rotate.c
+++ b/src/bin/elementary/test_efl_anim_rotate.c
@@ -7,31 +7,38 @@ typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *cw_45_degrees_anim; 8 Efl_Canvas_Animation *cw_45_degrees_anim;
9 Efl_Canvas_Animation *ccw_45_degrees_anim; 9 Efl_Canvas_Animation *ccw_45_degrees_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 10 Elm_Button *button;
11 11
12 Eina_Bool is_btn_rotated; 12 Eina_Bool is_btn_rotated;
13} App_Data; 13} App_Data;
14 14
15static void 15static void
16_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 16_anim_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
17{ 17{
18 printf("Animation has been started!\n"); 18 Eo *anim = event->info;
19}
20 19
21static void 20 if (anim)
22_anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 21 {
23{ 22 printf("Animation has been started!\n");
24 printf("Animation has been ended!\n"); 23 }
24 else
25 {
26 printf("Animation has been ended!\n");
27 }
25} 28}
26 29
27static void 30static void
28_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 31_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
29{ 32{
30 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 33 double *progress = event->info;
31 double progress = event_running->progress; 34 printf("Animation is running! Current progress(%lf)\n", *progress);
32 printf("Animation is running! Current progress(%lf)\n", progress);
33} 35}
34 36
37EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
38 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
39 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
40)
41
35static void 42static void
36_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 43_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
37{ 44{
@@ -42,18 +49,15 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
42 if (ad->is_btn_rotated) 49 if (ad->is_btn_rotated)
43 { 50 {
44 //Create Animation Object from Animation 51 //Create Animation Object from Animation
45 efl_animation_player_animation_set(ad->anim_obj, ad->cw_45_degrees_anim); 52 efl_canvas_object_animation_start(ad->button, ad->cw_45_degrees_anim, 1.0, 0.0);
46 efl_text_set(obj, "Start Rotate Animation from 45 to 0 degrees"); 53 efl_text_set(obj, "Start Rotate Animation from 45 to 0 degrees");
47 } 54 }
48 else 55 else
49 { 56 {
50 //Create Animation Object from Animation 57 //Create Animation Object from Animation
51 efl_animation_player_animation_set(ad->anim_obj, ad->ccw_45_degrees_anim); 58 efl_canvas_object_animation_start(ad->button, ad->ccw_45_degrees_anim, 1.0, 0.0);
52 efl_text_set(obj, "Start Rotate Animation from 0 to 45 degrees"); 59 efl_text_set(obj, "Start Rotate Animation from 0 to 45 degrees");
53 } 60 }
54
55 //Let Animation Object start animation
56 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
57} 61}
58 62
59static void 63static void
@@ -81,32 +85,24 @@ test_efl_anim_rotate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
81 evas_object_resize(btn, 150, 150); 85 evas_object_resize(btn, 150, 150);
82 evas_object_move(btn, 125, 100); 86 evas_object_move(btn, 125, 100);
83 evas_object_show(btn); 87 evas_object_show(btn);
88 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
84 89
85 //Rotate from 0 to 45 degrees Animation 90 //Rotate from 0 to 45 degrees Animation
86 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 91 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
87 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0,NULL, 0.5, 0.5); 92 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, NULL, EINA_VECTOR2(0.5, 0.5));
88 efl_animation_duration_set(cw_45_degrees_anim, 1.0); 93 efl_animation_duration_set(cw_45_degrees_anim, 1.0);
89 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); 94 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
90 95
91 //Rotate from 45 to 0 degrees Animation 96 //Rotate from 45 to 0 degrees Animation
92 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 97 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
93 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, 0.5, 0.5); 98 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, NULL, EINA_VECTOR2(0.5, 0.5));
94 efl_animation_duration_set(ccw_45_degrees_anim, 1.0); 99 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
95 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); 100 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
96 101
97 //Initialize App Data 102 //Initialize App Data
98 ad->cw_45_degrees_anim = cw_45_degrees_anim; 103 ad->cw_45_degrees_anim = cw_45_degrees_anim;
99 ad->ccw_45_degrees_anim = ccw_45_degrees_anim; 104 ad->ccw_45_degrees_anim = ccw_45_degrees_anim;
100 105 ad->button = btn;
101 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
102 efl_animation_player_target_set(efl_added, btn));
103 //Register callback called when animation starts
104 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
105 //Register callback called when animation ends
106 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, NULL);
107 //Register callback called while animation is executed
108 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
109
110 ad->is_btn_rotated = EINA_FALSE; 106 ad->is_btn_rotated = EINA_FALSE;
111 107
112 //Button to start animation 108 //Button to start animation
@@ -140,6 +136,7 @@ test_efl_anim_rotate_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
140 evas_object_resize(btn, 150, 150); 136 evas_object_resize(btn, 150, 150);
141 evas_object_move(btn, 125, 100); 137 evas_object_move(btn, 125, 100);
142 evas_object_show(btn); 138 evas_object_show(btn);
139 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
143 140
144 //Pivot to be center of the rotation 141 //Pivot to be center of the rotation
145 Evas_Object *pivot = elm_button_add(win); 142 Evas_Object *pivot = elm_button_add(win);
@@ -150,32 +147,22 @@ test_efl_anim_rotate_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
150 evas_object_show(pivot); 147 evas_object_show(pivot);
151 148
152 //Rotate from 0 to 45 degrees Animation 149 //Rotate from 0 to 45 degrees Animation
153 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 150 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
154 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, pivot, 0.5, 0.5); 151 efl_animation_rotate_set(cw_45_degrees_anim, 0.0, 45.0, pivot, EINA_VECTOR2(0.5, 0.5));
155 efl_animation_duration_set(cw_45_degrees_anim, 1.0); 152 efl_animation_duration_set(cw_45_degrees_anim, 1.0);
156 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); 153 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
157 154
158 //Rotate from 45 to 0 degrees Animation 155 //Rotate from 45 to 0 degrees Animation
159 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 156 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
160 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, pivot, 0.5, 0.5); 157 efl_animation_rotate_set(ccw_45_degrees_anim, 45.0, 0.0, pivot, EINA_VECTOR2(0.5, 0.5));
161 efl_animation_duration_set(ccw_45_degrees_anim, 1.0); 158 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
162 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); 159 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
163 160
164 //Initialize App Data 161 //Initialize App Data
165 ad->cw_45_degrees_anim = cw_45_degrees_anim; 162 ad->cw_45_degrees_anim = cw_45_degrees_anim;
166 ad->ccw_45_degrees_anim = ccw_45_degrees_anim; 163 ad->ccw_45_degrees_anim = ccw_45_degrees_anim;
167 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
168 efl_animation_player_target_set(efl_added, btn));
169
170 //Register callback called when animation starts
171 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
172
173 //Register callback called when animation ends
174 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, NULL);
175
176 //Register callback called while animation is executed
177 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
178 ad->is_btn_rotated = EINA_FALSE; 164 ad->is_btn_rotated = EINA_FALSE;
165 ad->button = btn;
179 166
180 //Button to start animation 167 //Button to start animation
181 Evas_Object *btn2 = elm_button_add(win); 168 Evas_Object *btn2 = elm_button_add(win);
@@ -208,6 +195,7 @@ test_efl_anim_rotate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
208 evas_object_resize(btn, 150, 150); 195 evas_object_resize(btn, 150, 150);
209 evas_object_move(btn, 125, 100); 196 evas_object_move(btn, 125, 100);
210 evas_object_show(btn); 197 evas_object_show(btn);
198 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
211 199
212 //Absolute coordinate (0, 0) to be center of the rotation 200 //Absolute coordinate (0, 0) to be center of the rotation
213 Evas_Object *abs_center = elm_button_add(win); 201 Evas_Object *abs_center = elm_button_add(win);
@@ -218,31 +206,22 @@ test_efl_anim_rotate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUS
218 evas_object_show(abs_center); 206 evas_object_show(abs_center);
219 207
220 //Rotate from 0 to 45 degrees Animation 208 //Rotate from 0 to 45 degrees Animation
221 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 209 Efl_Canvas_Animation *cw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
222 efl_animation_rotate_absolute_set(cw_45_degrees_anim, 0.0, 45.0, 0, 0); 210 efl_animation_rotate_absolute_set(cw_45_degrees_anim, 0.0, 45.0, EINA_POSITION2D(0, 0));
223 efl_animation_duration_set(cw_45_degrees_anim, 1.0); 211 efl_animation_duration_set(cw_45_degrees_anim, 1.0);
224 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE); 212 efl_animation_final_state_keep_set(cw_45_degrees_anim, EINA_TRUE);
225 213
226 //Rotate from 45 to 0 degrees Animation 214 //Rotate from 45 to 0 degrees Animation
227 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ANIMATION_ROTATE_CLASS, win); 215 Efl_Canvas_Animation *ccw_45_degrees_anim = efl_add(EFL_CANVAS_ROTATE_ANIMATION_CLASS, win);
228 efl_animation_rotate_absolute_set(ccw_45_degrees_anim, 45.0, 0.0, 0, 0); 216 efl_animation_rotate_absolute_set(ccw_45_degrees_anim, 45.0, 0.0, EINA_POSITION2D(0, 0));
229 efl_animation_duration_set(ccw_45_degrees_anim, 1.0); 217 efl_animation_duration_set(ccw_45_degrees_anim, 1.0);
230 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE); 218 efl_animation_final_state_keep_set(ccw_45_degrees_anim, EINA_TRUE);
231 219
232 //Initialize App Data 220 //Initialize App Data
233 ad->cw_45_degrees_anim = cw_45_degrees_anim; 221 ad->cw_45_degrees_anim = cw_45_degrees_anim;
234 ad->ccw_45_degrees_anim = ccw_45_degrees_anim; 222 ad->ccw_45_degrees_anim = ccw_45_degrees_anim;
235 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
236 efl_animation_player_target_set(efl_added, btn));
237
238 //Register callback called when animation starts
239 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
240 //Register callback called when animation ends
241 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, NULL);
242 //Register callback called while animation is executed
243 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
244
245 ad->is_btn_rotated = EINA_FALSE; 223 ad->is_btn_rotated = EINA_FALSE;
224 ad->button = btn;
246 225
247 //Button to start animation 226 //Button to start animation
248 Evas_Object *btn2 = elm_button_add(win); 227 Evas_Object *btn2 = elm_button_add(win);
diff --git a/src/bin/elementary/test_efl_anim_scale.c b/src/bin/elementary/test_efl_anim_scale.c
index 5e5f9ab..6653772 100644
--- a/src/bin/elementary/test_efl_anim_scale.c
+++ b/src/bin/elementary/test_efl_anim_scale.c
@@ -7,31 +7,38 @@ typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *scale_double_anim; 8 Efl_Canvas_Animation *scale_double_anim;
9 Efl_Canvas_Animation *scale_half_anim; 9 Efl_Canvas_Animation *scale_half_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 10 Elm_Button *button;
11 11
12 Eina_Bool is_btn_scaled; 12 Eina_Bool is_btn_scaled;
13} App_Data; 13} App_Data;
14 14
15static void 15static void
16_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 16_anim_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
17{ 17{
18 printf("Animation has been started!\n"); 18 Eo *anim = event->info;
19}
20 19
21static void 20 if (anim)
22_anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 21 {
23{ 22 printf("Animation has been started!\n");
24 printf("Animation has been ended!\n"); 23 }
24 else
25 {
26 printf("Animation has been ended!\n");
27 }
25} 28}
26 29
27static void 30static void
28_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 31_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
29{ 32{
30 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 33 double *progress = event->info;
31 double progress = event_running->progress; 34 printf("Animation is running! Current progress(%lf)\n", *progress);
32 printf("Animation is running! Current progress(%lf)\n", progress);
33} 35}
34 36
37EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
38 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
39 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
40)
41
35static void 42static void
36_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 43_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
37{ 44{
@@ -42,18 +49,15 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
42 if (ad->is_btn_scaled) 49 if (ad->is_btn_scaled)
43 { 50 {
44 //Create Animation Object from Animation 51 //Create Animation Object from Animation
45 efl_animation_player_animation_set(ad->anim_obj, ad->scale_double_anim); 52 efl_canvas_object_animation_start(ad->button, ad->scale_double_anim, 1.0, 0.0);
46 efl_text_set(obj, "Start Scale Animation to zoom out"); 53 efl_text_set(obj, "Start Scale Animation to zoom out");
47 } 54 }
48 else 55 else
49 { 56 {
50 //Create Animation Object from Animation 57 //Create Animation Object from Animation
51 efl_animation_player_animation_set(ad->anim_obj, ad->scale_half_anim); 58 efl_canvas_object_animation_start(ad->button, ad->scale_half_anim, 1.0, 0.0);
52 efl_text_set(obj, "Start Scale Animation to zoom in"); 59 efl_text_set(obj, "Start Scale Animation to zoom in");
53 } 60 }
54
55 //Let Animation Object start animation
56 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
57} 61}
58 62
59static void 63static void
@@ -81,35 +85,25 @@ test_efl_anim_scale(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *
81 evas_object_resize(btn, 150, 150); 85 evas_object_resize(btn, 150, 150);
82 evas_object_move(btn, 125, 100); 86 evas_object_move(btn, 125, 100);
83 evas_object_show(btn); 87 evas_object_show(btn);
88 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
84 89
85 //Scale Animation to zoom in 90 //Scale Animation to zoom in
86 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 91 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
87 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, NULL, 0.5, 0.5); 92 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), NULL, EINA_VECTOR2(0.5, 0.5));
88 efl_animation_duration_set(scale_double_anim, 1.0); 93 efl_animation_duration_set(scale_double_anim, 1.0);
89 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 94 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
90 95
91 //Scale Animation to zoom out 96 //Scale Animation to zoom out
92 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 97 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
93 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, NULL, 0.5, 0.5); 98 efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), NULL, EINA_VECTOR2(0.5, 0.5));
94 efl_animation_duration_set(scale_half_anim, 1.0); 99 efl_animation_duration_set(scale_half_anim, 1.0);
95 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 100 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
96 101
97 //Initialize App Data 102 //Initialize App Data
98 ad->scale_double_anim = scale_double_anim; 103 ad->scale_double_anim = scale_double_anim;
99 ad->scale_half_anim = scale_half_anim; 104 ad->scale_half_anim = scale_half_anim;
100 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
101 efl_animation_player_target_set(efl_added, btn));
102
103 //Register callback called when animation starts
104 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
105
106 //Register callback called when animation ends
107 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
108
109 //Register callback called while animation is executed
110 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
111
112 ad->is_btn_scaled = EINA_FALSE; 105 ad->is_btn_scaled = EINA_FALSE;
106 ad->button = btn;
113 107
114 //Button to start animation 108 //Button to start animation
115 Evas_Object *btn2 = elm_button_add(win); 109 Evas_Object *btn2 = elm_button_add(win);
@@ -142,6 +136,7 @@ test_efl_anim_scale_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
142 evas_object_resize(btn, 150, 150); 136 evas_object_resize(btn, 150, 150);
143 evas_object_move(btn, 125, 100); 137 evas_object_move(btn, 125, 100);
144 evas_object_show(btn); 138 evas_object_show(btn);
139 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
145 140
146 //Pivot to be center of the scaling 141 //Pivot to be center of the scaling
147 Evas_Object *pivot = elm_button_add(win); 142 Evas_Object *pivot = elm_button_add(win);
@@ -152,29 +147,21 @@ test_efl_anim_scale_relative(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
152 evas_object_show(pivot); 147 evas_object_show(pivot);
153 148
154 //Scale Animation to zoom in 149 //Scale Animation to zoom in
155 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 150 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
156 efl_animation_scale_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, pivot, 0.5, 0.5); 151 efl_animation_scale_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), pivot, EINA_VECTOR2(0.5, 0.5));
157 efl_animation_duration_set(scale_double_anim, 1.0); 152 efl_animation_duration_set(scale_double_anim, 1.0);
158 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 153 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
159 154
160 //Scale Animation to zoom out 155 //Scale Animation to zoom out
161 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 156 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
162 efl_animation_scale_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, pivot, 0.5, 0.5); 157 efl_animation_scale_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), pivot, EINA_VECTOR2(0.5, 0.5));
163 efl_animation_duration_set(scale_half_anim, 1.0); 158 efl_animation_duration_set(scale_half_anim, 1.0);
164 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 159 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
165 160
166 //Initialize App Data 161 //Initialize App Data
167 ad->scale_double_anim = scale_double_anim; 162 ad->scale_double_anim = scale_double_anim;
168 ad->scale_half_anim = scale_half_anim; 163 ad->scale_half_anim = scale_half_anim;
169 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 164 ad->button = btn;
170 efl_animation_player_target_set(efl_added, btn));
171 //Register callback called when animation starts
172 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
173 //Register callback called when animation ends
174 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
175 //Register callback called while animation is executed
176 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
177
178 ad->is_btn_scaled = EINA_FALSE; 165 ad->is_btn_scaled = EINA_FALSE;
179 166
180 //Button to start animation 167 //Button to start animation
@@ -208,6 +195,7 @@ test_efl_anim_scale_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
208 evas_object_resize(btn, 150, 150); 195 evas_object_resize(btn, 150, 150);
209 evas_object_move(btn, 125, 100); 196 evas_object_move(btn, 125, 100);
210 evas_object_show(btn); 197 evas_object_show(btn);
198 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
211 199
212 //Absolute coordinate (0, 0) to be center of the scaling 200 //Absolute coordinate (0, 0) to be center of the scaling
213 Evas_Object *abs_center = elm_button_add(win); 201 Evas_Object *abs_center = elm_button_add(win);
@@ -218,29 +206,21 @@ test_efl_anim_scale_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSE
218 evas_object_show(abs_center); 206 evas_object_show(abs_center);
219 207
220 //Scale Animation to zoom in 208 //Scale Animation to zoom in
221 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 209 Efl_Canvas_Animation *scale_double_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
222 efl_animation_scale_absolute_set(scale_double_anim, 1.0, 1.0, 2.0, 2.0, 0, 0); 210 efl_animation_scale_absolute_set(scale_double_anim, EINA_VECTOR2(1.0, 1.0), EINA_VECTOR2(2.0, 2.0), EINA_POSITION2D(0, 0));
223 efl_animation_duration_set(scale_double_anim, 1.0); 211 efl_animation_duration_set(scale_double_anim, 1.0);
224 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE); 212 efl_animation_final_state_keep_set(scale_double_anim, EINA_TRUE);
225 213
226 //Scale Animation to zoom out 214 //Scale Animation to zoom out
227 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_ANIMATION_SCALE_CLASS, win); 215 Efl_Canvas_Animation *scale_half_anim = efl_add(EFL_CANVAS_SCALE_ANIMATION_CLASS, win);
228 efl_animation_scale_absolute_set(scale_half_anim, 2.0, 2.0, 1.0, 1.0, 0, 0); 216 efl_animation_scale_absolute_set(scale_half_anim, EINA_VECTOR2(2.0, 2.0), EINA_VECTOR2(1.0, 1.0), EINA_POSITION2D(0, 0));
229 efl_animation_duration_set(scale_half_anim, 1.0); 217 efl_animation_duration_set(scale_half_anim, 1.0);
230 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE); 218 efl_animation_final_state_keep_set(scale_half_anim, EINA_TRUE);
231 219
232 //Initialize App Data 220 //Initialize App Data
233 ad->scale_double_anim = scale_double_anim; 221 ad->scale_double_anim = scale_double_anim;
234 ad->scale_half_anim = scale_half_anim; 222 ad->scale_half_anim = scale_half_anim;
235 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 223 ad->button = btn;
236 efl_animation_player_target_set(efl_added, btn));
237 //Register callback called when animation starts
238 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
239 //Register callback called when animation ends
240 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
241 //Register callback called while animation is executed
242 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
243
244 ad->is_btn_scaled = EINA_FALSE; 224 ad->is_btn_scaled = EINA_FALSE;
245 225
246 //Button to start animation 226 //Button to start animation
diff --git a/src/bin/elementary/test_efl_anim_start_delay.c b/src/bin/elementary/test_efl_anim_start_delay.c
index e3c7b25..ae41fc7 100644
--- a/src/bin/elementary/test_efl_anim_start_delay.c
+++ b/src/bin/elementary/test_efl_anim_start_delay.c
@@ -7,7 +7,7 @@ typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *show_anim; 8 Efl_Canvas_Animation *show_anim;
9 Efl_Canvas_Animation *hide_anim; 9 Efl_Canvas_Animation *hide_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 10 Elm_Button *button;
11 11
12 Evas_Object *start_delay_spin; 12 Evas_Object *start_delay_spin;
13 13
@@ -15,29 +15,35 @@ typedef struct _App_Data
15} App_Data; 15} App_Data;
16 16
17static void 17static void
18_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 18_anim_changed_cb(void *data, const Efl_Event *event EINA_UNUSED)
19{
20 printf("Animation has been started!\n");
21}
22
23static void
24_anim_ended_cb(void *data, const Efl_Event *event EINA_UNUSED)
25{ 19{
20 Eo *anim = event->info;
26 App_Data *ad = data; 21 App_Data *ad = data;
27 22
28 printf("Animation has been ended!\n"); 23 if (anim)
29 24 {
30 elm_object_disabled_set(ad->start_delay_spin, EINA_FALSE); 25 printf("Animation has been started!\n");
26 elm_object_disabled_set(ad->start_delay_spin, EINA_FALSE);
27 }
28 else
29 {
30 printf("Animation has been ended!\n");
31 elm_object_disabled_set(ad->start_delay_spin, EINA_TRUE);
32 }
31} 33}
32 34
33static void 35static void
34_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 36_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
35{ 37{
36 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 38 double *progress = event->info;
37 double progress = event_running->progress; 39 printf("Animation is running! Current progress(%lf)\n", *progress);
38 printf("Animation is running! Current progress(%lf)\n", progress);
39} 40}
40 41
42EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
43 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
44 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
45)
46
41static void 47static void
42_start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 48_start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
43{ 49{
@@ -54,7 +60,7 @@ _start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED
54 efl_animation_start_delay_set(ad->show_anim, start_delay); 60 efl_animation_start_delay_set(ad->show_anim, start_delay);
55 61
56 //Create Animation Object from Animation 62 //Create Animation Object from Animation
57 efl_animation_player_animation_set(ad->anim_obj, ad->show_anim); 63 efl_canvas_object_animation_start(ad->button, ad->show_anim, 1.0, 0.0);
58 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0"); 64 efl_text_set(obj, "Start Alpha Animation from 1.0 to 0.0");
59 } 65 }
60 else 66 else
@@ -63,12 +69,9 @@ _start_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED
63 efl_animation_start_delay_set(ad->hide_anim, start_delay); 69 efl_animation_start_delay_set(ad->hide_anim, start_delay);
64 70
65 //Create Animation Object from Animation 71 //Create Animation Object from Animation
66 efl_animation_player_animation_set(ad->anim_obj, ad->hide_anim); 72 efl_canvas_object_animation_start(ad->button, ad->hide_anim, 1.0, 0.0);
67 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0"); 73 efl_text_set(obj, "Start Alpha Animation from 0.0 to 1.0");
68 } 74 }
69
70 //Let Animation Object start animation
71 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
72} 75}
73 76
74static void 77static void
@@ -96,15 +99,16 @@ test_efl_anim_start_delay(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
96 evas_object_resize(btn, 200, 200); 99 evas_object_resize(btn, 200, 200);
97 evas_object_move(btn, 100, 50); 100 evas_object_move(btn, 100, 50);
98 evas_object_show(btn); 101 evas_object_show(btn);
102 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
99 103
100 //Show Animation 104 //Show Animation
101 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 105 Efl_Canvas_Animation *show_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
102 efl_animation_alpha_set(show_anim, 0.0, 1.0); 106 efl_animation_alpha_set(show_anim, 0.0, 1.0);
103 efl_animation_duration_set(show_anim, 1.0); 107 efl_animation_duration_set(show_anim, 1.0);
104 efl_animation_final_state_keep_set(show_anim, EINA_TRUE); 108 efl_animation_final_state_keep_set(show_anim, EINA_TRUE);
105 109
106 //Hide Animation 110 //Hide Animation
107 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ANIMATION_ALPHA_CLASS, win); 111 Efl_Canvas_Animation *hide_anim = efl_add(EFL_CANVAS_ALPHA_ANIMATION_CLASS, win);
108 efl_animation_alpha_set(hide_anim, 1.0, 0.0); 112 efl_animation_alpha_set(hide_anim, 1.0, 0.0);
109 efl_animation_duration_set(hide_anim, 1.0); 113 efl_animation_duration_set(hide_anim, 1.0);
110 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE); 114 efl_animation_final_state_keep_set(hide_anim, EINA_TRUE);
@@ -130,23 +134,12 @@ test_efl_anim_start_delay(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
130 evas_object_move(start_delay_spin, 100, 350); 134 evas_object_move(start_delay_spin, 100, 350);
131 evas_object_show(start_delay_spin); 135 evas_object_show(start_delay_spin);
132 136
133
134 //Initialize App Data 137 //Initialize App Data
135 ad->show_anim = show_anim; 138 ad->show_anim = show_anim;
136 ad->hide_anim = hide_anim; 139 ad->hide_anim = hide_anim;
137 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win,
138 efl_animation_player_target_set(efl_added, btn));
139
140 //Register callback called when animation starts
141 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
142 //Register callback called when animation ends
143 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, ad);
144 //Register callback called while animation is executed
145 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
146
147 ad->start_delay_spin = start_delay_spin; 140 ad->start_delay_spin = start_delay_spin;
148 ad->is_btn_visible = EINA_TRUE; 141 ad->is_btn_visible = EINA_TRUE;
149 142 ad->button = btn;
150 143
151 evas_object_resize(win, 400, 450); 144 evas_object_resize(win, 400, 450);
152 evas_object_show(win); 145 evas_object_show(win);
diff --git a/src/bin/elementary/test_efl_anim_translate.c b/src/bin/elementary/test_efl_anim_translate.c
index 9f30cc3..c1a3165 100644
--- a/src/bin/elementary/test_efl_anim_translate.c
+++ b/src/bin/elementary/test_efl_anim_translate.c
@@ -7,31 +7,38 @@ typedef struct _App_Data
7{ 7{
8 Efl_Canvas_Animation *translate_rb_anim; 8 Efl_Canvas_Animation *translate_rb_anim;
9 Efl_Canvas_Animation *translate_lt_anim; 9 Efl_Canvas_Animation *translate_lt_anim;
10 Efl_Canvas_Animation_Player *anim_obj; 10 Elm_Button *button;
11 11
12 Eina_Bool is_btn_translated; 12 Eina_Bool is_btn_translated;
13} App_Data; 13} App_Data;
14 14
15static void 15static void
16_anim_started_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 16_anim_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
17{ 17{
18 printf("Animation has been started!\n"); 18 Eo *anim = event->info;
19}
20 19
21static void 20 if (anim)
22_anim_ended_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) 21 {
23{ 22 printf("Animation has been started!\n");
24 printf("Animation has been ended!\n"); 23 }
24 else
25 {
26 printf("Animation has been ended!\n");
27 }
25} 28}
26 29
27static void 30static void
28_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event) 31_anim_running_cb(void *data EINA_UNUSED, const Efl_Event *event)
29{ 32{
30 Efl_Canvas_Animation_Player_Event_Running *event_running = event->info; 33 double *progress = event->info;
31 double progress = event_running->progress; 34 printf("Animation is running! Current progress(%lf)\n", *progress);
32 printf("Animation is running! Current progress(%lf)\n", progress);
33} 35}
34 36
37EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
38 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_CHANGED, _anim_changed_cb },
39 {EFL_CANVAS_OBJECT_ANIMATION_EVENT_ANIMATION_PROGRESS_UPDATED, _anim_running_cb },
40)
41
35static void 42static void
36_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 43_btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
37{ 44{
@@ -42,18 +49,15 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
42 if (ad->is_btn_translated) 49 if (ad->is_btn_translated)
43 { 50 {
44 //Create Animation Object from Animation 51 //Create Animation Object from Animation
45 efl_animation_player_animation_set(ad->anim_obj, ad->translate_rb_anim); 52 efl_canvas_object_animation_start(ad->button, ad->translate_rb_anim, 1.0, 0.0);
46 efl_text_set(obj, "Start Translate Animation to left top"); 53 efl_text_set(obj, "Start Translate Animation to left top");
47 } 54 }
48 else 55 else
49 { 56 {
50 //Create Animation Object from Animation 57 //Create Animation Object from Animation
51 efl_animation_player_animation_set(ad->anim_obj, ad->translate_lt_anim); 58 efl_canvas_object_animation_start(ad->button, ad->translate_lt_anim, 1.0, 0.0);
52 efl_text_set(obj, "Start Translate Animation to right bottom"); 59 efl_text_set(obj, "Start Translate Animation to right bottom");
53 } 60 }
54
55 //Let Animation Object start animation
56 efl_player_playing_set(ad->anim_obj, EINA_TRUE);
57} 61}
58 62
59static void 63static void
@@ -81,31 +85,24 @@ test_efl_anim_translate(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
81 evas_object_resize(btn, 150, 150); 85 evas_object_resize(btn, 150, 150);
82 evas_object_move(btn, 125, 100); 86 evas_object_move(btn, 125, 100);
83 evas_object_show(btn); 87 evas_object_show(btn);
88 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
84 89
85 //Translate Animation to right bottom relatively 90 //Translate Animation to right bottom relatively
86 Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); 91 Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
87 efl_animation_translate_set(translate_rb_anim, 0, 0, 100, 100); 92 efl_animation_translate_set(translate_rb_anim, EINA_POSITION2D(0, 0), EINA_POSITION2D(100, 100));
88 efl_animation_duration_set(translate_rb_anim, 1.0); 93 efl_animation_duration_set(translate_rb_anim, 1.0);
89 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE); 94 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
90 95
91 //Translate Animation to left top relatively 96 //Translate Animation to left top relatively
92 Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); 97 Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
93 efl_animation_translate_set(translate_lt_anim, 100, 100, 0, 0); 98 efl_animation_translate_set(translate_lt_anim, EINA_POSITION2D(100, 100), EINA_POSITION2D(0, 0));
94 efl_animation_duration_set(translate_lt_anim, 1.0); 99 efl_animation_duration_set(translate_lt_anim, 1.0);
95 efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE); 100 efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE);
96 101
97 //Initialize App Data 102 //Initialize App Data
98 ad->translate_rb_anim = translate_rb_anim; 103 ad->translate_rb_anim = translate_rb_anim;
99 ad->translate_lt_anim = translate_lt_anim; 104 ad->translate_lt_anim = translate_lt_anim;
100 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 105 ad->button = btn;
101 efl_animation_player_target_set(efl_added, btn));
102 //Register callback called when animation starts
103 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
104 //Register callback called when animation ends
105 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, NULL);
106 //Register callback called while animation is executed
107 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
108
109 ad->is_btn_translated = EINA_FALSE; 106 ad->is_btn_translated = EINA_FALSE;
110 107
111 //Button to start animation 108 //Button to start animation
@@ -139,6 +136,7 @@ test_efl_anim_translate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_U
139 evas_object_resize(btn, 150, 150); 136 evas_object_resize(btn, 150, 150);
140 evas_object_move(btn, 125, 100); 137 evas_object_move(btn, 125, 100);
141 evas_object_show(btn); 138 evas_object_show(btn);
139 efl_event_callback_array_add(btn, animation_stats_cb(), ad);
142 140
143 //Absolute coordinate (0, 0) for absolute translation 141 //Absolute coordinate (0, 0) for absolute translation
144 Evas_Object *abs_center = elm_button_add(win); 142 Evas_Object *abs_center = elm_button_add(win);
@@ -149,14 +147,14 @@ test_efl_anim_translate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_U
149 evas_object_show(abs_center); 147 evas_object_show(abs_center);
150 148
151 //Translate Animation to right bottom absolutely 149 //Translate Animation to right bottom absolutely
152 Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); 150 Efl_Canvas_Animation *translate_rb_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
153 efl_animation_translate_absolute_set(translate_rb_anim, 0, 0, 100, 100); 151 efl_animation_translate_absolute_set(translate_rb_anim, EINA_POSITION2D(0, 0), EINA_POSITION2D(100, 100));
154 efl_animation_duration_set(translate_rb_anim, 1.0); 152 efl_animation_duration_set(translate_rb_anim, 1.0);
155 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE); 153 efl_animation_final_state_keep_set(translate_rb_anim, EINA_TRUE);
156 154
157 //Translate Animation to left top absolutely 155 //Translate Animation to left top absolutely
158 Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_ANIMATION_TRANSLATE_CLASS, win); 156 Efl_Canvas_Animation *translate_lt_anim = efl_add(EFL_CANVAS_TRANSLATE_ANIMATION_CLASS, win);
159 efl_animation_translate_absolute_set(translate_lt_anim, 100, 100, 0, 0); 157 efl_animation_translate_absolute_set(translate_lt_anim, EINA_POSITION2D(100, 100), EINA_POSITION2D(0, 0));
160 efl_animation_duration_set(translate_lt_anim, 1.0); 158 efl_animation_duration_set(translate_lt_anim, 1.0);
161 efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE); 159 efl_animation_final_state_keep_set(translate_lt_anim, EINA_TRUE);
162 160
@@ -164,14 +162,7 @@ test_efl_anim_translate_absolute(void *data EINA_UNUSED, Evas_Object *obj EINA_U
164 ad->translate_rb_anim = translate_rb_anim; 162 ad->translate_rb_anim = translate_rb_anim;
165 ad->translate_lt_anim = translate_lt_anim; 163 ad->translate_lt_anim = translate_lt_anim;
166 ad->is_btn_translated = EINA_FALSE; 164 ad->is_btn_translated = EINA_FALSE;
167 ad->anim_obj = efl_add(EFL_CANVAS_ANIMATION_PLAYER_CLASS, win, 165 ad->button = btn;
168 efl_animation_player_target_set(efl_added, btn));
169 //Register callback called when animation starts
170 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_STARTED, _anim_started_cb, NULL);
171 //Register callback called when animation ends
172 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_ENDED, _anim_ended_cb, NULL);
173 //Register callback called while animation is executed
174 efl_event_callback_add(ad->anim_obj, EFL_ANIMATION_PLAYER_EVENT_RUNNING, _anim_running_cb, NULL);
175 166
176 //Button to start animation 167 //Button to start animation
177 Evas_Object *btn2 = elm_button_add(win); 168 Evas_Object *btn2 = elm_button_add(win);
diff --git a/src/bin/elementary/test_efl_gfx_mapping.c b/src/bin/elementary/test_efl_gfx_mapping.c
index fecfc45..a895d82 100644
--- a/src/bin/elementary/test_efl_gfx_mapping.c
+++ b/src/bin/elementary/test_efl_gfx_mapping.c
@@ -46,7 +46,7 @@ test_efl_gfx_mapping(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
46 Evas_Object *win, *img; 46 Evas_Object *win, *img;
47 char buf[PATH_MAX]; 47 char buf[PATH_MAX];
48 48
49 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 49 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
50 efl_text_set(efl_added, "Efl Gfx Map"), 50 efl_text_set(efl_added, "Efl Gfx Map"),
51 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 51 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
52 52
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 7f5add0..c6f3189 100644
--- a/src/bin/elementary/test_efl_gfx_vg_value_provider.c
+++ b/src/bin/elementary/test_efl_gfx_vg_value_provider.c
@@ -15,6 +15,12 @@
15 15
16#ifdef BUILD_VG_LOADER_JSON 16#ifdef BUILD_VG_LOADER_JSON
17 17
18typedef struct _App_Data
19{
20 Eo *label;
21 Eo *slider;
22} App_Data;
23
18Evas_Object *values[4], *anim_view; 24Evas_Object *values[4], *anim_view;
19Evas_Object *path_entry, *type_hoversel; 25Evas_Object *path_entry, *type_hoversel;
20 26
@@ -51,7 +57,7 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
51 } 57 }
52 58
53 59
54 efl_ui_animation_view_value_provider_override(anim_view, vp); 60 efl_ui_vg_animation_value_provider_override(anim_view, vp);
55 } 61 }
56 if (!strcmp(type, "StrokeWidth")) 62 if (!strcmp(type, "StrokeWidth"))
57 { 63 {
@@ -61,7 +67,7 @@ add_value_provider(char* new_path, char* new_type, char* new_values)
61 char* v = (char*)efl_text_get(values[0]); 67 char* v = (char*)efl_text_get(values[0]);
62 if (v) width = strtod(v, NULL); 68 if (v) width = strtod(v, NULL);
63 efl_gfx_vg_value_provider_stroke_width_set(vp, width); 69 efl_gfx_vg_value_provider_stroke_width_set(vp, width);
64 efl_ui_animation_view_value_provider_override(anim_view, vp); 70 efl_ui_vg_animation_value_provider_override(anim_view, vp);
65 evas_object_show(anim_view); 71 evas_object_show(anim_view);
66 sprintf(new_path, "%s", path); 72 sprintf(new_path, "%s", path);
67 sprintf(new_type, "StrokeWidth"); 73 sprintf(new_type, "StrokeWidth");
@@ -78,15 +84,23 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
78 if (!text) return; 84 if (!text) return;
79 85
80 if (!strcmp("Play", text)) 86 if (!strcmp("Play", text))
81 efl_ui_animation_view_play((Evas_Object*)data); 87 {
88 double speed = efl_player_playback_speed_get(anim_view);
89 efl_player_playback_speed_set(anim_view, speed < 0 ? speed * -1 : speed);
90 efl_player_playing_set(anim_view, EINA_TRUE);
91 }
82 else if (!strcmp("Pause", text)) 92 else if (!strcmp("Pause", text))
83 efl_ui_animation_view_pause((Evas_Object*)data); 93 efl_player_paused_set((Evas_Object*)data, EINA_TRUE);
84 else if (!strcmp("Resume", text)) 94 else if (!strcmp("Resume", text))
85 efl_ui_animation_view_resume((Evas_Object*)data); 95 efl_player_paused_set((Evas_Object*)data, EINA_FALSE);
86 else if (!strcmp("Play Back", text)) 96 else if (!strcmp("Play Backwards", text))
87 efl_ui_animation_view_play_back((Evas_Object*)data); 97 {
98 double speed = efl_player_playback_speed_get(anim_view);
99 efl_player_playback_speed_set(anim_view, speed > 0 ? speed * -1 : speed);
100 efl_player_playing_set(anim_view, EINA_TRUE);
101 }
88 else if (!strcmp("Stop", text)) 102 else if (!strcmp("Stop", text))
89 efl_ui_animation_view_stop((Evas_Object*)data); 103 efl_player_playing_set((Evas_Object*)data, EINA_FALSE);
90 else if (!strcmp("ADD", text)) 104 else if (!strcmp("ADD", text))
91 { 105 {
92 Evas_Object *list = (Evas_Object*)data; 106 Evas_Object *list = (Evas_Object*)data;
@@ -96,7 +110,7 @@ btn_clicked_cb(void *data , const Efl_Event *ev )
96 { 110 {
97 char buf[255]; 111 char buf[255];
98 //TODO: Even if there is the same path as the existing item, it is added without updating. 112 //TODO: Even if there is the same path as the existing item, it is added without updating.
99 // In efl_ui_animation_view, duplicate paths are managed. 113 // In efl_ui_vg_animation, duplicate paths are managed.
100 // However, animator (lottie) does not have an implementation that manages overridden values. 114 // However, animator (lottie) does not have an implementation that manages overridden values.
101 /*Eina_List *items = (Eina_List*)elm_list_items_get(list); 115 /*Eina_List *items = (Eina_List*)elm_list_items_get(list);
102 Eina_List *l; 116 Eina_List *l;
@@ -145,7 +159,7 @@ static void
145check_changed_cb(void *data, const Efl_Event *event) 159check_changed_cb(void *data, const Efl_Event *event)
146{ 160{
147 Evas_Object *anim_view = data; 161 Evas_Object *anim_view = data;
148 efl_ui_animation_view_auto_repeat_set(anim_view, efl_ui_selectable_selected_get(event->object)); 162 efl_player_playback_loop_set(anim_view, efl_ui_selectable_selected_get(event->object));
149} 163}
150 164
151static void 165static void
@@ -154,92 +168,34 @@ speed_changed_cb(void *data, const Efl_Event *event)
154 Evas_Object *anim_view = data; 168 Evas_Object *anim_view = data;
155 double speed = 1; 169 double speed = 1;
156 if (efl_ui_selectable_selected_get(event->object)) speed = 0.25; 170 if (efl_ui_selectable_selected_get(event->object)) speed = 0.25;
157 efl_ui_animation_view_speed_set(anim_view, speed); 171 efl_player_playback_speed_set(anim_view, speed);
158} 172}
159 173
160static void 174static void
161limit_frame_cb(void *data, const Efl_Event *event) 175limit_frame_cb(void *data, const Efl_Event *event)
162{ 176{
163 Evas_Object *anim_view = data; 177 Evas_Object *anim_view = data;
164 int frame_count = efl_ui_animation_view_frame_count_get(anim_view); 178 int frame_count = efl_ui_vg_animation_frame_count_get(anim_view);
165 printf("Total Frame Count : %d\n", frame_count); 179 printf("Total Frame Count : %d\n", frame_count);
166 if (efl_ui_selectable_selected_get(event->object)) 180 if (efl_ui_selectable_selected_get(event->object))
167 { 181 {
168 efl_ui_animation_view_min_frame_set(anim_view, 5); 182 efl_ui_vg_animation_min_frame_set(anim_view, 5);
169 efl_ui_animation_view_max_frame_set(anim_view, 10); 183 efl_ui_vg_animation_max_frame_set(anim_view, 10);
170 printf("Frames to show 5-10 only\n"); 184 printf("Frames to show 5-10 only\n");
171 } 185 }
172 else 186 else
173 { 187 {
174 efl_ui_animation_view_min_frame_set(anim_view, 0); 188 efl_ui_vg_animation_min_frame_set(anim_view, 0);
175 efl_ui_animation_view_max_frame_set(anim_view, frame_count); 189 efl_ui_vg_animation_max_frame_set(anim_view, frame_count);
176 printf("Showing all frames now\n"); 190 printf("Showing all frames now\n");
177 } 191 }
178} 192}
179 193
180static void 194static void
181update_anim_view_state(Evas_Object *anim_view, Evas_Object *label)
182{
183 Efl_Ui_Animation_View_State state = efl_ui_animation_view_state_get(anim_view);
184
185 switch (state)
186 {
187 case EFL_UI_ANIMATION_VIEW_STATE_NOT_READY:
188 efl_text_set(label, "State = Not Ready");
189 break;
190 case EFL_UI_ANIMATION_VIEW_STATE_PLAY:
191 efl_text_set(label, "State = Playing");
192 break;
193 case EFL_UI_ANIMATION_VIEW_STATE_PLAY_BACK:
194 efl_text_set(label, "State = Playing Back");
195 break;
196 case EFL_UI_ANIMATION_VIEW_STATE_PAUSE:
197 efl_text_set(label, "State = Paused");
198 break;
199 case EFL_UI_ANIMATION_VIEW_STATE_STOP:
200 efl_text_set(label, "State = Stopped");
201 break;
202 }
203}
204
205static void
206_play_updated(void *data, Evas_Object *obj, void *ev EINA_UNUSED)
207{
208 Evas_Object *slider = data;
209 efl_ui_range_value_set(slider, efl_ui_animation_view_progress_get(obj));
210}
211
212static void
213_state_update(void *data, Evas_Object *obj, void *ev EINA_UNUSED)
214{
215 Evas_Object *label = data;
216 update_anim_view_state(obj, label);
217}
218
219static void
220_play_done(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
221{
222 printf("done!\n");
223}
224
225static void
226_play_repeated(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
227{
228 printf("repeated!\n");
229}
230
231static void
232_slider_changed_cb(void *data, const Efl_Event *ev) 195_slider_changed_cb(void *data, const Efl_Event *ev)
233{ 196{
234 Evas_Object *anim_view = data; 197 Evas_Object *anim_view = data;
235 efl_ui_animation_view_progress_set(anim_view, efl_ui_range_value_get(ev->object)); 198 efl_player_playback_progress_set(anim_view, efl_ui_range_value_get(ev->object));
236}
237
238static void
239_slider_reset(void *data, Evas_Object *obj EINA_UNUSED, void *ev EINA_UNUSED)
240{
241 Evas_Object *slider = data;
242 efl_ui_range_value_set(slider, 0);
243} 199}
244 200
245void values_input(Eo* box, const char* type) 201void values_input(Eo* box, const char* type)
@@ -258,7 +214,7 @@ void values_input(Eo* box, const char* type)
258 char color_text[4][2] = { "R", "G", "B", "A" }; 214 char color_text[4][2] = { "R", "G", "B", "A" };
259 for (int i = 0; i < 4; i++) 215 for (int i = 0; i < 4; i++)
260 { 216 {
261 values[i] = efl_add(EFL_UI_TEXT_CLASS, box, 217 values[i] = efl_add(EFL_UI_TEXTBOX_CLASS, box,
262 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0), 218 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
263 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 219 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
264 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 220 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
@@ -270,7 +226,7 @@ void values_input(Eo* box, const char* type)
270 } 226 }
271 else if (!strcmp(type, "StrokeWidth")) 227 else if (!strcmp(type, "StrokeWidth"))
272 { 228 {
273 values[0] = efl_add(EFL_UI_TEXT_CLASS, box, 229 values[0] = efl_add(EFL_UI_TEXTBOX_CLASS, box,
274 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0), 230 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
275 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 231 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
276 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 232 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
@@ -291,18 +247,102 @@ _hover_item_selected_cb(void *data, Evas_Object *obj, void *event_info)
291 values_input(box, selected); 247 values_input(box, selected);
292} 248}
293 249
250static void
251update_anim_view_state(Evas_Object *anim_view, Evas_Object *label)
252{
253 Efl_Ui_Vg_Animation_State state = efl_ui_vg_animation_state_get(anim_view);
254
255 switch (state)
256 {
257 case EFL_UI_VG_ANIMATION_STATE_NOT_READY:
258 efl_text_set(label, "State = Not Ready");
259 break;
260 case EFL_UI_VG_ANIMATION_STATE_PLAYING:
261 efl_text_set(label, "State = Playing");
262 break;
263 case EFL_UI_VG_ANIMATION_STATE_PLAYING_BACKWARDS:
264 efl_text_set(label, "State = Playing Backwards");
265
266 break;
267 case EFL_UI_VG_ANIMATION_STATE_PAUSED:
268 efl_text_set(label, "State = Paused");
269 break;
270 case EFL_UI_VG_ANIMATION_STATE_STOPPED:
271 efl_text_set(label, "State = Stopped");
272 break;
273 }
274}
275
276static void
277_animation_playing_changed_cb(void *data, const Efl_Event *event)
278{
279 Eina_Bool playing = *(Eina_Bool*)event->info;
280 App_Data *ad = data;
281 update_anim_view_state(event->object, ad->label);
282 //Stopped
283 if (!playing)
284 efl_ui_range_value_set(ad->slider, 0);
285}
286
287static void
288_animation_paused_changed_cb(void *data, const Efl_Event *event)
289{
290 App_Data *ad = data;
291 update_anim_view_state(event->object, ad->label);
292}
293
294static void
295_animation_playback_progress_changed_cb(void *data, const Efl_Event *event)
296{
297 double progress = *(double*)event->info;
298 App_Data *ad = data;
299 efl_ui_range_value_set(ad->slider, progress);
300}
301
302static void
303_animation_playback_repeated_changed_cb(void *data EINA_UNUSED, const Efl_Event *event)
304{
305 int repeated_times = *(int*)event->info;
306 printf("repeated! (times: %d)\n", repeated_times);
307}
308
309static void
310_animation_playback_finished_changed_cb(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED)
311{
312 printf("done!\n");
313}
314
315EFL_CALLBACKS_ARRAY_DEFINE(animation_stats_cb,
316 {EFL_PLAYER_EVENT_PLAYING_CHANGED, _animation_playing_changed_cb },
317 {EFL_PLAYER_EVENT_PAUSED_CHANGED, _animation_paused_changed_cb },
318 {EFL_PLAYER_EVENT_PLAYBACK_PROGRESS_CHANGED, _animation_playback_progress_changed_cb },
319 {EFL_PLAYER_EVENT_PLAYBACK_REPEATED, _animation_playback_repeated_changed_cb },
320 {EFL_PLAYER_EVENT_PLAYBACK_FINISHED, _animation_playback_finished_changed_cb },
321)
322
323static void
324_win_del_cb(void *data, const Efl_Event *ev EINA_UNUSED)
325{
326 App_Data *ad = data;
327 free(ad);
328}
329
294void 330void
295test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 331test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
296{ 332{
297 Eo *win, *box, *box_sub, *label, *check, *slider, *list; 333 Eo *win, *box, *box_sub, *label, *check, *slider, *list;
298 char buf[255]; 334 char buf[255];
335 App_Data *ad = calloc(1, sizeof(App_Data));
336 if (!ad) return;
337
299 // This line must to need. 338 // This line must to need.
300 setenv("ELM_ACCEL", "gl", 1); 339 setenv("ELM_ACCEL", "gl", 1);
301 340
302 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 341 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
303 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 342 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
304 efl_text_set(efl_added, "Efl_Ui_Animation_View demo"), 343 efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
305 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 344 efl_ui_win_autodel_set(efl_added, EINA_TRUE),
345 efl_event_callback_add(efl_added, EFL_EVENT_DEL, _win_del_cb, ad));
306 346
307 // Create a box in Canvas 347 // Create a box in Canvas
308 box = efl_add(EFL_UI_BOX_CLASS, win, 348 box = efl_add(EFL_UI_BOX_CLASS, win,
@@ -310,14 +350,14 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
310 efl_content_set(win, efl_added)); 350 efl_content_set(win, efl_added));
311 351
312 //Create a label to show state of animation 352 //Create a label to show state of animation
313 label = efl_add(EFL_UI_TEXT_CLASS, win, 353 label = efl_add(EFL_UI_TEXTBOX_CLASS, win,
314 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.1), 354 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.1),
315 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 355 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
316 efl_pack(box, efl_added)); 356 efl_pack(box, efl_added));
317 357
318 //Create Animation View to play animation directly from JSON file 358 //Create Animation View to play animation directly from JSON file
319 snprintf(buf, sizeof(buf), "%s/images/three_box.json", elm_app_data_dir_get()); 359 snprintf(buf, sizeof(buf), "%s/images/three_box.json", elm_app_data_dir_get());
320 anim_view = efl_add(EFL_UI_ANIMATION_VIEW_CLASS, win, 360 anim_view = efl_add(EFL_UI_VG_ANIMATION_CLASS, win,
321 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND), 361 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
322 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 362 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
323 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)), 363 efl_gfx_entity_size_set(efl_added, EINA_SIZE2D(600, 600)),
@@ -329,7 +369,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
329 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.1), 369 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.1),
330 efl_pack(box, efl_added)); 370 efl_pack(box, efl_added));
331 //Path 371 //Path
332 efl_add(EFL_UI_TEXT_CLASS, box_sub, 372 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
333 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0), 373 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
334 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE), 374 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
335 efl_text_set(efl_added, "Path examples : three_box.json\n" 375 efl_text_set(efl_added, "Path examples : three_box.json\n"
@@ -346,7 +386,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
346 efl_text_multiline_set(efl_added, EINA_TRUE), 386 efl_text_multiline_set(efl_added, EINA_TRUE),
347 efl_pack(box_sub, efl_added)); 387 efl_pack(box_sub, efl_added));
348 388
349 efl_add(EFL_UI_TEXT_CLASS, box_sub, 389 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
350 efl_gfx_hint_weight_set(efl_added, 0, 0), 390 efl_gfx_hint_weight_set(efl_added, 0, 0),
351 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE), 391 efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
352 efl_text_set(efl_added, "[Value Provider]"), 392 efl_text_set(efl_added, "[Value Provider]"),
@@ -361,7 +401,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
361 efl_pack(box, efl_added)); 401 efl_pack(box, efl_added));
362 402
363 //Path 403 //Path
364 efl_add(EFL_UI_TEXT_CLASS, box_sub, 404 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
365 efl_gfx_hint_weight_set(efl_added, 0, 0), 405 efl_gfx_hint_weight_set(efl_added, 0, 0),
366 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 406 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
367 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 407 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
@@ -369,7 +409,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
369 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 409 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
370 efl_pack(box_sub, efl_added)); 410 efl_pack(box_sub, efl_added));
371 411
372 path_entry = efl_add(EFL_UI_TEXT_CLASS, box_sub, 412 path_entry = efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
373 efl_gfx_hint_weight_set(efl_added, 0.1, 0), 413 efl_gfx_hint_weight_set(efl_added, 0.1, 0),
374 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 414 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
375 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 415 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
@@ -378,7 +418,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
378 efl_gfx_hint_size_min_set(path_entry, EINA_SIZE2D(200, 10)); 418 efl_gfx_hint_size_min_set(path_entry, EINA_SIZE2D(200, 10));
379 efl_text_set(efl_part(path_entry, "efl.text_guide"), "Enter path(ex: ** or Layer.Shape.Fill) "); 419 efl_text_set(efl_part(path_entry, "efl.text_guide"), "Enter path(ex: ** or Layer.Shape.Fill) ");
380 420
381 efl_add(EFL_UI_TEXT_CLASS, box_sub, 421 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
382 efl_gfx_hint_weight_set(efl_added, 0, 0), 422 efl_gfx_hint_weight_set(efl_added, 0, 0),
383 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 423 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
384 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 424 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
@@ -398,7 +438,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
398 elm_object_focus_set(type_hoversel, EINA_TRUE); 438 elm_object_focus_set(type_hoversel, EINA_TRUE);
399 efl_pack(box_sub, type_hoversel); 439 efl_pack(box_sub, type_hoversel);
400 440
401 efl_add(EFL_UI_TEXT_CLASS, box_sub, 441 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
402 efl_gfx_hint_weight_set(efl_added, 0, 0), 442 efl_gfx_hint_weight_set(efl_added, 0, 0),
403 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 443 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
404 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 444 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
@@ -478,8 +518,8 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
478 518
479 519
480 //Duration Text 520 //Duration Text
481 snprintf(buf, sizeof(buf), "Duration: %1.2fs", efl_ui_animation_view_duration_time_get(anim_view)); 521 snprintf(buf, sizeof(buf), "Duration(Length): %1.2fs", efl_playable_length_get(anim_view));
482 efl_add(EFL_UI_TEXT_CLASS, box_sub, 522 efl_add(EFL_UI_TEXTBOX_CLASS, box_sub,
483 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0), 523 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
484 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 524 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
485 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 525 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
@@ -514,7 +554,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
514 efl_add(EFL_UI_BUTTON_CLASS, box_sub, 554 efl_add(EFL_UI_BUTTON_CLASS, box_sub,
515 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0), 555 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0),
516 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL), 556 efl_gfx_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
517 efl_text_set(efl_added, "Play Back"), 557 efl_text_set(efl_added, "Play Backwards"),
518 efl_pack(box_sub, efl_added), 558 efl_pack(box_sub, efl_added),
519 efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, btn_clicked_cb, anim_view)); 559 efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, btn_clicked_cb, anim_view));
520 560
@@ -549,16 +589,10 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
549 efl_pack(box_sub, efl_added), 589 efl_pack(box_sub, efl_added),
550 efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, btn_clicked_cb, anim_view)); 590 efl_event_callback_add(efl_added, EFL_INPUT_EVENT_CLICKED, btn_clicked_cb, anim_view));
551 591
552 evas_object_smart_callback_add(anim_view, "play,start", _state_update, label); 592 efl_event_callback_array_add(anim_view, animation_stats_cb(), ad);
553 evas_object_smart_callback_add(anim_view, "play,stop", _state_update, label);
554 evas_object_smart_callback_add(anim_view, "play,pause", _state_update, label);
555 evas_object_smart_callback_add(anim_view, "play,resume", _state_update, label);
556
557 evas_object_smart_callback_add(anim_view, "play,repeat", _play_repeated, label);
558 evas_object_smart_callback_add(anim_view, "play,done", _play_done, label);
559 593
560 evas_object_smart_callback_add(anim_view, "play,update", _play_updated, slider); 594 ad->label = label;
561 evas_object_smart_callback_add(anim_view, "play,stop", _slider_reset, slider); 595 ad->slider = slider;
562 596
563 update_anim_view_state(anim_view, label); 597 update_anim_view_state(anim_view, label);
564 598
@@ -573,9 +607,9 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
573 Eo *win, *box; 607 Eo *win, *box;
574 char buf[255]; 608 char buf[255];
575 609
576 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 610 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
577 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC), 611 efl_ui_win_type_set(efl_added, EFL_UI_WIN_TYPE_BASIC),
578 efl_text_set(efl_added, "Efl_Ui_Animation_View demo"), 612 efl_text_set(efl_added, "Efl_Ui_Vg_Animation demo"),
579 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 613 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
580 614
581 // Create a box 615 // Create a box
@@ -583,7 +617,7 @@ test_efl_gfx_vg_value_provider(void *data EINA_UNUSED, Evas_Object *obj EINA_UNU
583 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND), 617 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, EFL_GFX_HINT_EXPAND),
584 efl_content_set(win, efl_added)); 618 efl_content_set(win, efl_added));
585 619
586 efl_add(EFL_UI_TEXT_CLASS, win, 620 efl_add(EFL_UI_TEXTBOX_CLASS, win,
587 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.1), 621 efl_gfx_hint_weight_set(efl_added, EFL_GFX_HINT_EXPAND, 0.1),
588 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE), 622 efl_gfx_hint_fill_set(efl_added, EINA_FALSE, EINA_FALSE),
589 efl_text_set(efl_added, "Evas Vg Json (Lottie) Loader is not supported, Only Static Vector Image is available!"), 623 efl_text_set(efl_added, "Evas Vg Json (Lottie) Loader is not supported, Only Static Vector Image is available!"),
diff --git a/src/bin/elementary/test_efl_ui_text.c b/src/bin/elementary/test_efl_ui_text.c
index e7e909b..5391483 100644
--- a/src/bin/elementary/test_efl_ui_text.c
+++ b/src/bin/elementary/test_efl_ui_text.c
@@ -4,30 +4,30 @@
4#define EO_BETA_API 4#define EO_BETA_API
5#include <Efl_Ui.h> 5#include <Efl_Ui.h>
6#include <Elementary.h> 6#include <Elementary.h>
7#include "elm_priv.h" //FIXME remove this once efl.ui.text doesn't need elm_general.h 7
8static void 8static void
9_apply_style(Eo *obj, size_t start_pos, size_t end_pos, const char *style) 9_apply_style(Eo *obj, size_t start_pos, size_t end_pos, const char *style)
10{ 10{
11 Efl_Text_Cursor_Cursor *start, *end; 11 Efl_Text_Cursor *start, *end;
12 12
13 start = efl_text_cursor_new(obj); 13 start = efl_ui_textbox_cursor_create(obj);
14 end = efl_text_cursor_new(obj); 14 end = efl_ui_textbox_cursor_create(obj);
15 15
16 efl_text_cursor_position_set(obj, start, start_pos); 16 efl_text_cursor_position_set(start, start_pos);
17 efl_text_cursor_position_set(obj, end, end_pos); 17 efl_text_cursor_position_set(end, end_pos);
18 18
19 efl_text_annotation_insert(obj, start, end, style); 19 efl_text_formatter_attribute_insert(start, end, style);
20 20
21 efl_text_cursor_free(obj, start); 21 efl_del(start);
22 efl_text_cursor_free(obj, end); 22 efl_del(end);
23} 23}
24 24
25static Eo * 25static Eo *
26_create_label(Eo *win, Eo *bx) 26_create_label(Eo *win, Eo *bx)
27{ 27{
28 Eo *en; 28 Eo *en;
29 en = efl_add(EFL_UI_TEXT_CLASS, win); 29 en = efl_add(EFL_UI_TEXTBOX_CLASS, win);
30 printf("Added Efl.Ui.Text object\n"); 30 printf("Added Efl.Ui.Textbox object\n");
31 efl_text_interactive_editable_set(en, EINA_FALSE); 31 efl_text_interactive_editable_set(en, EINA_FALSE);
32 efl_pack(bx, en); 32 efl_pack(bx, en);
33 return en; 33 return en;
@@ -41,7 +41,7 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
41 Eo *en; 41 Eo *en;
42 char *markup; 42 char *markup;
43 43
44 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, 44 win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
45 efl_text_set(efl_added, "Efl Canvas_Layout"), 45 efl_text_set(efl_added, "Efl Canvas_Layout"),
46 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 46 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
47 47
@@ -66,7 +66,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
66 66
67 en = _create_label(win, bx); 67 en = _create_label(win, bx);
68 efl_text_markup_set(en, "You can also <b>ENTER</b> markup!"); 68 efl_text_markup_set(en, "You can also <b>ENTER</b> markup!");
69 efl_text_font_set(en, "Sans", 14); 69 efl_text_font_family_set(en, "Sans");
70 efl_text_font_size_set(en, 14);
70 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 71 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
71 efl_text_multiline_set(en, EINA_TRUE); 72 efl_text_multiline_set(en, EINA_TRUE);
72 73
@@ -75,7 +76,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
75 "You can use the text -> markup helper\nto make coding easier."); 76 "You can use the text -> markup helper\nto make coding easier.");
76 efl_text_markup_set(en, markup); 77 efl_text_markup_set(en, markup);
77 free(markup); 78 free(markup);
78 efl_text_font_set(en, "Sans", 14); 79 efl_text_font_family_set(en, "Sans");
80 efl_text_font_size_set(en, 14);
79 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 81 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
80 efl_text_multiline_set(en, EINA_TRUE); 82 efl_text_multiline_set(en, EINA_TRUE);
81 83
@@ -84,7 +86,8 @@ test_efl_ui_text_label(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, voi
84 "You can use markup -&gt; text helpers<ps>to make coding easier."); 86 "You can use markup -&gt; text helpers<ps>to make coding easier.");
85 efl_text_set(en, markup); 87 efl_text_set(en, markup);
86 free(markup); 88 free(markup);
87 efl_text_font_set(en, "Sans", 14); 89 efl_text_font_family_set(en, "Sans");
90 efl_text_font_size_set(en, 14);
88 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD); 91 efl_text_wrap_set(en, EFL_TEXT_FORMAT_WRAP_WORD);
89 efl_text_multiline_set(en, EINA_TRUE); 92 efl_text_multiline_set(en, EINA_TRUE);
90} 93}
@@ -98,15 +101,15 @@ typedef struct
98static void 101static void
99_on_bt3_clicked(void *data, const Efl_Event *event EINA_UNUSED) 102_on_bt3_clicked(void *data, const Efl_Event *event EINA_UNUSED)
100{