summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Efl.am3
-rw-r--r--src/examples/elementary.mk4
-rw-r--r--src/examples/elementary/.gitignore2
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_1.c6
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_2.c6
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_3.c12
-rw-r--r--src/examples/elementary/layout_property_bind.c (renamed from src/examples/elementary/layout_model_connect.c)0
-rw-r--r--src/lib/efl/Efl.h3
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c3
-rw-r--r--src/lib/efl/interfaces/efl_ui_factory.eo9
-rw-r--r--src/lib/efl/interfaces/efl_ui_factory_bind.eo19
-rw-r--r--src/lib/efl/interfaces/efl_ui_model_connect.eo13
-rw-r--r--src/lib/efl/interfaces/efl_ui_property_bind.eo18
-rw-r--r--src/lib/efl/interfaces/meson.build3
-rw-r--r--src/lib/elementary/efl_ui_caching_factory.c8
-rw-r--r--src/lib/elementary/efl_ui_caching_factory.eo2
-rw-r--r--src/lib/elementary/efl_ui_image.c8
-rw-r--r--src/lib/elementary/efl_ui_image.eo4
-rw-r--r--src/lib/elementary/efl_ui_image_factory.c8
-rw-r--r--src/lib/elementary/efl_ui_image_factory.eo2
-rw-r--r--src/lib/elementary/efl_ui_layout.c66
-rw-r--r--src/lib/elementary/efl_ui_layout.eo6
-rw-r--r--src/lib/elementary/efl_ui_layout_factory.c64
-rw-r--r--src/lib/elementary/efl_ui_layout_factory.eo4
-rw-r--r--src/lib/elementary/efl_ui_widget_factory.c8
-rw-r--r--src/lib/elementary/efl_ui_widget_factory.eo4
-rw-r--r--src/lib/elementary/elc_fileselector_entry.c4
-rw-r--r--src/lib/elementary/elm_view_form.c4
-rw-r--r--src/tests/elementary/efl_ui_test_layout.c8
29 files changed, 162 insertions, 139 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 304fb43a42..b364beeab4 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -64,8 +64,9 @@ efl_eolian_files = \
64 lib/efl/interfaces/efl_ui_range_display.eo \ 64 lib/efl/interfaces/efl_ui_range_display.eo \
65 lib/efl/interfaces/efl_ui_range_interactive.eo \ 65 lib/efl/interfaces/efl_ui_range_interactive.eo \
66 lib/efl/interfaces/efl_ui_view.eo \ 66 lib/efl/interfaces/efl_ui_view.eo \
67 lib/efl/interfaces/efl_ui_model_connect.eo \ 67 lib/efl/interfaces/efl_ui_property_bind.eo \
68 lib/efl/interfaces/efl_ui_factory.eo \ 68 lib/efl/interfaces/efl_ui_factory.eo \
69 lib/efl/interfaces/efl_ui_factory_bind.eo \
69 lib/efl/interfaces/efl_screen.eo \ 70 lib/efl/interfaces/efl_screen.eo \
70 lib/efl/interfaces/efl_io_closer.eo \ 71 lib/efl/interfaces/efl_io_closer.eo \
71 lib/efl/interfaces/efl_io_positioner.eo \ 72 lib/efl/interfaces/efl_io_positioner.eo \
diff --git a/src/examples/elementary.mk b/src/examples/elementary.mk
index 0d817258dc..ac8fe37c41 100644
--- a/src/examples/elementary.mk
+++ b/src/examples/elementary.mk
@@ -64,7 +64,7 @@ elementary/label_example_03.c \
64elementary/layout_example_01.c \ 64elementary/layout_example_01.c \
65elementary/layout_example_02.c \ 65elementary/layout_example_02.c \
66elementary/layout_example_03.c \ 66elementary/layout_example_03.c \
67elementary/layout_model_connect.c \ 67elementary/layout_property_bind.c \
68elementary/list_example_01.c \ 68elementary/list_example_01.c \
69elementary/list_example_02.c \ 69elementary/list_example_02.c \
70elementary/list_example_03.c \ 70elementary/list_example_03.c \
@@ -283,7 +283,7 @@ elementary/label_example_03 \
283elementary/layout_example_01 \ 283elementary/layout_example_01 \
284elementary/layout_example_02 \ 284elementary/layout_example_02 \
285elementary/layout_example_03 \ 285elementary/layout_example_03 \
286elementary/layout_model_connect \ 286elementary/layout_property_bind \
287elementary/list_example_01 \ 287elementary/list_example_01 \
288elementary/list_example_02 \ 288elementary/list_example_02 \
289elementary/list_example_03 \ 289elementary/list_example_03 \
diff --git a/src/examples/elementary/.gitignore b/src/examples/elementary/.gitignore
index 54d71c14a0..11544b23ee 100644
--- a/src/examples/elementary/.gitignore
+++ b/src/examples/elementary/.gitignore
@@ -58,7 +58,7 @@
58/layout_example_01 58/layout_example_01
59/layout_example_02 59/layout_example_02
60/layout_example_03 60/layout_example_03
61/layout_model_connect 61/layout_property_bind
62/list_example_01 62/list_example_01
63/list_example_02 63/list_example_02
64/list_example_03 64/list_example_03
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 635a603a35..597d6c3ed1 100644
--- a/src/examples/elementary/efl_ui_list_view_example_1.c
+++ b/src/examples/elementary/efl_ui_list_view_example_1.c
@@ -87,9 +87,9 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
87 ); 87 );
88 88
89 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); 89 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
90 efl_ui_model_connect(factory, "signal/efl,state,%v", "odd_style"); 90 efl_ui_property_bind(factory, "signal/efl,state,%v", "odd_style");
91 efl_ui_model_connect(factory, "signal/efl,state,%{selected;unselected}", "selected"); 91 efl_ui_property_bind(factory, "signal/efl,state,%{selected;unselected}", "selected");
92 efl_ui_model_connect(factory, "efl.text", "name"); 92 efl_ui_property_bind(factory, "efl.text", "name");
93 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); 93 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
94 94
95 li = efl_add(EFL_UI_LIST_VIEW_CLASS, win 95 li = efl_add(EFL_UI_LIST_VIEW_CLASS, win
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 50f0706a0d..8721342fd6 100644
--- a/src/examples/elementary/efl_ui_list_view_example_2.c
+++ b/src/examples/elementary/efl_ui_list_view_example_2.c
@@ -33,7 +33,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
33 33
34 model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_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_property_bind(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");
38 38
39 li = efl_add(EFL_UI_LIST_VIEW_CLASS, win); 39 li = efl_add(EFL_UI_LIST_VIEW_CLASS, win);
@@ -45,8 +45,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
45 45
46 46
47 imgf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win); 47 imgf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win);
48 efl_ui_model_connect(imgf, "", "path"); //connect to "path" property 48 efl_ui_property_bind(imgf, "", "path"); //connect to "path" property
49 efl_ui_factory_model_connect(factory, "efl.icon", imgf); 49 efl_ui_factory_bind(factory, "efl.icon", imgf);
50 50
51 elm_win_resize_object_add(win, li); 51 elm_win_resize_object_add(win, li);
52 52
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 633c6e1c0d..47718a83d4 100644
--- a/src/examples/elementary/efl_ui_list_view_example_3.c
+++ b/src/examples/elementary/efl_ui_list_view_example_3.c
@@ -150,8 +150,8 @@ _realized_1_cb(void *data EINA_UNUSED, const Efl_Event *event)
150 150
151 evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0); 151 evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0);
152 evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL); 152 evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
153 efl_ui_model_connect(ie->layout, "efl.text", "name"); 153 efl_ui_property_bind(ie->layout, "efl.text", "name");
154 efl_ui_model_connect(ie->layout, "signal/efl,state,%v", "odd_style"); 154 efl_ui_property_bind(ie->layout, "signal/efl,state,%v", "odd_style");
155} 155}
156 156
157static void 157static void
@@ -163,7 +163,7 @@ _realized_2_cb(void *data EINA_UNUSED, const Efl_Event *event)
163 elm_object_focus_allow_set(ie->layout, EINA_TRUE); 163 elm_object_focus_allow_set(ie->layout, EINA_TRUE);
164 evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0); 164 evas_object_size_hint_weight_set(ie->layout, EVAS_HINT_EXPAND, 0);
165 evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL); 165 evas_object_size_hint_align_set(ie->layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
166 efl_ui_model_connect(ie->layout, "efl.text", "occupation"); 166 efl_ui_property_bind(ie->layout, "efl.text", "occupation");
167} 167}
168 168
169static Efl_Model* 169static Efl_Model*
@@ -222,7 +222,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
222 222
223 priv->model = _make_model(); 223 priv->model = _make_model();
224 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); 224 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
225 efl_ui_model_connect(factory, "efl.text", "filename"); 225 efl_ui_property_bind(factory, "efl.text", "filename");
226 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); 226 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
227 227
228 priv->list1 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model)); 228 priv->list1 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model));
@@ -233,8 +233,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
233 efl_ui_list_view_layout_factory_set(priv->list1, factory); 233 efl_ui_list_view_layout_factory_set(priv->list1, factory);
234 234
235 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); 235 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
236 efl_ui_model_connect(factory, "efl.text", "filename"); 236 efl_ui_property_bind(factory, "efl.text", "filename");
237 efl_ui_model_connect(factory, "signal/efl,state,%v", "selected"); 237 efl_ui_property_bind(factory, "signal/efl,state,%v", "selected");
238 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default"); 238 efl_ui_layout_factory_theme_config(factory, "list_item", NULL, "default");
239 priv->list2 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model)); 239 priv->list2 = efl_add(EFL_UI_LIST_VIEW_CLASS, win, efl_ui_view_model_set(efl_added, priv->model));
240 efl_event_callback_add(priv->list2, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_2_cb, priv->list2); 240 efl_event_callback_add(priv->list2, EFL_UI_LIST_VIEW_EVENT_ITEM_REALIZED, _realized_2_cb, priv->list2);
diff --git a/src/examples/elementary/layout_model_connect.c b/src/examples/elementary/layout_property_bind.c
index 65103d49d4..65103d49d4 100644
--- a/src/examples/elementary/layout_model_connect.c
+++ b/src/examples/elementary/layout_property_bind.c
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 097111134e..4b37800ced 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -149,8 +149,9 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
149#include "interfaces/efl_canvas_scene.eo.h" 149#include "interfaces/efl_canvas_scene.eo.h"
150#include "interfaces/efl_canvas_pointer.eo.h" 150#include "interfaces/efl_canvas_pointer.eo.h"
151#include "interfaces/efl_ui_view.eo.h" 151#include "interfaces/efl_ui_view.eo.h"
152#include "interfaces/efl_ui_model_connect.eo.h" 152#include "interfaces/efl_ui_property_bind.eo.h"
153#include "interfaces/efl_ui_factory.eo.h" 153#include "interfaces/efl_ui_factory.eo.h"
154#include "interfaces/efl_ui_factory_bind.eo.h"
154#include "interfaces/efl_ui_format.eo.h" 155#include "interfaces/efl_ui_format.eo.h"
155#include "interfaces/efl_cached_item.eo.h" 156#include "interfaces/efl_cached_item.eo.h"
156 157
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index 0ede9908f8..75ffcd984c 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -70,8 +70,9 @@
70#include "interfaces/efl_ui_range_interactive.eo.c" 70#include "interfaces/efl_ui_range_interactive.eo.c"
71#include "interfaces/efl_ui_autorepeat.eo.c" 71#include "interfaces/efl_ui_autorepeat.eo.c"
72#include "interfaces/efl_ui_view.eo.c" 72#include "interfaces/efl_ui_view.eo.c"
73#include "interfaces/efl_ui_model_connect.eo.c" 73#include "interfaces/efl_ui_property_bind.eo.c"
74#include "interfaces/efl_ui_factory.eo.c" 74#include "interfaces/efl_ui_factory.eo.c"
75#include "interfaces/efl_ui_factory_bind.eo.c"
75 76
76#include "interfaces/efl_ui_draggable.eo.c" 77#include "interfaces/efl_ui_draggable.eo.c"
77#include "interfaces/efl_ui_clickable.eo.c" 78#include "interfaces/efl_ui_clickable.eo.c"
diff --git a/src/lib/efl/interfaces/efl_ui_factory.eo b/src/lib/efl/interfaces/efl_ui_factory.eo
index 45be8aab80..7b4356a04b 100644
--- a/src/lib/efl/interfaces/efl_ui_factory.eo
+++ b/src/lib/efl/interfaces/efl_ui_factory.eo
@@ -4,7 +4,7 @@ struct Efl.Ui.Factory_Item_Created_Event {
4 item: Efl.Gfx.Entity; [[The item that was just created.]] 4 item: Efl.Gfx.Entity; [[The item that was just created.]]
5} 5}
6 6
7interface Efl.Ui.Factory extends Efl.Ui.Model.Connect 7interface Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind
8{ 8{
9 [[Efl UI factory interface]] 9 [[Efl UI factory interface]]
10 methods { 10 methods {
@@ -22,13 +22,6 @@ interface Efl.Ui.Factory extends Efl.Ui.Model.Connect
22 ui_view: Efl.Gfx.Entity; [[Efl canvas]] 22 ui_view: Efl.Gfx.Entity; [[Efl canvas]]
23 } 23 }
24 } 24 }
25 model_connect {
26 [[Connect factory to a model]]
27 params {
28 name: string; [[Model name]]
29 factory: Efl.Ui.Factory; [[Efl factory]]
30 }
31 }
32 } 25 }
33 events { 26 events {
34 created: Efl.Ui.Factory_Item_Created_Event; [[Event triggered when an item has been successfully created.]] 27 created: Efl.Ui.Factory_Item_Created_Event; [[Event triggered when an item has been successfully created.]]
diff --git a/src/lib/efl/interfaces/efl_ui_factory_bind.eo b/src/lib/efl/interfaces/efl_ui_factory_bind.eo
new file mode 100644
index 0000000000..0e36b44f05
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_factory_bind.eo
@@ -0,0 +1,19 @@
1interface Efl.Ui.Factory_Bind
2{
3 [[Efl UI Property interface.
4 view object can have @Efl.Model and need to set cotent with those model stored data.
5 the interface can help binding the factory to create object with model property data.
6 see @Efl.Model
7 see @Efl.Ui.Factory]]
8 methods {
9 factory_bind {
10 [[bind the factory with the given key string. when the data is ready or changed,
11 factory create the object and bind the data to the key action and process promised work.
12 Note: the input @Efl.Ui.Factory need to be @Efl.Ui.Property_Bind.property_bind at least once.]]
13 params {
14 key: string; [[Key string for bind model property data]]
15 factory: Efl.Ui.Factory; [[@Efl.Ui.Factory for create and bind model property data]]
16 }
17 }
18 }
19}
diff --git a/src/lib/efl/interfaces/efl_ui_model_connect.eo b/src/lib/efl/interfaces/efl_ui_model_connect.eo
deleted file mode 100644
index 4a5e2c1310..0000000000
--- a/src/lib/efl/interfaces/efl_ui_model_connect.eo
+++ /dev/null
@@ -1,13 +0,0 @@
1interface Efl.Ui.Model.Connect
2{
3 [[Efl UI model connect interface]]
4 methods {
5 connect {
6 [[Connect property]]
7 params {
8 name: string; [[Model name]]
9 property: string; [[Property name]]
10 }
11 }
12 }
13}
diff --git a/src/lib/efl/interfaces/efl_ui_property_bind.eo b/src/lib/efl/interfaces/efl_ui_property_bind.eo
new file mode 100644
index 0000000000..e709bd87c7
--- /dev/null
+++ b/src/lib/efl/interfaces/efl_ui_property_bind.eo
@@ -0,0 +1,18 @@
1interface Efl.Ui.Property_Bind
2{
3 [[Efl UI Property_Bind interface.
4 view object can have @Efl.Model to manage the data,
5 the interface can help loading and tracking child data from the model property.
6 see @Efl.Model
7 see @Efl.Ui.Factory]]
8 methods {
9 property_bind {
10 [[bind property data with the given key string. when the data is ready or changed,
11 bind the data to the key action and process promised work.]]
12 params {
13 key: string; [[key string for bind model property data]]
14 property: string; [[Model property name]]
15 }
16 }
17 }
18}
diff --git a/src/lib/efl/interfaces/meson.build b/src/lib/efl/interfaces/meson.build
index a1ef0ee2ae..4c862196d2 100644
--- a/src/lib/efl/interfaces/meson.build
+++ b/src/lib/efl/interfaces/meson.build
@@ -90,8 +90,9 @@ pub_eo_files = [
90 'efl_ui_range_display.eo', 90 'efl_ui_range_display.eo',
91 'efl_ui_range_interactive.eo', 91 'efl_ui_range_interactive.eo',
92 'efl_ui_view.eo', 92 'efl_ui_view.eo',
93 'efl_ui_model_connect.eo', 93 'efl_ui_property_bind.eo',
94 'efl_ui_factory.eo', 94 'efl_ui_factory.eo',
95 'efl_ui_factory_bind.eo',
95 'efl_ui_multi_selectable.eo', 96 'efl_ui_multi_selectable.eo',
96 'efl_screen.eo', 97 'efl_screen.eo',
97 'efl_io_closer.eo', 98 'efl_io_closer.eo',
diff --git a/src/lib/elementary/efl_ui_caching_factory.c b/src/lib/elementary/efl_ui_caching_factory.c
index 49a316e01e..cfd8182617 100644
--- a/src/lib/elementary/efl_ui_caching_factory.c
+++ b/src/lib/elementary/efl_ui_caching_factory.c
@@ -325,12 +325,12 @@ _efl_ui_caching_factory_efl_object_parent_set(Eo *obj, Efl_Ui_Caching_Factory_Da
325} 325}
326 326
327static void 327static void
328_efl_ui_caching_factory_efl_ui_model_connect_connect(Eo *obj, Efl_Ui_Caching_Factory_Data *pd, 328_efl_ui_caching_factory_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Caching_Factory_Data *pd,
329 const char *name, const char *property) 329 const char *key, const char *property)
330{ 330{
331 if (!strcmp(name, "style")) 331 if (!strcmp(key, "style"))
332 eina_stringshare_replace(&pd->style, property); 332 eina_stringshare_replace(&pd->style, property);
333 efl_ui_model_connect(efl_super(obj, EFL_UI_CACHING_FACTORY_CLASS), name, property); 333 efl_ui_property_bind(efl_super(obj, EFL_UI_CACHING_FACTORY_CLASS), key, property);
334} 334}
335 335
336#include "efl_ui_caching_factory.eo.c" 336#include "efl_ui_caching_factory.eo.c"
diff --git a/src/lib/elementary/efl_ui_caching_factory.eo b/src/lib/elementary/efl_ui_caching_factory.eo
index ad97a12c88..ee53983a54 100644
--- a/src/lib/elementary/efl_ui_caching_factory.eo
+++ b/src/lib/elementary/efl_ui_caching_factory.eo
@@ -36,7 +36,7 @@ class Efl.Ui.Caching_Factory extends Efl.Ui.Widget_Factory
36 implements { 36 implements {
37 Efl.Ui.Factory.create; 37 Efl.Ui.Factory.create;
38 Efl.Ui.Factory.release; 38 Efl.Ui.Factory.release;
39 Efl.Ui.Model.Connect.connect; 39 Efl.Ui.Property_Bind.property_bind;
40 Efl.Ui.Widget_Factory.item_class { get; set; } 40 Efl.Ui.Widget_Factory.item_class { get; set; }
41 Efl.Object.invalidate; 41 Efl.Object.invalidate;
42 Efl.Object.parent { set; } 42 Efl.Object.parent { set; }
diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c
index ff2a7cb6ef..0b6ecf5b89 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -1952,20 +1952,20 @@ _efl_ui_image_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Data
1952} 1952}
1953 1953
1954EOLIAN static void 1954EOLIAN static void
1955_efl_ui_image_efl_ui_model_connect_connect(Eo *obj, Efl_Ui_Image_Data *pd, const char *name, const char *property) 1955_efl_ui_image_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Image_Data *pd, const char *key, const char *property)
1956{ 1956{
1957 if (strcmp(name, "filename") == 0) 1957 if (strcmp(key, "filename") == 0)
1958 { 1958 {
1959 pd->property.icon = EINA_FALSE; 1959 pd->property.icon = EINA_FALSE;
1960 eina_stringshare_replace(&pd->property.file, property); 1960 eina_stringshare_replace(&pd->property.file, property);
1961 } 1961 }
1962 else if (strcmp(name, "icon") == 0) 1962 else if (strcmp(key, "icon") == 0)
1963 { 1963 {
1964 pd->property.icon = EINA_TRUE; 1964 pd->property.icon = EINA_TRUE;
1965 eina_stringshare_replace(&pd->property.file, property); 1965 eina_stringshare_replace(&pd->property.file, property);
1966 eina_stringshare_replace(&pd->property.key, NULL); 1966 eina_stringshare_replace(&pd->property.key, NULL);
1967 } 1967 }
1968 else if (strcmp(name, "key") == 0) 1968 else if (strcmp(key, "key") == 0)
1969 { 1969 {
1970 eina_stringshare_replace(&pd->property.key, property); 1970 eina_stringshare_replace(&pd->property.key, property);
1971 } 1971 }
diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo
index 47e37a77c1..8cdc14ff5b 100644
--- a/src/lib/elementary/efl_ui_image.eo
+++ b/src/lib/elementary/efl_ui_image.eo
@@ -22,7 +22,7 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Dra
22 Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Gfx.View, 22 Efl.File, Efl.Gfx.Image, Efl.Gfx.Image_Load_Controller, Efl.Player, Efl.Gfx.View,
23 Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color, 23 Efl.Access.Component, Efl.Access.Widget.Action, Efl.Gfx.Color,
24 Efl.Orientation, 24 Efl.Orientation,
25 Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Layout.Calc, 25 Efl.Ui.View, Efl.Ui.Property_Bind, Efl.Layout.Calc,
26 Efl.Layout.Group, Efl.Layout.Signal 26 Efl.Layout.Group, Efl.Layout.Signal
27{ 27{
28 [[ Efl UI image class]] 28 [[ Efl UI image class]]
@@ -118,7 +118,7 @@ class Efl.Ui.Image extends Efl.Ui.Widget implements Efl.Ui.Clickable, Efl.Ui.Dra
118 Efl.Canvas.Object.clip { set; } 118 Efl.Canvas.Object.clip { set; }
119 Efl.Canvas.Group.group_member_add; 119 Efl.Canvas.Group.group_member_add;
120 Efl.Ui.Draggable.drag_target { get; set; } 120 Efl.Ui.Draggable.drag_target { get; set; }
121 Efl.Ui.Model.Connect.connect; 121 Efl.Ui.Property_Bind.property_bind;
122 Efl.Ui.View.model { get; set; } 122 Efl.Ui.View.model { get; set; }
123 Efl.Ui.Widget.theme_apply; 123 Efl.Ui.Widget.theme_apply;
124 Efl.Ui.Widget.widget_event; 124 Efl.Ui.Widget.widget_event;
diff --git a/src/lib/elementary/efl_ui_image_factory.c b/src/lib/elementary/efl_ui_image_factory.c
index 4cd08cd5f5..1b34c110b2 100644
--- a/src/lib/elementary/efl_ui_image_factory.c
+++ b/src/lib/elementary/efl_ui_image_factory.c
@@ -34,14 +34,14 @@ _efl_ui_image_factory_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Image_Fa
34} 34}
35 35
36static Eina_Value 36static Eina_Value
37_efl_ui_image_factory_connect(Eo *obj EINA_UNUSED, void *data, const Eina_Value value) 37_efl_ui_image_factory_bind(Eo *obj EINA_UNUSED, void *data, const Eina_Value value)
38{ 38{
39 Efl_Gfx_Entity *entity = NULL; 39 Efl_Gfx_Entity *entity = NULL;
40 Efl_Ui_Image_Factory_Data *pd = data; 40 Efl_Ui_Image_Factory_Data *pd = data;
41 41
42 eina_value_pget(&value, &entity); 42 eina_value_pget(&value, &entity);
43 43
44 efl_ui_model_connect(entity, "filename", pd->property); 44 efl_ui_property_bind(entity, "filename", pd->property);
45 45
46 return value; 46 return value;
47} 47}
@@ -58,12 +58,12 @@ _efl_ui_image_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Image_Factory_Data *
58 58
59 return efl_future_then(obj, f, 59 return efl_future_then(obj, f,
60 .success_type = EINA_VALUE_TYPE_OBJECT, 60 .success_type = EINA_VALUE_TYPE_OBJECT,
61 .success = _efl_ui_image_factory_connect, 61 .success = _efl_ui_image_factory_bind,
62 .data = pd); 62 .data = pd);
63} 63}
64 64
65EOLIAN static void 65EOLIAN static void
66_efl_ui_image_factory_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Image_Factory_Data *pd, const char *name EINA_UNUSED, const char *property) 66_efl_ui_image_factory_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_Ui_Image_Factory_Data *pd, const char *key EINA_UNUSED, const char *property)
67{ 67{
68 eina_stringshare_replace(&pd->property, property); 68 eina_stringshare_replace(&pd->property, property);
69} 69}
diff --git a/src/lib/elementary/efl_ui_image_factory.eo b/src/lib/elementary/efl_ui_image_factory.eo
index 2b5c97e4b4..884fb9099c 100644
--- a/src/lib/elementary/efl_ui_image_factory.eo
+++ b/src/lib/elementary/efl_ui_image_factory.eo
@@ -5,6 +5,6 @@ class Efl.Ui.Image_Factory extends Efl.Ui.Caching_Factory
5 Efl.Object.constructor; 5 Efl.Object.constructor;
6 Efl.Object.destructor; 6 Efl.Object.destructor;
7 Efl.Ui.Factory.create; 7 Efl.Ui.Factory.create;
8 Efl.Ui.Model.Connect.connect; 8 Efl.Ui.Property_Bind.property_bind;
9 } 9 }
10} 10}
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 034cd04870..ae7b5183ba 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -76,7 +76,7 @@ struct _Efl_Ui_Layout_Factory_Tracking
76{ 76{
77 Efl_Ui_Factory *factory; 77 Efl_Ui_Factory *factory;
78 Eina_Future *in_flight; 78 Eina_Future *in_flight;
79 Eina_Stringshare *name; 79 Eina_Stringshare *key;
80}; 80};
81 81
82 82
@@ -2085,7 +2085,7 @@ struct _Efl_Ui_Layout_Factory_Request
2085 Efl_Ui_Layout_Factory_Tracking *tracking; 2085 Efl_Ui_Layout_Factory_Tracking *tracking;
2086 Efl_Ui_Layout_Data *pd; 2086 Efl_Ui_Layout_Data *pd;
2087 Efl_Ui_Factory *factory; 2087 Efl_Ui_Factory *factory;
2088 const char *name; 2088 const char *key;
2089}; 2089};
2090 2090
2091static Eina_Value 2091static Eina_Value
@@ -2098,11 +2098,11 @@ _content_created(Eo *obj, void *data, const Eina_Value value)
2098 eina_value_get(&value, &content); 2098 eina_value_get(&value, &content);
2099 2099
2100 // Recycle old content 2100 // Recycle old content
2101 old_content = elm_layout_content_get(obj, request->name); 2101 old_content = elm_layout_content_get(obj, request->key);
2102 if (old_content) efl_ui_factory_release(request->factory, old_content); 2102 if (old_content) efl_ui_factory_release(request->factory, old_content);
2103 2103
2104 // Set new content 2104 // Set new content
2105 elm_layout_content_set(obj, request->name, content); 2105 elm_layout_content_set(obj, request->key, content);
2106 2106
2107 return value; 2107 return value;
2108} 2108}
@@ -2113,13 +2113,13 @@ _clean_request(Eo *obj EINA_UNUSED, void *data, const Eina_Future *dead_future E
2113 Efl_Ui_Layout_Factory_Request *request = data; 2113 Efl_Ui_Layout_Factory_Request *request = data;
2114 2114
2115 request->tracking->in_flight = NULL; 2115 request->tracking->in_flight = NULL;
2116 eina_stringshare_del(request->name); 2116 eina_stringshare_del(request->key);
2117 efl_unref(request->factory); 2117 efl_unref(request->factory);
2118 free(request); 2118 free(request);
2119} 2119}
2120 2120
2121static void 2121static void
2122_efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_Factory_Tracking *tracking, const char *name) 2122_efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_Factory_Tracking *tracking, const char *key)
2123{ 2123{
2124 Efl_Ui_Layout_Factory_Request *request = calloc(1, sizeof (Efl_Ui_Layout_Factory_Request)); 2124 Efl_Ui_Layout_Factory_Request *request = calloc(1, sizeof (Efl_Ui_Layout_Factory_Request));
2125 Eina_Future *f; 2125 Eina_Future *f;
@@ -2128,7 +2128,7 @@ _efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Data *pd, Efl_Ui_Layout_F
2128 2128
2129 if (tracking->in_flight) eina_future_cancel(tracking->in_flight); 2129 if (tracking->in_flight) eina_future_cancel(tracking->in_flight);
2130 2130
2131 request->name = eina_stringshare_ref(name); 2131 request->key = eina_stringshare_ref(key);
2132 request->pd = pd; 2132 request->pd = pd;
2133 request->factory = efl_ref(tracking->factory); 2133 request->factory = efl_ref(tracking->factory);
2134 request->tracking = tracking; 2134 request->tracking = tracking;
@@ -2205,7 +2205,7 @@ _efl_ui_layout_factory_free(Efl_Ui_Layout_Factory_Tracking *tracking)
2205{ 2205{
2206 if (tracking->in_flight) eina_future_cancel(tracking->in_flight); 2206 if (tracking->in_flight) eina_future_cancel(tracking->in_flight);
2207 efl_unref(tracking->factory); 2207 efl_unref(tracking->factory);
2208 eina_stringshare_del(tracking->name); 2208 eina_stringshare_del(tracking->key);
2209 free(tracking); 2209 free(tracking);
2210} 2210}
2211 2211
@@ -2222,7 +2222,7 @@ _efl_ui_layout_connect_hash(Efl_Ui_Layout_Data *pd)
2222EOLIAN static void 2222EOLIAN static void
2223_efl_ui_layout_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model *model) 2223_efl_ui_layout_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model *model)
2224{ 2224{
2225 Eina_Stringshare *name; 2225 Eina_Stringshare *key;
2226 Eina_Hash_Tuple *tuple; 2226 Eina_Hash_Tuple *tuple;
2227 Eina_Iterator *it; 2227 Eina_Iterator *it;
2228 2228
@@ -2241,9 +2241,9 @@ _efl_ui_layout_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model
2241 2241
2242 // Reset to empty state 2242 // Reset to empty state
2243 it = eina_hash_iterator_key_new(pd->connect.properties); 2243 it = eina_hash_iterator_key_new(pd->connect.properties);
2244 EINA_ITERATOR_FOREACH(it, name) 2244 EINA_ITERATOR_FOREACH(it, key)
2245 { 2245 {
2246 efl_text_set(efl_part(obj, name), NULL); 2246 efl_text_set(efl_part(obj, key), NULL);
2247 } 2247 }
2248 eina_iterator_free(it); 2248 eina_iterator_free(it);
2249 2249
@@ -2253,15 +2253,15 @@ _efl_ui_layout_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Data *pd, Efl_Model
2253 Efl_Ui_Layout_Factory_Tracking *factory; 2253 Efl_Ui_Layout_Factory_Tracking *factory;
2254 Efl_Gfx_Entity *content; 2254 Efl_Gfx_Entity *content;
2255 2255
2256 name = tuple->key; 2256 key = tuple->key;
2257 factory = tuple->data; 2257 factory = tuple->data;
2258 2258
2259 // Cancel in flight creation request 2259 // Cancel in flight creation request
2260 if (factory->in_flight) eina_future_cancel(factory->in_flight); 2260 if (factory->in_flight) eina_future_cancel(factory->in_flight);
2261 2261
2262 // Cleanup content 2262 // Cleanup content
2263 content = elm_layout_content_get(obj, name); 2263 content = elm_layout_content_get(obj, key);
2264 elm_layout_content_set(obj, name, NULL); 2264 elm_layout_content_set(obj, key, NULL);
2265 2265
2266 // And recycle it 2266 // And recycle it
2267 efl_ui_factory_release(factory->factory, content); 2267 efl_ui_factory_release(factory->factory, content);
@@ -2279,30 +2279,30 @@ _efl_ui_layout_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Da
2279} 2279}
2280 2280
2281EOLIAN static void 2281EOLIAN static void
2282_efl_ui_layout_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, const char *name, const char *property) 2282_efl_ui_layout_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, const char *key, const char *property)
2283{ 2283{
2284 EINA_SAFETY_ON_NULL_RETURN(name); 2284 EINA_SAFETY_ON_NULL_RETURN(key);
2285 Eina_Stringshare *sprop; 2285 Eina_Stringshare *sprop;
2286 Eina_Hash *hash = NULL; 2286 Eina_Hash *hash = NULL;
2287 char *data = NULL; 2287 char *data = NULL;
2288 2288
2289 if (!_elm_layout_part_aliasing_eval(obj, &name, EINA_TRUE)) 2289 if (!_elm_layout_part_aliasing_eval(obj, &key, EINA_TRUE))
2290 return; 2290 return;
2291 2291
2292 _efl_ui_layout_connect_hash(pd); 2292 _efl_ui_layout_connect_hash(pd);
2293 2293
2294 sprop = eina_stringshare_add(property); 2294 sprop = eina_stringshare_add(property);
2295 2295
2296 // FIXME: prevent double connect of name to multiple property ? 2296 // FIXME: prevent double connect of key to multiple property ?
2297 if (strncmp(SIGNAL_PREFIX, name, sizeof(SIGNAL_PREFIX) - 1) == 0) 2297 if (strncmp(SIGNAL_PREFIX, key, sizeof(SIGNAL_PREFIX) - 1) == 0)
2298 { 2298 {
2299 hash = pd->connect.signals; 2299 hash = pd->connect.signals;
2300 data = strdup(name + sizeof(SIGNAL_PREFIX) - 1); 2300 data = strdup(key + sizeof(SIGNAL_PREFIX) - 1);
2301 } 2301 }
2302 else 2302 else
2303 { 2303 {
2304 hash = pd->connect.properties; 2304 hash = pd->connect.properties;
2305 data = strdup(name); 2305 data = strdup(key);
2306 } 2306 }
2307 2307
2308 if (!sprop) 2308 if (!sprop)
@@ -2328,30 +2328,30 @@ _efl_ui_layout_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_D
2328} 2328}
2329 2329
2330EOLIAN static void 2330EOLIAN static void
2331_efl_ui_layout_efl_ui_factory_model_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd, 2331_efl_ui_layout_efl_ui_factory_bind_factory_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Data *pd,
2332 const char *name, Efl_Ui_Factory *factory) 2332 const char *key, Efl_Ui_Factory *factory)
2333{ 2333{
2334 EINA_SAFETY_ON_NULL_RETURN(name); 2334 EINA_SAFETY_ON_NULL_RETURN(key);
2335 Efl_Ui_Layout_Factory_Tracking *tracking; 2335 Efl_Ui_Layout_Factory_Tracking *tracking;
2336 Eina_Stringshare *ss_name; 2336 Eina_Stringshare *ss_key;
2337 2337
2338 if (!_elm_layout_part_aliasing_eval(obj, &name, EINA_TRUE)) 2338 if (!_elm_layout_part_aliasing_eval(obj, &key, EINA_TRUE))
2339 return; 2339 return;
2340 2340
2341 if (!pd->connect.factories) 2341 if (!pd->connect.factories)
2342 pd->connect.factories = eina_hash_stringshared_new(EINA_FREE_CB(_efl_ui_layout_factory_free)); 2342 pd->connect.factories = eina_hash_stringshared_new(EINA_FREE_CB(_efl_ui_layout_factory_free));
2343 2343
2344 ss_name = eina_stringshare_add(name); 2344 ss_key = eina_stringshare_add(key);
2345 2345
2346 // First undo the old one if there is one 2346 // First undo the old one if there is one
2347 tracking = eina_hash_find(pd->connect.factories, ss_name); 2347 tracking = eina_hash_find(pd->connect.factories, ss_key);
2348 if (tracking) 2348 if (tracking)
2349 { 2349 {
2350 Efl_Gfx_Entity *old; 2350 Efl_Gfx_Entity *old;
2351 2351
2352 // Unset and recycle 2352 // Unset and recycle
2353 old = elm_layout_content_get(obj, ss_name); 2353 old = elm_layout_content_get(obj, ss_key);
2354 elm_layout_content_set(obj, ss_name, NULL); 2354 elm_layout_content_set(obj, ss_key, NULL);
2355 if (old) efl_ui_factory_release(tracking->factory, old); 2355 if (old) efl_ui_factory_release(tracking->factory, old);
2356 2356
2357 // Stop in flight request 2357 // Stop in flight request
@@ -2365,15 +2365,15 @@ _efl_ui_layout_efl_ui_factory_model_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_D
2365 tracking = calloc(1, sizeof (Efl_Ui_Layout_Factory_Tracking)); 2365 tracking = calloc(1, sizeof (Efl_Ui_Layout_Factory_Tracking));
2366 if (!tracking) return ; 2366 if (!tracking) return ;
2367 2367
2368 tracking->name = ss_name; 2368 tracking->key = ss_key;
2369 2369
2370 eina_hash_add(pd->connect.factories, ss_name, tracking); 2370 eina_hash_add(pd->connect.factories, ss_key, tracking);
2371 } 2371 }
2372 2372
2373 // And update content with the new factory 2373 // And update content with the new factory
2374 tracking->factory = efl_ref(factory); 2374 tracking->factory = efl_ref(factory);
2375 2375
2376 _efl_ui_layout_view_model_content_update(pd, tracking, ss_name); 2376 _efl_ui_layout_view_model_content_update(pd, tracking, ss_key);
2377} 2377}
2378 2378
2379EOLIAN static Eo * 2379EOLIAN static Eo *
diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo
index 72a294855f..b1855cfcd0 100644
--- a/src/lib/elementary/efl_ui_layout.eo
+++ b/src/lib/elementary/efl_ui_layout.eo
@@ -1,7 +1,7 @@
1import efl_ui; 1import efl_ui;
2 2
3class Efl.Ui.Layout extends Efl.Ui.Widget implements Efl.Container, Efl.File, 3class Efl.Ui.Layout extends Efl.Ui.Widget implements Efl.Container, Efl.File,
4 Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Ui.Factory, 4 Efl.Ui.View, Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind,
5 Efl.Layout.Calc, Efl.Layout.Signal, 5 Efl.Layout.Calc, Efl.Layout.Signal,
6 Efl.Layout.Group 6 Efl.Layout.Group
7{ 7{
@@ -76,8 +76,8 @@ class Efl.Ui.Layout extends Efl.Ui.Widget implements Efl.Container, Efl.File,
76 Efl.Container.content_iterate; 76 Efl.Container.content_iterate;
77 Efl.Part.part_get; 77 Efl.Part.part_get;
78 Efl.Ui.View.model { get; set; } 78 Efl.Ui.View.model { get; set; }
79 Efl.Ui.Model.Connect.connect; 79 Efl.Ui.Property_Bind.property_bind;
80 Efl.Ui.Factory.model_connect; 80 Efl.Ui.Factory_Bind.factory_bind;
81 } 81 }
82 events { 82 events {
83 theme,changed: void; [[Called when theme changed]] 83 theme,changed: void; [[Called when theme changed]]
diff --git a/src/lib/elementary/efl_ui_layout_factory.c b/src/lib/elementary/efl_ui_layout_factory.c
index 0d81136114..d2f3488dc7 100644
--- a/src/lib/elementary/efl_ui_layout_factory.c
+++ b/src/lib/elementary/efl_ui_layout_factory.c
@@ -10,33 +10,35 @@
10 10
11typedef struct _Efl_Ui_Layout_Factory_Data 11typedef struct _Efl_Ui_Layout_Factory_Data
12{ 12{
13 Eina_Hash *connects; 13 struct {
14 Eina_Hash *factory_connects; 14 Eina_Hash *properties;
15 Eina_Hash *factories;
16 } bind;
15 Eina_Stringshare *klass; 17 Eina_Stringshare *klass;
16 Eina_Stringshare *group; 18 Eina_Stringshare *group;
17 Eina_Stringshare *style; 19 Eina_Stringshare *style;
18} Efl_Ui_Layout_Factory_Data; 20} Efl_Ui_Layout_Factory_Data;
19 21
20Eina_Bool 22Eina_Bool
21_model_connect(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) 23_property_bind(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata)
22{ 24{
23 Eo *layout = fdata; 25 Eo *layout = fdata;
24 Eina_Stringshare *name = key; 26 Eina_Stringshare *ss_key = key;
25 Eina_Stringshare *property = data; 27 Eina_Stringshare *property = data;
26 28
27 efl_ui_model_connect(layout, name, property); 29 efl_ui_property_bind(layout, ss_key, property);
28 30
29 return EINA_TRUE; 31 return EINA_TRUE;
30} 32}
31 33
32Eina_Bool 34Eina_Bool
33_factory_model_connect(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata) 35_factory_bind(const Eina_Hash *hash EINA_UNUSED, const void *key, void *data, void *fdata)
34{ 36{
35 Eo *layout = fdata; 37 Eo *layout = fdata;
36 Eina_Stringshare *name = key; 38 Eina_Stringshare *ss_key = key;
37 Efl_Ui_Factory *factory = data; 39 Efl_Ui_Factory *factory = data;
38 40
39 efl_ui_factory_model_connect(layout, name, factory); 41 efl_ui_factory_bind(layout, ss_key, factory);
40 return EINA_TRUE; 42 return EINA_TRUE;
41} 43}
42 44
@@ -47,8 +49,8 @@ _efl_ui_layout_factory_efl_object_constructor(Eo *obj, Efl_Ui_Layout_Factory_Dat
47 49
48 efl_ui_widget_factory_item_class_set(obj, EFL_UI_LAYOUT_CLASS); 50 efl_ui_widget_factory_item_class_set(obj, EFL_UI_LAYOUT_CLASS);
49 51
50 pd->connects = eina_hash_stringshared_new(EINA_FREE_CB(eina_stringshare_del)); 52 pd->bind.properties = eina_hash_stringshared_new(EINA_FREE_CB(eina_stringshare_del));
51 pd->factory_connects = eina_hash_stringshared_new(EINA_FREE_CB(efl_unref)); 53 pd->bind.factories = eina_hash_stringshared_new(EINA_FREE_CB(efl_unref));
52 54
53 return obj; 55 return obj;
54} 56}
@@ -60,14 +62,14 @@ _efl_ui_layout_factory_efl_object_destructor(Eo *obj, Efl_Ui_Layout_Factory_Data
60 eina_stringshare_del(pd->group); 62 eina_stringshare_del(pd->group);
61 eina_stringshare_del(pd->style); 63 eina_stringshare_del(pd->style);
62 64
63 eina_hash_free(pd->connects); 65 eina_hash_free(pd->bind.properties);
64 eina_hash_free(pd->factory_connects); 66 eina_hash_free( pd->bind.factories);
65 67
66 efl_destructor(efl_super(obj, MY_CLASS)); 68 efl_destructor(efl_super(obj, MY_CLASS));
67} 69}
68 70
69static Eina_Value 71static Eina_Value
70_efl_ui_layout_factory_connect(Eo *obj EINA_UNUSED, void *data, const Eina_Value value) 72_efl_ui_layout_factory_bind(Eo *obj EINA_UNUSED, void *data, const Eina_Value value)
71{ 73{
72 Efl_Ui_Layout_Factory_Data *pd = data; 74 Efl_Ui_Layout_Factory_Data *pd = data;
73 Efl_Gfx_Entity *layout; 75 Efl_Gfx_Entity *layout;
@@ -76,8 +78,8 @@ _efl_ui_layout_factory_connect(Eo *obj EINA_UNUSED, void *data, const Eina_Value
76 78
77 efl_ui_layout_theme_set(layout, pd->klass, pd->group, pd->style); 79 efl_ui_layout_theme_set(layout, pd->klass, pd->group, pd->style);
78 80
79 eina_hash_foreach(pd->connects, _model_connect, layout); 81 eina_hash_foreach(pd->bind.properties, _property_bind, layout);
80 eina_hash_foreach(pd->factory_connects, _factory_model_connect, layout); 82 eina_hash_foreach(pd->bind.factories, _factory_bind, layout);
81 83
82 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0); 84 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0);
83 evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL); 85 evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -95,52 +97,52 @@ _efl_ui_layout_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Layout_Factory_Data
95 97
96 return efl_future_then(obj, f, 98 return efl_future_then(obj, f,
97 .success_type = EINA_VALUE_TYPE_OBJECT, 99 .success_type = EINA_VALUE_TYPE_OBJECT,
98 .success = _efl_ui_layout_factory_connect, 100 .success = _efl_ui_layout_factory_bind,
99 .data = pd); 101 .data = pd);
100} 102}
101 103
102EOLIAN static void 104EOLIAN static void
103_efl_ui_layout_factory_efl_ui_factory_model_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd 105_efl_ui_layout_factory_efl_ui_factory_bind_factory_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd,
104 , const char *name, Efl_Ui_Factory *factory) 106 const char *key, Efl_Ui_Factory *factory)
105{ 107{
106 Eina_Stringshare *ss_name; 108 Eina_Stringshare *ss_key;
107 Efl_Ui_Factory *f_old; 109 Efl_Ui_Factory *f_old;
108 ss_name = eina_stringshare_add(name); 110 ss_key = eina_stringshare_add(key);
109 111
110 if (factory == NULL) 112 if (factory == NULL)
111 { 113 {
112 eina_hash_del(pd->factory_connects, ss_name, NULL); 114 eina_hash_del(pd->bind.factories, ss_key, NULL);
113 return; 115 return;
114 } 116 }
115 117
116 f_old = eina_hash_set(pd->factory_connects, ss_name, efl_ref(factory)); 118 f_old = eina_hash_set(pd->bind.factories, ss_key, efl_ref(factory));
117 if (f_old) 119 if (f_old)
118 { 120 {
119 efl_unref(f_old); 121 efl_unref(f_old);
120 eina_stringshare_del(ss_name); 122 eina_stringshare_del(ss_key);
121 } 123 }
122} 124}
123 125
124EOLIAN static void 126EOLIAN static void
125_efl_ui_layout_factory_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd 127_efl_ui_layout_factory_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd,
126 , const char *name, const char *property) 128 const char *key, const char *property)
127{ 129{
128 Eina_Stringshare *ss_name, *ss_prop, *ss_old; 130 Eina_Stringshare *ss_key, *ss_prop, *ss_old;
129 ss_name = eina_stringshare_add(name); 131 ss_key = eina_stringshare_add(key);
130 132
131 if (property == NULL) 133 if (property == NULL)
132 { 134 {
133 eina_hash_del(pd->connects, ss_name, NULL); 135 eina_hash_del(pd->bind.properties, ss_key, NULL);
134 eina_stringshare_del(ss_name); 136 eina_stringshare_del(ss_key);
135 return; 137 return;
136 } 138 }
137 139
138 ss_prop = eina_stringshare_add(property); 140 ss_prop = eina_stringshare_add(property);
139 ss_old = eina_hash_set(pd->connects, ss_name, ss_prop); 141 ss_old = eina_hash_set(pd->bind.properties, ss_key, ss_prop);
140 if (ss_old) 142 if (ss_old)
141 { 143 {
142 eina_stringshare_del(ss_old); 144 eina_stringshare_del(ss_old);
143 eina_stringshare_del(ss_name); 145 eina_stringshare_del(ss_key);
144 } 146 }
145 147
146} 148}
diff --git a/src/lib/elementary/efl_ui_layout_factory.eo b/src/lib/elementary/efl_ui_layout_factory.eo
index ea71e89a32..75ced32ed7 100644
--- a/src/lib/elementary/efl_ui_layout_factory.eo
+++ b/src/lib/elementary/efl_ui_layout_factory.eo
@@ -16,7 +16,7 @@ class Efl.Ui.Layout_Factory extends Efl.Ui.Caching_Factory
16 Efl.Object.constructor; 16 Efl.Object.constructor;
17 Efl.Object.destructor; 17 Efl.Object.destructor;
18 Efl.Ui.Factory.create; 18 Efl.Ui.Factory.create;
19 Efl.Ui.Factory.model_connect; 19 Efl.Ui.Property_Bind.property_bind;
20 Efl.Ui.Model.Connect.connect; 20 Efl.Ui.Factory_Bind.factory_bind;
21 } 21 }
22} 22}
diff --git a/src/lib/elementary/efl_ui_widget_factory.c b/src/lib/elementary/efl_ui_widget_factory.c
index b83a0a79aa..a8602a4174 100644
--- a/src/lib/elementary/efl_ui_widget_factory.c
+++ b/src/lib/elementary/efl_ui_widget_factory.c
@@ -116,16 +116,16 @@ _efl_ui_widget_factory_efl_ui_factory_release(Eo *obj EINA_UNUSED,
116} 116}
117 117
118static void 118static void
119_efl_ui_widget_factory_efl_ui_model_connect_connect(Eo *obj, Efl_Ui_Widget_Factory_Data *pd, 119_efl_ui_widget_factory_efl_ui_property_bind_property_bind(Eo *obj, Efl_Ui_Widget_Factory_Data *pd,
120 const char *name, const char *property) 120 const char *target, const char *property)
121{ 121{
122 if (!strcmp(name, "style")) 122 if (!strcmp(target, "style"))
123 { 123 {
124 eina_stringshare_replace(&pd->style, property); 124 eina_stringshare_replace(&pd->style, property);
125 return ; 125 return ;
126 } 126 }
127 127
128 efl_ui_model_connect(efl_super(obj, EFL_UI_WIDGET_FACTORY_CLASS), name, property); 128 efl_ui_property_bind(efl_super(obj, EFL_UI_WIDGET_FACTORY_CLASS), target, property);
129} 129}
130 130
131#include "efl_ui_widget_factory.eo.c" 131#include "efl_ui_widget_factory.eo.c"
diff --git a/src/lib/elementary/efl_ui_widget_factory.eo b/src/lib/elementary/efl_ui_widget_factory.eo
index 63eb3c28db..4542a4879c 100644
--- a/src/lib/elementary/efl_ui_widget_factory.eo
+++ b/src/lib/elementary/efl_ui_widget_factory.eo
@@ -3,7 +3,7 @@ class Efl.Ui.Widget_Factory extends Efl.Loop_Consumer implements Efl.Ui.Factory
3 [[Efl Ui Factory that provides @Efl.Ui.Widget. 3 [[Efl Ui Factory that provides @Efl.Ui.Widget.
4 4
5 This factory is designed to build @Efl.Ui.Widget and optionally set their 5 This factory is designed to build @Efl.Ui.Widget and optionally set their
6 @Efl.Ui.Widget.style if it was connected with @Efl.Ui.Model.Connect.connect "$style". 6 @Efl.Ui.Widget.style if it was connected with @Efl.Ui.Property_Bind.property_bind "$style".
7 7
8 ]] 8 ]]
9 methods { 9 methods {
@@ -20,7 +20,7 @@ class Efl.Ui.Widget_Factory extends Efl.Loop_Consumer implements Efl.Ui.Factory
20 implements { 20 implements {
21 Efl.Ui.Factory.create; 21 Efl.Ui.Factory.create;
22 Efl.Ui.Factory.release; 22 Efl.Ui.Factory.release;
23 Efl.Ui.Model.Connect.connect; 23 Efl.Ui.Property_Bind.property_bind;
24 } 24 }
25 constructors { 25 constructors {
26 .item_class @optional; 26 .item_class @optional;
diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c
index 5251644c5a..1a963bd6d8 100644
--- a/src/lib/elementary/elc_fileselector_entry.c
+++ b/src/lib/elementary/elc_fileselector_entry.c
@@ -78,7 +78,7 @@ _FILE_CHOSEN_fwd(void *data, const Efl_Event *event)
78 ELM_FILESELECTOR_ENTRY_DATA_GET(fs, sd); 78 ELM_FILESELECTOR_ENTRY_DATA_GET(fs, sd);
79 79
80 efl_ui_view_model_set(sd->entry, model); 80 efl_ui_view_model_set(sd->entry, model);
81 efl_ui_model_connect(sd->entry, "default", "path"); 81 efl_ui_property_bind(sd->entry, "default", "path");
82 82
83 path = efl_model_property_get(model, "path"); 83 path = efl_model_property_get(model, "path");
84 file = eina_value_to_string(path); 84 file = eina_value_to_string(path);
@@ -422,7 +422,7 @@ _elm_fileselector_entry_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Elm_Fileselec
422{ 422{
423 efl_ui_view_model_set(sd->button, model); 423 efl_ui_view_model_set(sd->button, model);
424 efl_ui_view_model_set(sd->entry, model); 424 efl_ui_view_model_set(sd->entry, model);
425 efl_ui_model_connect(sd->entry, "default", "path"); 425 efl_ui_property_bind(sd->entry, "default", "path");
426} 426}
427 427
428EINA_DEPRECATED EAPI const char * 428EINA_DEPRECATED EAPI const char *
diff --git a/src/lib/elementary/elm_view_form.c b/src/lib/elementary/elm_view_form.c
index 4969310f9b..d8f9a88b0f 100644
--- a/src/lib/elementary/elm_view_form.c
+++ b/src/lib/elementary/elm_view_form.c
@@ -47,11 +47,11 @@ _link_dying(void* data, Efl_Event const* event)
47static Eina_Bool 47static Eina_Bool
48_elm_view_widget_add(Elm_View_Form_Data *priv, const char *property, Evas_Object *link) 48_elm_view_widget_add(Elm_View_Form_Data *priv, const char *property, Evas_Object *link)
49{ 49{
50 if (!efl_isa(link, EFL_UI_MODEL_CONNECT_INTERFACE)) return EINA_FALSE; 50 if (!efl_isa(link, EFL_UI_PROPERTY_BIND_INTERFACE)) return EINA_FALSE;
51 if (!property) property = "default"; 51 if (!property) property = "default";
52 52
53 efl_ui_view_model_set(link, priv->model); 53 efl_ui_view_model_set(link, priv->model);
54 efl_ui_model_connect(link, "default", property); 54 efl_ui_property_bind(link, "default", property);
55 efl_event_callback_add(link, EFL_EVENT_DEL, _link_dying, priv); 55 efl_event_callback_add(link, EFL_EVENT_DEL, _link_dying, priv);
56 56
57 priv->links = eina_list_append(priv->links, link); 57 priv->links = eina_list_append(priv->links, link);
diff --git a/src/tests/elementary/efl_ui_test_layout.c b/src/tests/elementary/efl_ui_test_layout.c
index e699cf448a..660010bd54 100644
--- a/src/tests/elementary/efl_ui_test_layout.c
+++ b/src/tests/elementary/efl_ui_test_layout.c
@@ -18,7 +18,7 @@ _propagated_cb(void *data EINA_UNUSED,
18 return v; 18 return v;
19} 19}
20 20
21EFL_START_TEST(efl_ui_layout_test_model_connect) 21EFL_START_TEST(efl_ui_layout_test_property_bind)
22{ 22{
23 char buf[PATH_MAX]; 23 char buf[PATH_MAX];
24 Evas_Object *win, *ly; 24 Evas_Object *win, *ly;
@@ -26,7 +26,7 @@ EFL_START_TEST(efl_ui_layout_test_model_connect)
26 Eina_Value v; 26 Eina_Value v;
27 Eina_Future *f; 27 Eina_Future *f;
28 const char *part_text; 28 const char *part_text;
29 const char text_value[] = "A random string for elm_layout_model_connect test"; 29 const char text_value[] = "A random string for elm_layout_property_bind test";
30 30
31 win = win_add(NULL, "layout", EFL_UI_WIN_BASIC); 31 win = win_add(NULL, "layout", EFL_UI_WIN_BASIC);
32 32
@@ -41,7 +41,7 @@ EFL_START_TEST(efl_ui_layout_test_model_connect)
41 f = efl_model_property_set(model, "text_property", &v); 41 f = efl_model_property_set(model, "text_property", &v);
42 eina_future_then(f, _propagated_cb, NULL, NULL); 42 eina_future_then(f, _propagated_cb, NULL, NULL);
43 43
44 efl_ui_model_connect(ly, "text", "text_property"); 44 efl_ui_property_bind(ly, "text", "text_property");
45 efl_ui_view_model_set(ly, model); 45 efl_ui_view_model_set(ly, model);
46 46
47 ecore_main_loop_begin(); 47 ecore_main_loop_begin();
@@ -92,7 +92,7 @@ EFL_END_TEST
92 92
93void efl_ui_test_layout(TCase *tc) 93void efl_ui_test_layout(TCase *tc)
94{ 94{
95 tcase_add_test(tc, efl_ui_layout_test_model_connect); 95 tcase_add_test(tc, efl_ui_layout_test_property_bind);
96 tcase_add_test(tc, efl_ui_layout_test_layout_api_size_min); 96 tcase_add_test(tc, efl_ui_layout_test_layout_api_size_min);
97 tcase_add_test(tc, efl_ui_layout_test_layout_api_update_hints); 97 tcase_add_test(tc, efl_ui_layout_test_layout_api_update_hints);
98 tcase_add_test(tc, efl_ui_layout_test_layout_force); 98 tcase_add_test(tc, efl_ui_layout_test_layout_force);