2013/1/29 Tom Hacohen <t...@stosb.com> > No, custom constructor is not the old one. > > You need to use: > > #define elm_obj_win_constructor(name, type) > ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR), EO_TYPECHECK(const > char *, name), EO_TYPECHECK(Elm_Win_Type, type) >
After some more 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() - 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 ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel