Hi Davide, The idea is to provide Eo with introspection and automatic bindings generation.
I made some PoC, and can generate bindings for Python and JS - elev8. (elev8 is javascript runtime based on Google's v8 js engine). I scan C -souces for Eo classes and functions definitions and generate python(cython) code (or C++ for elev8) which compiled into extern module. There are still issues to solve.. You can look at it here: https://github.com/yakov-g/eo_bindings/blob/master/DEV_README I can answer any questions. And discuss how it can be properly done. Yakov On 01/30/2013 12:09 AM, Davide Andreoli wrote: > 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) >> > haa, ok,now i can create a window using: > win = eo_add_custom(ELM_OBJ_WIN_CLASS, NULL, > elm_obj_win_constructor("main", ELM_WIN_BASIC)); > > thanks, I will make more tests tomorrow...too tired now > > >> >From elm_win.h. >> >> And well, you should switch to Eo for all the objects. Please also talk to >> Yakov in CC, as I believe he has already got Python bindings for Eo. >> > Yakov: ping > are you working on py bindings? we are doing double work? whats your goal? > > > >> >> On Tue, Jan 29, 2013 at 9:18 PM, Davide Andreoli <d...@gurumeditation.it >>> wrote: >>> 2013/1/29 Tom Hacohen <t...@stosb.com> >>> >>>> Don't use eo_del/unref as counterparts to the old API. Create the >> objects >>>> with the new API if you would like to use them... >>>> >>> Hi, thanks for the fast reply. >>> >>> I have tried that approach but I have problems with some objects than, >>> for example elm_win: >>> if I do: >>> win = eo_add(ELM_OBJ_WIN_CLASS, NULL); >>> >>> I get the error: >>> ERR<3716>:elementary elm_win.c:2979 _constructor() only custom >> constructor >>> can be used with 'elm_win' class >>> >>> "custom constructor" is the old one right? >>> In that case I have to manage different delete cases for objs that >> support >>> eo and the ones that don't, >>> and I lost all the benefits of a single-delete-code for every objects :/ >>> >>> thanks >>> davemds >>> >>> >>> >>>> On 29 Jan 2013 19:37, "Davide Andreoli" <d...@gurumeditation.it> >> wrote: >>>>> Hi all, >>>>> I'm working/studying Eo while trying to optimize the python bindings >>>>> and I have some problems deleting eo objects. >>>>> >>>>> see this super simple example: >>>>> (pastebin.com/1C0dqdYA for a "colored" version) >>>>> >>>>> >>>>> #include <Eo.h> >>>>> #include <Elementary.h> >>>>> >>>>> 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 = elm_win_add(NULL, "main", ELM_WIN_BASIC); >>>>> 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 = evas_object_rectangle_add(evas_object_evas_get(win)); >>>>> evas_object_resize(r, 100, 100); >>>>> evas_object_show(r); >>>>> >>>>> evas_object_del(r); // this one work as expected >>>>> // eo_del(r); // this give a bad warnig >>>>> // eo_unref(r); // this cause an endless loop on >>>>> elm_shutdown >>>>> >>>>> elm_run(); >>>>> elm_shutdown(); >>>>> >>>>> return 0; >>>>> } >>>>> >>>>> ELM_MAIN() >>>>> >>>>> >>>>> >>>>> The example simply create a rectangle and then delete it, the only >>>> working >>>>> way to delete the rect >>>>> seems to be the evas_object_del call (that work as expected) >>>>> >>>>> Using eo_del() to delete the rect cause this warning: >>>>> ERR<3219>:eo lib/eo/eo.c:1306 _eo_unref() Object 0x21d9920 already >>>> deleted. >>>>> ERR<3219>:eo lib/eo/eo.c:1306 _eo_unref() Object 0x21d9920 already >>>> deleted. >>>>> as soon as you call eo_del() >>>>> >>>>> While eo_unref() cause an endless loop on elm_shutdown with this >>> warning >>>>> repeated forever: >>>>> CRI<3242>: lib/eo/eo.c:1081 eo_parent_set() *** Eina Magic Check >> Failed >>>> at >>>>> 0x1a88f80 !!! >>>>> Input handle is wrong type >>>>> Expected: a186bc32 - Eo >>>>> Supplied: afda6798 - (unknown) >>>>> *** NAUGHTY PROGRAMMER!!! >>>>> *** SPANK SPANK SPANK!!! >>>>> *** Now go fix your code. Tut tut tut! >>>>> >>>>> >>>>> I'm doing something wrong? I'm misunderstanding something? >>>>> >>>>> any help is appreciated >>>>> >>>>> thanks >>>>> davemds >>>>> >>>>> >> ------------------------------------------------------------------------------ >>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> current >>>>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>>>> MVPs and experts. ON SALE this month only -- learn more at: >>>>> http://p.sf.net/sfu/learnnow-d2d >>>>> _______________________________________________ >>>>> enlightenment-devel mailing list >>>>> enlightenment-devel@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >>>>> >>>> >> ------------------------------------------------------------------------------ >>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>>> MVPs and experts. ON SALE this month only -- learn more at: >>>> http://p.sf.net/sfu/learnnow-d2d >>>> _______________________________________________ >>>> enlightenment-devel mailing list >>>> enlightenment-devel@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >>>> >>> >> ------------------------------------------------------------------------------ >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only -- learn more at: >>> http://p.sf.net/sfu/learnnow-d2d >>> _______________________________________________ >>> enlightenment-devel mailing list >>> enlightenment-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >>> >> >> >> -- >> Tom. >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. ON SALE this month only -- learn more at: >> http://p.sf.net/sfu/learnnow-d2d >> _______________________________________________ >> enlightenment-devel mailing list >> enlightenment-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >> > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > ------------------------------------------------------------------------------ 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