On Thu, Sep 3, 2009 at 11:36 AM, Enlightenment SVN<[email protected]> wrote: > Log: > Fix build errors and add new function evas_get > > - Fix elementary.Object.disabled_get/set and elementary.Button.icon_get > - Add new elementary.Object.evas_get() function to access the parent > evas.Canvas of each evas.Object > Author: morphis > Date: 2009-09-03 07:36:20 -0700 (Thu, 03 Sep 2009) > New Revision: 42207 > > Modified: > trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_object.pxi > trunk/BINDINGS/python/python-elementary/include/elementary/c_elementary.pxd > > Modified: > trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_object.pxi > =================================================================== > --- > trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_object.pxi > 2009-09-03 14:23:14 UTC (rev 42206) > +++ > trunk/BINDINGS/python/python-elementary/elementary/elementary.c_elementary_object.pxi > 2009-09-03 14:36:20 UTC (rev 42207) > @@ -32,6 +32,10 @@ > except Exception, e: > traceback.print_exc() > > +cdef class Canvas(evas.c_evas.Canvas): > + def __init__(self): > + pass > +
why not a simple "from evas import Canvas"? You're creating yet another class, hierarchy, etc... which is useless and can help to degrade performance. Also note that it is better to use from "evas" and not "c_evas" in this case. > cdef class Object(evas.c_evas.Object): > """ > elementary.Object > @@ -40,6 +44,12 @@ > widgets are based on this class > """ > > + def evas_get(self): > + if self.evas is None: > + self.evas = Canvas() > + self.evas.obj = evas.c_evas.evas_object_evas_get(self.obj) > + return self.evas evas.c_evas.Object already provides evas_get() and I'm not sure how you want this to work, there should be no way to create an elementary object without an associated canvas. Please look into evas bindings or edje as example, they might save you some problems. If you find problems with those, please say and we fix to help everyone. -- Gustavo Sverzut Barbieri http://profusion.mobi embedded systems -------------------------------------- MSN: [email protected] Skype: gsbarbieri Mobile: +55 (19) 9225-2202 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
