summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_image_factory.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elementary/efl_ui_image_factory.c')
-rw-r--r--src/lib/elementary/efl_ui_image_factory.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/lib/elementary/efl_ui_image_factory.c b/src/lib/elementary/efl_ui_image_factory.c
index 4d0c139e8b..336a94ac45 100644
--- a/src/lib/elementary/efl_ui_image_factory.c
+++ b/src/lib/elementary/efl_ui_image_factory.c
@@ -35,34 +35,22 @@ _efl_ui_image_factory_efl_object_destructor(Eo *obj EINA_UNUSED, Efl_Ui_Image_Fa
35 efl_destructor(efl_super(obj, MY_CLASS)); 35 efl_destructor(efl_super(obj, MY_CLASS));
36} 36}
37 37
38static Eina_Value 38static void
39_efl_ui_image_factory_bind(Eo *obj EINA_UNUSED, void *data, const Eina_Value value) 39_efl_ui_image_factory_efl_ui_factory_building(const Eo *obj EINA_UNUSED, Efl_Ui_Image_Factory_Data *pd, Efl_Gfx_Entity *ui_view)
40{ 40{
41 Efl_Ui_Image_Factory_Data *pd = data; 41 efl_ui_property_bind(ui_view, "filename", pd->property);
42 Efl_Gfx_Entity *entity;
43 int len, i;
44 42
45 EINA_VALUE_ARRAY_FOREACH(&value, len, i, entity) 43 efl_ui_factory_building(efl_super(obj, EFL_UI_IMAGE_FACTORY_CLASS), ui_view);
46 efl_ui_property_bind(entity, "filename", pd->property);
47
48 return value;
49} 44}
50 45
51EOLIAN static Eina_Future * 46EOLIAN static Eina_Future *
52_efl_ui_image_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Image_Factory_Data *pd, 47_efl_ui_image_factory_efl_ui_factory_create(Eo *obj, Efl_Ui_Image_Factory_Data *pd,
53 Eina_Iterator *models, Efl_Gfx_Entity *parent) 48 Eina_Iterator *models, Efl_Gfx_Entity *parent)
54{ 49{
55 Eina_Future *f;
56
57 if (!parent) return efl_loop_future_rejected(obj, EFL_FACTORY_ERROR_NOT_SUPPORTED); 50 if (!parent) return efl_loop_future_rejected(obj, EFL_FACTORY_ERROR_NOT_SUPPORTED);
58 if (!pd->property) return efl_loop_future_rejected(obj, EFL_FACTORY_ERROR_NOT_SUPPORTED); 51 if (!pd->property) return efl_loop_future_rejected(obj, EFL_FACTORY_ERROR_NOT_SUPPORTED);
59 52
60 f = efl_ui_factory_create(efl_super(obj, EFL_UI_IMAGE_FACTORY_CLASS), models, parent); 53 return efl_ui_factory_create(efl_super(obj, EFL_UI_IMAGE_FACTORY_CLASS), models, parent);
61
62 return efl_future_then(obj, f,
63 .success_type = EINA_VALUE_TYPE_ARRAY,
64 .success = _efl_ui_image_factory_bind,
65 .data = pd);
66} 54}
67 55
68EOLIAN static Eina_Error 56EOLIAN static Eina_Error