Hi,
I'm reposting this as I don't get any reply...maybe Tom missed it ;)
After some more Eo tests I have this example:
void my_win_del(void *data, Evas_Object *obj, void *event_info)
{
elm_exit();
}
EAPI_MAIN int
elm_main(int argc, char **argv)
{
Evas_Object *win, *r;
win = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL,
elm_obj_win_constructor("main", ELM_WIN_BASIC));
// eo_unref(win);
elm_win_title_set(win, "Elementary Tests");
evas_object_smart_callback_add(win, "delete,request", my_win_del, NULL);
evas_object_resize(win, 320, 320);
evas_object_show(win);
r = eo_add(EVAS_OBJ_RECTANGLE_CLASS, evas_object_evas_get(win));
// eo_unref(r);
evas_object_resize(r, 100, 100);
evas_object_show(r);
eo_del(r);
elm_run();
elm_shutdown();
return 0;
}
ELM_MAIN()
Problems:
- with the 2 eo_unref() calls commented out the app freeze (without any
warnings) on
elm_shutdown(). Probably because not all objs has been deleted.
- with the 2 eo_unref() calls DEcommented the shutdown is ok but then the
oe_del(r) is
causing the warning:
ERR<9335>:eo lib/eo/eo.c:1306 _eo_unref() Object 0x1452fe0 already deleted.
ERR<9335>:eo lib/eo/eo.c:1306 _eo_unref() Object 0x1452fe0 already deleted.
Thoughts:
- doing the unref() just after the eo_add() does not have any sense to me.
- deleting the win using eo_del() seems not to delete the child objs
- forcing the user to delete ALL the created object before the shutdown is
an hard
requirement; can work with simple examples but not in real life
applications.
- using the new api or the old one cause different behavior :/
thanks
davemds
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel