summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_layout_factory.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-08-15 20:45:09 -0700
committerCedric BAIL <cedric.bail@free.fr>2019-08-21 11:18:34 -0700
commit0248d504b34f5f4324102ae406b848c2c8fe28c4 (patch)
treea022986ba9a4b0f17bcb41ae4fff04ca52413762 /src/lib/elementary/efl_ui_layout_factory.c
parentb8bf5b31e847194446838d32565a4c654823024b (diff)
elementary: switch Efl.Ui.Factory API to a batch API and update all class using it.
Reviewed-by: Lauro Neto <Lauro Moura <lauromoura@expertisesolutions.com.br>> Differential Revision: https://phab.enlightenment.org/D9579
Diffstat (limited to 'src/lib/elementary/efl_ui_layout_factory.c')
-rw-r--r--src/lib/elementary/efl_ui_layout_factory.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/lib/elementary/efl_ui_layout_factory.c b/src/lib/elementary/efl_ui_layout_factory.c
index 310bc52..4ab6d19 100644
--- a/src/lib/elementary/efl_ui_layout_factory.c
+++ b/src/lib/elementary/efl_ui_layout_factory.c
@@ -73,30 +73,32 @@ _efl_ui_layout_factory_bind(Eo *obj EINA_UNUSED, void *data, const Eina_Value va
73{ 73{
74 Efl_Ui_Layout_Factory_Data *pd = data; 74 Efl_Ui_Layout_Factory_Data *pd = data;
75 Efl_Gfx_Entity *layout; 75 Efl_Gfx_Entity *layout;
76 int len, i;
76 77
77 eina_value_pget(&value, &layout); 78 EINA_VALUE_ARRAY_FOREACH(&value, len, i, layout)
78 79 {
79 efl_ui_layout_theme_set(layout, pd->klass, pd->group, pd->style); 80 efl_ui_layout_theme_set(layout, pd->klass, pd->group, pd->style);
80 81
81 eina_hash_foreach(pd->bind.properties, _property_bind, layout); 82 eina_hash_foreach(pd->bind.properties, _property_bind, layout);
82 eina_hash_foreach(pd->bind.factories, _factory_bind, layout); 83 eina_hash_foreach(pd->bind.factories, _factory_bind, layout);
83 84
84 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0); 85 evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, 0);
85 evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL); 86 evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
87 }
86 88
87 return value; 89 return value;
88} 90}
89 91
90EOLIAN static Eina_Future * 92EOLIAN static Eina_Future *
91_efl_ui_layout_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Layout_Factory_Data *pd, 93_efl_ui_layout_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Layout_Factory_Data *pd,
92 Efl_Model *model, Efl_Gfx_Entity *parent) 94 Eina_Iterator *models, Efl_Gfx_Entity *parent)
93{ 95{
94 Eina_Future *f; 96 Eina_Future *f;
95 97
96 f = efl_ui_factory_create(efl_super(obj, EFL_UI_LAYOUT_FACTORY_CLASS), model, parent); 98 f = efl_ui_factory_create(efl_super(obj, EFL_UI_LAYOUT_FACTORY_CLASS), models, parent);
97 99
98 return efl_future_then(obj, f, 100 return efl_future_then(obj, f,
99 .success_type = EINA_VALUE_TYPE_OBJECT, 101 .success_type = EINA_VALUE_TYPE_ARRAY,
100 .success = _efl_ui_layout_factory_bind, 102 .success = _efl_ui_layout_factory_bind,
101 .data = pd); 103 .data = pd);
102} 104}
@@ -148,8 +150,8 @@ _efl_ui_layout_factory_efl_ui_property_bind_property_bind(Eo *obj EINA_UNUSED, E
148} 150}
149 151
150EOLIAN static void 152EOLIAN static void
151_efl_ui_layout_factory_theme_config(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd 153_efl_ui_layout_factory_theme_config(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Factory_Data *pd,
152 , const char *klass, const char *group, const char *style) 154 const char *klass, const char *group, const char *style)
153{ 155{
154 eina_stringshare_replace(&pd->klass, klass); 156 eina_stringshare_replace(&pd->klass, klass);
155 eina_stringshare_replace(&pd->group, group); 157 eina_stringshare_replace(&pd->group, group);