summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-01-26 16:56:53 -0800
committerCedric BAIL <cedric@osg.samsung.com>2018-05-01 10:39:01 -0700
commit756f4cee0e32cb662c4728f64b83b31b5c3f4107 (patch)
tree60371ea029f88c7f32ca07989a089c676be99712 /src
parent8093eca7f32395fa52fc1ae3d2a690623ebbdbb7 (diff)
elementary: migrate Efl.Ui.Layout to use the new Efl.Model API.
Diffstat (limited to 'src')
-rw-r--r--src/lib/elementary/efl_ui_layout_object.c346
-rw-r--r--src/lib/elementary/elm_widget_layout.h14
2 files changed, 173 insertions, 187 deletions
diff --git a/src/lib/elementary/efl_ui_layout_object.c b/src/lib/elementary/efl_ui_layout_object.c
index a499704917..c8c28b88d3 100644
--- a/src/lib/elementary/efl_ui_layout_object.c
+++ b/src/lib/elementary/efl_ui_layout_object.c
@@ -744,7 +744,6 @@ _efl_ui_layout_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Object_Data *sd
744{ 744{
745 Efl_Ui_Layout_Sub_Object_Data *sub_d; 745 Efl_Ui_Layout_Sub_Object_Data *sub_d;
746 Efl_Ui_Layout_Sub_Object_Cursor *pc; 746 Efl_Ui_Layout_Sub_Object_Cursor *pc;
747 Efl_Ui_Layout_Sub_Connect *sc;
748 Edje_Signal_Data *esd; 747 Edje_Signal_Data *esd;
749 Evas_Object *child; 748 Evas_Object *child;
750 Eina_List *l; 749 Eina_List *l;
@@ -772,24 +771,20 @@ _efl_ui_layout_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Layout_Object_Data *sd
772 free(esd); 771 free(esd);
773 } 772 }
774 773
775 if(sd->model) 774 if(sd->connect.model)
776 { 775 {
777 efl_event_callback_del(sd->model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_model_properties_changed_cb, sd); 776 efl_event_callback_del(sd->connect.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
778 efl_unref(sd->model); 777 _efl_model_properties_changed_cb, sd);
779 sd->model = NULL; 778 efl_unref(sd->connect.model);
779 sd->connect.model = NULL;
780 } 780 }
781 781
782 EINA_LIST_FREE(sd->prop_connect, sc) 782 eina_hash_free(sd->connect.properties);
783 { 783 sd->connect.properties = NULL;
784 if (sc->future) efl_future_cancel(sc->future); 784 eina_hash_free(sd->connect.signals);
785 sc->future = NULL; 785 sd->connect.signals = NULL;
786 eina_stringshare_del(sc->name); 786 eina_hash_free(sd->connect.factories);
787 eina_stringshare_del(sc->property); 787 sd->connect.factories = NULL;
788 free(sc);
789 }
790 sd->prop_connect = NULL;
791 eina_hash_free(sd->factories);
792 sd->factories = NULL;
793 788
794 /* let's make our Edje object the *last* to be processed, since it 789 /* let's make our Edje object the *last* to be processed, since it
795 * may (smart) parent other sub objects here */ 790 * may (smart) parent other sub objects here */
@@ -1230,9 +1225,8 @@ _efl_ui_layout_text_generic_set(Eo *obj, Efl_Ui_Layout_Object_Data *sd, const ch
1230{ 1225{
1231 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 1226 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
1232 1227
1233 Eina_List *l;
1234 Efl_Ui_Layout_Sub_Object_Data *sub_d = NULL; 1228 Efl_Ui_Layout_Sub_Object_Data *sub_d = NULL;
1235 Efl_Ui_Layout_Sub_Connect *sc; 1229 Eina_List *l;
1236 1230
1237 EINA_LIST_FOREACH(sd->subs, l, sub_d) 1231 EINA_LIST_FOREACH(sd->subs, l, sub_d)
1238 { 1232 {
@@ -1289,19 +1283,18 @@ _efl_ui_layout_text_generic_set(Eo *obj, Efl_Ui_Layout_Object_Data *sd, const ch
1289 sub_d->obj = _elm_access_edje_object_part_object_register 1283 sub_d->obj = _elm_access_edje_object_part_object_register
1290 (obj, elm_layout_edje_get(obj), part); 1284 (obj, elm_layout_edje_get(obj), part);
1291 1285
1292 if (sd->model) 1286 if (sd->connect.model && !sd->connect.updating)
1293 { 1287 {
1294 EINA_LIST_FOREACH(sd->prop_connect, l, sc) 1288 char *property = eina_hash_find(sd->connect.properties, sub_d->part);
1289
1290 if (property)
1295 { 1291 {
1296 if (sc->name == sub_d->part && !sd->view_updated) 1292 Eina_Value v = EINA_VALUE_EMPTY;
1297 { 1293
1298 Eina_Value v; 1294 eina_value_setup(&v, EINA_VALUE_TYPE_STRING);
1299 eina_value_setup(&v, EINA_VALUE_TYPE_STRING); 1295 eina_value_set(&v, text);
1300 eina_value_set(&v, text); 1296
1301 efl_model_property_set(sd->model, sc->property, &v); 1297 efl_model_property_set(sd->connect.model, property, &v);
1302 eina_value_flush(&v);
1303 break;
1304 }
1305 } 1298 }
1306 } 1299 }
1307 1300
@@ -1933,237 +1926,224 @@ _efl_ui_layout_efl_object_dbg_info_get(Eo *eo_obj, Efl_Ui_Layout_Object_Data *_p
1933} 1926}
1934 1927
1935static void 1928static void
1936_prop_future_error_cb(void* data, Efl_Event const*event EINA_UNUSED) 1929_efl_ui_layout_view_model_property_update(Efl_Ui_Layout_Object_Data *pd, const char *part, const char *fetch)
1937{ 1930{
1938 Efl_Ui_Layout_Sub_Connect *sc = data; 1931 Eina_Value *v = NULL;
1939 sc->future = NULL; 1932 char *value;
1933
1934 v = efl_model_property_get(pd->connect.model, fetch);
1935 value = eina_value_to_string(v);
1936
1937 pd->connect.updating = EINA_TRUE; // Prevent recursive call to property_set while updating text
1938 efl_text_set(efl_part(pd->obj, part), value);
1939 pd->connect.updating = EINA_FALSE;
1940
1941 eina_value_free(v);
1942 free(value);
1940} 1943}
1941 1944
1942static void 1945static void
1943_view_update(Efl_Ui_Layout_Sub_Connect *sc, const char *property) 1946_efl_ui_layout_view_model_signal_update(Efl_Ui_Layout_Object_Data *pd, const char *signal, const char *fetch)
1944{ 1947{
1948 Eina_Value *v = NULL;
1945 Eina_Strbuf *buf; 1949 Eina_Strbuf *buf;
1950 char *value;
1946 1951
1947 if (sc->is_signal == EINA_FALSE) 1952 v = efl_model_property_get(pd->connect.model, fetch);
1953
1954 // FIXME: previous implementation would just do that for signal/part == "selected"
1955 if (eina_value_type_get(v) == EINA_VALUE_TYPE_UCHAR)
1948 { 1956 {
1949 EFL_UI_LAYOUT_DATA_GET(sc->obj, pd); 1957 Eina_Bool bl;
1950 pd->view_updated = EINA_TRUE; 1958
1951 elm_layout_text_set(sc->obj, sc->name, property); 1959 eina_value_bool_get(v, &bl);
1952 pd->view_updated = EINA_FALSE; 1960 if (bl) value = strdup("selected");
1953 return; 1961 else value = strdup("unselected");
1962 }
1963 else
1964 {
1965 value = eina_value_to_string(v);
1954 } 1966 }
1955 1967
1956 buf = eina_strbuf_new(); 1968 buf = eina_strbuf_new();
1957 eina_strbuf_append(buf, sc->name); 1969 // FIXME: is it really the form of signal we want to send ?
1958 eina_strbuf_replace_all(buf, "%v", property); 1970 eina_strbuf_append_printf(buf, "%s%s", signal, value);
1971 elm_layout_signal_emit(pd->obj, eina_strbuf_string_get(buf),
1972 elm_widget_is_legacy(pd->obj) ? "elm" : "efl");
1959 1973
1960 if (elm_widget_is_legacy(sc->obj))
1961 elm_layout_signal_emit(sc->obj, eina_strbuf_string_get(buf), "elm");
1962 else
1963 elm_layout_signal_emit(sc->obj, eina_strbuf_string_get(buf), "efl");
1964 eina_strbuf_free(buf); 1974 eina_strbuf_free(buf);
1975 eina_value_free(v);
1976 free(value);
1965} 1977}
1966 1978
1967static void 1979static void
1968_prop_future_then_cb(void* data, Efl_Event const*event) 1980_efl_ui_layout_view_model_content_update(Efl_Ui_Layout_Object_Data *pd, Efl_Ui_Factory *factory, const char *name)
1969{ 1981{
1970 Efl_Ui_Layout_Sub_Connect *sc = data; 1982 Efl_Gfx_Entity *content;
1971 const Eina_Value_Type *vtype;
1972 Eina_Value *value = (Eina_Value *)((Efl_Future_Event_Success*)event->info)->value;
1973 Eina_Stringshare *selected;
1974 char *text;
1975 1983
1976 sc->future = NULL; 1984 content = efl_ui_factory_create(factory, pd->connect.model, pd->obj);
1977 vtype= eina_value_type_get(value); 1985 elm_layout_content_set(pd->obj, name, content);
1978
1979 if (vtype == EINA_VALUE_TYPE_STRING || vtype == EINA_VALUE_TYPE_STRINGSHARE)
1980 {
1981 eina_value_get(value, &text);
1982 _view_update(sc, text);
1983 return;
1984 }
1985
1986 selected = eina_stringshare_add("selected");
1987 if (vtype == EINA_VALUE_TYPE_UCHAR && sc->property == selected)
1988 {
1989 Eina_Bool sb = EINA_FALSE;
1990 eina_value_get(value, &sb);
1991 if (sb)
1992 _view_update(sc, "selected");
1993 else
1994 _view_update(sc, "unselected");
1995 }
1996 else
1997 {
1998 text = eina_value_to_string(value);
1999 _view_update(sc, text);
2000 free(text);
2001 }
2002
2003 eina_stringshare_del(selected);
2004} 1986}
2005 1987
2006static void 1988static void
2007_efl_ui_layout_view_model_update(Efl_Ui_Layout_Object_Data *pd) 1989_efl_ui_layout_view_model_update(Efl_Ui_Layout_Object_Data *pd)
2008{ 1990{
2009 Efl_Ui_Layout_Sub_Connect *sc; 1991 Eina_Hash_Tuple *tuple;
2010 Eina_List *l; 1992 Eina_Iterator *it;
2011 1993
2012 if (!pd->prop_connect || !pd->model) return; 1994 if (!pd->connect.model) return ;
2013 1995
2014 EINA_LIST_FOREACH(pd->prop_connect, l, sc) 1996 it = eina_hash_iterator_tuple_new(pd->connect.properties);
2015 { 1997 EINA_ITERATOR_FOREACH(it, tuple)
2016 if (sc->future) efl_future_cancel(sc->future); 1998 _efl_ui_layout_view_model_property_update(pd, tuple->data, tuple->key);
2017 sc->future = efl_model_property_get(pd->model, sc->property); 1999 eina_iterator_free(it);
2018 efl_future_then(sc->future, &_prop_future_then_cb, &_prop_future_error_cb, NULL, sc); 2000
2019 } 2001 it = eina_hash_iterator_tuple_new(pd->connect.signals);
2002 EINA_ITERATOR_FOREACH(it, tuple)
2003 _efl_ui_layout_view_model_signal_update(pd, tuple->data, tuple->key);
2004 eina_iterator_free(it);
2005
2006 it = eina_hash_iterator_tuple_new(pd->connect.factories);
2007 EINA_ITERATOR_FOREACH(it, tuple)
2008 _efl_ui_layout_view_model_content_update(pd, tuple->data, tuple->key);
2009 eina_iterator_free(it);
2020} 2010}
2021 2011
2022static void 2012static void
2023_efl_model_properties_changed_cb(void *data, const Efl_Event *event) 2013_efl_model_properties_changed_cb(void *data, const Efl_Event *event)
2024{ 2014{
2025 Efl_Ui_Layout_Object_Data *pd = data;
2026 Efl_Model_Property_Event *evt = event->info; 2015 Efl_Model_Property_Event *evt = event->info;
2027 Eina_Stringshare *ss_prop; 2016 Efl_Ui_Layout_Object_Data *pd = data;
2028 Efl_Ui_Layout_Sub_Connect *sc;
2029 const char *prop; 2017 const char *prop;
2030 Eina_Array_Iterator it; 2018 Eina_Array_Iterator it;
2031 unsigned int i; 2019 unsigned int i;
2032 Eina_List *l;
2033 2020
2034 if (!evt->changed_properties || !pd->prop_connect) return; 2021 if (!evt->changed_properties) return ;
2035 2022
2036 EINA_ARRAY_ITER_NEXT(evt->changed_properties, i, prop, it) 2023 EINA_ARRAY_ITER_NEXT(evt->changed_properties, i, prop, it)
2037 { 2024 {
2038 ss_prop = eina_stringshare_add(prop); 2025 Eina_Stringshare *sprop = eina_stringshare_add(prop);
2039 EINA_LIST_FOREACH(pd->prop_connect, l, sc) 2026 const char *part;
2040 { 2027 const char *signal;
2041 if (sc->property == ss_prop) 2028 Efl_Ui_Factory *factory;
2042 { 2029
2043 if (sc->future) efl_future_cancel(sc->future); 2030 part = eina_hash_find(pd->connect.properties, sprop);
2044 sc->future = efl_model_property_get(pd->model, sc->property); 2031 if (part) _efl_ui_layout_view_model_property_update(pd, part, sprop);
2045 efl_future_then(sc->future, &_prop_future_then_cb, &_prop_future_error_cb, NULL, sc); 2032
2046 } 2033 signal = eina_hash_find(pd->connect.signals, sprop);
2047 } 2034 if (signal) _efl_ui_layout_view_model_signal_update(pd, signal, sprop);
2048 eina_stringshare_del(ss_prop); 2035
2036 factory = eina_hash_find(pd->connect.factories, sprop);
2037 if (factory) _efl_ui_layout_view_model_content_update(pd, factory, sprop);
2038
2039 eina_stringshare_del(sprop);
2049 } 2040 }
2050} 2041}
2051 2042
2052EOLIAN static void 2043static void
2053_efl_ui_layout_object_efl_ui_view_model_set(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Object_Data *pd, Efl_Model *model) 2044_efl_ui_layout_connect_hash(Efl_Ui_Layout_Object_Data *pd)
2054{ 2045{
2055 Efl_Ui_Layout_Sub_Connect *sc; 2046 if (pd->connect.properties) return ;
2056 Eina_List *l;
2057 2047
2058 if (pd->model) 2048 // FIXME: fix destruction function definition
2059 { 2049 pd->connect.properties = eina_hash_stringshared_new(NULL); // Hash of property targeting a part
2060 efl_event_callback_del(pd->model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_model_properties_changed_cb, pd); 2050 pd->connect.signals = eina_hash_stringshared_new(NULL); // Hash of property triggering a signal
2061 EINA_LIST_FOREACH(pd->prop_connect, l, sc) 2051 pd->connect.factories = eina_hash_stringshared_new(EINA_FREE_CB(efl_unref)); // Hash of property triggering a content creation
2062 if (sc->future) efl_future_cancel(sc->future); 2052}
2063 2053
2064 efl_unref(pd->model); 2054EOLIAN static void
2065 pd->model = NULL; 2055_efl_ui_layout_object_efl_ui_view_model_set(Eo *obj, Efl_Ui_Layout_Object_Data *pd, Efl_Model *model)
2066 } 2056{
2057 Eina_Stringshare *name;
2058 Eina_Hash_Tuple *tuple;
2059 Eina_Iterator *it;
2060
2061 efl_replace(&pd->connect.model, model);
2067 2062
2068 if (model) 2063 if (model)
2069 { 2064 {
2070 pd->model = model; 2065 efl_event_callback_add(pd->connect.model, EFL_MODEL_EVENT_PROPERTIES_CHANGED,
2071 efl_ref(pd->model); 2066 _efl_model_properties_changed_cb, pd);
2072 efl_event_callback_add(pd->model, EFL_MODEL_EVENT_PROPERTIES_CHANGED, _efl_model_properties_changed_cb, pd);
2073 } 2067 }
2074 else
2075 {
2076 EINA_LIST_FOREACH(pd->prop_connect, l, sc)
2077 {
2078 if (!sc->is_signal)
2079 elm_layout_text_set(obj, sc->name, NULL);
2080 }
2081 2068
2082 return; 2069 _efl_ui_layout_connect_hash(pd);
2083 }
2084 2070
2085 if (pd->prop_connect) 2071 // Reset to empty state
2086 _efl_ui_layout_view_model_update(pd); 2072 it = eina_hash_iterator_key_new(pd->connect.properties);
2073 EINA_ITERATOR_FOREACH(it, name)
2074 {
2075 efl_text_set(efl_part(obj, name), NULL);
2076 }
2077 eina_iterator_free(it);
2087 2078
2088 if (pd->factories) 2079 it = eina_hash_iterator_tuple_new(pd->connect.factories);
2080 EINA_ITERATOR_FOREACH(it, tuple)
2089 { 2081 {
2090 Eina_Hash_Tuple *tuple; 2082 Efl_Ui_Factory *factory;
2091 Eina_Stringshare *name; 2083 Efl_Gfx_Entity *content;
2092 Efl_Ui_Factory *factory;
2093 Efl_Gfx_Entity *content;
2094 2084
2095 Eina_Iterator *it_p = eina_hash_iterator_tuple_new(pd->factories); 2085 name = tuple->key;
2096 while (eina_iterator_next(it_p, (void **)&tuple)) 2086 factory = tuple->data;
2097 { 2087 content = elm_layout_content_get(obj, name);
2098 name = tuple->key;
2099 factory = tuple->data;
2100 content = elm_layout_content_get(pd->obj, name);
2101 2088
2102 if (content && efl_isa(content, EFL_UI_VIEW_INTERFACE)) 2089 elm_layout_content_set(obj, name, NULL);
2103 { 2090 efl_ui_factory_release(factory, content);
2104 efl_ui_view_model_set(content, pd->model);
2105 }
2106 else
2107 {
2108 efl_ui_factory_release(factory, content);
2109 content = efl_ui_factory_create(factory, pd->model, pd->obj);
2110 elm_layout_content_set(pd->obj, name, content);
2111 }
2112 }
2113 eina_iterator_free(it_p);
2114 } 2091 }
2092 eina_iterator_free(it);
2093
2094 // Refresh content if necessary
2095 _efl_ui_layout_view_model_update(pd);
2115} 2096}
2116 2097
2117EOLIAN static Efl_Model * 2098EOLIAN static Efl_Model *
2118_efl_ui_layout_object_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Object_Data *pd) 2099_efl_ui_layout_object_efl_ui_view_model_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Object_Data *pd)
2119{ 2100{
2120 return pd->model; 2101 return pd->connect.model;
2121} 2102}
2122 2103
2123EOLIAN static void 2104EOLIAN static void
2124_efl_ui_layout_object_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Object_Data *pd, const char *name, const char *property) 2105_efl_ui_layout_object_efl_ui_model_connect_connect(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Object_Data *pd, const char *name, const char *property)
2125{ 2106{
2126 EINA_SAFETY_ON_NULL_RETURN(name); 2107 EINA_SAFETY_ON_NULL_RETURN(name);
2127 EINA_SAFETY_ON_NULL_RETURN(property); 2108 Eina_Stringshare *sprop;
2128 Efl_Ui_Layout_Sub_Connect *sc, *fsc; 2109 Eina_Hash *hash = NULL;
2129 Eina_List *l; 2110 char *data = NULL;
2130 2111
2131 if (!_elm_layout_part_aliasing_eval(obj, &name, EINA_TRUE)) 2112 if (!_elm_layout_part_aliasing_eval(obj, &name, EINA_TRUE))
2132 return; 2113 return;
2133 2114
2134 sc = calloc(1, sizeof(*sc)); 2115 _efl_ui_layout_connect_hash(pd);
2135 sc->obj = obj; 2116
2136 sc->property = eina_stringshare_add(property); 2117 sprop = eina_stringshare_add(property);
2137 2118
2138 if (strncmp(SIGNAL_PREFIX, name, sizeof(SIGNAL_PREFIX) -1) == 0) 2119 // FIXME: prevent double connect of name to multiple property ?
2120 if (strncmp(SIGNAL_PREFIX, name, sizeof(SIGNAL_PREFIX) - 1) == 0)
2139 { 2121 {
2140 sc->name = eina_stringshare_add(name+sizeof(SIGNAL_PREFIX) -1); 2122 hash = pd->connect.signals;
2141 sc->is_signal = EINA_TRUE; 2123 data = strdup(name + sizeof(SIGNAL_PREFIX) - 1);
2142 } 2124 }
2143 else 2125 else
2144 { 2126 {
2145 sc->name = eina_stringshare_add(name); 2127 hash = pd->connect.properties;
2146 sc->is_signal = EINA_FALSE; 2128 data = strdup(name);
2147 } 2129 }
2148 2130
2149 EINA_LIST_FOREACH(pd->prop_connect, l, fsc) 2131 if (!sprop)
2150 { 2132 {
2151 if (fsc->name == sc->name && fsc->property == sc->property) 2133 // FIXME: remove the entry from the hash ?
2152 {
2153 eina_stringshare_del(sc->name);
2154 eina_stringshare_del(sc->property);
2155 free(sc);
2156 return;
2157 }
2158 } 2134 }
2159 2135 else
2160 pd->prop_connect = eina_list_append(pd->prop_connect, sc);
2161
2162 if (pd->model)
2163 { 2136 {
2164 sc->future = efl_model_property_get(pd->model, sc->property); 2137 eina_hash_add(hash, sprop, data);
2165 efl_future_then(sc->future, &_prop_future_then_cb, &_prop_future_error_cb, NULL, sc);
2166 } 2138 }
2139
2140 // Update display right away if possible
2141 if (!pd->connect.model) return ;
2142
2143 if (hash == pd->connect.signals)
2144 _efl_ui_layout_view_model_signal_update(pd, data, sprop);
2145 else
2146 _efl_ui_layout_view_model_property_update(pd, data, sprop);
2167} 2147}
2168 2148
2169EOLIAN static void 2149EOLIAN static void
@@ -2180,13 +2160,13 @@ _efl_ui_layout_object_efl_ui_factory_model_connect(Eo *obj EINA_UNUSED, Efl_Ui_L
2180 2160
2181 ss_name = eina_stringshare_add(name); 2161 ss_name = eina_stringshare_add(name);
2182 2162
2183 if (!pd->factories) 2163 if (!pd->connect.factories)
2184 pd->factories = eina_hash_stringshared_new(EINA_FREE_CB(efl_unref)); 2164 pd->connect.factories = eina_hash_stringshared_new(EINA_FREE_CB(efl_unref));
2185 2165
2186 new_ev = efl_ui_factory_create(factory, pd->model, obj); 2166 new_ev = efl_ui_factory_create(factory, pd->connect.model, obj);
2187 EINA_SAFETY_ON_NULL_RETURN(new_ev); 2167 EINA_SAFETY_ON_NULL_RETURN(new_ev);
2188 2168
2189 old_factory = eina_hash_set(pd->factories, ss_name, efl_ref(factory)); 2169 old_factory = eina_hash_set(pd->connect.factories, ss_name, efl_ref(factory));
2190 if (old_factory) 2170 if (old_factory)
2191 { 2171 {
2192 old_ev = elm_layout_content_get(obj, name); 2172 old_ev = elm_layout_content_get(obj, name);
diff --git a/src/lib/elementary/elm_widget_layout.h b/src/lib/elementary/elm_widget_layout.h
index a0833b6fc3..5b871790ac 100644
--- a/src/lib/elementary/elm_widget_layout.h
+++ b/src/lib/elementary/elm_widget_layout.h
@@ -53,9 +53,16 @@ typedef struct _Elm_Layout_Smart_Data
53 Eina_List *subs; /**< List of Elm_Layout_Sub_Object_Data structs, to hold the actual sub objects such as text, content and the children of box and table. */ 53 Eina_List *subs; /**< List of Elm_Layout_Sub_Object_Data structs, to hold the actual sub objects such as text, content and the children of box and table. */
54 Eina_List *edje_signals; /**< The list of edje signal callbacks. */ 54 Eina_List *edje_signals; /**< The list of edje signal callbacks. */
55 Eina_List *parts_cursors; /**< The list of cursor names of layout parts. This is a list of Elm_Layout_Sub_Object_Cursor struct. */ 55 Eina_List *parts_cursors; /**< The list of cursor names of layout parts. This is a list of Elm_Layout_Sub_Object_Cursor struct. */
56 Eina_List *prop_connect; /**< The list of properties connected to layout parts. */ 56
57 Eina_Hash *factories; /**< The hash with parts connected to factories. */ 57 struct {
58 Efl_Model *model; /**< The model */ 58 Eina_Hash *properties; /**< The list of properties connected to layout parts. */
59 Eina_Hash *signals; /**< The list of signals connected. */
60 Eina_Hash *factories; /**< The hash with parts connected to factories. */
61 Efl_Model *model; /**< The model */
62
63 Eina_Bool updating : 1;
64 } connect;
65
59 int frozen; /**< Layout freeze counter */ 66 int frozen; /**< Layout freeze counter */
60 67
61 Eina_Bool needs_size_calc : 1; /**< This flas is set true when the layout sizing eval is already requested. This defers sizing evaluation until smart calculation to avoid unnecessary calculation. */ 68 Eina_Bool needs_size_calc : 1; /**< This flas is set true when the layout sizing eval is already requested. This defers sizing evaluation until smart calculation to avoid unnecessary calculation. */
@@ -64,7 +71,6 @@ typedef struct _Elm_Layout_Smart_Data
64 Eina_Bool can_access : 1; /**< This is true when all text(including textblock) parts can be accessible by accessibility. */ 71 Eina_Bool can_access : 1; /**< This is true when all text(including textblock) parts can be accessible by accessibility. */
65 Eina_Bool destructed_is : 1; /**< This flag indicates if Efl.Ui.Layout destructor was called. This is needed to avoid unnecessary calculation of subobject deletion during layout object's deletion. */ 72 Eina_Bool destructed_is : 1; /**< This flag indicates if Efl.Ui.Layout destructor was called. This is needed to avoid unnecessary calculation of subobject deletion during layout object's deletion. */
66 Eina_Bool file_set : 1; /**< This flag indicates if Efl.Ui.Layout source is set from a file*/ 73 Eina_Bool file_set : 1; /**< This flag indicates if Efl.Ui.Layout source is set from a file*/
67 Eina_Bool view_updated : 1; /**< This flag indicates to Efl.Ui.Layout don't update model in text_set */
68} Efl_Ui_Layout_Object_Data; 74} Efl_Ui_Layout_Object_Data;
69 75
70/** 76/**