diff options
author | Ian Osgood <iano@quirkster.com> | 2006-04-29 11:27:15 -0700 |
---|---|---|
committer | Ian Osgood <iano@quirkster.com> | 2006-04-29 11:27:15 -0700 |
commit | 424c2ffaed14e0d0f2bb02dffa6a1c1df29d3423 (patch) | |
tree | e9c4d1e3140ed4582a06bfd18492759c5797d09e | |
parent | c0ed4444a21eb72009c7ac89cfb2ff2c919e899f (diff) |
Remove X.h dependency from flames
-rw-r--r-- | tests/flames.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/flames.c b/tests/flames.c index fb1cf2e..89fd331 100644 --- a/tests/flames.c +++ b/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 char *title) 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++) |