summaryrefslogtreecommitdiff
path: root/xcb-demo
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2004-03-17 17:42:08 +0000
committerJamey Sharp <jamey@minilop.net>2004-03-17 17:42:08 +0000
commitd8ac4da81558e1b391e2f56c31f123651725b4d0 (patch)
tree68108ca3f63d9abd8d6935ee8f8c5f1a2f066fd3 /xcb-demo
parent4c8bf1424835d6d0d6115b1d747130152713d503 (diff)
Big API changes so XCB headers don't conflict with Xlib ones.
http://freedesktop.org/Software/XCBCompletedTasks#17_Mar_2004
Diffstat (limited to 'xcb-demo')
-rw-r--r--xcb-demo/hypnomoire.c18
-rw-r--r--xcb-demo/main.c18
-rw-r--r--xcb-demo/rendertest.c160
-rw-r--r--xcb-demo/reply_formats.c6
-rw-r--r--xcb-demo/reply_formats.h6
-rw-r--r--xcb-demo/xdpyinfo.c16
6 files changed, 112 insertions, 112 deletions
diff --git a/xcb-demo/hypnomoire.c b/xcb-demo/hypnomoire.c
index b119a16..e26a4d5 100644
--- a/xcb-demo/hypnomoire.c
+++ b/xcb-demo/hypnomoire.c
@@ -22,13 +22,13 @@
#define PI 3.14159265
static XCBConnection *c;
-static SCREEN *root;
-static GCONTEXT white, black;
+static XCBSCREEN *root;
+static XCBGCONTEXT white, black;
#define WINS 8
static struct {
- DRAWABLE w;
- DRAWABLE p;
+ XCBDRAWABLE w;
+ XCBDRAWABLE p;
CARD16 width;
CARD16 height;
float angv;
@@ -44,7 +44,7 @@ int main()
CARD32 mask = GCForeground | GCGraphicsExposures;
CARD32 values[2];
- DRAWABLE rootwin;
+ XCBDRAWABLE rootwin;
c = XCBConnectBasic();
root = XCBConnSetupSuccessRepRoots(XCBGetSetup(c)).data;
@@ -89,7 +89,7 @@ void *run(void *param)
int xo, yo;
double r, theta = 0;
- POINT line[2];
+ XCBPOINT line[2];
windows[idx].w.window = XCBWINDOWNew(c);
windows[idx].p.pixmap = XCBPIXMAPNew(c);
@@ -109,12 +109,12 @@ void *run(void *param)
int depth;
CARD32 mask = XCBCWBackPixel | XCBCWEventMask | XCBCWDontPropagate;
CARD32 values[3];
- RECTANGLE rect = { 0, 0, windows[idx].width, windows[idx].height };
+ XCBRECTANGLE rect = { 0, 0, windows[idx].width, windows[idx].height };
values[0] = root->white_pixel;
values[1] = ButtonReleaseMask | ExposureMask;
values[2] = ButtonPressMask;
- depth = SCREENAllowedDepths(root).data->depth;
+ depth = XCBSCREENAllowedDepths(root).data->depth;
XCBCreateWindow(c, depth, windows[idx].w.window, root->root,
/* x */ 0, /* y */ 0,
@@ -157,7 +157,7 @@ void *run(void *param)
}
}
-int lookup_window(WINDOW w)
+int lookup_window(XCBWINDOW w)
{
int i;
for(i = 0; i < WINS; ++i)
diff --git a/xcb-demo/main.c b/xcb-demo/main.c
index 6de84a3..7e4bd10 100644
--- a/xcb-demo/main.c
+++ b/xcb-demo/main.c
@@ -34,14 +34,14 @@ void try_events(XCBConnection *c);
void wait_events(XCBConnection *c);
static XCBConnection *c;
-static WINDOW window;
+static XCBWINDOW window;
int main(int argc, char **argv)
{
CARD32 mask = 0;
CARD32 values[6];
- DRAWABLE d;
- SCREEN *root;
+ XCBDRAWABLE d;
+ XCBSCREEN *root;
#ifdef TEST_GET_GEOMETRY
XCBGetGeometryCookie geom[3];
XCBGetGeometryRep *geomrep[3];
@@ -98,7 +98,7 @@ int main(int argc, char **argv)
mask |= XCBCWDontPropagate;
values[5] = ButtonPressMask;
- XCBCreateWindow(c, SCREENAllowedDepths(root).data->depth,
+ XCBCreateWindow(c, XCBSCREENAllowedDepths(root).data->depth,
window, root->root,
/* x */ 20, /* y */ 200, /* width */ 150, /* height */ 150,
/* border_width */ 10, /* class */ InputOutput,
@@ -109,15 +109,15 @@ int main(int argc, char **argv)
atomrep[1] = XCBInternAtomReply(c, atom[1], 0);
atomrep[0] = XCBInternAtomReply(c, atom[0], 0);
{
- ATOM XA_WM_NAME = { 39 };
- ATOM XA_STRING = { 31 };
+ XCBATOM XA_WM_NAME = { 39 };
+ XCBATOM XA_STRING = { 31 };
XCBChangeProperty(c, PropModeReplace, window, XA_WM_NAME, XA_STRING, 8, strlen(argv[0]), argv[0]);
}
if(atomrep[0] && atomrep[1])
{
- ATOM WM_PROTOCOLS = atomrep[0]->atom;
- ATOM WM_DELETE_WINDOW = atomrep[1]->atom;
- ATOM XA_ATOM = { 4 };
+ XCBATOM WM_PROTOCOLS = atomrep[0]->atom;
+ XCBATOM WM_DELETE_WINDOW = atomrep[1]->atom;
+ XCBATOM XA_ATOM = { 4 };
XCBChangeProperty(c, PropModeReplace, window, WM_PROTOCOLS, XA_ATOM, 32, 1, &WM_DELETE_WINDOW);
}
free(atomrep[0]);
diff --git a/xcb-demo/rendertest.c b/xcb-demo/rendertest.c
index c7e2e8b..1888102 100644
--- a/xcb-demo/rendertest.c
+++ b/xcb-demo/rendertest.c
@@ -11,13 +11,13 @@
void print_version_info(XCBRenderQueryVersionRep *reply);
int print_formats_info(XCBRenderQueryPictFormatsRep *reply);
int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply);
-PICTFORMAT get_pictformat_from_visual(XCBRenderQueryPictFormatsRep *reply, VISUALID visual);
-PICTFORMINFO *get_pictforminfo(XCBRenderQueryPictFormatsRep *reply, PICTFORMINFO *query);
+XCBRenderPICTFORMAT get_pictformat_from_visual(XCBRenderQueryPictFormatsRep *reply, XCBVISUALID visual);
+XCBRenderPICTFORMINFO *get_pictforminfo(XCBRenderQueryPictFormatsRep *reply, XCBRenderPICTFORMINFO *query);
XCBConnection *c;
-PICTFORMAT pf;
+XCBRenderPICTFORMAT pf;
-inline FIXED make_fixed(INT16 i, INT16 f)
+inline XCBRenderFIXED make_fixed(INT16 i, INT16 f)
{
return (i << 16) | (f & 0xffff);
}
@@ -31,13 +31,13 @@ void print_version_info(XCBRenderQueryVersionRep *reply)
int print_formats_info(XCBRenderQueryPictFormatsRep *reply)
{
- PICTFORMINFO *first_forminfo;
+ XCBRenderPICTFORMINFO *first_forminfo;
int num_formats;
int num_screens;
int num_depths;
int num_visuals;
- PICTFORMINFOIter forminfo_iter;
- PICTSCREENIter screen_iter;
+ XCBRenderPICTFORMINFOIter forminfo_iter;
+ XCBRenderPICTSCREENIter screen_iter;
forminfo_iter = XCBRenderQueryPictFormatsFormats(reply);
screen_iter = XCBRenderQueryPictFormatsScreens(reply);
@@ -49,7 +49,7 @@ int print_formats_info(XCBRenderQueryPictFormatsRep *reply)
pf = first_forminfo->id;
while(forminfo_iter.rem)
{
- PICTFORMINFO *forminfo = (PICTFORMINFO *)forminfo_iter.data;
+ XCBRenderPICTFORMINFO *forminfo = (XCBRenderPICTFORMINFO *)forminfo_iter.data;
fprintf(stdout, "PICTFORMINFO #%d\n", 1 + num_formats - forminfo_iter.rem);
fprintf(stdout, " PICTFORMAT ID: %ld\n", forminfo->id.xid);
@@ -64,65 +64,65 @@ int print_formats_info(XCBRenderQueryPictFormatsRep *reply)
fprintf(stdout, " Direct AlphaShift: %d\n", forminfo->direct.alpha_shift);
fprintf(stdout, " Direct AlphaMask: %d\n", forminfo->direct.alpha_mask);
fprintf(stdout, "\n");
- PICTFORMINFONext(&forminfo_iter);
+ XCBRenderPICTFORMINFONext(&forminfo_iter);
}
num_screens = reply->num_screens;
while(screen_iter.rem)
{
- PICTDEPTHIter depth_iter;
- PICTSCREEN *cscreen = screen_iter.data;
+ XCBRenderPICTDEPTHIter depth_iter;
+ XCBRenderPICTSCREEN *cscreen = screen_iter.data;
fprintf(stdout, "Screen #%d\n", 1 + num_screens - screen_iter.rem);
fprintf(stdout, " Depths for this screen: %ld\n", cscreen->num_depths);
fprintf(stdout, " Fallback PICTFORMAT: %ld\n", cscreen->fallback.xid);
- depth_iter = PICTSCREENDepths(cscreen);
+ depth_iter = XCBRenderPICTSCREENDepths(cscreen);
num_depths = cscreen->num_depths;
while(depth_iter.rem)
{
- PICTVISUALIter visual_iter;
- PICTDEPTH *cdepth = depth_iter.data;
+ XCBRenderPICTVISUALIter visual_iter;
+ XCBRenderPICTDEPTH *cdepth = depth_iter.data;
fprintf(stdout, " Depth #%d\n", 1 + num_depths - depth_iter.rem);
fprintf(stdout, " Visuals for this depth: %d\n", cdepth->num_visuals);
fprintf(stdout, " Depth: %d\n", cdepth->depth);
- visual_iter = PICTDEPTHVisuals(cdepth);
+ visual_iter = XCBRenderPICTDEPTHVisuals(cdepth);
num_visuals = cdepth->num_visuals;
while(visual_iter.rem)
{
- PICTVISUAL *cvisual = visual_iter.data;
+ XCBRenderPICTVISUAL *cvisual = visual_iter.data;
fprintf(stdout, " Visual #%d\n", 1 + num_visuals - visual_iter.rem);
fprintf(stdout, " VISUALID: %ld\n", cvisual->visual.id);
fprintf(stdout, " PICTFORMAT: %ld\n", cvisual->format.xid);
- PICTVISUALNext(&visual_iter);
+ XCBRenderPICTVISUALNext(&visual_iter);
}
- PICTDEPTHNext(&depth_iter);
+ XCBRenderPICTDEPTHNext(&depth_iter);
}
- PICTSCREENNext(&screen_iter);
+ XCBRenderPICTSCREENNext(&screen_iter);
}
return 0;
}
int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply)
{
- WINDOW window;
- DRAWABLE window_drawable, tmp, root_drawable;
- PIXMAP surfaces[4], alpha_surface;
- PICTFORMAT alpha_mask_format, window_format, surface_format, no_format = {0};
- PICTURE window_pict, pict_surfaces[4], alpha_pict,
+ XCBWINDOW window;
+ XCBDRAWABLE window_drawable, tmp, root_drawable;
+ XCBPIXMAP surfaces[4], alpha_surface;
+ XCBRenderPICTFORMAT alpha_mask_format, window_format, surface_format, no_format = {0};
+ XCBRenderPICTURE window_pict, pict_surfaces[4], alpha_pict,
no_picture = {0}, root_picture;
- PICTFORMINFO *forminfo_ptr, *alpha_forminfo_ptr, query;
+ XCBRenderPICTFORMINFO *forminfo_ptr, *alpha_forminfo_ptr, query;
CARD32 value_mask, value_list[4];
- RECTANGLE pict_rect[1], window_rect;
- COLOR pict_color[4], back_color, alpha_color;
- SCREEN *root;
- TRAP traps[4];
- TRIANGLE triangles[4];
- POINTFIX tristrips[9];
- POINTFIX trifans[9];
+ XCBRECTANGLE pict_rect[1], window_rect;
+ XCBRenderCOLOR pict_color[4], back_color, alpha_color;
+ XCBSCREEN *root;
+ XCBRenderTRAP traps[4];
+ XCBRenderTRIANGLE triangles[4];
+ XCBRenderPOINTFIX tristrips[9];
+ XCBRenderPOINTFIX trifans[9];
int index;
root = XCBConnSetupSuccessRepRoots(XCBGetSetup(c)).data;
@@ -130,17 +130,17 @@ int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply)
/* Setting query so that it will search for an 8 bit alpha surface. */
query.id.xid = 0;
- query.type = PictTypeDirect;
+ query.type = XCBRenderPictTypeDirect;
query.depth = 8;
query.direct.red_mask = 0;
query.direct.green_mask = 0;
query.direct.blue_mask = 0;
query.direct.alpha_mask = 255;
- /* Get the PICTFORMAT associated with the window. */
+ /* Get the XCBRenderPICTFORMAT associated with the window. */
window_format = get_pictformat_from_visual(reply, root->root_visual);
- /* Get the PICTFORMAT we will use for the alpha mask */
+ /* Get the XCBRenderPICTFORMAT we will use for the alpha mask */
alpha_forminfo_ptr = get_pictforminfo(reply, &query);
alpha_mask_format.xid = alpha_forminfo_ptr->id.xid;
@@ -148,7 +148,7 @@ int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply)
query.depth = 32;
query.direct.alpha_mask = 0;
- /* Get the surface forminfo and PICTFORMAT */
+ /* Get the surface forminfo and XCBRenderPICTFORMAT */
forminfo_ptr = get_pictforminfo(reply, &query);
surface_format.xid = forminfo_ptr->id.xid;
@@ -156,14 +156,14 @@ int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply)
for(index = 0; index < 4; index++)
{
surfaces[index] = XCBPIXMAPNew(conn);
- pict_surfaces[index] = XCBPICTURENew(conn);
+ pict_surfaces[index] = XCBRenderPICTURENew(conn);
}
alpha_surface = XCBPIXMAPNew(conn);
- alpha_pict = XCBPICTURENew(conn);
+ alpha_pict = XCBRenderPICTURENew(conn);
window = XCBWINDOWNew(conn);
- window_pict = XCBPICTURENew(conn);
+ window_pict = XCBRenderPICTURENew(conn);
window_drawable.window = window;
- root_picture = XCBPICTURENew(conn);
+ root_picture = XCBRenderPICTURENew(conn);
/* Here we will create the pixmaps that we will use */
for(index = 0; index < 4; index++)
@@ -186,7 +186,7 @@ int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply)
600, 600, /* width and height */
0, /* border width */
InputOutput, /* class */
- root->root_visual, /* VISUALID */
+ root->root_visual, /* XCBVISUALID */
value_mask, value_list); /* LISTofVALUES */
/*
@@ -322,65 +322,65 @@ int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply)
* Play around with Render
*/
- XCBRenderFillRectangles(conn, PictOpSrc, alpha_pict, alpha_color, 1, pict_rect);
- XCBRenderFillRectangles(conn, PictOpSrc, pict_surfaces[0], pict_color[0], 1, pict_rect);
- XCBRenderFillRectangles(conn, PictOpSrc, pict_surfaces[1], pict_color[1], 1, pict_rect);
- XCBRenderFillRectangles(conn, PictOpSrc, pict_surfaces[2], pict_color[2], 1, pict_rect);
- XCBRenderFillRectangles(conn, PictOpSrc, pict_surfaces[3], pict_color[3], 1, pict_rect);
+ XCBRenderFillRectangles(conn, XCBRenderPictOpSrc, alpha_pict, alpha_color, 1, pict_rect);
+ XCBRenderFillRectangles(conn, XCBRenderPictOpSrc, pict_surfaces[0], pict_color[0], 1, pict_rect);
+ XCBRenderFillRectangles(conn, XCBRenderPictOpSrc, pict_surfaces[1], pict_color[1], 1, pict_rect);
+ XCBRenderFillRectangles(conn, XCBRenderPictOpSrc, pict_surfaces[2], pict_color[2], 1, pict_rect);
+ XCBRenderFillRectangles(conn, XCBRenderPictOpSrc, pict_surfaces[3], pict_color[3], 1, pict_rect);
XCBFlush(conn);
sleep(1);
- XCBRenderFillRectangles(conn, PictOpOver, window_pict, back_color, 1, &window_rect);
+ XCBRenderFillRectangles(conn, XCBRenderPictOpOver, window_pict, back_color, 1, &window_rect);
XCBFlush(conn);
sleep(1);
/* Composite the first pict_surface onto the window picture */
- XCBRenderComposite(conn, PictOpOver, pict_surfaces[0], no_picture /* alpha_pict */, window_pict,
+ XCBRenderComposite(conn, XCBRenderPictOpOver, pict_surfaces[0], no_picture /* alpha_pict */, window_pict,
0, 0, 0, 0, 200, 200,
400, 400);
XCBFlush(conn);
sleep(1);
/*
- XCBRenderComposite(conn, PictOpOver, pict_surfaces[0], alpha_pict, window_pict,
+ XCBRenderComposite(conn, XCBRenderPictOpOver, pict_surfaces[0], alpha_pict, window_pict,
0, 0, 0, 0, 0, 0,
200, 200);
XCBFlush(conn);
sleep(1);
*/
- XCBRenderComposite(conn, PictOpOver, pict_surfaces[1], no_picture /* alpha_pict */, window_pict,
+ XCBRenderComposite(conn, XCBRenderPictOpOver, pict_surfaces[1], no_picture /* alpha_pict */, window_pict,
0, 0, 0, 0, 0, 0,
400, 400);
XCBFlush(conn);
sleep(1);
- XCBRenderComposite(conn, PictOpOver, pict_surfaces[2], no_picture /* alpha_pict */, window_pict,
+ XCBRenderComposite(conn, XCBRenderPictOpOver, pict_surfaces[2], no_picture /* alpha_pict */, window_pict,
0, 0, 0, 0, 200, 0,
400, 400);
XCBFlush(conn);
sleep(1);
- XCBRenderComposite(conn, PictOpOver, pict_surfaces[3], no_picture /* alpha_pict */, window_pict,
+ XCBRenderComposite(conn, XCBRenderPictOpOver, pict_surfaces[3], no_picture /* alpha_pict */, window_pict,
0, 0, 0, 0, 0, 200,
400, 400);
XCBFlush(conn);
sleep(1);
- XCBRenderTrapezoids(conn, PictOpOver, pict_surfaces[0], window_pict, alpha_mask_format, 0, 0, 1, &traps[0]);
+ XCBRenderTrapezoids(conn, XCBRenderPictOpOver, pict_surfaces[0], window_pict, alpha_mask_format, 0, 0, 1, &traps[0]);
XCBFlush(conn);
sleep(1);
- XCBRenderTriangles(conn, PictOpOver, pict_surfaces[1], window_pict, no_format, 0, 0, 1, &triangles[0]);
+ XCBRenderTriangles(conn, XCBRenderPictOpOver, pict_surfaces[1], window_pict, no_format, 0, 0, 1, &triangles[0]);
XCBFlush(conn);
sleep(1);
- XCBRenderTriStrip(conn, PictOpOver, pict_surfaces[2], window_pict, no_format, 0, 0, 9, &tristrips[0]);
+ XCBRenderTriStrip(conn, XCBRenderPictOpOver, pict_surfaces[2], window_pict, no_format, 0, 0, 9, &tristrips[0]);
XCBFlush(conn);
sleep(1);
- XCBRenderTriFan(conn, PictOpOver, pict_surfaces[3], window_pict, no_format, 0, 0, 8, &trifans[0]);
+ XCBRenderTriFan(conn, XCBRenderPictOpOver, pict_surfaces[3], window_pict, no_format, 0, 0, 8, &trifans[0]);
XCBFlush(conn);
sleep(2);
@@ -404,21 +404,21 @@ int draw_window(XCBConnection *conn, XCBRenderQueryPictFormatsRep *reply)
/**********************************************************
* This function searches through the reply for a
- * PictVisual who's VISUALID is the same as the one
+ * PictVisual who's XCBVISUALID is the same as the one
* specified in query. The function will then return the
- * PICTFORMAT from that PictVIsual structure.
- * This is useful for getting the PICTFORMAT that is
+ * XCBRenderPICTFORMAT from that PictVIsual structure.
+ * This is useful for getting the XCBRenderPICTFORMAT that is
* the same visual type as the root window.
**********************************************************/
-PICTFORMAT get_pictformat_from_visual(XCBRenderQueryPictFormatsRep *reply, VISUALID query)
+XCBRenderPICTFORMAT get_pictformat_from_visual(XCBRenderQueryPictFormatsRep *reply, XCBVISUALID query)
{
- PICTSCREENIter screen_iter;
- PICTSCREEN *cscreen;
- PICTDEPTHIter depth_iter;
- PICTDEPTH *cdepth;
- PICTVISUALIter visual_iter;
- PICTVISUAL *cvisual;
- PICTFORMAT return_value;
+ XCBRenderPICTSCREENIter screen_iter;
+ XCBRenderPICTSCREEN *cscreen;
+ XCBRenderPICTDEPTHIter depth_iter;
+ XCBRenderPICTDEPTH *cdepth;
+ XCBRenderPICTVISUALIter visual_iter;
+ XCBRenderPICTVISUAL *cvisual;
+ XCBRenderPICTFORMAT return_value;
screen_iter = XCBRenderQueryPictFormatsScreens(reply);
@@ -426,12 +426,12 @@ PICTFORMAT get_pictformat_from_visual(XCBRenderQueryPictFormatsRep *reply, VISUA
{
cscreen = screen_iter.data;
- depth_iter = PICTSCREENDepths(cscreen);
+ depth_iter = XCBRenderPICTSCREENDepths(cscreen);
while(depth_iter.rem)
{
cdepth = depth_iter.data;
- visual_iter = PICTDEPTHVisuals(cdepth);
+ visual_iter = XCBRenderPICTDEPTHVisuals(cdepth);
while(visual_iter.rem)
{
cvisual = visual_iter.data;
@@ -440,27 +440,27 @@ PICTFORMAT get_pictformat_from_visual(XCBRenderQueryPictFormatsRep *reply, VISUA
{
return cvisual->format;
}
- PICTVISUALNext(&visual_iter);
+ XCBRenderPICTVISUALNext(&visual_iter);
}
- PICTDEPTHNext(&depth_iter);
+ XCBRenderPICTDEPTHNext(&depth_iter);
}
- PICTSCREENNext(&screen_iter);
+ XCBRenderPICTSCREENNext(&screen_iter);
}
return_value.xid = 0;
return return_value;
}
-PICTFORMINFO *get_pictforminfo(XCBRenderQueryPictFormatsRep *reply, PICTFORMINFO *query)
+XCBRenderPICTFORMINFO *get_pictforminfo(XCBRenderQueryPictFormatsRep *reply, XCBRenderPICTFORMINFO *query)
{
- PICTFORMINFOIter forminfo_iter;
+ XCBRenderPICTFORMINFOIter forminfo_iter;
forminfo_iter = XCBRenderQueryPictFormatsFormats(reply);
while(forminfo_iter.rem)
{
- PICTFORMINFO *cformat;
+ XCBRenderPICTFORMINFO *cformat;
cformat = forminfo_iter.data;
- PICTFORMINFONext(&forminfo_iter);
+ XCBRenderPICTFORMINFONext(&forminfo_iter);
if( (query->id.xid != 0) && (query->id.xid != cformat->id.xid) )
{
@@ -511,10 +511,10 @@ int main(int argc, char *argv[])
XCBRenderQueryVersionRep *version_reply;
XCBRenderQueryPictFormatsCookie formats_cookie;
XCBRenderQueryPictFormatsRep *formats_reply;
- PICTFORMAT rootformat;
- SCREEN *root;
+ XCBRenderPICTFORMAT rootformat;
+ XCBSCREEN *root;
- PICTFORMINFO forminfo_query, *forminfo_result;
+ XCBRenderPICTFORMINFO forminfo_query, *forminfo_result;
c = XCBConnectBasic();
root = XCBConnSetupSuccessRepRoots(XCBGetSetup(c)).data;
@@ -532,7 +532,7 @@ int main(int argc, char *argv[])
print_formats_info(formats_reply);
forminfo_query.id.xid = 0;
- forminfo_query.type = PictTypeDirect;
+ forminfo_query.type = XCBRenderPictTypeDirect;
forminfo_query.depth = 8;
forminfo_query.direct.red_mask = 0;
forminfo_query.direct.green_mask = 0;
diff --git a/xcb-demo/reply_formats.c b/xcb-demo/reply_formats.c
index b0666f8..7920f3f 100644
--- a/xcb-demo/reply_formats.c
+++ b/xcb-demo/reply_formats.c
@@ -9,7 +9,7 @@
#define WINFMT "0x%08x"
-int formatGetWindowAttributesReply(WINDOW wid, XCBGetWindowAttributesRep *reply)
+int formatGetWindowAttributesReply(XCBWINDOW wid, XCBGetWindowAttributesRep *reply)
{
if(!reply)
{
@@ -55,7 +55,7 @@ int formatGetWindowAttributesReply(WINDOW wid, XCBGetWindowAttributesRep *reply)
return 1;
}
-int formatGetGeometryReply(WINDOW wid, XCBGetGeometryRep *reply)
+int formatGetGeometryReply(XCBWINDOW wid, XCBGetGeometryRep *reply)
{
if(!reply)
{
@@ -75,7 +75,7 @@ int formatGetGeometryReply(WINDOW wid, XCBGetGeometryRep *reply)
return 1;
}
-int formatQueryTreeReply(WINDOW wid, XCBQueryTreeRep *reply)
+int formatQueryTreeReply(XCBWINDOW wid, XCBQueryTreeRep *reply)
{
int i;
diff --git a/xcb-demo/reply_formats.h b/xcb-demo/reply_formats.h
index e8aa9b0..431eca1 100644
--- a/xcb-demo/reply_formats.h
+++ b/xcb-demo/reply_formats.h
@@ -9,9 +9,9 @@
#include <X11/XCB/xcb.h>
-int formatGetWindowAttributesReply(WINDOW wid, XCBGetWindowAttributesRep *reply);
-int formatGetGeometryReply(WINDOW wid, XCBGetGeometryRep *reply);
-int formatQueryTreeReply(WINDOW wid, XCBQueryTreeRep *reply);
+int formatGetWindowAttributesReply(XCBWINDOW wid, XCBGetWindowAttributesRep *reply);
+int formatGetGeometryReply(XCBWINDOW wid, XCBGetGeometryRep *reply);
+int formatQueryTreeReply(XCBWINDOW wid, XCBQueryTreeRep *reply);
int formatEvent(XCBGenericEvent *e);
#endif /* REPLY_FORMATS_H */
diff --git a/xcb-demo/xdpyinfo.c b/xcb-demo/xdpyinfo.c
index c813b0f..53538bd 100644
--- a/xcb-demo/xdpyinfo.c
+++ b/xcb-demo/xdpyinfo.c
@@ -11,7 +11,7 @@ void list_extensions(void (*)(int, char *));
void print_extension(int, char *);
void query_extension(int, char *);
void list_screens();
-void print_screen(SCREEN *s);
+void print_screen(XCBSCREEN *s);
int main(int argc, char **argv)
{
@@ -59,7 +59,7 @@ void print_setup()
void print_formats()
{
int i = XCBConnSetupSuccessRepPixmapFormatsLength(XCBGetSetup(c));
- FORMAT *p = XCBConnSetupSuccessRepPixmapFormats(XCBGetSetup(c));
+ XCBFORMAT *p = XCBConnSetupSuccessRepPixmapFormats(XCBGetSetup(c));
printf("\n" "number of supported pixmap formats: %d", i);
fputs("\n" "supported pixmap formats:", stdout);
for(--i; i >= 0; --i, ++p)
@@ -69,7 +69,7 @@ void print_formats()
void list_extensions(void (*ext_printer)(int, char *))
{
XCBListExtensionsRep *r;
- STRIter i;
+ XCBSTRIter i;
r = XCBListExtensionsReply(c, XCBListExtensions(c), 0);
if(!r)
@@ -80,10 +80,10 @@ void list_extensions(void (*ext_printer)(int, char *))
i = XCBListExtensionsNames(r);
printf("\n" "number of extensions: %d", i.rem);
- for(; i.rem; STRNext(&i))
+ for(; i.rem; XCBSTRNext(&i))
{
fputs("\n" " ", stdout);
- ext_printer(STRNameLength(i.data), STRName(i.data));
+ ext_printer(XCBSTRNameLength(i.data), XCBSTRName(i.data));
}
}
@@ -129,19 +129,19 @@ void query_extension(int len, char *name)
void list_screens()
{
- SCREENIter i;
+ XCBSCREENIter i;
int cur;
i = XCBConnSetupSuccessRepRoots(XCBGetSetup(c));
printf("\n" "number of screens: %d" "\n", i.rem);
- for(cur = 1; i.rem; SCREENNext(&i), ++cur)
+ for(cur = 1; i.rem; XCBSCREENNext(&i), ++cur)
{
printf("\n" "screen #%d:", cur);
print_screen(i.data);
}
}
-void print_screen(SCREEN *s)
+void print_screen(XCBSCREEN *s)
{
printf("\n" " dimensions: %dx%d pixels (%dx%d millimeters)", s->width_in_pixels, s->height_in_pixels, s->width_in_millimeters, s->height_in_millimeters);
}