Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : proto/python-efl

Dir     : e17/proto/python-efl/python-ecore/ecore/evas


Modified Files:
        __init__.py ecore.evas.c_ecore_evas.pxd 
        ecore.evas.c_ecore_evas_base.pxi 


Log Message:
Remove dependency on Numeric/array.h, improved __str__ and __repr__ and 
simplified ecore classes.

* Numeric/array.h was just required to print reference count, this
  macro is now in python_evas_utils.h and we're clean.
* __str__ was too verbose and not informative, it was improved with
  other attributes like color, geometry, name, clip and
  layer, but reference count and wrapped pointer are not there
  anymore, they made into new __repr__.
* Following previous patch from Caio, this version remove class
  redefinition in ecore/__init__.py, also these classes were redone to
  work better, and the results are good, with less lines of code and
  better consistency.


===================================================================
RCS file: /cvs/e/e17/proto/python-efl/python-ecore/ecore/evas/__init__.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- __init__.py 19 Jul 2007 16:07:06 -0000      1.3
+++ __init__.py 2 Sep 2007 15:11:54 -0000       1.4
@@ -2,18 +2,8 @@
 
 import c_ecore_evas
 
-shutdown = c_ecore_evas.shutdown
-
-engine_type_supported_get = c_ecore_evas.engine_type_supported_get
-engine_type_from_name = c_ecore_evas.engine_type_from_name
-engine_name_from_type = c_ecore_evas.engine_name_from_type
-
-SoftwareX11 = c_ecore_evas.SoftwareX11
-GLX11 = c_ecore_evas.GLX11
-XRenderX11 = c_ecore_evas.XRenderX11
-FB = c_ecore_evas.FB
-DirectFB = c_ecore_evas.DirectFB
-Buffer = c_ecore_evas.Buffer
-SoftwareX11_16 = c_ecore_evas.SoftwareX11_16
+from c_ecore_evas import shutdown, engine_type_supported_get, \
+     engine_type_from_name, engine_name_from_type, SoftwareX11, \
+     GLX11, XRenderX11, FB, DirectFB, Buffer, SoftwareX11_16
 
 c_ecore_evas.init()
===================================================================
RCS file: 
/cvs/e/e17/proto/python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas.pxd,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ecore.evas.c_ecore_evas.pxd 22 Jun 2007 21:05:07 -0000      1.2
+++ ecore.evas.c_ecore_evas.pxd 2 Sep 2007 15:11:54 -0000       1.3
@@ -1,3 +1,7 @@
+cdef extern from "python_evas_utils.h":
+    int PY_REFCOUNT(object)
+
+
 cdef extern from "Evas.h":
     ctypedef struct Evas
 
===================================================================
RCS file: 
/cvs/e/e17/proto/python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_base.pxi,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ecore.evas.c_ecore_evas_base.pxi    15 Aug 2007 15:31:47 -0000      1.3
+++ ecore.evas.c_ecore_evas_base.pxi    2 Sep 2007 15:11:54 -0000       1.4
@@ -163,9 +163,12 @@
         return 1
 
     def __str__(self):
-        return "%s(0x%x, refcount=%d, Ecore_Evas=0x%x, Evas=%s)" % \
+        return "%s(Evas=%s)" % (self.__class__.__name__, self._evas)
+
+    def __repr__(self):
+        return "%s(0x%x, refcount=%d, Ecore_Evas=0x%x, Evas=%r)" % \
                (self.__class__.__name__, <unsigned long>self,
-                python.REFCOUNT(self), <unsigned long>self.obj,
+                PY_REFCOUNT(self), <unsigned long>self.obj,
                 self._evas)
 
     def evas_get(self):



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to