summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-01-31 13:35:34 +0900
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-01-31 14:59:37 +0900
commit5525c89a3d1091cd17c5df6fbdc7378f0d0b4ff3 (patch)
tree16e710a757db55ef1f6de3201b5f4542de3a7680
parentc713bb90d3fe4a56ebd5f4f88cd5a248c5b7e482 (diff)
efl_model : rename all efl_model based classes.
Summary: As the result of discussion in T7458, we need to rename all efl_model based classes with efl_XXX_Model sequence. I've run few vote for this, see V42, V43 few classes are totally renamed as our consideration of misnaming. | Efl.Model_Loop | Efl.Loop_Model | | Efl.Model_Item | Efl.Generic_Model | | Efl.Model_Container | Efl.Container_Model | | Efl.Model_Container_Item | Efl.Container_Model_Item | | Efl.Model_Composite | Efl.Composite_Model | | Efl.Model_Composite_Boolean | Efl.Boolean_Model | | Efl.Model_Composite_Boolean_Chlidren | Efl.Boolean_Model_Item | | Efl.Model_Composite_Selection | Efl.Select_Model | | Efl.Model_Composite_Selection_Chlidren | Efl.Select_Model_Item | | Efl.Model_View | Efl.View_Model | | Eio.Model | Efl.Io.Model | | Efl.Ui.Model_State | Efl.Ui.State_Model | | Efl.Ui.Model_Size | Efl.Ui.Size_Model | | Efl.Ui.Model_Exact | Efl.Ui.Exact_Model | | Efl.Ui.Model_Average | Efl.Ui.Average_Model | | Efl.Ui.Model_Homogeneous | Efl.Ui.Homogeneous_Model | I worried about Efl.Io.Model changes, cause it is widely used, but as I tested, there is no issue found yet. Eldbus.Model also may can changed Efl.Dbus.Model, but I cannot found any class who using Efl.Dbus namespace, so I left it future work. Test Plan: Run the Make Test, it works well except Efl test about selection. there are class inheritance problem exist in select_model, I reported it and will fix it in another patch. Reviewers: cedric, felipealmeida, woohyun, Hermet Reviewed By: cedric Subscribers: lauromoura Tags: #efl, #do_not_merge Differential Revision: https://phab.enlightenment.org/D7533
-rw-r--r--src/Makefile_Ecore.am36
-rw-r--r--src/Makefile_Efl.am6
-rw-r--r--src/Makefile_Eio.am10
-rw-r--r--src/Makefile_Elementary.am18
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_1.c8
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_2.c2
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_3.c6
-rw-r--r--src/examples/elementary/filemvc.c8
-rw-r--r--src/examples/elementary/fileviewlist.c4
-rw-r--r--src/examples/elementary/layout_model_connect.c2
-rw-r--r--src/lib/ecore/Ecore_Eo.h16
-rw-r--r--src/lib/ecore/efl_boolean_model.c (renamed from src/lib/ecore/efl_model_composite_boolean.c)90
-rw-r--r--src/lib/ecore/efl_boolean_model.eo (renamed from src/lib/ecore/efl_model_composite_boolean.eo)4
-rw-r--r--src/lib/ecore/efl_composite_model.c (renamed from src/lib/ecore/efl_model_composite.c)64
-rw-r--r--src/lib/ecore/efl_composite_model.eo (renamed from src/lib/ecore/efl_model_composite.eo)2
-rw-r--r--src/lib/ecore/efl_composite_model_private.h (renamed from src/lib/ecore/efl_model_composite_private.h)10
-rw-r--r--src/lib/ecore/efl_container_model.c (renamed from src/lib/ecore/efl_model_container.c)50
-rw-r--r--src/lib/ecore/efl_container_model.eo (renamed from src/lib/ecore/efl_model_container.eo)4
-rw-r--r--src/lib/ecore/efl_container_model_item.c (renamed from src/lib/ecore/efl_model_container_item.c)38
-rw-r--r--src/lib/ecore/efl_container_model_item.eo (renamed from src/lib/ecore/efl_model_container_item.eo)12
-rw-r--r--src/lib/ecore/efl_container_model_private.h (renamed from src/lib/ecore/efl_model_container_private.h)14
-rw-r--r--src/lib/ecore/efl_generic_model.c (renamed from src/lib/ecore/efl_model_item.c)34
-rw-r--r--src/lib/ecore/efl_generic_model.eo (renamed from src/lib/ecore/efl_model_item.eo)2
-rw-r--r--src/lib/ecore/efl_loop_model.c (renamed from src/lib/ecore/efl_model_loop.c)20
-rw-r--r--src/lib/ecore/efl_loop_model.eo (renamed from src/lib/ecore/efl_model_loop.eo)2
-rw-r--r--src/lib/ecore/efl_select_model.c (renamed from src/lib/ecore/efl_model_composite_selection.c)64
-rw-r--r--src/lib/ecore/efl_select_model.eo (renamed from src/lib/ecore/efl_model_composite_selection.eo)4
-rw-r--r--src/lib/ecore/efl_view_model.c (renamed from src/lib/ecore/efl_model_view.c)226
-rw-r--r--src/lib/ecore/efl_view_model.eo (renamed from src/lib/ecore/efl_model_view.eo)22
-rw-r--r--src/lib/ecore/meson.build36
-rw-r--r--src/lib/eio/Eio_Eo.h2
-rw-r--r--src/lib/eio/efl_io_model.c (renamed from src/lib/eio/eio_model.c)212
-rw-r--r--src/lib/eio/efl_io_model.eo (renamed from src/lib/eio/eio_model.eo)6
-rw-r--r--src/lib/eio/efl_io_model_private.h (renamed from src/lib/eio/eio_model_private.h)24
-rw-r--r--src/lib/eio/meson.build6
-rw-r--r--src/lib/eldbus/eldbus_model.eo2
-rw-r--r--src/lib/elementary/efl_ui_average_model.c (renamed from src/lib/elementary/efl_ui_model_average.c)56
-rw-r--r--src/lib/elementary/efl_ui_average_model.eo (renamed from src/lib/elementary/efl_ui_model_average.eo)8
-rw-r--r--src/lib/elementary/efl_ui_exact_model.c (renamed from src/lib/elementary/efl_ui_model_exact.c)102
-rw-r--r--src/lib/elementary/efl_ui_exact_model.eo (renamed from src/lib/elementary/efl_ui_model_exact.eo)4
-rw-r--r--src/lib/elementary/efl_ui_homogeneous_model.c (renamed from src/lib/elementary/efl_ui_model_homogeneous.c)38
-rw-r--r--src/lib/elementary/efl_ui_homogeneous_model.eo (renamed from src/lib/elementary/efl_ui_model_homogeneous.eo)4
-rw-r--r--src/lib/elementary/efl_ui_size_model.c (renamed from src/lib/elementary/efl_ui_model_size.c)16
-rw-r--r--src/lib/elementary/efl_ui_size_model.eo (renamed from src/lib/elementary/efl_ui_model_size.eo)6
-rw-r--r--src/lib/elementary/efl_ui_state_model.eo (renamed from src/lib/elementary/efl_ui_model_state.eo)2
-rw-r--r--src/lib/elementary/elc_fileselector.c28
-rw-r--r--src/lib/elementary/elc_fileselector_button.c6
-rw-r--r--src/lib/elementary/elm_interface_fileselector.eo2
-rw-r--r--src/lib/elementary/elm_priv.h8
-rw-r--r--src/lib/elementary/meson.build18
-rw-r--r--src/tests/efl/efl_suite.c6
-rw-r--r--src/tests/efl/efl_suite.h6
-rw-r--r--src/tests/efl/efl_test_composite_model.c (renamed from src/tests/efl/efl_test_model_composite.c)30
-rw-r--r--src/tests/efl/efl_test_container_model.c (renamed from src/tests/efl/efl_test_model_container.c)14
-rw-r--r--src/tests/efl/efl_test_view_model.c (renamed from src/tests/efl/efl_test_model_view.c)58
-rw-r--r--src/tests/efl/meson.build6
-rw-r--r--src/tests/eio/efl_io_model_test_file.c (renamed from src/tests/eio/eio_model_test_file.c)10
-rw-r--r--src/tests/eio/efl_io_model_test_monitor_add.c (renamed from src/tests/eio/eio_model_test_monitor_add.c)10
-rw-r--r--src/tests/eio/eio_suite.c4
-rw-r--r--src/tests/eio/eio_suite.h4
-rw-r--r--src/tests/eio/meson.build4
-rw-r--r--src/tests/elementary/efl_ui_model.c34
-rw-r--r--src/tests/elementary/efl_ui_test_layout.c4
63 files changed, 777 insertions, 777 deletions
diff --git a/src/Makefile_Ecore.am b/src/Makefile_Ecore.am
index 2cbc5a1..1b093ec 100644
--- a/src/Makefile_Ecore.am
+++ b/src/Makefile_Ecore.am
@@ -42,14 +42,14 @@ ecore_eolian_files_public = \
42 lib/ecore/efl_bounce_interpolator.eo \ 42 lib/ecore/efl_bounce_interpolator.eo \
43 lib/ecore/efl_spring_interpolator.eo \ 43 lib/ecore/efl_spring_interpolator.eo \
44 lib/ecore/efl_cubic_bezier_interpolator.eo \ 44 lib/ecore/efl_cubic_bezier_interpolator.eo \
45 lib/ecore/efl_model_loop.eo \ 45 lib/ecore/efl_loop_model.eo \
46 lib/ecore/efl_model_item.eo \ 46 lib/ecore/efl_generic_model.eo \
47 lib/ecore/efl_model_container.eo \ 47 lib/ecore/efl_container_model.eo \
48 lib/ecore/efl_model_container_item.eo \ 48 lib/ecore/efl_container_model_item.eo \
49 lib/ecore/efl_model_composite_boolean.eo \ 49 lib/ecore/efl_boolean_model.eo \
50 lib/ecore/efl_model_composite_selection.eo \ 50 lib/ecore/efl_select_model.eo \
51 lib/ecore/efl_model_composite.eo \ 51 lib/ecore/efl_composite_model.eo \
52 lib/ecore/efl_model_view.eo 52 lib/ecore/efl_view_model.eo
53 53
54ecore_eolian_files = \ 54ecore_eolian_files = \
55 $(ecore_eolian_files_legacy) \ 55 $(ecore_eolian_files_legacy) \
@@ -118,18 +118,18 @@ lib/ecore/efl_io_stderr.c \
118lib/ecore/efl_io_file.c \ 118lib/ecore/efl_io_file.c \
119lib/ecore/efl_io_copier.c \ 119lib/ecore/efl_io_copier.c \
120lib/ecore/efl_io_buffered_stream.c \ 120lib/ecore/efl_io_buffered_stream.c \
121lib/ecore/efl_model_loop.c \ 121lib/ecore/efl_loop_model.c \
122lib/ecore/efl_model_item.c \ 122lib/ecore/efl_generic_model.c \
123lib/ecore/efl_model_container.c \ 123lib/ecore/efl_container_model.c \
124lib/ecore/efl_model_container_item.c \ 124lib/ecore/efl_container_model_item.c \
125lib/ecore/efl_model_container_private.h \ 125lib/ecore/efl_container_model_private.h \
126lib/ecore/efl_model_composite.c \ 126lib/ecore/efl_composite_model.c \
127lib/ecore/efl_model_composite_boolean.c \ 127lib/ecore/efl_boolean_model.c \
128lib/ecore/efl_model_composite_selection.c \ 128lib/ecore/efl_select_model.c \
129lib/ecore/efl_model_composite_private.h \ 129lib/ecore/efl_composite_model_private.h \
130lib/ecore/efl_model_accessor_view.c \ 130lib/ecore/efl_model_accessor_view.c \
131lib/ecore/efl_model_accessor_view_private.h \ 131lib/ecore/efl_model_accessor_view_private.h \
132lib/ecore/efl_model_view.c \ 132lib/ecore/efl_view_model.c \
133lib/ecore/efl_linear_interpolator.c \ 133lib/ecore/efl_linear_interpolator.c \
134lib/ecore/efl_accelerate_interpolator.c \ 134lib/ecore/efl_accelerate_interpolator.c \
135lib/ecore/efl_decelerate_interpolator.c \ 135lib/ecore/efl_decelerate_interpolator.c \
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 20daaeb..304fb43 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -203,9 +203,9 @@ TESTS += tests/efl/efl_suite
203 203
204tests_efl_efl_suite_SOURCES = \ 204tests_efl_efl_suite_SOURCES = \
205tests/efl/efl_suite.c \ 205tests/efl/efl_suite.c \
206tests/efl/efl_test_model_container.c \ 206tests/efl/efl_test_container_model.c \
207tests/efl/efl_test_model_composite.c \ 207tests/efl/efl_test_composite_model.c \
208tests/efl/efl_test_model_view.c \ 208tests/efl/efl_test_view_model.c \
209tests/efl/efl_suite.h 209tests/efl/efl_suite.h
210 210
211tests_efl_efl_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \ 211tests_efl_efl_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl \
diff --git a/src/Makefile_Eio.am b/src/Makefile_Eio.am
index 81a1054..4a92dd2 100644
--- a/src/Makefile_Eio.am
+++ b/src/Makefile_Eio.am
@@ -2,7 +2,7 @@
2### Library 2### Library
3 3
4eio_eolian_files = \ 4eio_eolian_files = \
5 lib/eio/eio_model.eo \ 5 lib/eio/efl_io_model.eo \
6 lib/eio/efl_io_manager.eo \ 6 lib/eio/efl_io_manager.eo \
7 lib/eio/eio_sentry.eo 7 lib/eio/eio_sentry.eo
8 8
@@ -38,8 +38,8 @@ lib/eio/eio_monitor.c \
38lib/eio/eio_monitor_poll.c \ 38lib/eio/eio_monitor_poll.c \
39lib/eio/eio_single.c \ 39lib/eio/eio_single.c \
40lib/eio/eio_xattr.c \ 40lib/eio/eio_xattr.c \
41lib/eio/eio_model.c \ 41lib/eio/efl_io_model.c \
42lib/eio/eio_model_private.h \ 42lib/eio/efl_io_model_private.h \
43lib/eio/eio_private.h \ 43lib/eio/eio_private.h \
44lib/eio/eio_sentry_private.h 44lib/eio/eio_sentry_private.h
45 45
@@ -74,8 +74,8 @@ TESTS += tests/eio/eio_suite
74 74
75tests_eio_eio_suite_SOURCES = \ 75tests_eio_eio_suite_SOURCES = \
76tests/eio/eio_suite.c \ 76tests/eio/eio_suite.c \
77tests/eio/eio_model_test_file.c \ 77tests/eio/efl_io_model_test_file.c \
78tests/eio/eio_model_test_monitor_add.c \ 78tests/eio/efl_io_model_test_monitor_add.c \
79tests/eio/eio_test_monitor.c \ 79tests/eio/eio_test_monitor.c \
80tests/eio/eio_test_sentry.c \ 80tests/eio/eio_test_sentry.c \
81tests/eio/eio_test_file.c \ 81tests/eio/eio_test_file.c \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index 6f38e0b..2ed29dd 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -169,17 +169,17 @@ elm_private_eolian_files = \
169 lib/elementary/efl_ui_focus_parent_provider.eo \ 169 lib/elementary/efl_ui_focus_parent_provider.eo \
170 lib/elementary/efl_ui_focus_parent_provider_standard.eo \ 170 lib/elementary/efl_ui_focus_parent_provider_standard.eo \
171 lib/elementary/efl_ui_focus_parent_provider_gen.eo \ 171 lib/elementary/efl_ui_focus_parent_provider_gen.eo \
172 lib/elementary/efl_ui_model_state.eo \ 172 lib/elementary/efl_ui_state_model.eo \
173 tests/elementary/focus_test.eo \ 173 tests/elementary/focus_test.eo \
174 tests/elementary/focus_test_sub_main.eo \ 174 tests/elementary/focus_test_sub_main.eo \
175 lib/elementary/efl_ui_selection_manager.eo \ 175 lib/elementary/efl_ui_selection_manager.eo \
176 lib/elementary/efl_datetime_manager.eo \ 176 lib/elementary/efl_datetime_manager.eo \
177 lib/elementary/efl_ui_list_view_relayout.eo \ 177 lib/elementary/efl_ui_list_view_relayout.eo \
178 lib/elementary/efl_ui_list_view_precise_layouter.eo \ 178 lib/elementary/efl_ui_list_view_precise_layouter.eo \
179 lib/elementary/efl_ui_model_size.eo \ 179 lib/elementary/efl_ui_size_model.eo \
180 lib/elementary/efl_ui_model_homogeneous.eo \ 180 lib/elementary/efl_ui_homogeneous_model.eo \
181 lib/elementary/efl_ui_model_exact.eo \ 181 lib/elementary/efl_ui_exact_model.eo \
182 lib/elementary/efl_ui_model_average.eo \ 182 lib/elementary/efl_ui_average_model.eo \
183 $(NULL) 183 $(NULL)
184 184
185# Legacy classes - not part of public EO API 185# Legacy classes - not part of public EO API
@@ -890,10 +890,10 @@ lib_elementary_libelementary_la_SOURCES = \
890 lib/elementary/efl_ui_widget_focus_manager.c \ 890 lib/elementary/efl_ui_widget_focus_manager.c \
891 lib/elementary/efl_ui_caching_factory.c \ 891 lib/elementary/efl_ui_caching_factory.c \
892 lib/elementary/efl_ui_widget_factory.c \ 892 lib/elementary/efl_ui_widget_factory.c \
893 lib/elementary/efl_ui_model_size.c \ 893 lib/elementary/efl_ui_size_model.c \
894 lib/elementary/efl_ui_model_homogeneous.c \ 894 lib/elementary/efl_ui_homogeneous_model.c \
895 lib/elementary/efl_ui_model_exact.c \ 895 lib/elementary/efl_ui_exact_model.c \
896 lib/elementary/efl_ui_model_average.c \ 896 lib/elementary/efl_ui_average_model.c \
897 $(NULL) 897 $(NULL)
898 898
899 899
diff --git a/src/examples/elementary/efl_ui_list_view_example_1.c b/src/examples/elementary/efl_ui_list_view_example_1.c
index e432fe1..635a603 100644
--- a/src/examples/elementary/efl_ui_list_view_example_1.c
+++ b/src/examples/elementary/efl_ui_list_view_example_1.c
@@ -45,11 +45,11 @@ static Efl_Model*
45_make_model(Evas_Object *win) 45_make_model(Evas_Object *win)
46{ 46{
47 Eina_Value vtext; 47 Eina_Value vtext;
48 Efl_Model_Item *model, *child; 48 Efl_Generic_Model *model, *child;
49 unsigned int i, s; 49 unsigned int i, s;
50 char buf[256]; 50 char buf[256];
51 51
52 model = efl_add(EFL_MODEL_ITEM_CLASS, win); 52 model = efl_add(EFL_GENERIC_MODEL_CLASS, win);
53 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING); 53 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
54 54
55 for (i = 0; i < (NUM_ITEMS); i++) 55 for (i = 0; i < (NUM_ITEMS); i++)
@@ -74,7 +74,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
74 Efl_Ui_Factory *factory; 74 Efl_Ui_Factory *factory;
75 Evas_Object *win, *li; 75 Evas_Object *win, *li;
76 Eo *model; 76 Eo *model;
77 Efl_Model_Composite_Selection *selmodel; 77 Efl_Select_Model *selmodel;
78 78
79 win = elm_win_util_standard_add("list_view", "List_View"); 79 win = elm_win_util_standard_add("list_view", "List_View");
80 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 80 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
@@ -82,7 +82,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
82 elm_win_autodel_set(win, EINA_TRUE); 82 elm_win_autodel_set(win, EINA_TRUE);
83 83
84 model = _make_model(win); 84 model = _make_model(win);
85 selmodel = efl_add(EFL_MODEL_COMPOSITE_SELECTION_CLASS, efl_main_loop_get() 85 selmodel = efl_add(EFL_SELECT_MODEL_CLASS, efl_main_loop_get()
86 , efl_ui_view_model_set(efl_added, model) 86 , efl_ui_view_model_set(efl_added, model)
87 ); 87 );
88 88
diff --git a/src/examples/elementary/efl_ui_list_view_example_2.c b/src/examples/elementary/efl_ui_list_view_example_2.c
index ca56f37..50f0706 100644
--- a/src/examples/elementary/efl_ui_list_view_example_2.c
+++ b/src/examples/elementary/efl_ui_list_view_example_2.c
@@ -31,7 +31,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
31 if (argv[1] != NULL) dirname = argv[1]; 31 if (argv[1] != NULL) dirname = argv[1];
32 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 32 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
33 33
34 model = efl_add(EIO_MODEL_CLASS, win, eio_model_path_set(efl_added, dirname)); 34 model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
35 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); 35 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
36 efl_ui_model_connect(factory, "efl.text", "filename"); 36 efl_ui_model_connect(factory, "efl.text", "filename");
37 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); 37 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c
index eaf5dc9..633c6e1 100644
--- a/src/examples/elementary/efl_ui_list_view_example_3.c
+++ b/src/examples/elementary/efl_ui_list_view_example_3.c
@@ -70,7 +70,7 @@ _bt_add_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_
70{ 70{
71 Priv_Data *priv = (Priv_Data*)data; 71 Priv_Data *priv = (Priv_Data*)data;
72 Eina_Value vtext, value; 72 Eina_Value vtext, value;
73 Efl_Model_Item *child; 73 Efl_Generic_Model *child;
74 74
75 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING); 75 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
76 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR); 76 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR);
@@ -170,10 +170,10 @@ static Efl_Model*
170_make_model() 170_make_model()
171{ 171{
172 Eina_Value vtext, value; 172 Eina_Value vtext, value;
173 Efl_Model_Item *model, *child; 173 Efl_Generic_Model *model, *child;
174 unsigned int i, len; 174 unsigned int i, len;
175 175
176 model = efl_add(EFL_MODEL_ITEM_CLASS, efl_main_loop_get()); 176 model = efl_add(EFL_GENERIC_MODEL_CLASS, efl_main_loop_get());
177 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING); 177 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
178 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR); 178 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR);
179 179
diff --git a/src/examples/elementary/filemvc.c b/src/examples/elementary/filemvc.c
index 6935e93..051d5f4 100644
--- a/src/examples/elementary/filemvc.c
+++ b/src/examples/elementary/filemvc.c
@@ -10,7 +10,7 @@
10#include <Elementary.h> 10#include <Elementary.h>
11#include <Efl.h> 11#include <Efl.h>
12#include <Eio.h> 12#include <Eio.h>
13#include <eio_model.eo.h> 13#include <efl_io_model.eo.h>
14#include <stdio.h> 14#include <stdio.h>
15#include <Eio.h> 15#include <Eio.h>
16#include <elm_view_form.h> 16#include <elm_view_form.h>
@@ -38,7 +38,7 @@ _cleanup_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
38} 38}
39 39
40static int 40static int
41_filter_cb(void *data EINA_UNUSED, Eio_Model *model, Eina_File_Direct_Info *info) 41_filter_cb(void *data EINA_UNUSED, Efl_Io_Model *model, Eina_File_Direct_Info *info)
42{ 42{
43 if (info->type == EINA_FILE_DIR && info->path[info->name_start] != '.') return 1; 43 if (info->type == EINA_FILE_DIR && info->path[info->name_start] != '.') return 1;
44 44
@@ -124,8 +124,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
124 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 124 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
125 125
126 //treemodel 126 //treemodel
127 priv.treemodel = efl_add(EIO_MODEL_CLASS, win, eio_model_path_set(efl_added, dirname)); 127 priv.treemodel = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
128 eio_model_children_filter_set(priv.treemodel, NULL, _filter_cb, NULL); 128 efl_io_model_children_filter_set(priv.treemodel, NULL, _filter_cb, NULL);
129 129
130 //treeview 130 //treeview
131 genlist = elm_genlist_add(win); 131 genlist = elm_genlist_add(win);
diff --git a/src/examples/elementary/fileviewlist.c b/src/examples/elementary/fileviewlist.c
index 716fdb3..4f7ff60 100644
--- a/src/examples/elementary/fileviewlist.c
+++ b/src/examples/elementary/fileviewlist.c
@@ -11,7 +11,7 @@
11#include <Elementary.h> 11#include <Elementary.h>
12#include <Efl.h> 12#include <Efl.h>
13#include <Eio.h> 13#include <Eio.h>
14#include <eio_model.eo.h> 14#include <efl_io_model.eo.h>
15#include <stdio.h> 15#include <stdio.h>
16 16
17#define EFL_MODEL_TEST_FILENAME_PATH "/tmp" 17#define EFL_MODEL_TEST_FILENAME_PATH "/tmp"
@@ -54,7 +54,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
54 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 54 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
55 evas_object_show(genlist); 55 evas_object_show(genlist);
56 56
57 priv.filemodel = efl_add(EIO_MODEL_CLASS, win, eio_model_path_set(efl_added, dirname)); 57 priv.filemodel = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
58 priv.fileview = efl_add(ELM_VIEW_LIST_CLASS, win, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, "double_label")); 58 priv.fileview = efl_add(ELM_VIEW_LIST_CLASS, win, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, "double_label"));
59 elm_view_list_model_set(priv.fileview, priv.filemodel); 59 elm_view_list_model_set(priv.fileview, priv.filemodel);
60 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv); 60 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv);
diff --git a/src/examples/elementary/layout_model_connect.c b/src/examples/elementary/layout_model_connect.c
index acc74bc..65103d4 100644
--- a/src/examples/elementary/layout_model_connect.c
+++ b/src/examples/elementary/layout_model_connect.c
@@ -111,7 +111,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
111 if (argv[1] != NULL) dirname = argv[1]; 111 if (argv[1] != NULL) dirname = argv[1];
112 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 112 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
113 113
114 priv->model = efl_add(EIO_MODEL_CLASS, win, eio_model_path_set(efl_added, dirname)); 114 priv->model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
115 115
116 genlist = elm_genlist_add(win); 116 genlist = elm_genlist_add(win);
117 priv->fileview = efl_add(ELM_VIEW_LIST_CLASS, win, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL)); 117 priv->fileview = efl_add(ELM_VIEW_LIST_CLASS, win, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL));
diff --git a/src/lib/ecore/Ecore_Eo.h b/src/lib/ecore/Ecore_Eo.h
index d0a6bc0..6a21ff5 100644
--- a/src/lib/ecore/Ecore_Eo.h
+++ b/src/lib/ecore/Ecore_Eo.h
@@ -109,14 +109,14 @@ EAPI Eo *efl_main_loop_get(void);
109 * @{ 109 * @{
110 */ 110 */
111 111
112#include "efl_model_loop.eo.h" 112#include "efl_loop_model.eo.h"
113#include "efl_model_item.eo.h" 113#include "efl_generic_model.eo.h"
114#include "efl_model_container.eo.h" 114#include "efl_container_model.eo.h"
115#include "efl_model_container_item.eo.h" 115#include "efl_container_model_item.eo.h"
116#include "efl_model_composite.eo.h" 116#include "efl_composite_model.eo.h"
117#include "efl_model_composite_boolean.eo.h" 117#include "efl_boolean_model.eo.h"
118#include "efl_model_composite_selection.eo.h" 118#include "efl_select_model.eo.h"
119#include "efl_model_view.eo.h" 119#include "efl_view_model.eo.h"
120 120
121/** 121/**
122 * @} 122 * @}
diff --git a/src/lib/ecore/efl_model_composite_boolean.c b/src/lib/ecore/efl_boolean_model.c
index 5cfa961..da9d3bd 100644
--- a/src/lib/ecore/efl_model_composite_boolean.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -4,18 +4,18 @@
4 4
5#include <Efl_Core.h> 5#include <Efl_Core.h>
6 6
7#include "efl_model_composite_private.h" 7#include "efl_composite_model_private.h"
8 8
9typedef struct _Efl_Model_Composite_Boolean_Data Efl_Model_Composite_Boolean_Data; 9typedef struct _Efl_Boolean_Model_Data Efl_Boolean_Model_Data;
10typedef struct _Efl_Model_Composite_Boolean_Value Efl_Model_Composite_Boolean_Value; 10typedef struct _Efl_Boolean_Model_Value Efl_Boolean_Model_Value;
11 11
12struct _Efl_Model_Composite_Boolean_Data 12struct _Efl_Boolean_Model_Data
13{ 13{
14 Efl_Model_Composite_Boolean_Data *parent; 14 Efl_Boolean_Model_Data *parent;
15 Eina_Hash *values; 15 Eina_Hash *values;
16}; 16};
17 17
18struct _Efl_Model_Composite_Boolean_Value 18struct _Efl_Boolean_Model_Value
19{ 19{
20 Eina_Stringshare *property; 20 Eina_Stringshare *property;
21 21
@@ -29,41 +29,41 @@ struct _Efl_Model_Composite_Boolean_Value
29}; 29};
30 30
31static Eina_Iterator * 31static Eina_Iterator *
32_efl_model_composite_boolean_efl_model_properties_get(const Eo *obj, 32_efl_boolean_model_efl_model_properties_get(const Eo *obj,
33 Efl_Model_Composite_Boolean_Data *pd) 33 Efl_Boolean_Model_Data *pd)
34{ 34{
35 EFL_MODEL_COMPOSITE_PROPERTIES_SUPER(props, 35 EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props,
36 obj, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS, 36 obj, EFL_BOOLEAN_MODEL_CLASS,
37 eina_hash_iterator_key_new(pd->parent->values)); 37 eina_hash_iterator_key_new(pd->parent->values));
38 return props; 38 return props;
39} 39}
40 40
41static Eina_Value * 41static Eina_Value *
42_efl_model_composite_boolean_efl_model_property_get(const Eo *obj, 42_efl_boolean_model_efl_model_property_get(const Eo *obj,
43 Efl_Model_Composite_Boolean_Data *pd, 43 Efl_Boolean_Model_Data *pd,
44 const char *property) 44 const char *property)
45{ 45{
46 Efl_Model_Composite_Boolean_Value *v; 46 Efl_Boolean_Model_Value *v;
47 Eina_Stringshare *s; 47 Eina_Stringshare *s;
48 Eina_Bool flag; 48 Eina_Bool flag;
49 unsigned int index; 49 unsigned int index;
50 50
51 if (property == NULL) return NULL; 51 if (property == NULL) return NULL;
52 52
53 // If we do not have a parent set that his a COMPOSITE_BOOLEAN, then we should just forward up the call 53 // If we do not have a parent set that his a BOOLEAN, then we should just forward up the call
54 if (!pd->parent) 54 if (!pd->parent)
55 return efl_model_property_get(efl_super(obj, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS), property); 55 return efl_model_property_get(efl_super(obj, EFL_BOOLEAN_MODEL_CLASS), property);
56 56
57 // Check if this is requesting a defined boolean property 57 // Check if this is requesting a defined boolean property
58 // Property are defined and their value are stored on the parent COMPOSITE_BOOLEAN 58 // Property are defined and their value are stored on the parent BOOLEAN
59 s = eina_stringshare_add(property); 59 s = eina_stringshare_add(property);
60 v = eina_hash_find(pd->parent->values, s); 60 v = eina_hash_find(pd->parent->values, s);
61 eina_stringshare_del(s); 61 eina_stringshare_del(s);
62 62
63 if (!v) // Not a property handle by this object, forward 63 if (!v) // Not a property handle by this object, forward
64 return efl_model_property_get(efl_super(obj, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS), property); 64 return efl_model_property_get(efl_super(obj, EFL_BOOLEAN_MODEL_CLASS), property);
65 65
66 index = efl_model_composite_index_get(obj); 66 index = efl_composite_model_index_get(obj);
67 67
68 // As an optimization we do optimistically allocate the boolean array 68 // As an optimization we do optimistically allocate the boolean array
69 // Better would be to have a sparse boolean array 69 // Better would be to have a sparse boolean array
@@ -76,11 +76,11 @@ _efl_model_composite_boolean_efl_model_property_get(const Eo *obj,
76} 76}
77 77
78static Eina_Future * 78static Eina_Future *
79_efl_model_composite_boolean_efl_model_property_set(Eo *obj, 79_efl_boolean_model_efl_model_property_set(Eo *obj,
80 Efl_Model_Composite_Boolean_Data *pd, 80 Efl_Boolean_Model_Data *pd,
81 const char *property, Eina_Value *value) 81 const char *property, Eina_Value *value)
82{ 82{
83 Efl_Model_Composite_Boolean_Value *v; 83 Efl_Boolean_Model_Value *v;
84 Eina_Stringshare *s; 84 Eina_Stringshare *s;
85 Eina_Bool flag; 85 Eina_Bool flag;
86 unsigned int index; 86 unsigned int index;
@@ -89,25 +89,25 @@ _efl_model_composite_boolean_efl_model_property_set(Eo *obj,
89 return efl_loop_future_rejected(obj, 89 return efl_loop_future_rejected(obj,
90 EFL_MODEL_ERROR_UNKNOWN); 90 EFL_MODEL_ERROR_UNKNOWN);
91 91
92 // If we do not have a parent set that his a COMPOSITE_BOOLEAN, then we should just forward up the call 92 // If we do not have a parent set that his a BOOLEAN, then we should just forward up the call
93 if (!pd->parent) 93 if (!pd->parent)
94 return efl_model_property_set(efl_super(obj, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS), 94 return efl_model_property_set(efl_super(obj, EFL_BOOLEAN_MODEL_CLASS),
95 property, value); 95 property, value);
96 96
97 // Check if this is requesting a defined boolean property 97 // Check if this is requesting a defined boolean property
98 // Property are defined and their value are stored on the parent COMPOSITE_BOOLEAN 98 // Property are defined and their value are stored on the parent BOOLEAN
99 s = eina_stringshare_add(property); 99 s = eina_stringshare_add(property);
100 v = eina_hash_find(pd->parent->values, s); 100 v = eina_hash_find(pd->parent->values, s);
101 eina_stringshare_del(s); 101 eina_stringshare_del(s);
102 102
103 if (!v) 103 if (!v)
104 return efl_model_property_set(efl_super(obj, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS), 104 return efl_model_property_set(efl_super(obj, EFL_BOOLEAN_MODEL_CLASS),
105 property, value); 105 property, value);
106 106
107 if (!eina_value_bool_convert(value, &flag)) 107 if (!eina_value_bool_convert(value, &flag))
108 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_UNKNOWN); 108 return efl_loop_future_rejected(obj, EFL_MODEL_ERROR_UNKNOWN);
109 109
110 index = efl_model_composite_index_get(obj); 110 index = efl_composite_model_index_get(obj);
111 111
112 // We are optimistically allocating the boolean buffer now. 112 // We are optimistically allocating the boolean buffer now.
113 // Aligning it on 64bits 113 // Aligning it on 64bits
@@ -139,7 +139,7 @@ _efl_model_composite_boolean_efl_model_property_set(Eo *obj,
139static void 139static void
140_boolean_value_free(void *data) 140_boolean_value_free(void *data)
141{ 141{
142 Efl_Model_Composite_Boolean_Value *value = data; 142 Efl_Boolean_Model_Value *value = data;
143 143
144 eina_stringshare_del(value->property); 144 eina_stringshare_del(value->property);
145 value->property = NULL; 145 value->property = NULL;
@@ -152,41 +152,41 @@ _boolean_value_free(void *data)
152} 152}
153 153
154static Eo * 154static Eo *
155_efl_model_composite_boolean_efl_object_constructor(Eo *obj, Efl_Model_Composite_Boolean_Data *pd) 155_efl_boolean_model_efl_object_constructor(Eo *obj, Efl_Boolean_Model_Data *pd)
156{ 156{
157 Eo *parent; 157 Eo *parent;
158 obj = efl_constructor(efl_super(obj, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS)); 158 obj = efl_constructor(efl_super(obj, EFL_BOOLEAN_MODEL_CLASS));
159 159
160 if (!obj) return NULL; 160 if (!obj) return NULL;
161 161
162 pd->values = eina_hash_stringshared_new(_boolean_value_free); 162 pd->values = eina_hash_stringshared_new(_boolean_value_free);
163 // Only add a reference to the parent if it is actually a COMPOSITE_BOOLEAN_CLASS 163 // Only add a reference to the parent if it is actually a BOOLEAN_MODEL_CLASS
164 // The root typically doesn't have any boolean property, only its child do 164 // The root typically doesn't have any boolean property, only its child do
165 parent = efl_parent_get(obj); 165 parent = efl_parent_get(obj);
166 if (efl_isa(parent, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS)) 166 if (efl_isa(parent, EFL_BOOLEAN_MODEL_CLASS))
167 pd->parent = efl_data_scope_get(parent, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS); 167 pd->parent = efl_data_scope_get(parent, EFL_BOOLEAN_MODEL_CLASS);
168 168
169 return obj; 169 return obj;
170} 170}
171 171
172static void 172static void
173_efl_model_composite_boolean_efl_object_destructor(Eo *obj, Efl_Model_Composite_Boolean_Data *pd) 173_efl_boolean_model_efl_object_destructor(Eo *obj, Efl_Boolean_Model_Data *pd)
174{ 174{
175 eina_hash_free(pd->values); 175 eina_hash_free(pd->values);
176 176
177 efl_destructor(efl_super(obj, EFL_MODEL_COMPOSITE_BOOLEAN_CLASS)); 177 efl_destructor(efl_super(obj, EFL_BOOLEAN_MODEL_CLASS));
178} 178}
179 179
180static void 180static void
181_efl_model_composite_boolean_boolean_add(Eo *obj EINA_UNUSED, 181_efl_boolean_model_boolean_add(Eo *obj EINA_UNUSED,
182 Efl_Model_Composite_Boolean_Data *pd, 182 Efl_Boolean_Model_Data *pd,
183 const char *name, Eina_Bool default_value) 183 const char *name, Eina_Bool default_value)
184{ 184{
185 Efl_Model_Composite_Boolean_Value *value; 185 Efl_Boolean_Model_Value *value;
186 186
187 if (!name) return ; 187 if (!name) return ;
188 188
189 value = calloc(1, sizeof (Efl_Model_Composite_Boolean_Value)); 189 value = calloc(1, sizeof (Efl_Boolean_Model_Value));
190 if (!value) return ; 190 if (!value) return ;
191 191
192 value->property = eina_stringshare_add(name); 192 value->property = eina_stringshare_add(name);
@@ -196,9 +196,9 @@ _efl_model_composite_boolean_boolean_add(Eo *obj EINA_UNUSED,
196} 196}
197 197
198static void 198static void
199_efl_model_composite_boolean_boolean_del(Eo *obj EINA_UNUSED, 199_efl_boolean_model_boolean_del(Eo *obj EINA_UNUSED,
200 Efl_Model_Composite_Boolean_Data *pd, 200 Efl_Boolean_Model_Data *pd,
201 const char *name) 201 const char *name)
202{ 202{
203 Eina_Stringshare *s; 203 Eina_Stringshare *s;
204 204
@@ -207,4 +207,4 @@ _efl_model_composite_boolean_boolean_del(Eo *obj EINA_UNUSED,
207 eina_stringshare_del(s); 207 eina_stringshare_del(s);
208} 208}
209 209
210#include "efl_model_composite_boolean.eo.c" 210#include "efl_boolean_model.eo.c"
diff --git a/src/lib/ecore/efl_model_composite_boolean.eo b/src/lib/ecore/efl_boolean_model.eo
index 8bbc664..ab6c2e8 100644
--- a/src/lib/ecore/efl_model_composite_boolean.eo
+++ b/src/lib/ecore/efl_boolean_model.eo
@@ -1,6 +1,6 @@
1class Efl.Model_Composite_Boolean extends Efl.Model_Composite 1class Efl.Boolean_Model extends Efl.Composite_Model
2{ 2{
3 [[Efl model composite boolean class]] 3 [[Efl boolean model class]]
4 methods { 4 methods {
5 boolean_add { 5 boolean_add {
6 [[Add a new named boolean property with a defined default value.]] 6 [[Add a new named boolean property with a defined default value.]]
diff --git a/src/lib/ecore/efl_model_composite.c b/src/lib/ecore/efl_composite_model.c
index 9beb6ac..1eea0cb 100644
--- a/src/lib/ecore/efl_model_composite.c
+++ b/src/lib/ecore/efl_composite_model.c
@@ -8,13 +8,13 @@
8 8
9#include "ecore_private.h" 9#include "ecore_private.h"
10 10
11#include "efl_model_composite.eo.h" 11#include "efl_composite_model.eo.h"
12 12
13#define _CHILD_INDEX "child.index" 13#define _CHILD_INDEX "child.index"
14 14
15typedef struct _Efl_Model_Composite_Data Efl_Model_Composite_Data; 15typedef struct _Efl_Composite_Model_Data Efl_Composite_Model_Data;
16 16
17struct _Efl_Model_Composite_Data 17struct _Efl_Composite_Model_Data
18{ 18{
19 Efl_Model *source; 19 Efl_Model *source;
20 20
@@ -25,7 +25,7 @@ struct _Efl_Model_Composite_Data
25}; 25};
26 26
27static void 27static void
28_efl_model_composite_efl_object_destructor(Eo *obj, Efl_Model_Composite_Data *pd) 28_efl_composite_model_efl_object_destructor(Eo *obj, Efl_Composite_Model_Data *pd)
29{ 29{
30 if (pd->source) 30 if (pd->source)
31 { 31 {
@@ -38,11 +38,11 @@ _efl_model_composite_efl_object_destructor(Eo *obj, Efl_Model_Composite_Data *pd
38 pd->source = NULL; 38 pd->source = NULL;
39 } 39 }
40 40
41 efl_destructor(efl_super(obj, EFL_MODEL_COMPOSITE_CLASS)); 41 efl_destructor(efl_super(obj, EFL_COMPOSITE_MODEL_CLASS));
42} 42}
43 43
44static Efl_Object * 44static Efl_Object *
45_efl_model_composite_efl_object_finalize(Eo *obj, Efl_Model_Composite_Data *pd) 45_efl_composite_model_efl_object_finalize(Eo *obj, Efl_Composite_Model_Data *pd)
46{ 46{
47 if (pd->source == NULL) 47 if (pd->source == NULL)
48 { 48 {
@@ -54,7 +54,7 @@ _efl_model_composite_efl_object_finalize(Eo *obj, Efl_Model_Composite_Data *pd)
54} 54}
55 55
56static void 56static void
57_efl_model_composite_index_set(Eo *obj EINA_UNUSED, Efl_Model_Composite_Data *pd, unsigned int index) 57_efl_composite_model_index_set(Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd, unsigned int index)
58{ 58{
59 if (pd->set_index || !pd->source) 59 if (pd->set_index || !pd->source)
60 return ; 60 return ;
@@ -63,7 +63,7 @@ _efl_model_composite_index_set(Eo *obj EINA_UNUSED, Efl_Model_Composite_Data *pd
63} 63}
64 64
65static unsigned int 65static unsigned int
66_efl_model_composite_index_get(const Eo *obj, Efl_Model_Composite_Data *pd) 66_efl_composite_model_index_get(const Eo *obj, Efl_Composite_Model_Data *pd)
67{ 67{
68 Eina_Value *fetch = NULL; 68 Eina_Value *fetch = NULL;
69 unsigned int r = 0xFFFFFFFF; 69 unsigned int r = 0xFFFFFFFF;
@@ -82,7 +82,7 @@ _efl_model_composite_index_get(const Eo *obj, Efl_Model_Composite_Data *pd)
82} 82}
83 83
84static void 84static void
85_efl_model_composite_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Model_Composite_Data *pd, Efl_Model *model) 85_efl_composite_model_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd, Efl_Model *model)
86{ 86{
87 Eina_Iterator *properties; 87 Eina_Iterator *properties;
88 const char *property; 88 const char *property;
@@ -114,13 +114,13 @@ _efl_model_composite_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Model_Compos
114} 114}
115 115
116static Efl_Model * 116static Efl_Model *
117_efl_model_composite_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Model_Composite_Data *pd) 117_efl_composite_model_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd)
118{ 118{
119 return pd->source; 119 return pd->source;
120} 120}
121 121
122static Eina_Future * 122static Eina_Future *
123_efl_model_composite_efl_model_property_set(Eo *obj, Efl_Model_Composite_Data *pd, 123_efl_composite_model_efl_model_property_set(Eo *obj, Efl_Composite_Model_Data *pd,
124 const char *property, Eina_Value *value) 124 const char *property, Eina_Value *value)
125{ 125{
126 if (pd->need_index && !strcmp(property, _CHILD_INDEX)) 126 if (pd->need_index && !strcmp(property, _CHILD_INDEX))
@@ -136,7 +136,7 @@ _efl_model_composite_efl_model_property_set(Eo *obj, Efl_Model_Composite_Data *p
136} 136}
137 137
138static Eina_Value * 138static Eina_Value *
139_efl_model_composite_efl_model_property_get(const Eo *obj EINA_UNUSED, Efl_Model_Composite_Data *pd, 139_efl_composite_model_efl_model_property_get(const Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd,
140 const char *property) 140 const char *property)
141{ 141{
142 if (pd->need_index && !strcmp(property, _CHILD_INDEX)) 142 if (pd->need_index && !strcmp(property, _CHILD_INDEX))
@@ -149,7 +149,7 @@ _efl_model_composite_efl_model_property_get(const Eo *obj EINA_UNUSED, Efl_Model
149} 149}
150 150
151static Eina_Iterator * 151static Eina_Iterator *
152_efl_model_composite_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Model_Composite_Data *pd) 152_efl_composite_model_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd)
153{ 153{
154 if (pd->need_index) 154 if (pd->need_index)
155 { 155 {
@@ -164,13 +164,13 @@ _efl_model_composite_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Mod
164} 164}
165 165
166static unsigned int 166static unsigned int
167_efl_model_composite_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Model_Composite_Data *pd) 167_efl_composite_model_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Composite_Model_Data *pd)
168{ 168{
169 return efl_model_children_count_get(pd->source); 169 return efl_model_children_count_get(pd->source);
170} 170}
171 171
172typedef struct _Efl_Model_Composite_Slice_Request Efl_Model_Composite_Slice_Request; 172typedef struct _Efl_Composite_Model_Slice_Request Efl_Composite_Model_Slice_Request;
173struct _Efl_Model_Composite_Slice_Request 173struct _Efl_Composite_Model_Slice_Request
174{ 174{
175 const Efl_Class *self; 175 const Efl_Class *self;
176 Eo *parent; 176 Eo *parent;
@@ -178,9 +178,9 @@ struct _Efl_Model_Composite_Slice_Request
178}; 178};
179 179
180static Eina_Value 180static Eina_Value
181_efl_model_composite_then(Eo *o EINA_UNUSED, void *data, const Eina_Value v) 181_efl_composite_model_then(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
182{ 182{
183 Efl_Model_Composite_Slice_Request *req = data; 183 Efl_Composite_Model_Slice_Request *req = data;
184 unsigned int i, len; 184 unsigned int i, len;
185 Eina_Value r = EINA_VALUE_EMPTY; 185 Eina_Value r = EINA_VALUE_EMPTY;
186 Eo *target = NULL; 186 Eo *target = NULL;
@@ -195,7 +195,7 @@ _efl_model_composite_then(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
195 // can know if it needs to retain the information regarding its index. 195 // can know if it needs to retain the information regarding its index.
196 composite = efl_add(req->self, req->parent, 196 composite = efl_add(req->self, req->parent,
197 efl_ui_view_model_set(efl_added, target), 197 efl_ui_view_model_set(efl_added, target),
198 efl_model_composite_index_set(efl_added, req->start + i)); 198 efl_composite_model_index_set(efl_added, req->start + i));
199 199
200 eina_value_array_append(&r, composite); 200 eina_value_array_append(&r, composite);
201 } 201 }
@@ -204,27 +204,27 @@ _efl_model_composite_then(Eo *o EINA_UNUSED, void *data, const Eina_Value v)
204} 204}
205 205
206static void 206static void
207_efl_model_composite_clean(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED) 207_efl_composite_model_clean(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
208{ 208{
209 Efl_Model_Composite_Slice_Request *req = data; 209 Efl_Composite_Model_Slice_Request *req = data;
210 210
211 efl_unref(req->parent); 211 efl_unref(req->parent);
212 free(data); 212 free(data);
213} 213}
214 214
215static Eina_Future * 215static Eina_Future *
216_efl_model_composite_efl_model_children_slice_get(Eo *obj, 216_efl_composite_model_efl_model_children_slice_get(Eo *obj,
217 Efl_Model_Composite_Data *pd, 217 Efl_Composite_Model_Data *pd,
218 unsigned int start, 218 unsigned int start,
219 unsigned int count) 219 unsigned int count)
220{ 220{
221 Efl_Model_Composite_Slice_Request *req; 221 Efl_Composite_Model_Slice_Request *req;
222 Eina_Future *f; 222 Eina_Future *f;
223 223
224 f = efl_model_children_slice_get(pd->source, start, count); 224 f = efl_model_children_slice_get(pd->source, start, count);
225 if (!f) return NULL; 225 if (!f) return NULL;
226 226
227 req = malloc(sizeof (Efl_Model_Composite_Slice_Request)); 227 req = malloc(sizeof (Efl_Composite_Model_Slice_Request));
228 if (!req) return efl_loop_future_rejected(obj, ENOMEM); 228 if (!req) return efl_loop_future_rejected(obj, ENOMEM);
229 229
230 req->self = efl_class_get(obj); 230 req->self = efl_class_get(obj);
@@ -232,24 +232,24 @@ _efl_model_composite_efl_model_children_slice_get(Eo *obj,
232 req->start = start; 232 req->start = start;
233 233
234 return efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_ARRAY, 234 return efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_ARRAY,
235 .success = _efl_model_composite_then, 235 .success = _efl_composite_model_then,
236 .free = _efl_model_composite_clean, 236 .free = _efl_composite_model_clean,
237 .data = req); 237 .data = req);
238} 238}
239 239
240static Efl_Object * 240static Efl_Object *
241_efl_model_composite_efl_model_child_add(Eo *obj EINA_UNUSED, 241_efl_composite_model_efl_model_child_add(Eo *obj EINA_UNUSED,
242 Efl_Model_Composite_Data *pd) 242 Efl_Composite_Model_Data *pd)
243{ 243{
244 return efl_model_child_add(pd->source); 244 return efl_model_child_add(pd->source);
245} 245}
246 246
247static void 247static void
248_efl_model_composite_efl_model_child_del(Eo *obj EINA_UNUSED, 248_efl_composite_model_efl_model_child_del(Eo *obj EINA_UNUSED,
249 Efl_Model_Composite_Data *pd, 249 Efl_Composite_Model_Data *pd,
250 Efl_Object *child) 250 Efl_Object *child)
251{ 251{
252 efl_model_child_del(pd->source, child); 252 efl_model_child_del(pd->source, child);
253} 253}
254 254
255#include "efl_model_composite.eo.c" 255#include "efl_composite_model.eo.c"
diff --git a/src/lib/ecore/efl_model_composite.eo b/src/lib/ecore/efl_composite_model.eo
index a1baad1..58cc3c3 100644
--- a/src/lib/ecore/efl_model_composite.eo
+++ b/src/lib/ecore/efl_composite_model.eo
@@ -1,4 +1,4 @@
1class Efl.Model_Composite extends Efl.Model_Loop implements Efl.Ui.View 1class Efl.Composite_Model extends Efl.Loop_Model implements Efl.Ui.View
2{ 2{
3 [[Efl model for all composite class which provide a unified API to set source of data. 3 [[Efl model for all composite class which provide a unified API to set source of data.
4 4
diff --git a/src/lib/ecore/efl_model_composite_private.h b/src/lib/ecore/efl_composite_model_private.h
index 0b0f042..c9e3783 100644
--- a/src/lib/ecore/efl_model_composite_private.h
+++ b/src/lib/ecore/efl_composite_model_private.h
@@ -1,15 +1,15 @@
1 1
2#define EFL_MODEL_COMPOSITE_PROPERTIES(name, dyn, sta, ...) \ 2#define EFL_COMPOSITE_MODEL_PROPERTIES(name, dyn, sta, ...) \
3 EFL_MODEL_COMPOSITE_PROPERTIES_SUPER(name, NULL, NULL, (dyn), sta, ##__VA_ARGS__) 3 EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(name, NULL, NULL, (dyn), sta, ##__VA_ARGS__)
4 4
5#define EFL_MODEL_COMPOSITE_PROPERTIES_SUPER(name, obj, klass, dyn, ...) \ 5#define EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(name, obj, klass, dyn, ...) \
6 Eina_Iterator *name; \ 6 Eina_Iterator *name; \
7 do \ 7 do \
8 { \ 8 { \
9 static const char *static_props__[] = { \ 9 static const char *static_props__[] = { \
10 __VA_ARGS__ \ 10 __VA_ARGS__ \
11 }; \ 11 }; \
12 name = _efl_model_composite_properties_mix( \ 12 name = _efl_composite_model_properties_mix( \
13 ((obj) ? efl_model_properties_get(efl_super((obj), (klass))) : NULL), \ 13 ((obj) ? efl_model_properties_get(efl_super((obj), (klass))) : NULL), \
14 (dyn), \ 14 (dyn), \
15 EINA_C_ARRAY_ITERATOR_NEW(static_props__)); \ 15 EINA_C_ARRAY_ITERATOR_NEW(static_props__)); \
@@ -18,7 +18,7 @@
18 18
19 19
20static inline Eina_Iterator * 20static inline Eina_Iterator *
21_efl_model_composite_properties_mix(Eina_Iterator *super, Eina_Iterator *dyn, Eina_Iterator *sta) 21_efl_composite_model_properties_mix(Eina_Iterator *super, Eina_Iterator *dyn, Eina_Iterator *sta)
22{ 22{
23 Eina_Iterator *its[3]; 23 Eina_Iterator *its[3];
24 int i = 0; 24 int i = 0;
diff --git a/src/lib/ecore/efl_model_container.c b/src/lib/ecore/efl_container_model.c
index b69f3f2..0b6ae9a 100644
--- a/src/lib/ecore/efl_model_container.c
+++ b/src/lib/ecore/efl_container_model.c
@@ -9,9 +9,9 @@
9 9
10#include "ecore_internal.h" 10#include "ecore_internal.h"
11 11
12#include "efl_model_container_private.h" 12#include "efl_container_model_private.h"
13 13
14#define MY_CLASS EFL_MODEL_CONTAINER_CLASS 14#define MY_CLASS EFL_CONTAINER_MODEL_CLASS
15 15
16void * 16void *
17_value_copy_alloc(void *v, const Eina_Value_Type *type) 17_value_copy_alloc(void *v, const Eina_Value_Type *type)
@@ -65,8 +65,8 @@ _property_data_free_cb(void *data)
65} 65}
66 66
67static Efl_Object * 67static Efl_Object *
68_efl_model_container_efl_object_constructor(Eo *obj, 68_efl_container_model_efl_object_constructor(Eo *obj,
69 Efl_Model_Container_Data *sd) 69 Efl_Container_Model_Data *sd)
70{ 70{
71 obj = efl_constructor(efl_super(obj, MY_CLASS)); 71 obj = efl_constructor(efl_super(obj, MY_CLASS));
72 if (!obj) 72 if (!obj)
@@ -79,8 +79,8 @@ _efl_model_container_efl_object_constructor(Eo *obj,
79} 79}
80 80
81static void 81static void
82_efl_model_container_efl_object_destructor(Eo *obj, 82_efl_container_model_efl_object_destructor(Eo *obj,
83 Efl_Model_Container_Data *sd) 83 Efl_Container_Model_Data *sd)
84{ 84{
85 Eina_Stringshare *key; 85 Eina_Stringshare *key;
86 Eina_Iterator *it; 86 Eina_Iterator *it;
@@ -98,8 +98,8 @@ _efl_model_container_efl_object_destructor(Eo *obj,
98} 98}
99 99
100static const Eina_Value_Type * 100static const Eina_Value_Type *
101_efl_model_container_child_property_value_type_get(Eo *obj EINA_UNUSED, 101_efl_container_model_child_property_value_type_get(Eo *obj EINA_UNUSED,
102 Efl_Model_Container_Data *sd, 102 Efl_Container_Model_Data *sd,
103 const char *property) 103 const char *property)
104{ 104{
105 Child_Property_Data *cpd; 105 Child_Property_Data *cpd;
@@ -114,8 +114,8 @@ _efl_model_container_child_property_value_type_get(Eo *obj EINA_UNUSED,
114} 114}
115 115
116static Eina_Iterator * 116static Eina_Iterator *
117_efl_model_container_child_property_values_get(Eo *obj EINA_UNUSED, 117_efl_container_model_child_property_values_get(Eo *obj EINA_UNUSED,
118 Efl_Model_Container_Data *sd, 118 Efl_Container_Model_Data *sd,
119 const char *property) 119 const char *property)
120{ 120{
121 Child_Property_Data *cpd; 121 Child_Property_Data *cpd;
@@ -130,8 +130,8 @@ _efl_model_container_child_property_values_get(Eo *obj EINA_UNUSED,
130} 130}
131 131
132static Eina_Bool 132static Eina_Bool
133_efl_model_container_child_property_add(Eo *obj, 133_efl_container_model_child_property_add(Eo *obj,
134 Efl_Model_Container_Data *sd, 134 Efl_Container_Model_Data *sd,
135 const char *name, 135 const char *name,
136 const Eina_Value_Type *type, 136 const Eina_Value_Type *type,
137 Eina_Iterator *values) 137 Eina_Iterator *values)
@@ -198,8 +198,8 @@ _efl_model_container_child_property_add(Eo *obj,
198 Efl_Model_Children_Event cevt = { 0 }; 198 Efl_Model_Children_Event cevt = { 0 };
199 Efl_Model *child; 199 Efl_Model *child;
200 200
201 child = efl_add(EFL_MODEL_CONTAINER_ITEM_CLASS, obj, 201 child = efl_add(EFL_CONTAINER_MODEL_ITEM_CLASS, obj,
202 efl_model_container_item_define(efl_added, sd, i)); 202 efl_container_model_item_define(efl_added, sd, i));
203 sd->childrens = eina_list_append(sd->childrens, child); 203 sd->childrens = eina_list_append(sd->childrens, child);
204 204
205 cevt.index = i; 205 cevt.index = i;
@@ -222,14 +222,14 @@ _efl_model_container_child_property_add(Eo *obj,
222} 222}
223 223
224static Eina_Iterator * 224static Eina_Iterator *
225_efl_model_container_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd) 225_efl_container_model_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Container_Model_Data *sd)
226{ 226{
227 return eina_hash_iterator_key_new(sd->properties); 227 return eina_hash_iterator_key_new(sd->properties);
228} 228}
229 229
230static Eina_Future * 230static Eina_Future *
231_efl_model_container_efl_model_property_set(Eo *obj, 231_efl_container_model_efl_model_property_set(Eo *obj,
232 Efl_Model_Container_Data *pd EINA_UNUSED, 232 Efl_Container_Model_Data *pd EINA_UNUSED,
233 const char *property EINA_UNUSED, 233 const char *property EINA_UNUSED,
234 Eina_Value *value EINA_UNUSED) 234 Eina_Value *value EINA_UNUSED)
235{ 235{
@@ -238,16 +238,16 @@ _efl_model_container_efl_model_property_set(Eo *obj,
238} 238}
239 239
240static Eina_Value * 240static Eina_Value *
241_efl_model_container_efl_model_property_get(const Eo *obj EINA_UNUSED, 241_efl_container_model_efl_model_property_get(const Eo *obj EINA_UNUSED,
242 Efl_Model_Container_Data *pd EINA_UNUSED, 242 Efl_Container_Model_Data *pd EINA_UNUSED,
243 const char *property EINA_UNUSED) 243 const char *property EINA_UNUSED)
244{ 244{
245 return eina_value_error_new(EFL_MODEL_ERROR_NOT_FOUND); 245 return eina_value_error_new(EFL_MODEL_ERROR_NOT_FOUND);
246} 246}
247 247
248static Eina_Future * 248static Eina_Future *
249_efl_model_container_efl_model_children_slice_get(Eo *obj, 249_efl_container_model_efl_model_children_slice_get(Eo *obj,
250 Efl_Model_Container_Data *sd, 250 Efl_Container_Model_Data *sd,
251 unsigned int start, 251 unsigned int start,
252 unsigned int count) 252 unsigned int count)
253{ 253{
@@ -258,13 +258,13 @@ _efl_model_container_efl_model_children_slice_get(Eo *obj,
258} 258}
259 259
260static unsigned int 260static unsigned int
261_efl_model_container_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd) 261_efl_container_model_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Container_Model_Data *sd)
262{ 262{
263 return eina_list_count(sd->childrens); 263 return eina_list_count(sd->childrens);
264} 264}
265 265
266static Eo * 266static Eo *
267_efl_model_container_efl_model_child_add(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED) 267_efl_container_model_efl_model_child_add(Eo *obj EINA_UNUSED, Efl_Container_Model_Data *sd EINA_UNUSED)
268{ 268{
269 EINA_LOG_WARN("child_add not supported by Efl.Model.Container"); 269 EINA_LOG_WARN("child_add not supported by Efl.Model.Container");
270 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED); 270 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED);
@@ -273,10 +273,10 @@ _efl_model_container_efl_model_child_add(Eo *obj EINA_UNUSED, Efl_Model_Containe
273} 273}
274 274
275static void 275static void
276_efl_model_container_efl_model_child_del(Eo *obj EINA_UNUSED, Efl_Model_Container_Data *sd EINA_UNUSED, Eo *child EINA_UNUSED) 276_efl_container_model_efl_model_child_del(Eo *obj EINA_UNUSED, Efl_Container_Model_Data *sd EINA_UNUSED, Eo *child EINA_UNUSED)
277{ 277{
278 EINA_LOG_WARN("child_del not supported by Efl.Model.Container"); 278 EINA_LOG_WARN("child_del not supported by Efl.Model.Container");
279 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED); 279 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED);
280} 280}
281 281
282#include "efl_model_container.eo.c" 282#include "efl_container_model.eo.c"
diff --git a/src/lib/ecore/efl_model_container.eo b/src/lib/ecore/efl_container_model.eo
index 04fbdf8..10c6515 100644
--- a/src/lib/ecore/efl_model_container.eo
+++ b/src/lib/ecore/efl_container_model.eo
@@ -1,12 +1,12 @@
1import eina_types; 1import eina_types;
2 2
3class Efl.Model_Container extends Efl.Model_Loop 3class Efl.Container_Model extends Efl.Loop_Model
4{ 4{
5 [[ 5 [[
6 Class used to create data models from Eina containers. 6 Class used to create data models from Eina containers.
7 7
8 Each container supplied represents a series of property values, each item 8 Each container supplied represents a series of property values, each item
9 being the property value for a child object (@Efl.Model_Container_Item). 9 being the property value for a child object (@Efl.Container_Model_Item).
10 10
11 The data in the given containers are copied and stored internally. 11 The data in the given containers are copied and stored internally.
12 12
diff --git a/src/lib/ecore/efl_model_container_item.c b/src/lib/ecore/efl_container_model_item.c
index ec61f8e..7457da9 100644
--- a/src/lib/ecore/efl_model_container_item.c
+++ b/src/lib/ecore/efl_container_model_item.c
@@ -5,19 +5,19 @@
5#include <Efl.h> 5#include <Efl.h>
6#include <Ecore.h> 6#include <Ecore.h>
7 7
8#include "efl_model_container_private.h" 8#include "efl_container_model_private.h"
9 9
10#define MY_CLASS EFL_MODEL_CONTAINER_ITEM_CLASS 10#define MY_CLASS EFL_CONTAINER_MODEL_ITEM_CLASS
11 11
12static void 12static void
13_efl_model_container_item_define(Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd, void *parent_data, unsigned int index) 13_efl_container_model_item_define(Eo *obj EINA_UNUSED, Efl_Container_Model_Item_Data *sd, void *parent_data, unsigned int index)
14{ 14{
15 sd->parent_data = parent_data; 15 sd->parent_data = parent_data;
16 sd->index = index; 16 sd->index = index;
17} 17}
18 18
19EOLIAN static void 19EOLIAN static void
20_efl_model_container_item_efl_object_invalidate(Eo *obj, Efl_Model_Container_Item_Data *sd) 20_efl_container_model_item_efl_object_invalidate(Eo *obj, Efl_Container_Model_Item_Data *sd)
21{ 21{
22 efl_invalidate(efl_super(obj, MY_CLASS)); 22 efl_invalidate(efl_super(obj, MY_CLASS));
23 23
@@ -26,14 +26,14 @@ _efl_model_container_item_efl_object_invalidate(Eo *obj, Efl_Model_Container_Ite
26} 26}
27 27
28static Eina_Iterator * 28static Eina_Iterator *
29_efl_model_container_item_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Model_Container_Item_Data *sd) 29_efl_container_model_item_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Container_Model_Item_Data *sd)
30{ 30{
31 // FIXME: Not to sure here, shouldn't we extend a child of the parent actually ? 31 // FIXME: Not to sure here, shouldn't we extend a child of the parent actually ?
32 return efl_model_properties_get(sd->parent_data->obj); 32 return efl_model_properties_get(sd->parent_data->obj);
33} 33}
34 34
35static Efl_Object * 35static Efl_Object *
36_efl_model_container_item_efl_object_finalize(Eo *obj, Efl_Model_Container_Item_Data *pd) 36_efl_container_model_item_efl_object_finalize(Eo *obj, Efl_Container_Model_Item_Data *pd)
37{ 37{
38 if (!pd->parent_data) 38 if (!pd->parent_data)
39 return NULL; 39 return NULL;
@@ -42,8 +42,8 @@ _efl_model_container_item_efl_object_finalize(Eo *obj, Efl_Model_Container_Item_
42} 42}
43 43
44static Eina_Future * 44static Eina_Future *
45_efl_model_container_item_efl_model_property_set(Eo *obj, 45_efl_container_model_item_efl_model_property_set(Eo *obj,
46 Efl_Model_Container_Item_Data *sd, 46 Efl_Container_Model_Item_Data *sd,
47 const char *property, Eina_Value *value) 47 const char *property, Eina_Value *value)
48{ 48{
49 Eina_Stringshare *name; 49 Eina_Stringshare *name;
@@ -91,8 +91,8 @@ _efl_model_container_item_efl_model_property_set(Eo *obj,
91} 91}
92 92
93static Eina_Value * 93static Eina_Value *
94_efl_model_container_item_efl_model_property_get(const Eo *obj EINA_UNUSED, 94_efl_container_model_item_efl_model_property_get(const Eo *obj EINA_UNUSED,
95 Efl_Model_Container_Item_Data *sd, 95 Efl_Container_Model_Item_Data *sd,
96 const char *property) 96 const char *property)
97{ 97{
98 Eina_Stringshare *name; 98 Eina_Stringshare *name;
@@ -127,8 +127,8 @@ _efl_model_container_item_efl_model_property_get(const Eo *obj EINA_UNUSED,
127} 127}
128 128
129EOLIAN static Eina_Future * 129EOLIAN static Eina_Future *
130_efl_model_container_item_efl_model_children_slice_get(Eo *obj, 130_efl_container_model_item_efl_model_children_slice_get(Eo *obj,
131 Efl_Model_Container_Item_Data *sd EINA_UNUSED, 131 Efl_Container_Model_Item_Data *sd EINA_UNUSED,
132 unsigned int start EINA_UNUSED, 132 unsigned int start EINA_UNUSED,
133 unsigned int count EINA_UNUSED) 133 unsigned int count EINA_UNUSED)
134{ 134{
@@ -136,15 +136,15 @@ _efl_model_container_item_efl_model_children_slice_get(Eo *obj,
136} 136}
137 137
138EOLIAN static unsigned int 138EOLIAN static unsigned int
139_efl_model_container_item_efl_model_children_count_get(const Eo *obj EINA_UNUSED, 139_efl_container_model_item_efl_model_children_count_get(const Eo *obj EINA_UNUSED,
140 Efl_Model_Container_Item_Data *sd EINA_UNUSED) 140 Efl_Container_Model_Item_Data *sd EINA_UNUSED)
141{ 141{
142 return 0; 142 return 0;
143} 143}
144 144
145EOLIAN static Eo * 145EOLIAN static Eo *
146_efl_model_container_item_efl_model_child_add(Eo *obj EINA_UNUSED, 146_efl_container_model_item_efl_model_child_add(Eo *obj EINA_UNUSED,
147 Efl_Model_Container_Item_Data *sd EINA_UNUSED) 147 Efl_Container_Model_Item_Data *sd EINA_UNUSED)
148{ 148{
149 EINA_LOG_WARN("child_add not supported by Efl.Model.Container.Item"); 149 EINA_LOG_WARN("child_add not supported by Efl.Model.Container.Item");
150 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED); 150 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED);
@@ -153,12 +153,12 @@ _efl_model_container_item_efl_model_child_add(Eo *obj EINA_UNUSED,
153} 153}
154 154
155EOLIAN static void 155EOLIAN static void
156_efl_model_container_item_efl_model_child_del(Eo *obj EINA_UNUSED, 156_efl_container_model_item_efl_model_child_del(Eo *obj EINA_UNUSED,
157 Efl_Model_Container_Item_Data *sd EINA_UNUSED, 157 Efl_Container_Model_Item_Data *sd EINA_UNUSED,
158 Eo *child EINA_UNUSED) 158 Eo *child EINA_UNUSED)
159{ 159{
160 EINA_LOG_WARN("child_del not supported by Efl.Model.Container.Item"); 160 EINA_LOG_WARN("child_del not supported by Efl.Model.Container.Item");
161 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED); 161 eina_error_set(EFL_MODEL_ERROR_NOT_SUPPORTED);
162} 162}
163 163
164#include "efl_model_container_item.eo.c" 164#include "efl_container_model_item.eo.c"
diff --git a/src/lib/ecore/efl_model_container_item.eo b/src/lib/ecore/efl_container_model_item.eo
index f085043..779806e 100644
--- a/src/lib/ecore/efl_model_container_item.eo
+++ b/src/lib/ecore/efl_container_model_item.eo
@@ -1,19 +1,19 @@
1class Efl.Model_Container_Item extends Efl.Object implements Efl.Model 1class Efl.Container_Model_Item extends Efl.Object implements Efl.Model
2{ 2{
3 [[ 3 [[
4 Used as a child of @Efl.Model_Container. 4 Used as a child of @Efl.Container_Model.
5 5
6 Provides the @Efl.Model API for elements of @Efl.Model_Container. 6 Provides the @Efl.Model API for elements of @Efl.Container_Model.
7 Should not be used in another context, so do not manually create objects 7 Should not be used in another context, so do not manually create objects
8 of this class. 8 of this class.
9 ]] 9 ]]
10 methods { 10 methods {
11 define { 11 define {
12 [[Defines @Efl.Model_Container_Item internal data.]] 12 [[Defines @Efl.Container_Model_Item internal data.]]
13 params { 13 params {
14 parent_data: void_ptr; [[Pointer to the private data of the 14 parent_data: void_ptr; [[Pointer to the private data of the
15 @Efl.Model_Container parent object.]] 15 @Efl.Container_Model parent object.]]
16 index: uint; [[Index of this item within the @Efl.Model_Container 16 index: uint; [[Index of this item within the @Efl.Container_Model
17 children.]] 17 children.]]
18 } 18 }
19 } 19 }
diff --git a/src/lib/ecore/efl_model_container_private.h b/src/lib/ecore/efl_container_model_private.h
index b1fe4c2..6a9e743 100644
--- a/src/lib/ecore/efl_model_container_private.h
+++ b/src/lib/ecore/efl_container_model_private.h
@@ -1,5 +1,5 @@
1#ifndef EFL_MODEL_CONTAINER_PRIVATE_H__ 1#ifndef EFL_CONTAINER_MODEL_PRIVATE_H__
2#define EFL_MODEL_CONTAINER_PRIVATE_H__ 2#define EFL_CONTAINER_MODEL_PRIVATE_H__
3 3
4typedef struct _Child_Property_Data Child_Property_Data; 4typedef struct _Child_Property_Data Child_Property_Data;
5struct _Child_Property_Data 5struct _Child_Property_Data
@@ -8,8 +8,8 @@ struct _Child_Property_Data
8 Eina_Array *values; 8 Eina_Array *values;
9}; 9};
10 10
11typedef struct _Efl_Model_Container_Data Efl_Model_Container_Data; 11typedef struct _Efl_Container_Model_Data Efl_Container_Model_Data;
12struct _Efl_Model_Container_Data 12struct _Efl_Container_Model_Data
13{ 13{
14 Eo *obj; 14 Eo *obj;
15 15
@@ -19,10 +19,10 @@ struct _Efl_Model_Container_Data
19}; 19};
20 20
21 21
22typedef struct _Efl_Model_Container_Item_Data Efl_Model_Container_Item_Data; 22typedef struct _Efl_Container_Model_Item_Data Efl_Container_Model_Item_Data;
23struct _Efl_Model_Container_Item_Data 23struct _Efl_Container_Model_Item_Data
24{ 24{
25 Efl_Model_Container_Data *parent_data; 25 Efl_Container_Model_Data *parent_data;
26 unsigned int index; 26 unsigned int index;
27}; 27};
28 28
diff --git a/src/lib/ecore/efl_model_item.c b/src/lib/ecore/efl_generic_model.c
index 7e009e3..35d2637 100644
--- a/src/lib/ecore/efl_model_item.c
+++ b/src/lib/ecore/efl_generic_model.c
@@ -7,10 +7,10 @@
7 7
8#include "ecore_internal.h" 8#include "ecore_internal.h"
9 9
10#define MY_CLASS EFL_MODEL_ITEM_CLASS 10#define MY_CLASS EFL_GENERIC_MODEL_CLASS
11 11
12typedef struct _Efl_Model_Item_Data Efl_Model_Item_Data; 12typedef struct _Efl_Generic_Model_Data Efl_Generic_Model_Data;
13struct _Efl_Model_Item_Data 13struct _Efl_Generic_Model_Data
14{ 14{
15 Eina_Hash *properties; 15 Eina_Hash *properties;
16 Eina_List *childrens; 16 Eina_List *childrens;
@@ -30,7 +30,7 @@ _stringshared_keys_free(const Eina_Hash *hash EINA_UNUSED, const void *key, void
30} 30}
31 31
32static Efl_Object * 32static Efl_Object *
33_efl_model_item_efl_object_constructor(Eo *obj, Efl_Model_Item_Data *sd) 33_efl_generic_model_efl_object_constructor(Eo *obj, Efl_Generic_Model_Data *sd)
34{ 34{
35 obj = efl_constructor(efl_super(obj, MY_CLASS)); 35 obj = efl_constructor(efl_super(obj, MY_CLASS));
36 if (!obj) 36 if (!obj)
@@ -42,7 +42,7 @@ _efl_model_item_efl_object_constructor(Eo *obj, Efl_Model_Item_Data *sd)
42} 42}
43 43
44static void 44static void
45_efl_model_item_efl_object_destructor(Eo *obj, Efl_Model_Item_Data *sd) 45_efl_generic_model_efl_object_destructor(Eo *obj, Efl_Generic_Model_Data *sd)
46{ 46{
47 eina_list_free(sd->childrens); 47 eina_list_free(sd->childrens);
48 eina_hash_foreach(sd->properties, _stringshared_keys_free, NULL); 48 eina_hash_foreach(sd->properties, _stringshared_keys_free, NULL);
@@ -52,13 +52,13 @@ _efl_model_item_efl_object_destructor(Eo *obj, Efl_Model_Item_Data *sd)
52} 52}
53 53
54static Eina_Iterator * 54static Eina_Iterator *
55_efl_model_item_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Model_Item_Data *pd) 55_efl_generic_model_efl_model_properties_get(const Eo *obj EINA_UNUSED, Efl_Generic_Model_Data *pd)
56{ 56{
57 return eina_hash_iterator_key_new(pd->properties); 57 return eina_hash_iterator_key_new(pd->properties);
58} 58}
59 59
60static Eina_Future * 60static Eina_Future *
61_efl_model_item_efl_model_property_set(Eo *obj, Efl_Model_Item_Data *pd, const char *property, Eina_Value *value) 61_efl_generic_model_efl_model_property_set(Eo *obj, Efl_Generic_Model_Data *pd, const char *property, Eina_Value *value)
62{ 62{
63 Eina_Stringshare *prop; 63 Eina_Stringshare *prop;
64 Eina_Value *exist; 64 Eina_Value *exist;
@@ -110,9 +110,9 @@ _efl_model_item_efl_model_property_set(Eo *obj, Efl_Model_Item_Data *pd, const c
110} 110}
111 111
112static Eina_Value * 112static Eina_Value *
113_efl_model_item_efl_model_property_get(const Eo *obj EINA_UNUSED, 113_efl_generic_model_efl_model_property_get(const Eo *obj EINA_UNUSED,
114 Efl_Model_Item_Data *pd, 114 Efl_Generic_Model_Data *pd,
115 const char *property) 115 const char *property)
116{ 116{
117 Eina_Stringshare *prop; 117 Eina_Stringshare *prop;
118 Eina_Value *value; 118 Eina_Value *value;
@@ -128,7 +128,7 @@ _efl_model_item_efl_model_property_get(const Eo *obj EINA_UNUSED,
128} 128}
129 129
130static Eina_Future * 130static Eina_Future *
131_efl_model_item_efl_model_children_slice_get(Eo *obj, Efl_Model_Item_Data *pd, unsigned int start, unsigned int count) 131_efl_generic_model_efl_model_children_slice_get(Eo *obj, Efl_Generic_Model_Data *pd, unsigned int start, unsigned int count)
132{ 132{
133 Eina_Value v; 133 Eina_Value v;
134 134
@@ -137,21 +137,21 @@ _efl_model_item_efl_model_children_slice_get(Eo *obj, Efl_Model_Item_Data *pd, u
137} 137}
138 138
139static unsigned int 139static unsigned int
140_efl_model_item_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Model_Item_Data *pd) 140_efl_generic_model_efl_model_children_count_get(const Eo *obj EINA_UNUSED, Efl_Generic_Model_Data *pd)
141{ 141{
142 return eina_list_count(pd->childrens); 142 return eina_list_count(pd->childrens);
143} 143}
144 144
145static Eo * 145static Eo *
146_efl_model_item_efl_model_child_add(Eo *obj, Efl_Model_Item_Data *sd) 146_efl_generic_model_efl_model_child_add(Eo *obj, Efl_Generic_Model_Data *sd)
147{ 147{
148 Efl_Model_Children_Event cevt; 148 Efl_Model_Children_Event cevt;
149 Efl_Model *child; 149 Efl_Model *child;
150 150
151 child = efl_add(EFL_MODEL_ITEM_CLASS, obj); 151 child = efl_add(EFL_GENERIC_MODEL_CLASS, obj);
152 if (!child) 152 if (!child)
153 { 153 {
154 EINA_LOG_ERR("Could not allocate Efl.Model.Item"); 154 EINA_LOG_ERR("Could not allocate Efl.Generic_Model");
155 eina_error_set(EFL_MODEL_ERROR_UNKNOWN); 155 eina_error_set(EFL_MODEL_ERROR_UNKNOWN);
156 return NULL; 156 return NULL;
157 } 157 }
@@ -166,7 +166,7 @@ _efl_model_item_efl_model_child_add(Eo *obj, Efl_Model_Item_Data *sd)
166} 166}
167 167
168static void 168static void
169_efl_model_item_efl_model_child_del(Eo *obj, Efl_Model_Item_Data *sd, Eo *child) 169_efl_generic_model_efl_model_child_del(Eo *obj, Efl_Generic_Model_Data *sd, Eo *child)
170{ 170{
171 Efl_Model *data; 171 Efl_Model *data;
172 Eina_List *l; 172 Eina_List *l;
@@ -194,4 +194,4 @@ _efl_model_item_efl_model_child_del(Eo *obj, Efl_Model_Item_Data *sd, Eo *child)
194 } 194 }
195} 195}
196 196
197#include "efl_model_item.eo.c" 197#include "efl_generic_model.eo.c"
diff --git a/src/lib/ecore/efl_model_item.eo b/src/lib/ecore/efl_generic_model.eo
index 8543eec..4509027 100644
--- a/src/lib/ecore/efl_model_item.eo
+++ b/src/lib/ecore/efl_generic_model.eo
@@ -1,4 +1,4 @@
1class Efl.Model_Item extends Efl.Model_Loop 1class Efl.Generic_Model extends Efl.Loop_Model
2{ 2{
3 [[ 3 [[
4 Generic model that allows any property to be manually set. 4 Generic model that allows any property to be manually set.
diff --git a/src/lib/ecore/efl_model_loop.c b/src/lib/ecore/efl_loop_model.c
index 3303f96..f04a766 100644
--- a/src/lib/ecore/efl_model_loop.c
+++ b/src/lib/ecore/efl_loop_model.c
@@ -7,11 +7,11 @@
7#include <Ecore.h> 7#include <Ecore.h>
8#include "Eo.h" 8#include "Eo.h"
9 9
10#include "efl_model_loop.eo.h" 10#include "efl_loop_model.eo.h"
11 11
12typedef struct _Efl_Model_Loop_Watcher_Data Efl_Model_Loop_Watcher_Data; 12typedef struct _Efl_Loop_Model_Watcher_Data Efl_Loop_Model_Watcher_Data;
13 13
14struct _Efl_Model_Loop_Watcher_Data 14struct _Efl_Loop_Model_Watcher_Data
15{ 15{
16 const char *property; 16 const char *property;
17 Eina_Promise *p; 17 Eina_Promise *p;
@@ -21,7 +21,7 @@ struct _Efl_Model_Loop_Watcher_Data
21static void _propagate_future(void *data, const Efl_Event *event); 21static void _propagate_future(void *data, const Efl_Event *event);
22 22
23static void 23static void
24_efl_model_loop_wathcer_free(Efl_Model_Loop_Watcher_Data *wd) 24_efl_loop_model_wathcer_free(Efl_Loop_Model_Watcher_Data *wd)
25{ 25{
26 efl_event_callback_del(wd->obj, EFL_MODEL_EVENT_PROPERTIES_CHANGED, 26 efl_event_callback_del(wd->obj, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
27 _propagate_future, wd); 27 _propagate_future, wd);
@@ -36,7 +36,7 @@ _propagate_future(void *data, const Efl_Event *event)
36 const char *property; 36 const char *property;
37 unsigned int i; 37 unsigned int i;
38 Eina_Array_Iterator it; 38 Eina_Array_Iterator it;
39 Efl_Model_Loop_Watcher_Data *wd = data; 39 Efl_Loop_Model_Watcher_Data *wd = data;
40 40
41 EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, it) 41 EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, it)
42 if (property == wd->property || !strcmp(property, wd->property)) 42 if (property == wd->property || !strcmp(property, wd->property))
@@ -60,7 +60,7 @@ _propagate_future(void *data, const Efl_Event *event)
60 } 60 }
61 61
62 eina_value_free(v); 62 eina_value_free(v);
63 _efl_model_loop_wathcer_free(wd); 63 _efl_loop_model_wathcer_free(wd);
64 break ; 64 break ;
65 } 65 }
66} 66}
@@ -68,11 +68,11 @@ _propagate_future(void *data, const Efl_Event *event)
68static void 68static void
69_event_cancel(void *data, const Eina_Promise *dead_ptr EINA_UNUSED) 69_event_cancel(void *data, const Eina_Promise *dead_ptr EINA_UNUSED)
70{ 70{
71 _efl_model_loop_wathcer_free(data); 71 _efl_loop_model_wathcer_free(data);
72} 72}
73 73
74static Eina_Future * 74static Eina_Future *
75_efl_model_loop_efl_model_property_ready_get(Eo *obj, void *pd EINA_UNUSED, const char *property) 75_efl_loop_model_efl_model_property_ready_get(Eo *obj, void *pd EINA_UNUSED, const char *property)
76{ 76{
77 Eina_Value *value = efl_model_property_get(obj, property); 77 Eina_Value *value = efl_model_property_get(obj, property);
78 Eina_Future *f; 78 Eina_Future *f;
@@ -86,7 +86,7 @@ _efl_model_loop_efl_model_property_ready_get(Eo *obj, void *pd EINA_UNUSED, cons
86 86
87 if (err == EAGAIN) 87 if (err == EAGAIN)
88 { 88 {
89 Efl_Model_Loop_Watcher_Data *wd = calloc(1, sizeof (Efl_Model_Loop_Watcher_Data)); 89 Efl_Loop_Model_Watcher_Data *wd = calloc(1, sizeof (Efl_Loop_Model_Watcher_Data));
90 90
91 wd->obj = obj; 91 wd->obj = obj;
92 wd->property = eina_stringshare_add(property); 92 wd->property = eina_stringshare_add(property);
@@ -106,4 +106,4 @@ _efl_model_loop_efl_model_property_ready_get(Eo *obj, void *pd EINA_UNUSED, cons
106 return efl_future_then(obj, f); 106 return efl_future_then(obj, f);
107} 107}
108 108
109#include "efl_model_loop.eo.c" 109#include "efl_loop_model.eo.c"
diff --git a/src/lib/ecore/efl_model_loop.eo b/src/lib/ecore/efl_loop_model.eo
index 8e12b0f..cf11e56 100644
--- a/src/lib/ecore/efl_model_loop.eo
+++ b/src/lib/ecore/efl_loop_model.eo
@@ -1,4 +1,4 @@
1abstract Efl.Model_Loop extends Efl.Loop_Consumer implements Efl.Model 1abstract Efl.Loop_Model extends Efl.Loop_Consumer implements Efl.Model
2{ 2{
3 data: null; 3 data: null;
4 implements { 4 implements {
diff --git a/src/lib/ecore/efl_model_composite_selection.c b/src/lib/ecore/efl_select_model.c
index 3bcd7b4..75b11bd 100644
--- a/src/lib/ecore/efl_model_composite_selection.c
+++ b/src/lib/ecore/efl_select_model.c
@@ -7,15 +7,15 @@
7#include <Ecore.h> 7#include <Ecore.h>
8#include "Eo.h" 8#include "Eo.h"
9 9
10#include "efl_model_composite_selection.eo.h" 10#include "efl_select_model.eo.h"
11#include "efl_model_accessor_view_private.h" 11#include "efl_model_accessor_view_private.h"
12#include "efl_model_composite_private.h" 12#include "efl_composite_model_private.h"
13 13
14typedef struct _Efl_Model_Composite_Selection_Data Efl_Model_Composite_Selection_Data; 14typedef struct _Efl_Select_Model_Data Efl_Select_Model_Data;
15 15
16struct _Efl_Model_Composite_Selection_Data 16struct _Efl_Select_Model_Data
17{ 17{
18 Efl_Model_Composite_Selection_Data *parent; 18 Efl_Select_Model_Data *parent;
19 unsigned long last; 19 unsigned long last;
20 20
21 Eina_Bool exclusive : 1; 21 Eina_Bool exclusive : 1;
@@ -23,20 +23,20 @@ struct _Efl_Model_Composite_Selection_Data
23}; 23};
24 24
25static Eo* 25static Eo*
26_efl_model_composite_selection_efl_object_constructor(Eo *obj, 26_efl_select_model_efl_object_constructor(Eo *obj,
27 Efl_Model_Composite_Selection_Data *pd) 27 Efl_Select_Model_Data *pd EINA_UNUSED)
28{ 28{
29 Eo *parent; 29 Eo *parent;
30 30
31 obj = efl_constructor(efl_super(obj, EFL_MODEL_COMPOSITE_SELECTION_CLASS)); 31 obj = efl_constructor(efl_super(obj, EFL_SELECT_MODEL_CLASS));
32 32
33 efl_model_composite_boolean_add(obj, "selected", EINA_FALSE); 33 efl_boolean_model_boolean_add(obj, "selected", EINA_FALSE);
34 34
35 pd->last = -1; 35 pd->last = -1;
36 36
37 parent = efl_parent_get(obj); 37 parent = efl_parent_get(obj);
38 if (efl_isa(parent, EFL_MODEL_COMPOSITE_SELECTION_CLASS)) 38 if (efl_isa(parent, EFL_SELECT_MODEL_CLASS))
39 pd->parent = efl_data_scope_get(parent, EFL_MODEL_COMPOSITE_SELECTION_CLASS); 39 pd->parent = efl_data_scope_get(parent, EFL_SELECT_MODEL_CLASS);
40 40
41 return obj; 41 return obj;
42} 42}
@@ -44,7 +44,7 @@ _efl_model_composite_selection_efl_object_constructor(Eo *obj,
44static Eina_Value 44static Eina_Value
45_commit_change(Eo *child, void *data EINA_UNUSED, const Eina_Value v) 45_commit_change(Eo *child, void *data EINA_UNUSED, const Eina_Value v)
46{ 46{
47 Efl_Model_Composite_Selection_Data *pd; 47 Efl_Select_Model_Data *pd;
48 Eina_Value *selected = NULL; 48 Eina_Value *selected = NULL;
49 Eina_Bool selflag = EINA_FALSE; 49 Eina_Bool selflag = EINA_FALSE;
50 50
@@ -53,7 +53,7 @@ _commit_change(Eo *child, void *data EINA_UNUSED, const Eina_Value v)
53 53
54 selected = efl_model_property_get(child, "selected"); 54 selected = efl_model_property_get(child, "selected");
55 55
56 pd = efl_data_scope_get(efl_parent_get(child), EFL_MODEL_COMPOSITE_SELECTION_CLASS); 56 pd = efl_data_scope_get(efl_parent_get(child), EFL_SELECT_MODEL_CLASS);
57 if (!pd) goto on_error; 57 if (!pd) goto on_error;
58 58
59 eina_value_bool_get(selected, &selflag); 59 eina_value_bool_get(selected, &selflag);
@@ -61,21 +61,21 @@ _commit_change(Eo *child, void *data EINA_UNUSED, const Eina_Value v)
61 { 61 {
62 // select case 62 // select case
63 pd->none = EINA_FALSE; 63 pd->none = EINA_FALSE;
64 pd->last = efl_model_composite_index_get(child); 64 pd->last = efl_composite_model_index_get(child);
65 efl_event_callback_call(child, EFL_MODEL_COMPOSITE_SELECTION_EVENT_SELECTED, child); 65 efl_event_callback_call(child, EFL_SELECT_MODEL_EVENT_SELECTED, child);
66 } 66 }
67 else 67 else
68 { 68 {
69 // unselect case 69 // unselect case
70 unsigned long last; 70 unsigned long last;
71 71
72 last = efl_model_composite_index_get(child); 72 last = efl_composite_model_index_get(child);
73 if (pd->last == last) 73 if (pd->last == last)
74 { 74 {
75 pd->last = 0; 75 pd->last = 0;
76 pd->none = EINA_TRUE; 76 pd->none = EINA_TRUE;
77 } 77 }
78 efl_event_callback_call(child, EFL_MODEL_COMPOSITE_SELECTION_EVENT_UNSELECTED, child); 78 efl_event_callback_call(child, EFL_SELECT_MODEL_EVENT_UNSELECTED, child);
79 } 79 }
80 80
81 on_error: 81 on_error:
@@ -220,7 +220,7 @@ _untangle_error(void *data, Eina_Error err)
220 // where we could end up here. 220 // where we could end up here.
221 Eina_Error *error = calloc(1, sizeof (Eina_Error)); 221 Eina_Error *error = calloc(1, sizeof (Eina_Error));
222 222
223 f = efl_model_property_set(efl_super(child, EFL_MODEL_COMPOSITE_SELECTION_CLASS), 223 f = efl_model_property_set(efl_super(child, EFL_SELECT_MODEL_CLASS),
224 "selected", eina_value_bool_new(EINA_FALSE)); 224 "selected", eina_value_bool_new(EINA_FALSE));
225 // Once this is done, we need to repropagate the error 225 // Once this is done, we need to repropagate the error
226 *error = err; 226 *error = err;
@@ -230,19 +230,19 @@ _untangle_error(void *data, Eina_Error err)
230} 230}
231 231
232static Eina_Iterator * 232static Eina_Iterator *
233_efl_model_composite_selection_efl_model_properties_get(const Eo *obj, 233_efl_select_model_efl_model_properties_get(const Eo *obj,
234 Efl_Model_Composite_Selection_Data *pd EINA_UNUSED) 234 Efl_Select_Model_Data *pd EINA_UNUSED)
235{ 235{
236 EFL_MODEL_COMPOSITE_PROPERTIES_SUPER(props, 236 EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props,
237 obj, EFL_MODEL_COMPOSITE_SELECTION_CLASS, 237 obj, EFL_SELECT_MODEL_CLASS,
238 NULL, 238 NULL,
239 "self.selected", "child.selected", "exclusive"); 239 "self.selected", "child.selected", "exclusive");
240 return props; 240 return props;
241} 241}
242 242
243static Eina_Future * 243static Eina_Future *
244_efl_model_composite_selection_efl_model_property_set(Eo *obj, 244_efl_select_model_efl_model_property_set(Eo *obj,
245 Efl_Model_Composite_Selection_Data *pd, 245 Efl_Select_Model_Data *pd,
246 const char *property, Eina_Value *value) 246 const char *property, Eina_Value *value)
247{ 247{
248 Eina_Value vf = EINA_VALUE_EMPTY; 248 Eina_Value vf = EINA_VALUE_EMPTY;
@@ -284,7 +284,7 @@ _efl_model_composite_selection_efl_model_property_set(Eo *obj,
284 Eina_Value *prev; 284 Eina_Value *prev;
285 Eina_Future *chain; 285 Eina_Future *chain;
286 286
287 prev = efl_model_property_get(efl_super(obj, EFL_MODEL_COMPOSITE_SELECTION_CLASS), "selected"); 287 prev = efl_model_property_get(efl_super(obj, EFL_SELECT_MODEL_CLASS), "selected");
288 success = eina_value_bool_get(prev, &prevflag); 288 success = eina_value_bool_get(prev, &prevflag);
289 success &= eina_value_bool_convert(value, &newflag); 289 success &= eina_value_bool_convert(value, &newflag);
290 290
@@ -297,7 +297,7 @@ _efl_model_composite_selection_efl_model_property_set(Eo *obj,
297 exclusive = pd->parent->exclusive; 297 exclusive = pd->parent->exclusive;
298 298
299 // First store the new value in the boolean model we inherit from 299 // First store the new value in the boolean model we inherit from
300 chain = efl_model_property_set(efl_super(obj, EFL_MODEL_COMPOSITE_SELECTION_CLASS), 300 chain = efl_model_property_set(efl_super(obj, EFL_SELECT_MODEL_CLASS),
301 "selected", value); 301 "selected", value);
302 302
303 // Now act ! 303 // Now act !
@@ -310,7 +310,7 @@ _efl_model_composite_selection_efl_model_property_set(Eo *obj,
310 { 310 {
311 unsigned int i; 311 unsigned int i;
312 312
313 i = efl_model_composite_index_get(obj); 313 i = efl_composite_model_index_get(obj);
314 if (pd->parent->last == i && !newflag) 314 if (pd->parent->last == i && !newflag)
315 pd->parent->none = EINA_TRUE; 315 pd->parent->none = EINA_TRUE;
316 } 316 }
@@ -340,12 +340,12 @@ _efl_model_composite_selection_efl_model_property_set(Eo *obj,
340 return efl_future_then(obj, chain, .success = _commit_change); 340 return efl_future_then(obj, chain, .success = _commit_change);
341 } 341 }
342 342
343 return efl_model_property_set(efl_super(obj, EFL_MODEL_COMPOSITE_SELECTION_CLASS), 343 return efl_model_property_set(efl_super(obj, EFL_SELECT_MODEL_CLASS),
344 property, value); 344 property, value);
345} 345}
346 346
347static Eina_Value * 347static Eina_Value *
348_efl_model_composite_selection_efl_model_property_get(const Eo *obj, Efl_Model_Composite_Selection_Data *pd, const char *property) 348_efl_select_model_efl_model_property_get(const Eo *obj, Efl_Select_Model_Data *pd, const char *property)
349{ 349{
350 if (!strcmp("exclusive", property)) 350 if (!strcmp("exclusive", property))
351 return eina_value_bool_new(pd->exclusive); 351 return eina_value_bool_new(pd->exclusive);
@@ -360,10 +360,10 @@ _efl_model_composite_selection_efl_model_property_get(const Eo *obj, Efl_Model_C
360 // Redirect to are we ourself selected 360 // Redirect to are we ourself selected
361 if (pd->parent && !strcmp("self.selected", property)) 361 if (pd->parent && !strcmp("self.selected", property))
362 { 362 {
363 return efl_model_property_get(efl_super(obj, EFL_MODEL_COMPOSITE_SELECTION_CLASS), "selected"); 363 return efl_model_property_get(efl_super(obj, EFL_SELECT_MODEL_CLASS), "selected");
364 } 364 }
365 365
366 return efl_model_property_get(efl_super(obj, EFL_MODEL_COMPOSITE_SELECTION_CLASS), property); 366 return efl_model_property_get(efl_super(obj, EFL_SELECT_MODEL_CLASS), property);
367} 367}
368 368
369#include "efl_model_composite_selection.eo.c" 369#include "efl_select_model.eo.c"
diff --git a/src/lib/ecore/efl_model_composite_selection.eo b/src/lib/ecore/efl_select_model.eo
index 699154a..3300abc 100644
--- a/src/lib/ecore/efl_model_composite_selection.eo
+++ b/src/lib/ecore/efl_select_model.eo
@@ -1,6 +1,6 @@
1class Efl.Model_Composite_Selection extends Efl.Model_Composite_Boolean 1class Efl.Select_Model extends Efl.Boolean_Model
2{ 2{
3 [[Efl model composite selection class]] 3 [[Efl select model class]]
4 implements { 4 implements {
5 Efl.Object.constructor; 5 Efl.Object.constructor;
6 Efl.Model.property { get; set; } 6 Efl.Model.property { get; set; }
diff --git a/src/lib/ecore/efl_model_view.c b/src/lib/ecore/efl_view_model.c
index 855eb17..76f2405 100644
--- a/src/lib/ecore/efl_model_view.c
+++ b/src/lib/ecore/efl_view_model.c
@@ -9,22 +9,22 @@
9 9
10#include "ecore_internal.h" 10#include "ecore_internal.h"
11 11
12#include "efl_model_composite_private.h" 12#include "efl_composite_model_private.h"
13 13
14typedef struct _Efl_Model_View_Data Efl_Model_View_Data; 14typedef struct _Efl_View_Model_Data Efl_View_Model_Data;
15typedef struct _Efl_Model_View_Bind Efl_Model_View_Bind; 15typedef struct _Efl_View_Model_Bind Efl_View_Model_Bind;
16typedef struct _Efl_Model_View_Logic Efl_Model_View_Logic; 16typedef struct _Efl_View_Model_Logic Efl_View_Model_Logic;
17typedef struct _Efl_Model_View_Property_Ref Efl_Model_View_Property_Ref; 17typedef struct _Efl_View_Model_Property_Ref Efl_View_Model_Property_Ref;
18 18
19struct _Efl_Model_View_Data 19struct _Efl_View_Model_Data
20{ 20{
21 // FIXME: If parent is set, always access parent... recursively? 21 // FIXME: If parent is set, always access parent... recursively?
22 Efl_Model_View_Data *parent; 22 Efl_View_Model_Data *parent;
23 23
24 Eina_Hash *bound; // Stringhash of Efl_Model_View_Bind 24 Eina_Hash *bound; // Stringhash of Efl_View_Model_Bind
25 Eina_Hash *logics; // Stringhash of Efl_Model_View_Logic 25 Eina_Hash *logics; // Stringhash of Efl_View_Model_Logic
26 26
27 Eina_Hash *deduplication; // Stringhash of Efl_Model_View_Property_Ref 27 Eina_Hash *deduplication; // Stringhash of Efl_View_Model_Property_Ref
28 28
29 struct { 29 struct {
30 Eina_Bool property_changed : 1; 30 Eina_Bool property_changed : 1;
@@ -35,21 +35,21 @@ struct _Efl_Model_View_Data
35 Eina_Bool children_bind : 1; // Define if child object should be automatically binded 35 Eina_Bool children_bind : 1; // Define if child object should be automatically binded
36}; 36};
37 37
38struct _Efl_Model_View_Bind 38struct _Efl_View_Model_Bind
39{ 39{
40 Eina_Stringshare *source; 40 Eina_Stringshare *source;
41 Eina_List *destinations; 41 Eina_List *destinations;
42}; 42};
43 43
44struct _Efl_Model_View_Logic 44struct _Efl_View_Model_Logic
45{ 45{
46 struct { 46 struct {
47 EflModelViewPropertyGet fct; 47 EflViewModelPropertyGet fct;
48 Eina_Free_Cb free_cb; 48 Eina_Free_Cb free_cb;
49 void *data; 49 void *data;
50 } get; 50 } get;
51 struct { 51 struct {
52 EflModelViewPropertySet fct; 52 EflViewModelPropertySet fct;
53 Eina_Free_Cb free_cb; 53 Eina_Free_Cb free_cb;
54 void *data; 54 void *data;
55 } set; 55 } set;
@@ -59,7 +59,7 @@ struct _Efl_Model_View_Logic
59 Eina_Stringshare *property; 59 Eina_Stringshare *property;
60}; 60};
61 61
62struct _Efl_Model_View_Property_Ref 62struct _Efl_View_Model_Property_Ref
63{ 63{
64 EINA_REFCOUNT; 64 EINA_REFCOUNT;
65 Eina_Stringshare *property; 65 Eina_Stringshare *property;
@@ -68,21 +68,21 @@ struct _Efl_Model_View_Property_Ref
68static void 68static void
69_ref_free(void *data) 69_ref_free(void *data)
70{ 70{
71 Efl_Model_View_Property_Ref *r = data; 71 Efl_View_Model_Property_Ref *r = data;
72 72
73 eina_stringshare_del(r->property); 73 eina_stringshare_del(r->property);
74 free(r); 74 free(r);
75} 75}
76 76
77static void 77static void
78_ref_add(Efl_Model_View_Data *pd, Eina_Stringshare *property) 78_ref_add(Efl_View_Model_Data *pd, Eina_Stringshare *property)
79{ 79{
80 Efl_Model_View_Property_Ref *r; 80 Efl_View_Model_Property_Ref *r;
81 81
82 r = eina_hash_find(pd->deduplication, property); 82 r = eina_hash_find(pd->deduplication, property);
83 if (!r) 83 if (!r)
84 { 84 {
85 r = calloc(1, sizeof (Efl_Model_View_Property_Ref)); 85 r = calloc(1, sizeof (Efl_View_Model_Property_Ref));
86 if (!r) return ; 86 if (!r) return ;
87 r->property = eina_stringshare_ref(property); 87 r->property = eina_stringshare_ref(property);
88 88
@@ -93,9 +93,9 @@ _ref_add(Efl_Model_View_Data *pd, Eina_Stringshare *property)
93} 93}
94 94
95static void 95static void
96_ref_del(Efl_Model_View_Data *pd, Eina_Stringshare *property) 96_ref_del(Efl_View_Model_Data *pd, Eina_Stringshare *property)
97{ 97{
98 Efl_Model_View_Property_Ref *r; 98 Efl_View_Model_Property_Ref *r;
99 99
100 r = eina_hash_find(pd->deduplication, property); 100 r = eina_hash_find(pd->deduplication, property);
101 if (!r) return ; 101 if (!r) return ;
@@ -107,14 +107,14 @@ _ref_del(Efl_Model_View_Data *pd, Eina_Stringshare *property)
107static void 107static void
108_logic_free(void *data) 108_logic_free(void *data)
109{ 109{
110 Efl_Model_View_Logic *logic = data; 110 Efl_View_Model_Logic *logic = data;
111 Eina_Stringshare *source; 111 Eina_Stringshare *source;
112 112
113 if (logic->get.free_cb) logic->get.free_cb(logic->get.data); 113 if (logic->get.free_cb) logic->get.free_cb(logic->get.data);
114 if (logic->set.free_cb) logic->set.free_cb(logic->set.data); 114 if (logic->set.free_cb) logic->set.free_cb(logic->set.data);
115 EINA_LIST_FREE(logic->sources, source) 115 EINA_LIST_FREE(logic->sources, source)
116 { 116 {
117 efl_model_view_property_unbind(logic->object, source, logic->property); 117 efl_view_model_property_unbind(logic->object, source, logic->property);
118 eina_stringshare_del(source); 118 eina_stringshare_del(source);
119 } 119 }
120 eina_stringshare_del(logic->property); 120 eina_stringshare_del(logic->property);
@@ -122,30 +122,30 @@ _logic_free(void *data)
122} 122}
123 123
124static Eina_Value * 124static Eina_Value *
125_efl_model_view_property_dummy_get(void *data EINA_UNUSED, 125_efl_view_model_property_dummy_get(void *data EINA_UNUSED,
126 const Efl_Model_View *model_view EINA_UNUSED, 126 const Efl_View_Model *view_model EINA_UNUSED,
127 Eina_Stringshare *property EINA_UNUSED) 127 Eina_Stringshare *property EINA_UNUSED)
128{ 128{
129 return eina_value_error_new(EFL_MODEL_ERROR_NOT_SUPPORTED); 129 return eina_value_error_new(EFL_MODEL_ERROR_NOT_SUPPORTED);
130} 130}
131 131
132static Eina_Future * 132static Eina_Future *
133_efl_model_view_property_dummy_set(void *data EINA_UNUSED, 133_efl_view_model_property_dummy_set(void *data EINA_UNUSED,
134 Efl_Model_View *model_view, 134 Efl_View_Model *view_model,
135 Eina_Stringshare *property EINA_UNUSED, 135 Eina_Stringshare *property EINA_UNUSED,
136 Eina_Value *value EINA_UNUSED) 136 Eina_Value *value EINA_UNUSED)
137{ 137{
138 return efl_loop_future_rejected(model_view, EFL_MODEL_ERROR_READ_ONLY); 138 return efl_loop_future_rejected(view_model, EFL_MODEL_ERROR_READ_ONLY);
139} 139}
140 140
141static Eina_Error 141static Eina_Error
142_efl_model_view_property_logic_add(Eo *obj, Efl_Model_View_Data *pd, 142_efl_view_model_property_logic_add(Eo *obj, Efl_View_Model_Data *pd,
143 const char *property, 143 const char *property,
144 void *get_data, EflModelViewPropertyGet get, Eina_Free_Cb get_free_cb, 144 void *get_data, EflViewModelPropertyGet get, Eina_Free_Cb get_free_cb,
145 void *set_data, EflModelViewPropertySet set, Eina_Free_Cb set_free_cb, 145 void *set_data, EflViewModelPropertySet set, Eina_Free_Cb set_free_cb,
146 Eina_Iterator *bound) 146 Eina_Iterator *bound)
147{ 147{
148 Efl_Model_View_Logic *logic; 148 Efl_View_Model_Logic *logic;
149 Eina_Stringshare *prop; 149 Eina_Stringshare *prop;
150 const char *source; 150 const char *source;
151 151
@@ -157,15 +157,15 @@ _efl_model_view_property_logic_add(Eo *obj, Efl_Model_View_Data *pd,
157 return EFL_MODEL_ERROR_INCORRECT_VALUE; 157 return EFL_MODEL_ERROR_INCORRECT_VALUE;
158 } 158 }
159 159
160 logic = calloc(1, sizeof (Efl_Model_View_Logic)); 160 logic = calloc(1, sizeof (Efl_View_Model_Logic));
161 if (!logic) return ENOMEM; 161 if (!logic) return ENOMEM;
162 162
163 logic->object = obj; 163 logic->object = obj;
164 logic->property = prop; 164 logic->property = prop;
165 logic->get.fct = get ? get : _efl_model_view_property_dummy_get; 165 logic->get.fct = get ? get : _efl_view_model_property_dummy_get;
166 logic->get.free_cb = get_free_cb; 166 logic->get.free_cb = get_free_cb;
167 logic->get.data = get_data; 167 logic->get.data = get_data;
168 logic->set.fct = set ? set : _efl_model_view_property_dummy_set; 168 logic->set.fct = set ? set : _efl_view_model_property_dummy_set;
169 logic->set.free_cb = set_free_cb; 169 logic->set.free_cb = set_free_cb;
170 logic->set.data = set_data; 170 logic->set.data = set_data;
171 171
@@ -174,17 +174,17 @@ _efl_model_view_property_logic_add(Eo *obj, Efl_Model_View_Data *pd,
174 EINA_ITERATOR_FOREACH(bound, source) 174 EINA_ITERATOR_FOREACH(bound, source)
175 { 175 {
176 logic->sources = eina_list_append(logic->sources, eina_stringshare_add(source)); 176 logic->sources = eina_list_append(logic->sources, eina_stringshare_add(source));
177 efl_model_view_property_bind(obj, source, property); 177 efl_view_model_property_bind(obj, source, property);
178 } 178 }
179 179
180 return 0; 180 return 0;
181} 181}
182 182
183static Eina_Error 183static Eina_Error
184_efl_model_view_property_logic_del(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd, 184_efl_view_model_property_logic_del(Eo *obj EINA_UNUSED, Efl_View_Model_Data *pd,
185 const char *property) 185 const char *property)
186{ 186{
187 Efl_Model_View_Logic *logic; 187 Efl_View_Model_Logic *logic;
188 188
189 logic = eina_hash_find(pd->logics, property); 189 logic = eina_hash_find(pd->logics, property);
190 if (!logic) return EFL_MODEL_ERROR_INCORRECT_VALUE; 190 if (!logic) return EFL_MODEL_ERROR_INCORRECT_VALUE;
@@ -193,10 +193,10 @@ _efl_model_view_property_logic_del(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd,
193} 193}
194 194
195static void 195static void
196_efl_model_view_property_bind(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd, 196_efl_view_model_property_bind(Eo *obj EINA_UNUSED, Efl_View_Model_Data *pd,
197 const char *source, const char *destination) 197 const char *source, const char *destination)
198{ 198{
199 Efl_Model_View_Bind *bind; 199 Efl_View_Model_Bind *bind;
200 Eina_Stringshare *src; 200 Eina_Stringshare *src;
201 Eina_Stringshare *dst; 201 Eina_Stringshare *dst;
202 202
@@ -206,7 +206,7 @@ _efl_model_view_property_bind(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd,
206 bind = eina_hash_find(pd->bound, src); 206 bind = eina_hash_find(pd->bound, src);
207 if (!bind) 207 if (!bind)
208 { 208 {
209 bind = calloc(1, sizeof (Efl_Model_View_Bind)); 209 bind = calloc(1, sizeof (Efl_View_Model_Bind));
210 if (!bind) goto on_error; 210 if (!bind) goto on_error;
211 bind->source = eina_stringshare_ref(src); 211 bind->source = eina_stringshare_ref(src);
212 212
@@ -222,10 +222,10 @@ _efl_model_view_property_bind(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd,
222} 222}
223 223
224static void 224static void
225_efl_model_view_property_unbind(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd, 225_efl_view_model_property_unbind(Eo *obj EINA_UNUSED, Efl_View_Model_Data *pd,
226 const char *source, const char *destination) 226 const char *source, const char *destination)
227{ 227{
228 Efl_Model_View_Bind *bind; 228 Efl_View_Model_Bind *bind;
229 Eina_Stringshare *src; 229 Eina_Stringshare *src;
230 Eina_Stringshare *dst; 230 Eina_Stringshare *dst;
231 Eina_Stringshare *cmp; 231 Eina_Stringshare *cmp;
@@ -258,7 +258,7 @@ _efl_model_view_property_unbind(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd,
258static void 258static void
259_bind_free(void *data) 259_bind_free(void *data)
260{ 260{
261 Efl_Model_View_Bind *bind = data; 261 Efl_View_Model_Bind *bind = data;
262 Eina_Stringshare *dst; 262 Eina_Stringshare *dst;
263 263
264 eina_stringshare_del(bind->source); 264 eina_stringshare_del(bind->source);
@@ -269,20 +269,20 @@ _bind_free(void *data)
269 free(bind); 269 free(bind);
270} 270}
271 271
272static Efl_Model_View_Bind * 272static Efl_View_Model_Bind *
273_efl_model_view_property_bind_lookup(Efl_Model_View_Data *pd, Eina_Stringshare *src) 273_efl_view_model_property_bind_lookup(Efl_View_Model_Data *pd, Eina_Stringshare *src)
274{ 274{
275 Efl_Model_View_Bind *bind; 275 Efl_View_Model_Bind *bind;
276 276
277 bind = eina_hash_find(pd->bound, src); 277 bind = eina_hash_find(pd->bound, src);
278 if (!bind && pd->parent) return _efl_model_view_property_bind_lookup(pd->parent, src); 278 if (!bind && pd->parent) return _efl_view_model_property_bind_lookup(pd->parent, src);
279 return bind; 279 return bind;
280} 280}
281 281
282static void 282static void
283_efl_model_view_property_changed(void *data, const Efl_Event *event) 283_efl_view_model_property_changed(void *data, const Efl_Event *event)
284{ 284{
285 Efl_Model_View_Data *pd = data; 285 Efl_View_Model_Data *pd = data;
286 Efl_Model_Property_Event *ev = event->info; 286 Efl_Model_Property_Event *ev = event->info;
287 Efl_Model_Property_Event nev = { 0 }; 287 Efl_Model_Property_Event nev = { 0 };
288 const char *property; 288 const char *property;
@@ -300,12 +300,12 @@ _efl_model_view_property_changed(void *data, const Efl_Event *event)
300 300
301 EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, iterator) 301 EINA_ARRAY_ITER_NEXT(ev->changed_properties, i, property, iterator)
302 { 302 {
303 Efl_Model_View_Bind *bind; 303 Efl_View_Model_Bind *bind;
304 304
305 eina_array_push(nev.changed_properties, property); 305 eina_array_push(nev.changed_properties, property);
306 306
307 src = eina_stringshare_add(property); 307 src = eina_stringshare_add(property);
308 bind = _efl_model_view_property_bind_lookup(pd, src); 308 bind = _efl_view_model_property_bind_lookup(pd, src);
309 if (bind) 309 if (bind)
310 { 310 {
311 Eina_Stringshare *dest; 311 Eina_Stringshare *dest;
@@ -324,7 +324,7 @@ _efl_model_view_property_changed(void *data, const Efl_Event *event)
324} 324}
325 325
326static void 326static void
327_efl_model_view_children_bind_set(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd, Eina_Bool enable) 327_efl_view_model_children_bind_set(Eo *obj EINA_UNUSED, Efl_View_Model_Data *pd, Eina_Bool enable)
328{ 328{
329 if (pd->finalized) return; 329 if (pd->finalized) return;
330 330
@@ -332,46 +332,46 @@ _efl_model_view_children_bind_set(Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd,
332} 332}
333 333
334static Eina_Bool 334static Eina_Bool
335_efl_model_view_children_bind_get(const Eo *obj EINA_UNUSED, Efl_Model_View_Data *pd) 335_efl_view_model_children_bind_get(const Eo *obj EINA_UNUSED, Efl_View_Model_Data *pd)
336{ 336{
337 return pd->children_bind; 337 return pd->children_bind;
338} 338}
339 339
340static void 340static void
341_efl_model_view_parent_data(Efl_Model_View *child, Efl_Model_View_Data *ppd) 341_efl_view_model_parent_data(Efl_View_Model *child, Efl_View_Model_Data *ppd)
342{ 342{
343 Efl_Model_View_Data *cpd; 343 Efl_View_Model_Data *cpd;
344 344
345 cpd = efl_data_scope_get(child, EFL_MODEL_VIEW_CLASS); 345 cpd = efl_data_scope_get(child, EFL_VIEW_MODEL_CLASS);
346 cpd->parent = ppd; 346 cpd->parent = ppd;
347 cpd->propagating = ppd->propagating; 347 cpd->propagating = ppd->propagating;
348} 348}
349 349
350static Efl_Model_View * 350static Efl_View_Model *
351_efl_model_view_child_lookup(Efl_Model_View_Data *pd, Efl_Object *parent, Efl_Model *view) 351_efl_view_model_child_lookup(Efl_View_Model_Data *pd, Efl_Object *parent, Efl_Model *view)
352{ 352{
353 Efl_Model_View *co; 353 Efl_View_Model *co;
354 354
355 co = efl_key_wref_get(view, "_efl.model_view"); 355 co = efl_key_wref_get(view, "_efl.view_model");
356 if (co) return co; 356 if (co) return co;
357 357
358 co = efl_add(EFL_MODEL_VIEW_CLASS, parent, 358 co = efl_add(EFL_VIEW_MODEL_CLASS, parent,
359 efl_ui_view_model_set(efl_added, view), 359 efl_ui_view_model_set(efl_added, view),
360 _efl_model_view_parent_data(efl_added, pd)); 360 _efl_view_model_parent_data(efl_added, pd));
361 if (!co) return NULL; 361 if (!co) return NULL;
362 362
363 efl_key_wref_set(view, "_efl.model_view", co); 363 efl_key_wref_set(view, "_efl.view_model", co);
364 364
365 return co; 365 return co;
366} 366}
367 367
368static void 368static void
369_efl_model_view_child_added(void *data, const Efl_Event *event) 369_efl_view_model_child_added(void *data, const Efl_Event *event)
370{ 370{
371 Efl_Model_Children_Event *ev = event->info; 371 Efl_Model_Children_Event *ev = event->info;
372 Efl_Model_Children_Event nevt = { 0 }; 372 Efl_Model_Children_Event nevt = { 0 };
373 Efl_Model_View_Data *pd = data; 373 Efl_View_Model_Data *pd = data;
374 Efl_Model_View *co; 374 Efl_View_Model *co;
375 375
376 if (pd->propagating.child_added) return ; 376 if (pd->propagating.child_added) return ;
377 if (!pd->children_bind) return; 377 if (!pd->children_bind) return;
@@ -382,7 +382,7 @@ _efl_model_view_child_added(void *data, const Efl_Event *event)
382 // Our strategy is to rebuild a new Child_Add and cancel the current one. 382 // Our strategy is to rebuild a new Child_Add and cancel the current one.
383 efl_event_callback_stop(event->object); 383 efl_event_callback_stop(event->object);
384 384
385 co = _efl_model_view_child_lookup(pd, event->object, ev->child); 385 co = _efl_view_model_child_lookup(pd, event->object, ev->child);
386 if (!co) return; 386 if (!co) return;
387 387
388 nevt.index = ev->index; 388 nevt.index = ev->index;
@@ -394,12 +394,12 @@ _efl_model_view_child_added(void *data, const Efl_Event *event)
394} 394}
395 395
396static void 396static void
397_efl_model_view_child_removed(void *data, const Efl_Event *event) 397_efl_view_model_child_removed(void *data, const Efl_Event *event)
398{ 398{
399 Efl_Model_Children_Event *ev = event->info; 399 Efl_Model_Children_Event *ev = event->info;
400 Efl_Model_Children_Event nevt = { 0 }; 400 Efl_Model_Children_Event nevt = { 0 };
401 Efl_Model_View_Data *pd = data; 401 Efl_View_Model_Data *pd = data;
402 Efl_Model_View *co; 402 Efl_View_Model *co;
403 403
404 if (pd->propagating.child_removed) return ; 404 if (pd->propagating.child_removed) return ;
405 if (!pd->children_bind) return; 405 if (!pd->children_bind) return;
@@ -410,7 +410,7 @@ _efl_model_view_child_removed(void *data, const Efl_Event *event)
410 // Our strategy is to rebuild a new Child_Add and cancel the current one. 410 // Our strategy is to rebuild a new Child_Add and cancel the current one.
411 efl_event_callback_stop(event->object); 411 efl_event_callback_stop(event->object);
412 412
413 co = _efl_model_view_child_lookup(pd, event->object, ev->child); 413 co = _efl_view_model_child_lookup(pd, event->object, ev->child);
414 if (!co) return; 414 if (!co) return;
415 415
416 nevt.index = ev->index; 416 nevt.index = ev->index;
@@ -418,44 +418,44 @@ _efl_model_view_child_removed(void *data, const Efl_Event *event)
418 418
419 efl_event_callback_call(event->object, EFL_MODEL_EVENT_CHILD_REMOVED, &nevt); 419 efl_event_callback_call(event->object, EFL_MODEL_EVENT_CHILD_REMOVED, &nevt);
420 420
421 // The object is being destroyed, there is no point in us keeping the ModelView proxy alive. 421 // The object is being destroyed, there is no point in us keeping the ViewModel proxy alive.
422 efl_del(co); 422 efl_del(co);
423 423
424 pd->propagating.child_removed = EINA_FALSE; 424 pd->propagating.child_removed = EINA_FALSE;
425} 425}
426 426
427EFL_CALLBACKS_ARRAY_DEFINE(efl_model_view_intercept, 427EFL_CALLBACKS_ARRAY_DEFINE(efl_view_model_intercept,
428 { EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_model_view_property_changed }, 428 { EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_view_model_property_changed },
429 { EFL_MODEL_EVENT_CHILD_ADDED, _efl_model_view_child_added }, 429 { EFL_MODEL_EVENT_CHILD_ADDED, _efl_view_model_child_added },
430 { EFL_MODEL_EVENT_CHILD_REMOVED, _efl_model_view_child_removed }) 430 { EFL_MODEL_EVENT_CHILD_REMOVED, _efl_view_model_child_removed })
431 431
432static Efl_Object * 432static Efl_Object *
433_efl_model_view_efl_object_constructor(Eo *obj, Efl_Model_View_Data *pd) 433_efl_view_model_efl_object_constructor(Eo *obj, Efl_View_Model_Data *pd)
434{ 434{
435 obj = efl_constructor(efl_super(obj, EFL_MODEL_VIEW_CLASS)); 435 obj = efl_constructor(efl_super(obj, EFL_VIEW_MODEL_CLASS));
436 436
437 pd->children_bind = EINA_TRUE; 437 pd->children_bind = EINA_TRUE;
438 pd->bound = eina_hash_stringshared_new(_bind_free); 438 pd->bound = eina_hash_stringshared_new(_bind_free);
439 pd->logics = eina_hash_stringshared_new(_logic_free); 439 pd->logics = eina_hash_stringshared_new(_logic_free);
440 pd->deduplication = eina_hash_stringshared_new(_ref_free); 440 pd->deduplication = eina_hash_stringshared_new(_ref_free);
441 441
442 efl_event_callback_array_priority_add(obj, efl_model_view_intercept(), EFL_CALLBACK_PRIORITY_BEFORE, pd); 442 efl_event_callback_array_priority_add(obj, efl_view_model_intercept(), EFL_CALLBACK_PRIORITY_BEFORE, pd);
443 443
444 return obj; 444 return obj;
445} 445}
446 446
447static Efl_Object * 447static Efl_Object *
448_efl_model_view_efl_object_finalize(Eo *obj, Efl_Model_View_Data *pd) 448_efl_view_model_efl_object_finalize(Eo *obj, Efl_View_Model_Data *pd)
449{ 449{
450 pd->finalized = EINA_TRUE; 450 pd->finalized = EINA_TRUE;
451 451
452 return efl_finalize(efl_super(obj, EFL_MODEL_VIEW_CLASS)); 452 return efl_finalize(efl_super(obj, EFL_VIEW_MODEL_CLASS));
453} 453}
454 454
455static void 455static void
456_efl_model_view_efl_object_destructor(Eo *obj, Efl_Model_View_Data *pd) 456_efl_view_model_efl_object_destructor(Eo *obj, Efl_View_Model_Data *pd)
457{ 457{
458 efl_event_callback_array_del(obj, efl_model_view_intercept(), pd); 458 efl_event_callback_array_del(obj, efl_view_model_intercept(), pd);
459 459
460 eina_hash_free(pd->bound); 460 eina_hash_free(pd->bound);
461 pd->bound = NULL; 461 pd->bound = NULL;
@@ -463,78 +463,78 @@ _efl_model_view_efl_object_destructor(Eo *obj, Efl_Model_View_Data *pd)
463 eina_hash_free(pd->logics); 463 eina_hash_free(pd->logics);
464 pd->logics = NULL; 464 pd->logics = NULL;
465 465
466 efl_destructor(efl_super(obj, EFL_MODEL_VIEW_CLASS)); 466 efl_destructor(efl_super(obj, EFL_VIEW_MODEL_CLASS));
467} 467}
468 468
469static Efl_Model_View_Logic * 469static Efl_View_Model_Logic *
470_efl_model_view_property_logic_lookup(Efl_Model_View_Data *pd, Eina_Stringshare *property) 470_efl_view_model_property_logic_lookup(Efl_View_Model_Data *pd, Eina_Stringshare *property)
471{ 471{
472 Efl_Model_View_Logic *logic; 472 Efl_View_Model_Logic *logic;
473 473
474 if (!pd) return NULL; 474 if (!pd) return NULL;
475 logic = eina_hash_find(pd->logics, property); 475 logic = eina_hash_find(pd->logics, property);
476 if (!logic) return _efl_model_view_property_logic_lookup(pd->parent, property); 476 if (!logic) return _efl_view_model_property_logic_lookup(pd->parent, property);
477 return logic; 477 return logic;
478} 478}
479 479
480static Eina_Future * 480static Eina_Future *
481_efl_model_view_efl_model_property_set(Eo *obj, Efl_Model_View_Data *pd, 481_efl_view_model_efl_model_property_set(Eo *obj, Efl_View_Model_Data *pd,
482 const char *property, Eina_Value *value) 482 const char *property, Eina_Value *value)
483{ 483{
484 Efl_Model_View_Logic *logic; 484 Efl_View_Model_Logic *logic;
485 Eina_Stringshare *prop; 485 Eina_Stringshare *prop;
486 Eina_Future *f; 486 Eina_Future *f;
487 487
488 prop = eina_stringshare_add(property); 488 prop = eina_stringshare_add(property);
489 logic = _efl_model_view_property_logic_lookup(pd, prop); 489 logic = _efl_view_model_property_logic_lookup(pd, prop);
490 if (logic) 490 if (logic)
491 f = logic->set.fct(logic->get.data, obj, prop, value); 491 f = logic->set.fct(logic->get.data, obj, prop, value);
492 else 492 else
493 f = efl_model_property_set(efl_super(obj, EFL_MODEL_VIEW_CLASS), property, value); 493 f = efl_model_property_set(efl_super(obj, EFL_VIEW_MODEL_CLASS), property, value);
494 494
495 eina_stringshare_del(prop); 495 eina_stringshare_del(prop);
496 return f; 496 return f;
497} 497}
498 498
499static Eina_Value * 499static Eina_Value *
500_efl_model_view_efl_model_property_get(const Eo *obj, Efl_Model_View_Data *pd, 500_efl_view_model_efl_model_property_get(const Eo *obj, Efl_View_Model_Data *pd,
501 const char *property) 501 const char *property)
502{ 502{
503 Efl_Model_View_Logic *logic; 503 Efl_View_Model_Logic *logic;
504 Eina_Stringshare *prop; 504 Eina_Stringshare *prop;
505 Eina_Value *r; 505 Eina_Value *r;
506 506
507 prop = eina_stringshare_add(property); 507 prop = eina_stringshare_add(property);
508 logic = _efl_model_view_property_logic_lookup(pd, prop); 508 logic = _efl_view_model_property_logic_lookup(pd, prop);
509 if (logic) 509 if (logic)
510 r = logic->get.fct(logic->get.data, obj, prop); 510 r = logic->get.fct(logic->get.data, obj, prop);
511 else 511 else
512 r = efl_model_property_get(efl_super(obj, EFL_MODEL_VIEW_CLASS), property); 512 r = efl_model_property_get(efl_super(obj, EFL_VIEW_MODEL_CLASS), property);
513 513
514 eina_stringshare_del(prop); 514 eina_stringshare_del(prop);
515 return r; 515 return r;
516} 516}
517 517
518static Eina_Iterator * 518static Eina_Iterator *
519_efl_model_view_efl_model_properties_get(const Eo *obj, Efl_Model_View_Data *pd) 519_efl_view_model_efl_model_properties_get(const Eo *obj, Efl_View_Model_Data *pd)
520{ 520{
521 EFL_MODEL_COMPOSITE_PROPERTIES_SUPER(props, obj, EFL_MODEL_VIEW_CLASS, 521 EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props, obj, EFL_VIEW_MODEL_CLASS,
522 eina_hash_iterator_key_new(pd->deduplication)); 522 eina_hash_iterator_key_new(pd->deduplication));
523 523
524 return props; 524 return props;
525} 525}
526 526
527typedef struct _Efl_Model_View_Slice_Request Efl_Model_View_Slice_Request; 527typedef struct _Efl_View_Model_Slice_Request Efl_View_Model_Slice_Request;
528struct _Efl_Model_View_Slice_Request 528struct _Efl_View_Model_Slice_Request
529{ 529{
530 Efl_Model_View_Data *pd; 530 Efl_View_Model_Data *pd;
531 unsigned int start; 531 unsigned int start;
532}; 532};
533 533
534static Eina_Value 534static Eina_Value
535_efl_model_view_slice_then(Eo *o, void *data, const Eina_Value v) 535_efl_view_model_slice_then(Eo *o, void *data, const Eina_Value v)
536{ 536{
537 Efl_Model_View_Slice_Request *req = data; 537 Efl_View_Model_Slice_Request *req = data;
538 Eo *target; 538 Eo *target;
539 Eina_Value r = EINA_VALUE_EMPTY; 539 Eina_Value r = EINA_VALUE_EMPTY;
540 unsigned int i, len; 540 unsigned int i, len;
@@ -545,7 +545,7 @@ _efl_model_view_slice_then(Eo *o, void *data, const Eina_Value v)
545 { 545 {
546 Eo *composite; 546 Eo *composite;
547 547
548 composite = _efl_model_view_child_lookup(req->pd, o, target); 548 composite = _efl_view_model_child_lookup(req->pd, o, target);
549 eina_value_array_append(&r, composite); 549 eina_value_array_append(&r, composite);
550 } 550 }
551 551
@@ -553,21 +553,21 @@ _efl_model_view_slice_then(Eo *o, void *data, const Eina_Value v)
553} 553}
554 554
555static void 555static void
556_efl_model_view_slice_clean(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED) 556_efl_view_model_slice_clean(Eo *o EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
557{ 557{
558 free(data); 558 free(data);
559} 559}
560 560
561static Eina_Future * 561static Eina_Future *
562_efl_model_view_efl_model_children_slice_get(Eo *obj, Efl_Model_View_Data *pd, 562_efl_view_model_efl_model_children_slice_get(Eo *obj, Efl_View_Model_Data *pd,
563 unsigned int start, unsigned int count) 563 unsigned int start, unsigned int count)
564{ 564{
565 Efl_Model_View_Slice_Request *req; 565 Efl_View_Model_Slice_Request *req;
566 Eina_Future *f; 566 Eina_Future *f;
567 567
568 f = efl_model_children_slice_get(efl_super(obj, EFL_MODEL_VIEW_CLASS), start, count); 568 f = efl_model_children_slice_get(efl_super(obj, EFL_VIEW_MODEL_CLASS), start, count);
569 569
570 req = malloc(sizeof (Efl_Model_View_Slice_Request)); 570 req = malloc(sizeof (Efl_View_Model_Slice_Request));
571 if (!req) 571 if (!req)
572 { 572 {
573 eina_future_cancel(f); 573 eina_future_cancel(f);
@@ -578,9 +578,9 @@ _efl_model_view_efl_model_children_slice_get(Eo *obj, Efl_Model_View_Data *pd,
578 req->start = start; 578 req->start = start;
579 579
580 return efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_ARRAY, 580 return efl_future_then(obj, f, .success_type = EINA_VALUE_TYPE_ARRAY,
581 .success = _efl_model_view_slice_then, 581 .success = _efl_view_model_slice_then,
582 .free = _efl_model_view_slice_clean, 582 .free = _efl_view_model_slice_clean,
583 .data = req); 583 .data = req);
584} 584}
585 585
586#include "efl_model_view.eo.c" 586#include "efl_view_model.eo.c"
diff --git a/src/lib/ecore/efl_model_view.eo b/src/lib/ecore/efl_view_model.eo
index ccfa354..d362e88 100644
--- a/src/lib/ecore/efl_model_view.eo
+++ b/src/lib/ecore/efl_view_model.eo
@@ -1,23 +1,23 @@
1function EflModelViewPropertyGet { 1function EflViewModelPropertyGet {
2 [[Function called when a property is get.]] 2 [[Function called when a property is get.]]
3 params { 3 params {
4 @in model_view: const(Efl.Model_View); [[The ModelView object the @.property.get is issued on.]] 4 @in view_model: const(Efl.View_Model); [[The ViewModel object the @.property.get is issued on.]]
5 @in property: stringshare; [[The property name the @.property.get is issued on.]] 5 @in property: stringshare; [[The property name the @.property.get is issued on.]]
6 } 6 }
7 return: any_value_ptr; [[The property value.]] 7 return: any_value_ptr; [[The property value.]]
8}; 8};
9 9
10function EflModelViewPropertySet { 10function EflViewModelPropertySet {
11 [[Function called when a property is set.]] 11 [[Function called when a property is set.]]
12 params { 12 params {
13 @in model_view: Efl.Model_View; [[The ModelView object the @.property.set is issued on.]] 13 @in view_model: Efl.View_Model; [[The ViewModel object the @.property.set is issued on.]]
14 @in property: stringshare; [[The property name the @.property.set is issued on.]] 14 @in property: stringshare; [[The property name the @.property.set is issued on.]]
15 @in value: any_value_ptr @owned; [[The new value to set.]] 15 @in value: any_value_ptr @owned; [[The new value to set.]]
16 } 16 }
17 return: future<any_value_ptr>; [[The value that was finally set.]] 17 return: future<any_value_ptr>; [[The value that was finally set.]]
18}; 18};
19 19
20class Efl.Model_View extends Efl.Model_Composite 20class Efl.View_Model extends Efl.Composite_Model
21{ 21{
22 [[Efl model providing helpers for custom properties used when linking a model to a view and you need to generate/adapt values for display. 22 [[Efl model providing helpers for custom properties used when linking a model to a view and you need to generate/adapt values for display.
23 23
@@ -34,8 +34,8 @@ class Efl.Model_View extends Efl.Model_Composite
34 ]] 34 ]]
35 params { 35 params {
36 property: string; [[The property to bind on to.]] 36 property: string; [[The property to bind on to.]]
37 get: EflModelViewPropertyGet; [[Define the get callback called when the @Efl.Model.property.get is called with the above property name.]] 37 get: EflViewModelPropertyGet; [[Define the get callback called when the @Efl.Model.property.get is called with the above property name.]]
38 set: EflModelViewPropertySet; [[Define the set callback called when the @Efl.Model.property.set is called with the above property name.]] 38 set: EflViewModelPropertySet; [[Define the set callback called when the @Efl.Model.property.set is called with the above property name.]]
39 binded: iterator<string>; [[Iterator of property name to bind with this defined property see @.property_bind.]] 39 binded: iterator<string>; [[Iterator of property name to bind with this defined property see @.property_bind.]]
40 } 40 }
41 return: Eina.Error; 41 return: Eina.Error;
@@ -60,7 +60,7 @@ class Efl.Model_View extends Efl.Model_Composite
60 ]] 60 ]]
61 params { 61 params {
62 @in source: string; [[Property name in the composited model.]] 62 @in source: string; [[Property name in the composited model.]]
63 @in destination: string; [[Property name in the @Efl.Model_View]] 63 @in destination: string; [[Property name in the @Efl.View_Model]]
64 } 64 }
65 } 65 }
66 property_unbind { 66 property_unbind {
@@ -70,12 +70,12 @@ class Efl.Model_View extends Efl.Model_Composite
70 ]] 70 ]]
71 params { 71 params {
72 @in source: string; [[Property name in the composited model.]] 72 @in source: string; [[Property name in the composited model.]]
73 @in destination: string; [[Property name in the @Efl.Model_View]] 73 @in destination: string; [[Property name in the @Efl.View_Model]]
74 } 74 }
75 } 75 }
76 @property children_bind { 76 @property children_bind {
77 [[Define if we will intercept all childrens object reference and 77 [[Define if we will intercept all childrens object reference and
78 bind them through the ModelView with the same property logic as this 78 bind them through the ViewModel with the same property logic as this
79 one. Be careful of recursivity. 79 one. Be careful of recursivity.
80 80
81 This can only be applied at construction time.]] 81 This can only be applied at construction time.]]
@@ -99,6 +99,6 @@ class Efl.Model_View extends Efl.Model_Composite
99 Efl.Model.property { set; get; } 99 Efl.Model.property { set; get; }
100 } 100 }
101 constructors { 101 constructors {
102 Efl.Model_View.children_bind; 102 Efl.View_Model.children_bind;
103 } 103 }
104} 104}
diff --git a/src/lib/ecore/meson.build b/src/lib/ecore/meson.build
index 537a16d..baa5263 100644
--- a/src/lib/ecore/meson.build
+++ b/src/lib/ecore/meson.build
@@ -67,14 +67,14 @@ pub_eo_files = [
67 'efl_cubic_bezier_interpolator.eo', 67 'efl_cubic_bezier_interpolator.eo',
68 'efl_loop_message_future_handler.eo', 68 'efl_loop_message_future_handler.eo',
69 'efl_loop_message_future.eo', 69 'efl_loop_message_future.eo',
70 'efl_model_loop.eo', 70 'efl_loop_model.eo',
71 'efl_model_item.eo', 71 'efl_generic_model.eo',
72 'efl_model_container.eo', 72 'efl_container_model.eo',
73 'efl_model_container_item.eo', 73 'efl_container_model_item.eo',
74 'efl_model_composite_boolean.eo', 74 'efl_boolean_model.eo',
75 'efl_model_composite_selection.eo', 75 'efl_select_model.eo',
76 'efl_model_composite.eo', 76 'efl_composite_model.eo',
77 'efl_model_view.eo' 77 'efl_view_model.eo'
78] 78]
79 79
80foreach eo_file : pub_eo_files 80foreach eo_file : pub_eo_files
@@ -144,18 +144,18 @@ ecore_src = [
144 'efl_io_file.c', 144 'efl_io_file.c',
145 'efl_io_copier.c', 145 'efl_io_copier.c',
146 'efl_io_buffered_stream.c', 146 'efl_io_buffered_stream.c',
147 'efl_model_loop.c', 147 'efl_loop_model.c',
148 'efl_model_item.c', 148 'efl_generic_model.c',
149 'efl_model_container.c', 149 'efl_container_model.c',
150 'efl_model_container_item.c', 150 'efl_container_model_item.c',
151 'efl_model_container_private.h', 151 'efl_container_model_private.h',
152 'efl_model_composite.c', 152 'efl_composite_model.c',
153 'efl_model_composite_boolean.c', 153 'efl_boolean_model.c',
154 'efl_model_composite_selection.c', 154 'efl_select_model.c',
155 'efl_model_composite_private.h', 155 'efl_composite_model_private.h',
156 'efl_model_accessor_view.c', 156 'efl_model_accessor_view.c',
157 'efl_model_accessor_view_private.h', 157 'efl_model_accessor_view_private.h',
158 'efl_model_view.c', 158 'efl_view_model.c',
159 'efl_linear_interpolator.c', 159 'efl_linear_interpolator.c',
160 'efl_accelerate_interpolator.c', 160 'efl_accelerate_interpolator.c',
161 'efl_decelerate_interpolator.c', 161 'efl_decelerate_interpolator.c',
diff --git a/src/lib/eio/Eio_Eo.h b/src/lib/eio/Eio_Eo.h
index b79f2ab..e199d5d 100644
--- a/src/lib/eio/Eio_Eo.h
+++ b/src/lib/eio/Eio_Eo.h
@@ -7,7 +7,7 @@ extern "C" {
7 7
8#include "efl_io_manager.eo.h" 8#include "efl_io_manager.eo.h"
9#include "eio_sentry.eo.h" 9#include "eio_sentry.eo.h"
10#include "eio_model.eo.h" 10#include "efl_io_model.eo.h"
11 11
12#ifdef __cplusplus 12#ifdef __cplusplus
13} 13}
diff --git a/src/lib/eio/eio_model.c b/src/lib/eio/efl_io_model.c
index 01550d1..a142090 100644
--- a/src/lib/eio/eio_model.c
+++ b/src/lib/eio/efl_io_model.c
@@ -15,22 +15,22 @@
15#include "Eio.h" 15#include "Eio.h"
16 16
17#include "eio_private.h" 17#include "eio_private.h"
18#include "eio_model_private.h" 18#include "efl_io_model_private.h"
19 19
20#define MY_CLASS EIO_MODEL_CLASS 20#define MY_CLASS EFL_IO_MODEL_CLASS
21#define MY_CLASS_NAME "Eio_Model" 21#define MY_CLASS_NAME "Efl_Io_Model"
22 22
23static void _eio_model_info_free(Eio_Model_Info *info, Eina_Bool model); 23static void _efl_io_model_info_free(Efl_Io_Model_Info *info, Eina_Bool model);
24static void _eio_model_efl_model_monitor_add(Eio_Model_Data *priv); 24static void _efl_io_model_efl_model_monitor_add(Efl_Io_Model_Data *priv);
25 25
26EINA_VALUE_STRUCT_DESC_DEFINE(_eina_file_direct_info_desc, 26EINA_VALUE_STRUCT_DESC_DEFINE(_eina_file_direct_info_desc,
27 NULL, 27 NULL,
28 sizeof (Eio_Model_Info), 28 sizeof (Efl_Io_Model_Info),
29 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_ULONG, Eio_Model_Info, path_length), 29 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_ULONG, Efl_Io_Model_Info, path_length),
30 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_ULONG, Eio_Model_Info, name_length), 30 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_ULONG, Efl_Io_Model_Info, name_length),
31 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_ULONG, Eio_Model_Info, name_start), 31 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_ULONG, Efl_Io_Model_Info, name_start),
32 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_UINT, Eio_Model_Info, type), 32 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_UINT, Efl_Io_Model_Info, type),
33 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_STRINGSHARE, Eio_Model_Info, path)); 33 EINA_VALUE_STRUCT_MEMBER(EINA_VALUE_TYPE_STRINGSHARE, Efl_Io_Model_Info, path));
34/** 34/**
35 * Callbacks 35 * Callbacks
36 * Property 36 * Property
@@ -38,7 +38,7 @@ EINA_VALUE_STRUCT_DESC_DEFINE(_eina_file_direct_info_desc,
38static void 38static void
39_eio_move_done_cb(void *data, Eio_File *handler) 39_eio_move_done_cb(void *data, Eio_File *handler)
40{ 40{
41 Eio_Model_Data *pd = ecore_thread_local_data_find(handler->thread, ".pd"); 41 Efl_Io_Model_Data *pd = ecore_thread_local_data_find(handler->thread, ".pd");
42 Eina_Promise *p = data; 42 Eina_Promise *p = data;
43 43
44 // FIXME: generate events 44 // FIXME: generate events
@@ -50,7 +50,7 @@ _eio_move_done_cb(void *data, Eio_File *handler)
50static void 50static void
51_eio_file_error_cb(void *data, Eio_File *handler, int error) 51_eio_file_error_cb(void *data, Eio_File *handler, int error)
52{ 52{
53 Eio_Model_Data *pd = ecore_thread_local_data_find(handler->thread, ".pd"); 53 Efl_Io_Model_Data *pd = ecore_thread_local_data_find(handler->thread, ".pd");
54 Eina_Promise *p = data; 54 Eina_Promise *p = data;
55 55
56 eina_promise_reject(p, error); 56 eina_promise_reject(p, error);
@@ -65,10 +65,10 @@ static Eina_Bool
65_efl_model_evt_added_ecore_cb(void *data, int type, void *event) 65_efl_model_evt_added_ecore_cb(void *data, int type, void *event)
66{ 66{
67 Eio_Monitor_Event *ev = event; 67 Eio_Monitor_Event *ev = event;
68 Eio_Model *obj; 68 Efl_Io_Model *obj;
69 Eio_Model_Data *pd = data; 69 Efl_Io_Model_Data *pd = data;
70 Efl_Model_Children_Event cevt; 70 Efl_Model_Children_Event cevt;
71 Eio_Model_Info *mi; 71 Efl_Io_Model_Info *mi;
72 Eina_List *l; 72 Eina_List *l;
73 Eina_Stringshare *spath = NULL; 73 Eina_Stringshare *spath = NULL;
74 char *path = NULL; 74 char *path = NULL;
@@ -92,7 +92,7 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
92 goto end; 92 goto end;
93 } 93 }
94 94
95 mi = calloc(1, sizeof (Eio_Model_Info)); 95 mi = calloc(1, sizeof (Efl_Io_Model_Info));
96 if (!mi) goto end; 96 if (!mi) goto end;
97 97
98 mi->path_length = eina_stringshare_strlen(spath); 98 mi->path_length = eina_stringshare_strlen(spath);
@@ -138,11 +138,11 @@ _efl_model_evt_added_ecore_cb(void *data, int type, void *event)
138static Eina_Bool 138static Eina_Bool
139_efl_model_evt_deleted_ecore_cb(void *data, int type, void *event) 139_efl_model_evt_deleted_ecore_cb(void *data, int type, void *event)
140{ 140{
141 Eio_Model_Info *mi; 141 Efl_Io_Model_Info *mi;
142 Eina_List *l; 142 Eina_List *l;
143 Eio_Monitor_Event *ev = event; 143 Eio_Monitor_Event *ev = event;
144 Eio_Model *obj; 144 Efl_Io_Model *obj;
145 Eio_Model_Data *pd = data; 145 Efl_Io_Model_Data *pd = data;
146 Eina_Stringshare *spath = NULL; 146 Eina_Stringshare *spath = NULL;
147 Efl_Model_Children_Event cevt = { 0 }; 147 Efl_Model_Children_Event cevt = { 0 };
148 unsigned int i = 0; 148 unsigned int i = 0;
@@ -179,7 +179,7 @@ _efl_model_evt_deleted_ecore_cb(void *data, int type, void *event)
179 // This should trigger the object child destruction if it exist 179 // This should trigger the object child destruction if it exist
180 // resulting in the potential destruction of the child, after 180 // resulting in the potential destruction of the child, after
181 // this point mi and info might be freed. 181 // this point mi and info might be freed.
182 _eio_model_info_free(mi, EINA_FALSE); 182 _efl_io_model_info_free(mi, EINA_FALSE);
183 183
184 end: 184 end:
185 eina_stringshare_del(spath); 185 eina_stringshare_del(spath);
@@ -192,9 +192,9 @@ _efl_model_evt_deleted_ecore_cb(void *data, int type, void *event)
192 * Child Del 192 * Child Del
193 */ 193 */
194static void 194static void
195_eio_del_cleanup(Eio_Model *obj) 195_eio_del_cleanup(Efl_Io_Model *obj)
196{ 196{
197 Eio_Model_Data *pd = efl_data_scope_get(obj, EIO_MODEL_CLASS); 197 Efl_Io_Model_Data *pd = efl_data_scope_get(obj, EFL_IO_MODEL_CLASS);
198 198
199 pd->request.del = NULL; 199 pd->request.del = NULL;
200 efl_unref(obj); 200 efl_unref(obj);
@@ -203,7 +203,7 @@ _eio_del_cleanup(Eio_Model *obj)
203static void 203static void
204_eio_done_unlink_cb(void *data, Eio_File *handler EINA_UNUSED) 204_eio_done_unlink_cb(void *data, Eio_File *handler EINA_UNUSED)
205{ 205{
206 Eio_Model *child = data; 206 Efl_Io_Model *child = data;
207 207
208 _eio_del_cleanup(child); 208 _eio_del_cleanup(child);
209} 209}
@@ -211,7 +211,7 @@ _eio_done_unlink_cb(void *data, Eio_File *handler EINA_UNUSED)
211static void 211static void
212_eio_error_unlink_cb(void *data, Eio_File *handler EINA_UNUSED, int error) 212_eio_error_unlink_cb(void *data, Eio_File *handler EINA_UNUSED, int error)
213{ 213{
214 Eio_Model *child = data; 214 Efl_Io_Model *child = data;
215 215
216 ERR("%d: %s.", error, strerror(error)); 216 ERR("%d: %s.", error, strerror(error));
217 217
@@ -219,7 +219,7 @@ _eio_error_unlink_cb(void *data, Eio_File *handler EINA_UNUSED, int error)
219} 219}
220 220
221static void 221static void
222_eio_model_info_free(Eio_Model_Info *info, Eina_Bool model) 222_efl_io_model_info_free(Efl_Io_Model_Info *info, Eina_Bool model)
223{ 223{
224 if (!info) return ; 224 if (!info) return ;
225 225
@@ -246,7 +246,7 @@ _eio_model_info_free(Eio_Model_Info *info, Eina_Bool model)
246} 246}
247 247
248static Eina_File_Type 248static Eina_File_Type
249_eio_model_info_type_get(const Eina_File_Direct_Info *info, const Eina_Stat *st) 249_efl_io_model_info_type_get(const Eina_File_Direct_Info *info, const Eina_Stat *st)
250{ 250{
251 if (info && info->type != EINA_FILE_UNKNOWN) 251 if (info && info->type != EINA_FILE_UNKNOWN)
252 return info->type; 252 return info->type;
@@ -273,13 +273,13 @@ _eio_model_info_type_get(const Eina_File_Direct_Info *info, const Eina_Stat *st)
273} 273}
274 274
275static void 275static void
276_eio_model_info_build(const Eio_Model *model, Eio_Model_Data *pd) 276_efl_io_model_info_build(const Efl_Io_Model *model, Efl_Io_Model_Data *pd)
277{ 277{
278 char *path; 278 char *path;
279 279
280 if (pd->info) goto end; 280 if (pd->info) goto end;
281 281
282 pd->info = calloc(1, sizeof (Eio_Model_Info)); 282 pd->info = calloc(1, sizeof (Efl_Io_Model_Info));
283 if (!pd->info) return ; 283 if (!pd->info) return ;
284 284
285 pd->info->path_length = eina_stringshare_strlen(pd->path); 285 pd->info->path_length = eina_stringshare_strlen(pd->path);
@@ -290,7 +290,7 @@ _eio_model_info_build(const Eio_Model *model, Eio_Model_Data *pd)
290 pd->info->name_length = pd->info->path_length - pd->info->name_start; 290 pd->info->name_length = pd->info->path_length - pd->info->name_start;
291 free(path); 291 free(path);
292 292
293 pd->info->type = _eio_model_info_type_get(NULL, pd->st); 293 pd->info->type = _efl_io_model_info_type_get(NULL, pd->st);
294 294
295 efl_model_properties_changed(model, "direct_info"); 295 efl_model_properties_changed(model, "direct_info");
296 296
@@ -301,8 +301,8 @@ _eio_model_info_build(const Eio_Model *model, Eio_Model_Data *pd)
301static void 301static void
302_eio_build_st_done(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *stat) 302_eio_build_st_done(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *stat)
303{ 303{
304 Eio_Model *model = data; 304 Efl_Io_Model *model = data;
305 Eio_Model_Data *pd = efl_data_scope_get(model, EIO_MODEL_CLASS); 305 Efl_Io_Model_Data *pd = efl_data_scope_get(model, EFL_IO_MODEL_CLASS);
306 306
307 if (!pd) return ; 307 if (!pd) return ;
308 pd->request.stat = NULL; 308 pd->request.stat = NULL;
@@ -312,16 +312,16 @@ _eio_build_st_done(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *s
312 312
313 memcpy(pd->st, stat, sizeof (Eina_Stat)); 313 memcpy(pd->st, stat, sizeof (Eina_Stat));
314 314
315 if (!pd->info) _eio_model_info_build(model, pd); 315 if (!pd->info) _efl_io_model_info_build(model, pd);
316 if (pd->info->type == EINA_FILE_UNKNOWN) 316 if (pd->info->type == EINA_FILE_UNKNOWN)
317 pd->info->type = _eio_model_info_type_get(NULL, stat); 317 pd->info->type = _efl_io_model_info_type_get(NULL, stat);
318 318
319 efl_model_properties_changed(model, "mtime", "atime", "ctime", "is_dir", "is_lnk", "size", "stat"); 319 efl_model_properties_changed(model, "mtime", "atime", "ctime", "is_dir", "is_lnk", "size", "stat");
320 320
321 if (eio_file_is_dir(pd->st)) 321 if (eio_file_is_dir(pd->st))
322 { 322 {
323 // Now that we know we are a directory, we should whatch it 323 // Now that we know we are a directory, we should whatch it
324 _eio_model_efl_model_monitor_add(pd); 324 _efl_io_model_efl_model_monitor_add(pd);
325 325
326 // And start listing its child 326 // And start listing its child
327 efl_model_children_count_get(model); 327 efl_model_children_count_get(model);
@@ -333,8 +333,8 @@ _eio_build_st_done(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *s
333static void 333static void
334_eio_build_st_done_clobber(void *data, Eio_File *handler, const Eina_Stat *stat) 334_eio_build_st_done_clobber(void *data, Eio_File *handler, const Eina_Stat *stat)
335{ 335{
336 Eio_Model *model = data; 336 Efl_Io_Model *model = data;
337 Eio_Model *parent; 337 Efl_Io_Model *parent;
338 338
339 efl_ref(model); 339 efl_ref(model);
340 _eio_build_st_done(data, handler, stat); 340 _eio_build_st_done(data, handler, stat);
@@ -346,8 +346,8 @@ _eio_build_st_done_clobber(void *data, Eio_File *handler, const Eina_Stat *stat)
346static void 346static void
347_eio_build_st_error(void *data, Eio_File *handler EINA_UNUSED, int error) 347_eio_build_st_error(void *data, Eio_File *handler EINA_UNUSED, int error)
348{ 348{
349 Eio_Model *model = data; 349 Efl_Io_Model *model = data;
350 Eio_Model_Data *pd = efl_data_scope_get(model, EIO_MODEL_CLASS); 350 Efl_Io_Model_Data *pd = efl_data_scope_get(model, EFL_IO_MODEL_CLASS);
351 351
352 pd->request.stat = NULL; 352 pd->request.stat = NULL;
353 pd->error = error; 353 pd->error = error;
@@ -360,8 +360,8 @@ _eio_build_st_error(void *data, Eio_File *handler EINA_UNUSED, int error)
360static void 360static void
361_eio_build_st_error_clobber(void *data, Eio_File *handler, int error) 361_eio_build_st_error_clobber(void *data, Eio_File *handler, int error)
362{ 362{
363 Eio_Model *model = data; 363 Efl_Io_Model *model = data;
364 Eio_Model *parent; 364 Efl_Io_Model *parent;
365 365
366 efl_ref(model); 366 efl_ref(model);
367 _eio_build_st_error(data, handler, error); 367 _eio_build_st_error(data, handler, error);
@@ -371,7 +371,7 @@ _eio_build_st_error_clobber(void *data, Eio_File *handler, int error)
371} 371}
372 372
373static void 373static void
374_eio_build_st(const Eio_Model *model, Eio_Model_Data *pd) 374_eio_build_st(const Efl_Io_Model *model, Efl_Io_Model_Data *pd)
375{ 375{
376 if (pd->st) return ; 376 if (pd->st) return ;
377 if (pd->request.stat) return ; 377 if (pd->request.stat) return ;
@@ -381,7 +381,7 @@ _eio_build_st(const Eio_Model *model, Eio_Model_Data *pd)
381} 381}
382 382
383static void 383static void
384_eio_build_st_then_clobber(const Eio_Model *model, Eio_Model_Data *pd) 384_eio_build_st_then_clobber(const Efl_Io_Model *model, Efl_Io_Model_Data *pd)
385{ 385{
386 if (pd->st) return ; 386 if (pd->st) return ;
387 if (pd->request.stat) return ; 387 if (pd->request.stat) return ;
@@ -415,7 +415,7 @@ _cancel_request(Eo *model EINA_UNUSED, void *data, Eina_Error error)
415} 415}
416 416
417static Eina_Future * 417static Eina_Future *
418_build_delay(Eio_Model *model) 418_build_delay(Efl_Io_Model *model)
419{ 419{
420 Eina_Promise *p; 420 Eina_Promise *p;
421 421
@@ -437,7 +437,7 @@ _build_delay(Eio_Model *model)
437} 437}
438 438
439static void 439static void
440_eio_build_mime_clean(Eio_Model_Data *pd) 440_eio_build_mime_clean(Efl_Io_Model_Data *pd)
441{ 441{
442 efl_wref_del(pd->loop, &pd->loop); 442 efl_wref_del(pd->loop, &pd->loop);
443 pd->loop = NULL; 443 pd->loop = NULL;
@@ -447,8 +447,8 @@ _eio_build_mime_clean(Eio_Model_Data *pd)
447static Eina_Value 447static Eina_Value
448_eio_build_mime_now(void *data, const Eina_Value v, const Eina_Future *dead_future EINA_UNUSED) 448_eio_build_mime_now(void *data, const Eina_Value v, const Eina_Future *dead_future EINA_UNUSED)
449{ 449{
450 Eio_Model *model = data; 450 Efl_Io_Model *model = data;
451 Eio_Model_Data *pd = efl_data_scope_get(model, EIO_MODEL_CLASS); 451 Efl_Io_Model_Data *pd = efl_data_scope_get(model, EFL_IO_MODEL_CLASS);
452 452
453 if (v.type == EINA_VALUE_TYPE_ERROR) goto on_error; 453 if (v.type == EINA_VALUE_TYPE_ERROR) goto on_error;
454 if (!pd->loop) goto on_error; 454 if (!pd->loop) goto on_error;
@@ -476,7 +476,7 @@ _eio_build_mime_now(void *data, const Eina_Value v, const Eina_Future *dead_futu
476} 476}
477 477
478static void 478static void
479_eio_build_mime(const Efl_Object *model, Eio_Model_Data *pd) 479_eio_build_mime(const Efl_Object *model, Efl_Io_Model_Data *pd)
480{ 480{
481 Eina_Future *f; 481 Eina_Future *f;
482 482
@@ -491,24 +491,24 @@ _eio_build_mime(const Efl_Object *model, Eio_Model_Data *pd)
491} 491}
492 492
493static Eina_Value * 493static Eina_Value *
494_property_filename_cb(const Eo *obj, Eio_Model_Data *pd) 494_property_filename_cb(const Eo *obj, Efl_Io_Model_Data *pd)
495{ 495{
496 _eio_model_info_build(obj, pd); 496 _efl_io_model_info_build(obj, pd);
497 if (pd->info) 497 if (pd->info)
498 return eina_value_string_new(pd->info->path + pd->info->name_start); 498 return eina_value_string_new(pd->info->path + pd->info->name_start);
499 return eina_value_error_new(EAGAIN); 499 return eina_value_error_new(EAGAIN);
500} 500}
501 501
502static Eina_Value * 502static Eina_Value *
503_property_path_cb(const Eo *obj EINA_UNUSED, Eio_Model_Data *pd) 503_property_path_cb(const Eo *obj EINA_UNUSED, Efl_Io_Model_Data *pd)
504{ 504{
505 return eina_value_string_new(pd->path); 505 return eina_value_string_new(pd->path);
506} 506}
507 507
508static Eina_Value * 508static Eina_Value *
509_property_direct_info_cb(const Eo *obj, Eio_Model_Data *pd) 509_property_direct_info_cb(const Eo *obj, Efl_Io_Model_Data *pd)
510{ 510{
511 _eio_model_info_build(obj, pd); 511 _efl_io_model_info_build(obj, pd);
512 512
513 if (pd->info) 513 if (pd->info)
514 { 514 {
@@ -531,7 +531,7 @@ _property_direct_info_cb(const Eo *obj, Eio_Model_Data *pd)
531 531
532#define TIMECB(Prop) \ 532#define TIMECB(Prop) \
533 static Eina_Value * \ 533 static Eina_Value * \
534 _property_##Prop##_cb(const Eo *obj, Eio_Model_Data *pd) \ 534 _property_##Prop##_cb(const Eo *obj, Efl_Io_Model_Data *pd) \
535 { \ 535 { \
536 if (pd->st) \ 536 if (pd->st) \
537 return eina_value_time_new(pd->st->Prop); \ 537 return eina_value_time_new(pd->st->Prop); \
@@ -547,7 +547,7 @@ TIMECB(atime);
547TIMECB(ctime); 547TIMECB(ctime);
548 548
549static Eina_Value * 549static Eina_Value *
550_property_is_dir_cb(const Eo *obj, Eio_Model_Data *pd) 550_property_is_dir_cb(const Eo *obj, Efl_Io_Model_Data *pd)
551{ 551{
552 if (pd->st) 552 if (pd->st)
553 return eina_value_bool_new(eio_file_is_dir(pd->st)); 553 return eina_value_bool_new(eio_file_is_dir(pd->st));
@@ -559,7 +559,7 @@ _property_is_dir_cb(const Eo *obj, Eio_Model_Data *pd)
559} 559}
560 560
561static Eina_Value * 561static Eina_Value *
562_property_is_lnk_cb(const Eo *obj, Eio_Model_Data *pd) 562_property_is_lnk_cb(const Eo *obj, Efl_Io_Model_Data *pd)
563{ 563{
564 if (pd->st) 564 if (pd->st)
565 return eina_value_bool_new(eio_file_is_lnk(pd->st)); 565 return eina_value_bool_new(eio_file_is_lnk(pd->st));
@@ -571,7 +571,7 @@ _property_is_lnk_cb(const Eo *obj, Eio_Model_Data *pd)
571} 571}
572 572
573static Eina_Value * 573static Eina_Value *
574_property_size_cb(const Eo *obj, Eio_Model_Data *pd) 574_property_size_cb(const Eo *obj, Efl_Io_Model_Data *pd)
575{ 575{
576 if (pd->st) 576 if (pd->st)
577 return eina_value_ulong_new(pd->st->size); 577 return eina_value_ulong_new(pd->st->size);
@@ -583,7 +583,7 @@ _property_size_cb(const Eo *obj, Eio_Model_Data *pd)
583} 583}
584 584
585static Eina_Value * 585static Eina_Value *
586_property_stat_cb(const Eo *obj, Eio_Model_Data *pd) 586_property_stat_cb(const Eo *obj, Efl_Io_Model_Data *pd)
587{ 587{
588 if (pd->st) 588 if (pd->st)
589 { 589 {
@@ -607,7 +607,7 @@ _property_stat_cb(const Eo *obj, Eio_Model_Data *pd)
607} 607}
608 608
609static Eina_Value * 609static Eina_Value *
610_property_mime_type_cb(const Eo *obj, Eio_Model_Data *pd) 610_property_mime_type_cb(const Eo *obj, Efl_Io_Model_Data *pd)
611{ 611{
612 if (pd->mime_type) 612 if (pd->mime_type)
613 return eina_value_string_new(pd->mime_type); 613 return eina_value_string_new(pd->mime_type);
@@ -621,7 +621,7 @@ _property_mime_type_cb(const Eo *obj, Eio_Model_Data *pd)
621 621
622static struct { 622static struct {
623 const char *name; 623 const char *name;
624 Eina_Value *(*cb)(const Eo *obj, Eio_Model_Data *pd); 624 Eina_Value *(*cb)(const Eo *obj, Efl_Io_Model_Data *pd);
625} properties[] = { 625} properties[] = {
626 PP(filename), PP(path), 626 PP(filename), PP(path),
627 PP(direct_info), 627 PP(direct_info),
@@ -634,14 +634,14 @@ static struct {
634 * Interfaces impl. 634 * Interfaces impl.
635 */ 635 */
636static Eina_Iterator * 636static Eina_Iterator *
637_eio_model_efl_model_properties_get(const Eo *obj EINA_UNUSED, 637_efl_io_model_efl_model_properties_get(const Eo *obj EINA_UNUSED,
638 Eio_Model_Data *pd EINA_UNUSED) 638 Efl_Io_Model_Data *pd EINA_UNUSED)
639{ 639{
640 return EINA_C_ARRAY_ITERATOR_NEW(properties); 640 return EINA_C_ARRAY_ITERATOR_NEW(properties);
641} 641}
642 642
643static Eina_Value * 643static Eina_Value *
644_eio_model_efl_model_property_get(const Eo *obj, Eio_Model_Data *pd, const char *property) 644_efl_io_model_efl_model_property_get(const Eo *obj, Efl_Io_Model_Data *pd, const char *property)
645{ 645{
646 unsigned int i; 646 unsigned int i;
647 647
@@ -655,13 +655,13 @@ _eio_model_efl_model_property_get(const Eo *obj, Eio_Model_Data *pd, const char
655 655
656 ERR("Could not find property '%s'.", property); 656 ERR("Could not find property '%s'.", property);
657 // Unknow value request 657 // Unknow value request
658 return efl_model_property_get(efl_super(obj, EIO_MODEL_CLASS), property); 658 return efl_model_property_get(efl_super(obj, EFL_IO_MODEL_CLASS), property);
659} 659}
660 660
661static Eina_Future * 661static Eina_Future *
662_eio_model_efl_model_property_set(Eo *obj, 662_efl_io_model_efl_model_property_set(Eo *obj,
663 Eio_Model_Data *pd, 663 Efl_Io_Model_Data *pd,
664 const char *property, Eina_Value *value) 664 const char *property, Eina_Value *value)
665{ 665{
666 const char *path; 666 const char *path;
667 Eina_Future *f; 667 Eina_Future *f;
@@ -710,21 +710,21 @@ _eio_model_efl_model_property_set(Eo *obj,
710} 710}
711 711
712static void 712static void
713_eio_model_children_list(void *data, Eina_Array *entries) 713_efl_io_model_children_list(void *data, Eina_Array *entries)
714{ 714{
715 Eina_File_Direct_Info *info; 715 Eina_File_Direct_Info *info;
716 Efl_Model *obj = data; 716 Efl_Model *obj = data;
717 Eio_Model_Data *pd; 717 Efl_Io_Model_Data *pd;
718 Efl_Model_Children_Event cevt = { 0 }; 718 Efl_Model_Children_Event cevt = { 0 };
719 Eina_Array_Iterator iterator; 719 Eina_Array_Iterator iterator;
720 unsigned int i; 720 unsigned int i;
721 721
722 pd = efl_data_scope_get(obj, EIO_MODEL_CLASS); 722 pd = efl_data_scope_get(obj, EFL_IO_MODEL_CLASS);
723 if (!pd) return ; 723 if (!pd) return ;
724 724
725 EINA_ARRAY_ITER_NEXT(entries, i, info, iterator) 725 EINA_ARRAY_ITER_NEXT(entries, i, info, iterator)
726 { 726 {
727 Eio_Model_Info *mi; 727 Efl_Io_Model_Info *mi;
728 728
729 if (pd->filter.cb) 729 if (pd->filter.cb)
730 { 730 {
@@ -732,7 +732,7 @@ _eio_model_children_list(void *data, Eina_Array *entries)
732 continue ; 732 continue ;
733 } 733 }
734 734
735 mi = calloc(1, sizeof (Eio_Model_Info)); 735 mi = calloc(1, sizeof (Efl_Io_Model_Info));
736 if (!mi) continue ; 736 if (!mi) continue ;
737 737
738 mi->path_length = info->path_length; 738 mi->path_length = info->path_length;
@@ -740,7 +740,7 @@ _eio_model_children_list(void *data, Eina_Array *entries)
740 740
741 mi->name_start = info->name_start; 741 mi->name_start = info->name_start;
742 mi->name_length = info->name_length; 742 mi->name_length = info->name_length;
743 mi->type = _eio_model_info_type_get(info, NULL); 743 mi->type = _efl_io_model_info_type_get(info, NULL);
744 mi->parent_ref = EINA_TRUE; 744 mi->parent_ref = EINA_TRUE;
745 745
746 cevt.index = eina_list_count(pd->files); 746 cevt.index = eina_list_count(pd->files);
@@ -755,17 +755,17 @@ _eio_model_children_list(void *data, Eina_Array *entries)
755} 755}
756 756
757static Eina_Value 757static Eina_Value
758_eio_model_children_list_on(void *data, const Eina_Value v, 758_efl_io_model_children_list_on(void *data, const Eina_Value v,
759 const Eina_Future *dead EINA_UNUSED) 759 const Eina_Future *dead EINA_UNUSED)
760{ 760{
761 Eio_Model_Data *pd = data; 761 Efl_Io_Model_Data *pd = data;
762 762
763 pd->request.listing = NULL; 763 pd->request.listing = NULL;
764 pd->listed = EINA_TRUE; 764 pd->listed = EINA_TRUE;
765 765
766 // Now that we have listed the content of the directory, 766 // Now that we have listed the content of the directory,
767 // we can whatch over it 767 // we can whatch over it
768 _eio_model_efl_model_monitor_add(pd); 768 _efl_io_model_efl_model_monitor_add(pd);
769 769
770 return v; 770 return v;
771} 771}
@@ -774,7 +774,7 @@ _eio_model_children_list_on(void *data, const Eina_Value v,
774 * Children Count Get 774 * Children Count Get
775 */ 775 */
776static unsigned int 776static unsigned int
777_eio_model_efl_model_children_count_get(const Eo *obj, Eio_Model_Data *pd) 777_efl_io_model_efl_model_children_count_get(const Eo *obj, Efl_Io_Model_Data *pd)
778{ 778{
779 // If we have no information on the object, let's build it. 779 // If we have no information on the object, let's build it.
780 if (efl_invalidated_get(obj)) 780 if (efl_invalidated_get(obj))
@@ -800,8 +800,8 @@ _eio_model_efl_model_children_count_get(const Eo *obj, Eio_Model_Data *pd)
800 } 800 }
801 801
802 f = efl_io_manager_direct_ls(iom, pd->path, EINA_FALSE, 802 f = efl_io_manager_direct_ls(iom, pd->path, EINA_FALSE,
803 (void*) obj, _eio_model_children_list, NULL); 803 (void*) obj, _efl_io_model_children_list, NULL);
804 f = eina_future_then(f, _eio_model_children_list_on, pd, NULL); 804 f = eina_future_then(f, _efl_io_model_children_list_on, pd, NULL);
805 pd->request.listing = efl_future_then(obj, f); 805 pd->request.listing = efl_future_then(obj, f);
806 } 806 }
807 807
@@ -809,7 +809,7 @@ _eio_model_efl_model_children_count_get(const Eo *obj, Eio_Model_Data *pd)
809} 809}
810 810
811static void 811static void
812_eio_model_efl_model_monitor_add(Eio_Model_Data *priv) 812_efl_io_model_efl_model_monitor_add(Efl_Io_Model_Data *priv)
813{ 813{
814 if (!priv->monitor) 814 if (!priv->monitor)
815 { 815 {
@@ -828,7 +828,7 @@ _eio_model_efl_model_monitor_add(Eio_Model_Data *priv)
828} 828}
829 829
830static void 830static void
831_eio_model_efl_model_monitor_del(Eio_Model_Data *priv) 831_efl_io_model_efl_model_monitor_del(Efl_Io_Model_Data *priv)
832{ 832{
833 if (priv->monitor) 833 if (priv->monitor)
834 { 834 {
@@ -849,8 +849,8 @@ _eio_model_efl_model_monitor_del(Eio_Model_Data *priv)
849 * Children Load 849 * Children Load
850 */ 850 */
851static void 851static void
852_eio_model_children_filter_set(Eo *obj EINA_UNUSED, Eio_Model_Data *pd, 852_efl_io_model_children_filter_set(Eo *obj EINA_UNUSED, Efl_Io_Model_Data *pd,
853 void *filter_data, EflIoFilter filter, Eina_Free_Cb filter_free_cb) 853 void *filter_data, EflIoFilter filter, Eina_Free_Cb filter_free_cb)
854{ 854{
855 pd->filter.data = filter_data; 855 pd->filter.data = filter_data;
856 pd->filter.cb = filter; 856 pd->filter.cb = filter;
@@ -861,7 +861,7 @@ _eio_model_children_filter_set(Eo *obj EINA_UNUSED, Eio_Model_Data *pd,
861 * Child Add 861 * Child Add
862 */ 862 */
863static Eo * 863static Eo *
864_eio_model_efl_model_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED) 864_efl_io_model_efl_model_child_add(Eo *obj EINA_UNUSED, Efl_Io_Model_Data *priv EINA_UNUSED)
865{ 865{
866 return NULL; 866 return NULL;
867} 867}
@@ -870,11 +870,11 @@ _eio_model_efl_model_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UN
870 * Child Remove 870 * Child Remove
871 */ 871 */
872static void 872static void
873_eio_model_efl_model_child_del(Eo *obj EINA_UNUSED, 873_efl_io_model_efl_model_child_del(Eo *obj EINA_UNUSED,
874 Eio_Model_Data *priv EINA_UNUSED, 874 Efl_Io_Model_Data *priv EINA_UNUSED,
875 Eo *child) 875 Eo *child)
876{ 876{
877 Eio_Model_Data *child_pd; 877 Efl_Io_Model_Data *child_pd;
878 Eina_File_Type type; 878 Eina_File_Type type;
879 879
880 child_pd = efl_data_scope_get(child, MY_CLASS); 880 child_pd = efl_data_scope_get(child, MY_CLASS);
@@ -917,8 +917,8 @@ _eio_model_efl_model_child_del(Eo *obj EINA_UNUSED,
917 * Children Slice Get 917 * Children Slice Get
918 */ 918 */
919static Eina_Future * 919static Eina_Future *
920_eio_model_efl_model_children_slice_get(Eo *obj, Eio_Model_Data *pd, 920_efl_io_model_efl_model_children_slice_get(Eo *obj, Efl_Io_Model_Data *pd,
921 unsigned int start, unsigned int count) 921 unsigned int start, unsigned int count)
922{ 922{
923 Eina_Future_Scheduler *scheduler = NULL; 923 Eina_Future_Scheduler *scheduler = NULL;
924 Eina_Value array = EINA_VALUE_EMPTY; 924 Eina_Value array = EINA_VALUE_EMPTY;
@@ -944,15 +944,15 @@ _eio_model_efl_model_children_slice_get(Eo *obj, Eio_Model_Data *pd,
944 944
945 while (count > 0) 945 while (count > 0)
946 { 946 {
947 Eio_Model_Info *info = eina_list_data_get(ls); 947 Efl_Io_Model_Info *info = eina_list_data_get(ls);
948 Eio_Model_Data *child_data = NULL; 948 Efl_Io_Model_Data *child_data = NULL;
949 949
950 info->child_ref = EINA_TRUE; 950 info->child_ref = EINA_TRUE;
951 951
952 if (info->object == NULL) 952 if (info->object == NULL)
953 // Little trick here, setting internal data before finalize 953 // Little trick here, setting internal data before finalize
954 info->object = efl_add(EIO_MODEL_CLASS, obj, 954 info->object = efl_add(EFL_IO_MODEL_CLASS, obj,
955 child_data = efl_data_scope_get(efl_added, EIO_MODEL_CLASS), 955 child_data = efl_data_scope_get(efl_added, EFL_IO_MODEL_CLASS),
956 child_data->info = info, 956 child_data->info = info,
957 child_data->path = eina_stringshare_ref(info->path), 957 child_data->path = eina_stringshare_ref(info->path),
958 child_data->parent = ls, 958 child_data->parent = ls,
@@ -973,7 +973,7 @@ _eio_model_efl_model_children_slice_get(Eo *obj, Eio_Model_Data *pd,
973 * Class definitions 973 * Class definitions
974 */ 974 */
975static Efl_Object * 975static Efl_Object *
976_eio_model_efl_object_finalize(Eo *obj, Eio_Model_Data *pd) 976_efl_io_model_efl_object_finalize(Eo *obj, Efl_Io_Model_Data *pd)
977{ 977{
978 if (!pd->path) return NULL; 978 if (!pd->path) return NULL;
979 if (!efl_provider_find(obj, EFL_LOOP_CLASS)) 979 if (!efl_provider_find(obj, EFL_LOOP_CLASS))
@@ -999,7 +999,7 @@ _eio_model_efl_object_finalize(Eo *obj, Eio_Model_Data *pd)
999} 999}
1000 1000
1001static void 1001static void
1002_eio_model_path_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const char *path) 1002_efl_io_model_path_set(Eo *obj EINA_UNUSED, Efl_Io_Model_Data *priv, const char *path)
1003{ 1003{
1004 char *sanitized = eina_file_path_sanitize(path); 1004 char *sanitized = eina_file_path_sanitize(path);
1005 priv->path = eina_stringshare_add(sanitized); 1005 priv->path = eina_stringshare_add(sanitized);
@@ -1007,21 +1007,21 @@ _eio_model_path_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, const char *path)
1007} 1007}
1008 1008
1009static const char * 1009static const char *
1010_eio_model_path_get(const Eo *obj EINA_UNUSED, Eio_Model_Data *priv) 1010_efl_io_model_path_get(const Eo *obj EINA_UNUSED, Efl_Io_Model_Data *priv)
1011{ 1011{
1012 return priv->path; 1012 return priv->path;
1013} 1013}
1014 1014
1015static void 1015static void
1016_eio_model_efl_object_destructor(Eo *obj , Eio_Model_Data *priv) 1016_efl_io_model_efl_object_destructor(Eo *obj , Efl_Io_Model_Data *priv)
1017{ 1017{
1018 Eio_Model_Info *info; 1018 Efl_Io_Model_Info *info;
1019 1019
1020 _eio_model_info_free(priv->info, EINA_TRUE); 1020 _efl_io_model_info_free(priv->info, EINA_TRUE);
1021 priv->info = NULL; 1021 priv->info = NULL;
1022 1022
1023 EINA_LIST_FREE(priv->files, info) 1023 EINA_LIST_FREE(priv->files, info)
1024 _eio_model_info_free(info, EINA_FALSE); 1024 _efl_io_model_info_free(info, EINA_FALSE);
1025 1025
1026 eina_stringshare_del(priv->path); 1026 eina_stringshare_del(priv->path);
1027 1027
@@ -1029,9 +1029,9 @@ _eio_model_efl_object_destructor(Eo *obj , Eio_Model_Data *priv)
1029} 1029}
1030 1030
1031static void 1031static void
1032_eio_model_efl_object_invalidate(Eo *obj , Eio_Model_Data *priv) 1032_efl_io_model_efl_object_invalidate(Eo *obj , Efl_Io_Model_Data *priv)
1033{ 1033{
1034 _eio_model_efl_model_monitor_del(priv); 1034 _efl_io_model_efl_model_monitor_del(priv);
1035 1035
1036 // Unlink the object from the parent 1036 // Unlink the object from the parent
1037 if (priv->info) priv->info->object = NULL; 1037 if (priv->info) priv->info->object = NULL;
@@ -1060,7 +1060,7 @@ _eio_model_efl_object_invalidate(Eo *obj , Eio_Model_Data *priv)
1060 } 1060 }
1061 } 1061 }
1062 1062
1063 efl_invalidate(efl_super(obj, EIO_MODEL_CLASS)); 1063 efl_invalidate(efl_super(obj, EFL_IO_MODEL_CLASS));
1064} 1064}
1065 1065
1066#include "eio_model.eo.c" 1066#include "efl_io_model.eo.c"
diff --git a/src/lib/eio/eio_model.eo b/src/lib/eio/efl_io_model.eo
index c8776ff..9939a80 100644
--- a/src/lib/eio/eio_model.eo
+++ b/src/lib/eio/efl_io_model.eo
@@ -3,15 +3,15 @@ import eina_types;
3function EflIoFilter { 3function EflIoFilter {
4 [[EflIoFilter function]] 4 [[EflIoFilter function]]
5 params { 5 params {
6 @in model: Eio.Model; 6 @in model: Efl.Io.Model;
7 @in entry: ptr(Eina.File_Direct_Info); 7 @in entry: ptr(Eina.File_Direct_Info);
8 } 8 }
9 return: int; 9 return: int;
10}; 10};
11 11
12class Eio.Model extends Efl.Model_Loop 12class Efl.Io.Model extends Efl.Loop_Model
13{ 13{
14 [[Eio model class]] 14 [[Efl Io model class]]
15 15
16 methods { 16 methods {
17 children_filter_set { 17 children_filter_set {
diff --git a/src/lib/eio/eio_model_private.h b/src/lib/eio/efl_io_model_private.h
index bf1344a..8102406 100644
--- a/src/lib/eio/eio_model_private.h
+++ b/src/lib/eio/efl_io_model_private.h
@@ -1,13 +1,13 @@
1#ifndef _EIO_MODEL_PRIVATE_H 1#ifndef _EFL_IO_MODEL_PRIVATE_H
2#define _EIO_MODEL_PRIVATE_H 2#define _EFL_IO_MODEL_PRIVATE_H
3 3
4#define PROP_LIST_SIZE 8 4#define PROP_LIST_SIZE 8
5 5
6typedef struct _Eio_Model_Data Eio_Model_Data; 6typedef struct _Efl_Io_Model_Data Efl_Io_Model_Data;
7typedef struct _Eio_Model_Info Eio_Model_Info; 7typedef struct _Efl_Io_Model_Info Efl_Io_Model_Info;
8 8
9typedef struct _Eio_Model_Monitor_Data Eio_Model_Monitor_Data; 9typedef struct _Efl_Io_Model_Monitor_Data Efl_Io_Model_Monitor_Data;
10struct _Eio_Model_Monitor_Data 10struct _Efl_Io_Model_Monitor_Data
11{ 11{
12 Ecore_Event_Handler *ecore_child_add_handler[3]; 12 Ecore_Event_Handler *ecore_child_add_handler[3];
13 Ecore_Event_Handler *ecore_child_del_handler[3]; 13 Ecore_Event_Handler *ecore_child_del_handler[3];
@@ -18,7 +18,7 @@ struct _Eio_Model_Monitor_Data
18// FIXME: Would be more efficient to introduce an Eina_Path that assemble 18// FIXME: Would be more efficient to introduce an Eina_Path that assemble
19// an array of stringshare instead of using one mega stringshare directly. 19// an array of stringshare instead of using one mega stringshare directly.
20 20
21struct _Eio_Model_Info 21struct _Efl_Io_Model_Info
22{ 22{
23 Eina_Stringshare *path; 23 Eina_Stringshare *path;
24 Eo *object; 24 Eo *object;
@@ -33,14 +33,14 @@ struct _Eio_Model_Info
33 Eina_Bool child_ref : 1; 33 Eina_Bool child_ref : 1;
34}; 34};
35 35
36struct _Eio_Model_Data 36struct _Efl_Io_Model_Data
37{ 37{
38 Efl_Loop *loop; 38 Efl_Loop *loop;
39 Eio_Model *self; 39 Efl_Io_Model *self;
40 40
41 Eina_Stringshare *path;