Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/lib


Modified Files:
        e16_hack.c 


Log Message:
Cleanups, enable compiling everything as if it were C++.

===================================================================
RCS file: /cvs/e/e16/e/lib/e16_hack.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- e16_hack.c  13 Jan 2007 19:14:26 -0000      1.3
+++ e16_hack.c  17 Jan 2007 01:10:40 -0000      1.4
@@ -56,34 +56,44 @@
    return root;
 }
 
+typedef             Window(CWF) (Display * _display, Window _parent, int _x,
+                                int _y, unsigned int _width,
+                                unsigned int _height,
+                                unsigned int _border_width, int _depth,
+                                unsigned int _class, Visual * _visual,
+                                unsigned long _valuemask,
+                                XSetWindowAttributes * _attributes);
+
 /* XCreateWindow intercept hack */
 Window
 XCreateWindow(Display * display, Window parent, int x, int y,
              unsigned int width, unsigned int height,
              unsigned int border_width,
-             int depth, unsigned int class, Visual * visual,
+             int depth, unsigned int clss, Visual * visual,
              unsigned long valuemask, XSetWindowAttributes * attributes)
 {
-   static              Window(*func)
-      (Display * _display, Window _parent, int _x, int _y,
-       unsigned int _width, unsigned int _height,
-       unsigned int _border_width,
-       int _depth, unsigned int _class, Visual * _visual,
-       unsigned long _valuemask, XSetWindowAttributes * _attributes) = NULL;
+   static CWF         *func = NULL;
 
    /* find the real Xlib and the real X function */
    if (!lib_xlib)
       lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
    if (!func)
-      func = dlsym(lib_xlib, "XCreateWindow");
+      func = (CWF *) dlsym(lib_xlib, "XCreateWindow");
 
    if (parent == DefaultRootWindow(display))
       parent = MyRoot(display);
 
    return (*func) (display, parent, x, y, width, height, border_width, depth,
-                  class, visual, valuemask, attributes);
+                  clss, visual, valuemask, attributes);
 }
 
+typedef             Window(CSWF) (Display * _display, Window _parent, int _x,
+                                 int _y, unsigned int _width,
+                                 unsigned int _height,
+                                 unsigned int _border_width,
+                                 unsigned long _border,
+                                 unsigned long _background);
+
 /* XCreateSimpleWindow intercept hack */
 Window
 XCreateSimpleWindow(Display * display, Window parent, int x, int y,
@@ -91,17 +101,13 @@
                    unsigned int border_width,
                    unsigned long border, unsigned long background)
 {
-   static              Window(*func)
-      (Display * _display, Window _parent, int _x, int _y,
-       unsigned int _width, unsigned int _height,
-       unsigned int _border_width,
-       unsigned long _border, unsigned long _background) = NULL;
+   static CSWF        *func = NULL;
 
    /* find the real Xlib and the real X function */
    if (!lib_xlib)
       lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
    if (!func)
-      func = dlsym(lib_xlib, "XCreateSimpleWindow");
+      func = (CSWF *) dlsym(lib_xlib, "XCreateSimpleWindow");
 
    if (parent == DefaultRootWindow(display))
       parent = MyRoot(display);
@@ -110,19 +116,20 @@
                   border_width, border, background);
 }
 
+typedef int         (RWF) (Display * _display, Window _window, Window _parent,
+                          int x, int y);
+
 /* XReparentWindow intercept hack */
 int
 XReparentWindow(Display * display, Window window, Window parent, int x, int y)
 {
-   static int          (*func)
-      (Display * _display, Window _window, Window _parent, int _x, int _y) =
-      NULL;
+   static RWF         *func = NULL;
 
    /* find the real Xlib and the real X function */
    if (!lib_xlib)
       lib_xlib = dlopen("libX11.so", RTLD_GLOBAL | RTLD_LAZY);
    if (!func)
-      func = dlsym(lib_xlib, "XReparentWindow");
+      func = (RWF *) dlsym(lib_xlib, "XReparentWindow");
 
    if (parent == DefaultRootWindow(display))
       parent = MyRoot(display);



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to