summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-04-25 15:46:59 -0700
committerCedric BAIL <cedric.bail@free.fr>2019-05-09 09:33:31 -0700
commitdac867bb24dfe9c839cf734f2dc359f1a997d4a5 (patch)
tree8abfa95d8f7ab99dd1a493245c6f64d8f1a0a57e /src/lib/ecore
parent7b7ad5380a2900bfabb03f2ac86c96caa66ededf (diff)
ecore: refactor Efl.CompositeModel to provide child allocation to other internal Model.
Reviewed-by: SangHyeon Jade Lee <sh10233.lee@samsung.com> Differential Revision: https://phab.enlightenment.org/D8796
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/efl_composite_model.c14
-rw-r--r--src/lib/ecore/efl_composite_model_private.h15
2 files changed, 15 insertions, 14 deletions
diff --git a/src/lib/ecore/efl_composite_model.c b/src/lib/ecore/efl_composite_model.c
index 913d2041af..630d08edf7 100644
--- a/src/lib/ecore/efl_composite_model.c
+++ b/src/lib/ecore/efl_composite_model.c
@@ -45,20 +45,6 @@ _children_indexed_key(const Efl_Composite_Model_Data *node,
45 return node->index - *key; 45 return node->index - *key;
46} 46}
47 47
48static Efl_Model *
49_efl_composite_lookup(const Efl_Class *self, Eo *parent, Efl_Model *view, unsigned int index)
50{
51 EFL_COMPOSITE_LOOKUP_RETURN(remember, parent, view, "_efl.composite_model");
52
53 remember = efl_add_ref(self, parent,
54 efl_ui_view_model_set(efl_added, view),
55 efl_composite_model_index_set(efl_added, index),
56 efl_loop_model_volatile_make(efl_added));
57 if (!remember) return NULL;
58
59 EFL_COMPOSITE_REMEMBER_RETURN(remember, view);
60}
61
62static void 48static void
63_efl_composite_model_efl_object_invalidate(Eo *obj, Efl_Composite_Model_Data *pd) 49_efl_composite_model_efl_object_invalidate(Eo *obj, Efl_Composite_Model_Data *pd)
64{ 50{
diff --git a/src/lib/ecore/efl_composite_model_private.h b/src/lib/ecore/efl_composite_model_private.h
index f4872416d3..67862f968c 100644
--- a/src/lib/ecore/efl_composite_model_private.h
+++ b/src/lib/ecore/efl_composite_model_private.h
@@ -56,4 +56,19 @@ _efl_composite_model_properties_mix(Eina_Iterator *super, Eina_Iterator *dyn, Ei
56 efl_key_wref_set(View, buf, Remember); \ 56 efl_key_wref_set(View, buf, Remember); \
57 return Remember; 57 return Remember;
58 58
59
60static inline Efl_Model *
61_efl_composite_lookup(const Efl_Class *self, Eo *parent, Efl_Model *view, unsigned int index)
62{
63 EFL_COMPOSITE_LOOKUP_RETURN(remember, parent, view, "_efl.composite_model");
64
65 remember = efl_add_ref(self, parent,
66 efl_ui_view_model_set(efl_added, view),
67 efl_composite_model_index_set(efl_added, index),
68 efl_loop_model_volatile_make(efl_added));
69 if (!remember) return NULL;
70
71 EFL_COMPOSITE_REMEMBER_RETURN(remember, view);
72}
73
59#endif 74#endif