Hi List,

after the recent small API change in Ecore_Evas_Engines the python-bindings
of python-efl have been updated, but the python-efl API itself stayed the
same.
In my opinion this should be changed, too, because it's not a good style to
have different APIs in the bindings.
The attached patch changes the python API, the same way the C-API has been
changed recently. Of course this will break all apps that use the affected
engines.
I already fixed it in all the demo apps in the python-efl folder, so there
should be nothing else to do.
I didn't check the other apps in the whole CVS, don't know if there are any
other python apps.

If this patch comes in there would be one further step to do:
python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_gl_x11.pxi must
be renamed, as must
python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_software_x11_16.pxi
As a rename requires a cvs rm and cvs add this should be done by someone
with cvs access.
Also the includes in the examples and so on would have to be changed, I
would send another patch if the files will be renamed.

Greets,

thomasg

P.S. I hope the patch is not too much lines in one file, but as the changes
are more or less trivial I think this is no big deal.
Index: python-efl/python-ecore/ecore/evas/__init__.py
===================================================================
RCS file: /var/cvs/e/e17/proto/python-efl/python-ecore/ecore/evas/__init__.py,v
retrieving revision 1.5
diff -u -r1.5 __init__.py
--- python-efl/python-ecore/ecore/evas/__init__.py      1 Oct 2007 05:09:43 
-0000       1.5
+++ python-efl/python-ecore/ecore/evas/__init__.py      6 Aug 2008 12:20:14 
-0000
@@ -4,6 +4,6 @@
 
 from c_ecore_evas import shutdown, engine_type_supported_get, \
      engine_type_from_name, engine_name_from_type, SoftwareX11, \
-     GLX11, XRenderX11, FB, Buffer, SoftwareX11_16
+     OpenGLX11, XRenderX11, FB, Buffer, Software16_X11
 
 c_ecore_evas.init()
Index: python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas.pyx
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas.pyx,v
retrieving revision 1.8
diff -u -r1.8 ecore.evas.c_ecore_evas.pyx
--- python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas.pyx      25 Jul 
2008 19:05:24 -0000      1.8
+++ python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas.pyx      6 Aug 
2008 12:20:14 -0000
@@ -16,18 +16,18 @@
 engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_BUFFER] = "software_buffer"
 engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_X11] = "software_x11"
 engines[<int>ECORE_EVAS_ENGINE_XRENDER_X11] = "xrender_x11"
-engines[<int>ECORE_EVAS_ENGINE_OPENGL_X11] = "gl_x11"
+engines[<int>ECORE_EVAS_ENGINE_OPENGL_X11] = "opengl_x11"
 engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_XCB] = "software_xcb"
 engines[<int>ECORE_EVAS_ENGINE_XRENDER_XCB] = "xrender_xcb"
 engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_DDRAW] = "software_ddraw"
 engines[<int>ECORE_EVAS_ENGINE_DIRECT3D] = "direct3d"
-engines[<int>ECORE_EVAS_ENGINE_OPENGL_GLEW] = "gl_glew"
+engines[<int>ECORE_EVAS_ENGINE_OPENGL_GLEW] = "opengl_glew"
 engines[<int>ECORE_EVAS_ENGINE_SDL] = "sdl"
 engines[<int>ECORE_EVAS_ENGINE_DIRECTFB] = "directfb"
 engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_FB] = "software_fb"
-engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_16_X11] = "software_x11_16"
-engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW] = "software_ddraw_16"
-engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE] = "software_wince_16"
+engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_16_X11] = "software_16_x11"
+engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_16_DDRAW] = "software_16_ddraw"
+engines[<int>ECORE_EVAS_ENGINE_SOFTWARE_16_WINCE] = "software_16_wince"
 cdef int engines_len
 engines_len = sizeof(engines)/sizeof(engines[0])
 
Index: python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_gl_x11.pxi
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_gl_x11.pxi,v
retrieving revision 1.3
diff -u -r1.3 ecore.evas.c_ecore_evas_gl_x11.pxi
--- python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_gl_x11.pxi       
1 Oct 2007 05:09:43 -0000       1.3
+++ python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_gl_x11.pxi       
6 Aug 2008 12:20:14 -0000
@@ -1,6 +1,6 @@
 # This file is included verbatim by c_ecore_evas.pyx
 
-cdef class GLX11(BaseX11):
+cdef class OpenGLX11(BaseX11):
     """X11 window using OpenGL render.
 
     @ivar window: X11 window id.
@@ -12,7 +12,7 @@
         cdef Ecore_Evas *obj
 
         if self.obj == NULL:
-            obj = ecore_evas_gl_x11_new(display, parent_xid, x, y, w, h)
+            obj = ecore_evas_opengl_x11_new(display, parent_xid, x, y, w, h)
             self._set_obj(obj)
 
     def window_get(self):
@@ -20,7 +20,7 @@
 
            @rtype: int
         """
-        return ecore_evas_gl_x11_window_get(self.obj)
+        return ecore_evas_opengl_x11_window_get(self.obj)
 
     property window:
         def __get__(self):
@@ -28,18 +28,18 @@
 
     def subwindow_get(self):
         "@rtype: int"
-        return ecore_evas_gl_x11_subwindow_get(self.obj)
+        return ecore_evas_opengl_x11_subwindow_get(self.obj)
 
     property subwindow:
         def __get__(self):
             return self.subwindow_get()
 
     def direct_resize_set(self, int on):
-        ecore_evas_gl_x11_direct_resize_set(self.obj, on)
+        ecore_evas_opengl_x11_direct_resize_set(self.obj, on)
 
     def direct_resize_get(self):
         "@rtype: bool"
-        return bool(ecore_evas_gl_x11_direct_resize_get(self.obj))
+        return bool(ecore_evas_opengl_x11_direct_resize_get(self.obj))
 
     property direct_resize:
         def __get__(self):
@@ -49,5 +49,5 @@
             self.direct_resize_set(on)
 
     def extra_event_window_add(self, long win_xid):
-        ecore_evas_gl_x11_extra_event_window_add(self.obj, win_xid)
+        ecore_evas_opengl_x11_extra_event_window_add(self.obj, win_xid)
 
Index: 
python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_software_x11_16.pxi
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_software_x11_16.pxi,v
retrieving revision 1.3
diff -u -r1.3 ecore.evas.c_ecore_evas_software_x11_16.pxi
--- 
python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_software_x11_16.pxi  
    1 Oct 2007 05:09:43 -0000       1.3
+++ 
python-efl/python-ecore/ecore/evas/ecore.evas.c_ecore_evas_software_x11_16.pxi  
    6 Aug 2008 12:20:14 -0000
@@ -1,6 +1,6 @@
 # This file is included verbatim by c_ecore_evas.pyx
 
-cdef class SoftwareX11_16(BaseX11):
+cdef class Software16_X11(BaseX11):
     """X11 window using software render optimized for 16 bits-per-pixel.
 
     @ivar window: X11 window id.
@@ -12,7 +12,7 @@
         cdef Ecore_Evas *obj
 
         if self.obj == NULL:
-            obj = ecore_evas_software_x11_16_new(display, parent_xid,
+            obj = ecore_evas_software_16_x11_new(display, parent_xid,
                                                  x, y, w, h)
             self._set_obj(obj)
 
@@ -21,7 +21,7 @@
 
            @rtype: int
         """
-        return ecore_evas_software_x11_16_window_get(self.obj)
+        return ecore_evas_software_16_x11_window_get(self.obj)
 
     property window:
         def __get__(self):
@@ -29,18 +29,18 @@
 
     def subwindow_get(self):
         "@rtype: int"
-        return ecore_evas_software_x11_16_subwindow_get(self.obj)
+        return ecore_evas_software_16_x11_subwindow_get(self.obj)
 
     property subwindow:
         def __get__(self):
             return self.subwindow_get()
 
     def direct_resize_set(self, int on):
-        ecore_evas_software_x11_16_direct_resize_set(self.obj, on)
+        ecore_evas_software_16_x11_direct_resize_set(self.obj, on)
 
     def direct_resize_get(self):
         "@rtype: bool"
-        return bool(ecore_evas_software_x11_16_direct_resize_get(self.obj))
+        return bool(ecore_evas_software_16_x11_direct_resize_get(self.obj))
 
     property direct_resize:
         def __get__(self):
@@ -50,5 +50,5 @@
             self.direct_resize_set(on)
 
     def extra_event_window_add(self, long win_xid):
-        ecore_evas_software_x11_16_extra_event_window_add(self.obj, win_xid)
+        ecore_evas_software_16_x11_extra_event_window_add(self.obj, win_xid)
 
Index: python-efl/python-ecore/include/ecore/evas/c_ecore_evas.pxd
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-ecore/include/ecore/evas/c_ecore_evas.pxd,v
retrieving revision 1.9
diff -u -r1.9 c_ecore_evas.pxd
--- python-efl/python-ecore/include/ecore/evas/c_ecore_evas.pxd 26 Jul 2008 
16:22:27 -0000      1.9
+++ python-efl/python-ecore/include/ecore/evas/c_ecore_evas.pxd 6 Aug 2008 
12:20:14 -0000
@@ -66,12 +66,12 @@
     int ecore_evas_software_x11_direct_resize_get(Ecore_Evas *ee)
     void ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, 
Ecore_X_Window win)
 
-    Ecore_Evas *ecore_evas_gl_x11_new(char *disp_name, Ecore_X_Window parent, 
int x, int y, int w, int h)
-    Ecore_X_Window ecore_evas_gl_x11_window_get(Ecore_Evas *ee)
-    Ecore_X_Window ecore_evas_gl_x11_subwindow_get(Ecore_Evas *ee)
-    void ecore_evas_gl_x11_direct_resize_set(Ecore_Evas *ee, int on)
-    int ecore_evas_gl_x11_direct_resize_get(Ecore_Evas *ee)
-    void ecore_evas_gl_x11_extra_event_window_add(Ecore_Evas *ee, 
Ecore_X_Window win)
+    Ecore_Evas *ecore_evas_opengl_x11_new(char *disp_name, Ecore_X_Window 
parent, int x, int y, int w, int h)
+    Ecore_X_Window ecore_evas_opengl_x11_window_get(Ecore_Evas *ee)
+    Ecore_X_Window ecore_evas_opengl_x11_subwindow_get(Ecore_Evas *ee)
+    void ecore_evas_opengl_x11_direct_resize_set(Ecore_Evas *ee, int on)
+    int ecore_evas_opengl_x11_direct_resize_get(Ecore_Evas *ee)
+    void ecore_evas_opengl_x11_extra_event_window_add(Ecore_Evas *ee, 
Ecore_X_Window win)
 
     Ecore_Evas *ecore_evas_xrender_x11_new(char *disp_name, Ecore_X_Window 
parent, int x, int y, int w, int h)
     Ecore_X_Window ecore_evas_xrender_x11_window_get(Ecore_Evas *ee)
@@ -80,12 +80,12 @@
     int ecore_evas_xrender_x11_direct_resize_get(Ecore_Evas *ee)
     void ecore_evas_xrender_x11_extra_event_window_add(Ecore_Evas *ee, 
Ecore_X_Window win)
 
-    Ecore_Evas *ecore_evas_software_x11_16_new(char *disp_name, Ecore_X_Window 
parent, int x, int y, int w, int h)
-    Ecore_X_Window ecore_evas_software_x11_16_window_get(Ecore_Evas *ee)
-    Ecore_X_Window ecore_evas_software_x11_16_subwindow_get(Ecore_Evas *ee)
-    void ecore_evas_software_x11_16_direct_resize_set(Ecore_Evas *ee, int on)
-    int ecore_evas_software_x11_16_direct_resize_get(Ecore_Evas *ee)
-    void ecore_evas_software_x11_16_extra_event_window_add(Ecore_Evas *ee, 
Ecore_X_Window win)
+    Ecore_Evas *ecore_evas_software_16_x11_new(char *disp_name, Ecore_X_Window 
parent, int x, int y, int w, int h)
+    Ecore_X_Window ecore_evas_software_16_x11_window_get(Ecore_Evas *ee)
+    Ecore_X_Window ecore_evas_software_16_x11_subwindow_get(Ecore_Evas *ee)
+    void ecore_evas_software_16_x11_direct_resize_set(Ecore_Evas *ee, int on)
+    int ecore_evas_software_16_x11_direct_resize_get(Ecore_Evas *ee)
+    void ecore_evas_software_16_x11_extra_event_window_add(Ecore_Evas *ee, 
Ecore_X_Window win)
 
     Ecore_Evas *ecore_evas_fb_new(char *disp_name, int rotation, int w, int h)
 
@@ -213,7 +213,7 @@
     pass
 
 
-cdef class GLX11(BaseX11):
+cdef class OpenGLX11(BaseX11):
     pass
 
 
@@ -221,7 +221,7 @@
     pass
 
 
-cdef class SoftwareX11_16(BaseX11):
+cdef class Software16_X11(BaseX11):
     pass
 
 
Index: 
python-efl/python-edje/examples/evas-demo/01-app_launcher/01-app_launcher.py
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-edje/examples/evas-demo/01-app_launcher/01-app_launcher.py,v
retrieving revision 1.1
diff -u -r1.1 01-app_launcher.py
--- 
python-efl/python-edje/examples/evas-demo/01-app_launcher/01-app_launcher.py    
    25 Jul 2007 15:39:31 -0000      1.1
+++ 
python-efl/python-edje/examples/evas-demo/01-app_launcher/01-app_launcher.py    
    6 Aug 2008 12:20:15 -0000
@@ -21,8 +21,8 @@
 usage = "usage: %prog [options]"
 op = OptionParser(usage=usage)
 op.add_option("-e", "--engine", type="choice",
-              choices=("x11", "x11-16"), default="x11-16",
-              help=("which display engine to use (x11, x11-16), "
+              choices=("x11", "16-x11"), default="16-x11",
+              help=("which display engine to use (x11, 16-x11), "
                     "default=%default"))
 op.add_option("-n", "--no-fullscreen", action="store_true",
               help="do not launch in fullscreen")
@@ -38,11 +38,11 @@
 options, args = op.parse_args()
 if options.engine == "x11":
     f = ecore.evas.SoftwareX11
-elif options.engine == "x11-16":
-    if ecore.evas.engine_type_supported_get("software_x11_16"):
-        f = ecore.evas.SoftwareX11_16
+elif options.engine == "16-x11":
+    if ecore.evas.engine_type_supported_get("software_16_x11"):
+        f = ecore.evas.Software16_X11
     else:
-        print "warning: x11-16 is not supported, fallback to x11"
+        print "warning: 16-x11 is not supported, fallback to x11"
         f = ecore.evas.SoftwareX11
 
 w, h = options.geometry
Index: python-efl/python-edje/examples/evas-demo/02-vkbd/02-vkbd.py
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-edje/examples/evas-demo/02-vkbd/02-vkbd.py,v
retrieving revision 1.3
diff -u -r1.3 02-vkbd.py
--- python-efl/python-edje/examples/evas-demo/02-vkbd/02-vkbd.py        27 Aug 
2007 00:21:15 -0000      1.3
+++ python-efl/python-edje/examples/evas-demo/02-vkbd/02-vkbd.py        6 Aug 
2008 12:20:15 -0000
@@ -193,9 +193,9 @@
             o.signal_emit("key_down", k)
 
 
-if ecore.evas.engine_type_supported_get("software_x11_16") and \
+if ecore.evas.engine_type_supported_get("software_16_x11") and \
    '-x11' not in sys.argv:
-    ee = ecore.evas.SoftwareX11_16(w=WIDTH, h=HEIGHT)
+    ee = ecore.evas.Software16_X11(w=WIDTH, h=HEIGHT)
 else:
     ee = ecore.evas.SoftwareX11(w=WIDTH, h=HEIGHT)
 
Index: 
python-efl/python-edje/examples/evas-demo/03-kinetic_list/03-kinetic_list.py
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-edje/examples/evas-demo/03-kinetic_list/03-kinetic_list.py,v
retrieving revision 1.2
diff -u -r1.2 03-kinetic_list.py
--- 
python-efl/python-edje/examples/evas-demo/03-kinetic_list/03-kinetic_list.py    
    4 Aug 2007 13:12:43 -0000       1.2
+++ 
python-efl/python-edje/examples/evas-demo/03-kinetic_list/03-kinetic_list.py    
    6 Aug 2008 12:20:15 -0000
@@ -432,11 +432,11 @@
     def __init__(self, fullscreen, engine, size):
         if options.engine == "x11":
             f = ecore.evas.SoftwareX11
-        elif options.engine == "x11-16":
-            if ecore.evas.engine_type_supported_get("software_x11_16"):
-                f = ecore.evas.SoftwareX11_16
+        elif options.engine == "16-x11":
+            if ecore.evas.engine_type_supported_get("software_16_x11"):
+                f = ecore.evas.Software16_X11
             else:
-                print "warning: x11-16 is not supported, fallback to x11"
+                print "warning: 16-x11 is not supported, fallback to x11"
                 f = ecore.evas.SoftwareX11
 
         self.evas_obj = f(w=size[0], h=size[1])
@@ -474,8 +474,8 @@
     usage = "usage: %prog [options]"
     op = OptionParser(usage=usage)
     op.add_option("-e", "--engine", type="choice",
-                  choices=("x11", "x11-16"), default="x11-16",
-                  help=("which display engine to use (x11, x11-16), "
+                  choices=("x11", "16-x11"), default="16-x11",
+                  help=("which display engine to use (x11, 16-x11), "
                         "default=%default"))
     op.add_option("-n", "--no-fullscreen", action="store_true",
                   help="do not launch in fullscreen")
Index: python-efl/python-emotion/examples/emotion_test.py
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-emotion/examples/emotion_test.py,v
retrieving revision 1.4
diff -u -r1.4 emotion_test.py
--- python-efl/python-emotion/examples/emotion_test.py  4 Nov 2007 02:21:11 
-0000       1.4
+++ python-efl/python-emotion/examples/emotion_test.py  6 Aug 2008 12:20:15 
-0000
@@ -370,7 +370,7 @@
                       help=("which multimedia engine to use (xine, gst), "
                             "default=%default"))
     parser.add_option("-d", "--display", type="choice",
-                      choices=("software_x11", "gl_x11", "xrender_x11", "fb"),
+                      choices=("software_x11", "opengl_x11", "xrender_x11", 
"fb"),
                       default="software_x11",
                       help="which display method to use, default=%default")
     options, args = parser.parse_args()
@@ -394,7 +394,7 @@
     options, args = cmdline_parse()
     display_map = {
         "software_x11": ecore.evas.SoftwareX11,
-        "gl_x11": ecore.evas.GLX11,
+        "opengl_x11": ecore.evas.OpenGLX11,
         "xrender_x11": ecore.evas.XRenderX11,
         "fb": ecore.evas.FB,
         }
Index: python-efl/python-evas/tests/12-image_as_buffer.py
===================================================================
RCS file: 
/var/cvs/e/e17/proto/python-efl/python-evas/tests/12-image_as_buffer.py,v
retrieving revision 1.1
diff -u -r1.1 12-image_as_buffer.py
--- python-efl/python-evas/tests/12-image_as_buffer.py  21 Oct 2007 00:51:03 
-0000      1.1
+++ python-efl/python-evas/tests/12-image_as_buffer.py  6 Aug 2008 12:20:15 
-0000
@@ -5,7 +5,7 @@
 if 'x11' in sys.argv:
     ee = ecore.evas.SoftwareX11(w=800, h=480)
 else:
-    ee = ecore.evas.SoftwareX11_16(w=800, h=480)
+    ee = ecore.evas.Software16_X11(w=800, h=480)
 
 canvas = ee.evas
 
Index: python-efl/python-evas/tests/13-image-rotate.py
===================================================================
RCS file: /var/cvs/e/e17/proto/python-efl/python-evas/tests/13-image-rotate.py,v
retrieving revision 1.1
diff -u -r1.1 13-image-rotate.py
--- python-efl/python-evas/tests/13-image-rotate.py     15 Nov 2007 22:38:11 
-0000      1.1
+++ python-efl/python-evas/tests/13-image-rotate.py     6 Aug 2008 12:20:15 
-0000
@@ -8,7 +8,7 @@
 if 'x11' in sys.argv:
     ee = ecore.evas.SoftwareX11(w=800, h=480)
 else:
-    ee = ecore.evas.SoftwareX11_16(w=800, h=480)
+    ee = ecore.evas.Software16_X11(w=800, h=480)
 
 bg = ee.evas.Rectangle(color=(255, 255, 255, 255))
 bg.size = ee.evas.size
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to