Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ecompmgr.c eobj.h x.c xwin.h 


Log Message:
Add some glx support stuff.

===================================================================
RCS file: /cvs/e/e16/e/src/ecompmgr.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -3 -r1.139 -r1.140
--- ecompmgr.c  11 Mar 2007 13:52:23 -0000      1.139
+++ ecompmgr.c  19 Mar 2007 05:37:57 -0000      1.140
@@ -92,7 +92,9 @@
 #define INV_GEOM    (INV_POS | INV_SIZE)
 #define INV_ALL     (INV_POS | INV_SIZE | INV_CLIP | INV_OPACITY | INV_SHADOW 
| INV_PIXMAP)
 
-struct _eoci
+typedef struct _cmhook ECmWinInfo;
+
+struct _cmhook
 {
    EObj               *next;   /* Paint order */
    EObj               *prev;   /* Paint order */
===================================================================
RCS file: /cvs/e/e16/e/src/eobj.h,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- eobj.h      7 Feb 2007 01:51:18 -0000       1.40
+++ eobj.h      19 Mar 2007 05:37:57 -0000      1.41
@@ -26,10 +26,6 @@
 #include "etypes.h"
 #include "xwin.h"
 
-#if USE_COMPOSITE
-typedef struct _eoci ECmWinInfo;
-#endif
-
 typedef struct _eobj EObj;
 
 struct _eobj
@@ -51,17 +47,20 @@
    unsigned            noredir:1;      /* Do not redirect */
    unsigned            shadow:1;       /* Enable shadows */
    unsigned            fade:1; /* Enable fading */
-#if USE_COMPOSITE
-   unsigned int        opacity;
-   ECmWinInfo         *cmhook;
-   unsigned int        serial;
-#endif
    struct
    {
       char               *wm_name;
       char               *wm_res_name;
       char               *wm_res_class;
    } icccm;
+#if USE_COMPOSITE
+   unsigned int        serial;
+   unsigned int        opacity;
+   struct _cmhook     *cmhook;
+#endif
+#if USE_GLX
+   struct _glhook     *glhook;
+#endif
 };
 
 #define EOBJ_TYPE_EWIN      0
@@ -165,6 +164,10 @@
 void                EobjShapeUpdate(EObj * eo, int propagate);
 void                EobjsRepaint(void);
 Pixmap              EobjGetPixmap(const EObj * eo);
+
+#if USE_GLX
+struct _etexture   *EobjGetTexture(EObj * eo);
+#endif
 void                EobjChangeOpacity(EObj * eo, unsigned int opacity);
 void                EobjChangeShadow(EObj * eo, int shadow);
 void                EobjSetLayer(EObj * eo, int layer);
===================================================================
RCS file: /cvs/e/e16/e/src/x.c,v
retrieving revision 1.153
retrieving revision 1.154
diff -u -3 -r1.153 -r1.154
--- x.c 25 Feb 2007 04:13:37 -0000      1.153
+++ x.c 19 Mar 2007 05:37:57 -0000      1.154
@@ -347,12 +347,33 @@
 }
 
 #if USE_COMPOSITE
-Win
-ECreateArgbWindow(Win parent, int x, int y, int w, int h, Win cwin)
+static              Win
+ECreateWindowVDC(Win parent, int x, int y, int w, int h,
+                Visual * vis, unsigned int depth, Colormap cmap)
 {
    EXID               *win;
    Window              xwin;
    XSetWindowAttributes attr;
+
+   attr.background_pixmap = None;
+   attr.border_pixel = 0;
+   attr.backing_store = NotUseful;
+   attr.save_under = False;
+   attr.override_redirect = False;
+   attr.colormap = cmap;
+
+   xwin = XCreateWindow(disp, parent->xwin, x, y, w, h, 0,
+                       depth, InputOutput, vis,
+                       CWOverrideRedirect | CWSaveUnder | CWBackingStore |
+                       CWColormap | CWBackPixmap | CWBorderPixel, &attr);
+   win = EXidSet(xwin, parent, x, y, w, h, depth, vis, cmap);
+
+   return win;
+}
+
+Win
+ECreateArgbWindow(Win parent, int x, int y, int w, int h, Win cwin)
+{
    int                 depth;
    Visual             *vis;
    Colormap            cmap;
@@ -376,22 +397,23 @@
        cmap = argb_cmap;
      }
 
-   attr.background_pixmap = None;
-   attr.border_pixel = 0;
-   attr.backing_store = NotUseful;
-   attr.save_under = False;
-   attr.override_redirect = False;
-   attr.colormap = cmap;
+   return ECreateWindowVDC(parent, x, y, w, h, vis, depth, cmap);
+}
 
-   xwin = XCreateWindow(disp, parent->xwin, x, y, w, h, 0,
-                       depth, InputOutput, vis,
-                       CWOverrideRedirect | CWSaveUnder | CWBackingStore |
-                       CWColormap | CWBackPixmap | CWBorderPixel, &attr);
-   win = EXidSet(xwin, parent, x, y, w, h, depth, vis, cmap);
+#if USE_GLX
+Win
+ECreateWindowVD(Win parent, int x, int y, int w, int h,
+               Visual * vis, unsigned int depth)
+{
+   Colormap            cmap;
 
-   return win;
+   cmap = XCreateColormap(disp, VRoot.xwin, vis, AllocNone);
+
+   return ECreateWindowVDC(parent, x, y, w, h, vis, depth, cmap);
 }
 #endif
+
+#endif /* USE_COMPOSITE */
 
 Win
 ECreateObjectWindow(Win parent, int x, int y, int w, int h, int saveunder,
===================================================================
RCS file: /cvs/e/e16/e/src/xwin.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- xwin.h      13 Jan 2007 19:14:29 -0000      1.27
+++ xwin.h      19 Mar 2007 05:37:57 -0000      1.28
@@ -125,6 +125,8 @@
                                  int saveunder);
 Win                 ECreateArgbWindow(Win parent, int x, int y, int w, int h,
                                      Win cwin);
+Win                 ECreateWindowVD(Win parent, int x, int y, int w, int h,
+                                   Visual * vis, unsigned int depth);
 Win                 ECreateClientWindow(Win parent, int x, int y, int w, int 
h);
 Win                 ECreateObjectWindow(Win parent, int x, int y, int w,
                                        int h, int saveunder, int type,



-------------------------------------------------------------------------
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