struct _Efl_Ui_Layout_Factory_Request
{
Efl_Ui_Layout_Factory_Tracking *tracking;
- Efl_Ui_Layout *obj;
Efl_Ui_Layout_Data *pd;
Efl_Ui_Factory *factory;
const char *name;
};
static Eina_Value
-_content_created(void *data, const Eina_Value value)
+_content_created(Eo *obj, void *data, const Eina_Value value)
{
Efl_Ui_Layout_Factory_Request *request = data;
Efl_Gfx_Entity *content = NULL;
eina_value_get(&value, &content);
// Recycle old content
- old_content = elm_layout_content_get(request->obj, request->name);
+ old_content = elm_layout_content_get(obj, request->name);
if (old_content) efl_ui_factory_release(request->factory, old_content);
// Set new content
- elm_layout_content_set(request->obj, request->name, content);
+ elm_layout_content_set(obj, request->name, content);
return value;
}
static void
-_clean_request(void *data, const Eina_Future *dead_future EINA_UNUSED)
+_clean_request(Eo *obj EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
{
Efl_Ui_Layout_Factory_Request *request = data;
request->name = eina_stringshare_ref(name);
request->pd = pd;
- request->obj = pd->obj;
request->factory = efl_ref(tracking->factory);
request->tracking = tracking;
f = efl_ui_view_factory_create_with_event(tracking->factory, pd->connect.model, pd->obj);
- f = eina_future_then_from_desc(efl_future_then(pd->obj, f),
- eina_future_cb_easy(.success = _content_created,
- .success_type = EINA_VALUE_TYPE_OBJECT,
- .data = request,
- .free = _clean_request));
+ f = efl_future_then(pd->obj, f,
+ .success = _content_created,
+ .success_type = EINA_VALUE_TYPE_OBJECT,
+ .data = request,
+ .free = _clean_request);
}
static void
struct _Efl_Ui_List_Vuew_Layout_Item_Tracking
{
Efl_Ui_List_View_Layout_Item *item;
- Eo *obj;
Efl_Ui_List_View_Data *pd;
};
static Eina_Value
-_content_created(void *data, const Eina_Value value)
+_content_created(Eo *obj, void *data, const Eina_Value value)
{
Efl_Ui_List_View_Layout_Item_Tracking *tracking = data;
Efl_Ui_List_View_Layout_Item *item = tracking->item;
- Eo *obj = tracking->obj;
Efl_Ui_List_View_Item_Event evt;
eina_value_pget(&value, &item->layout);
}
static void
-_clean_request(void *data, const Eina_Future *dead_future EINA_UNUSED)
+_clean_request(Eo *obj EINA_UNUSED, void *data, const Eina_Future *dead_future EINA_UNUSED)
{
Efl_Ui_List_View_Layout_Item_Tracking *tracking = data;
if (!tracking) return item;
tracking->item = item;
- tracking->obj = obj;
tracking->pd = pd;
item->layout_request = efl_ui_view_factory_create_with_event(pd->factory, item->children, obj);
- item->layout_request = efl_future_then(obj, item->layout_request);
- item->layout_request = eina_future_then_from_desc(item->layout_request,
- eina_future_cb_easy(.success = _content_created,
- .success_type = EINA_VALUE_TYPE_OBJECT,
- .data = tracking,
- .free = _clean_request));
+ item->layout_request = efl_future_then(obj, item->layout_request,
+ .success = _content_created,
+ .success_type = EINA_VALUE_TYPE_OBJECT,
+ .data = tracking,
+ .free = _clean_request);
return item;
}