summaryrefslogtreecommitdiff
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-01-31 11:59:19 +0000
committerCedric BAIL <cedric.bail@free.fr>2019-02-11 11:06:13 -0800
commit053146598c346aa7c200aee55093a5e463d255de (patch)
tree44c1acdd0761d0ed48a4ac70121d686504a24a4d /src/lib/elementary
parent9277586fd8244826bdfbbc7625c3a08be71f5e06 (diff)
efl_ui : rename model connect and factory connect to bind property and factory.
As we discussed in T7469 with V40, efl_ui_model_connect efl_ui_factory_model_connect need to be renamed to efl_ui_bind_property efl_ui_bind_factory for this work, Efl.Ui.Model.Connect interface is changed as Efl.Ui.Bind, and bind_property and bind_factory both method is supported by this interface. bind_factory need Efl.Ui.Factory, and Efl.Ui.Factory inheritted Efl.Ui.Bind, so I little bit concerned about circular referencing, but so far, it works well. Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7529
Diffstat (limited to 'src/lib/elementary')
-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
14 files changed, 97 insertions, 95 deletions
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);