[Xcb-commit] 2 commits - xcb-demo

Ian Osgood iano at kemper.freedesktop.org
Sat Apr 29 11:33:21 PDT 2006


 xcb-demo/tests/flames.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

New commits:
diff-tree 351e6d82ef71d127d190a1abe640b15e0da5c429 (from parents)
Merge: 25dbf2f8b48d4d304a3839b26db348f95c08ff01 a64ff7cc17a05d778c7960cb7542ac4570d991bf
Author: Ian Osgood <iano at quirkster.com>
Date:   Sat Apr 29 11:33:06 2006 -0700

    Merge branch 'master' of git+ssh://iano@git.freedesktop.org/git/xcb

diff-tree 25dbf2f8b48d4d304a3839b26db348f95c08ff01 (from 0a0e3e4ad76dc1c15dc3e67322033488aed6b5ac)
Author: Ian Osgood <iano at quirkster.com>
Date:   Sat Apr 29 11:27:15 2006 -0700

    Remove X.h dependency from flames

diff --git a/xcb-demo/tests/flames.c b/xcb-demo/tests/flames.c
index fb1cf2e..89fd331 100644
--- a/xcb-demo/tests/flames.c
+++ b/xcb-demo/tests/flames.c
@@ -25,7 +25,7 @@
 #include <assert.h>
 #include <string.h>
 
-#include <X11/X.h>
+#define X_H
 #include <X11/XCB/xcb.h>
 #include <X11/XCB/shm.h>
 #include <X11/XCB/xcb_aux.h>
@@ -106,13 +106,13 @@ flame_init ()
 
   f->xcb.draw.window = screen->root;
   f->xcb.gc = XCBGCONTEXTNew (f->xcb.c);
-  mask = GCForeground | GCGraphicsExposures;
+  mask = XCBGCForeground | XCBGCGraphicsExposures;
   values[0] = screen->black_pixel;
   values[1] = 0; /* no graphics exposures */
   XCBCreateGC (f->xcb.c, f->xcb.gc, f->xcb.draw, mask, values);
 
   gc = XCBGCONTEXTNew (f->xcb.c);
-  mask = GCForeground | GCGraphicsExposures;
+  mask = XCBGCForeground | XCBGCGraphicsExposures;
   values[0] = screen->white_pixel;
   values[1] = 0; /* no graphics exposures */
   XCBCreateGC (f->xcb.c, gc, f->xcb.draw, mask, values);
@@ -120,14 +120,14 @@ flame_init ()
   f->xcb.depth = XCBAuxGetDepth (f->xcb.c, screen);
   mask = XCBCWBackPixel | XCBCWEventMask;
   values[0] = screen->white_pixel;
-  values[1] = ExposureMask | ButtonPressMask;
+  values[1] = XCBEventMaskExposure | XCBEventMaskButtonPress;
   f->xcb.draw.window = XCBWINDOWNew (f->xcb.c);
   XCBCreateWindow (f->xcb.c, f->xcb.depth,
 		   f->xcb.draw.window,
 		   screen->root,
 		   0, 0, BG_W, BG_H,
 		   0,
-		   InputOutput,
+		   XCBWindowClassInputOutput,
 		   screen->root_visual,
 		   mask, values);
   title_set (f, "XCB Flames");
@@ -143,7 +143,7 @@ flame_init ()
 
   f->xcb.cmap = XCBCOLORMAPNew (f->xcb.c);
   XCBCreateColormap (f->xcb.c,
-		     AllocNone,
+		     XCBColormapAllocNone,
 		     f->xcb.cmap,
 		     f->xcb.draw.window,
 		     screen->root_visual);
@@ -263,7 +263,7 @@ static void title_set (flame *f, const c
                                            strlen (atom_name),
                                            atom_name),
                             NULL);
-  XCBChangeProperty(f->xcb.c, PropModeReplace,
+  XCBChangeProperty(f->xcb.c, XCBPropModeReplace,
                     f->xcb.draw.window,
                     rep->atom, encoding, 8, strlen (title), title);
   free (rep);
@@ -291,7 +291,7 @@ flame_draw_flame (flame *f)
 
   image = XCBImageGet (f->xcb.c, f->xcb.draw,
 		       0, 0, BG_W, BG_H,
-		       ((unsigned long)~0L), ZPixmap);
+		       XCBAllPlanes, XCBImageFormatZPixmap);
   f->im = (unsigned int *)image->data;
 
   for (y = 0 ; y < ((BG_H >> 1) - 1) ; y++)


More information about the xcb-commit mailing list