[cairo-commit] cairo-demo/X11 cairo-demo.c,1.6,1.7
Jamey Sharp
commit at pdx.freedesktop.org
Wed Mar 17 09:44:29 PST 2004
- Previous message: [cairo-commit] cairo/src cairo.h, 1.47, 1.48 cairo_surface.c, 1.22,
1.23 cairo_xcb_surface.c, 1.1, 1.2
- Next message: [cairo-commit] papers/opengl_freenix04 opengl_freenix04.tex, 1.32,
1.33 sinus.png, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: jamey
Update of /cvs/cairo/cairo-demo/X11
In directory pdx:/tmp/cvs-serv4872/cairo-demo/X11
Modified Files:
cairo-demo.c
Log Message:
Fixed for latest XCB API. XCB headers can co-exist with Xlib headers now,
so Cairo may be compiled with both backends in the same library.
http://freedesktop.org/Software/XCBCompletedTasks#17_Mar_2004
Index: cairo-demo.c
===================================================================
RCS file: /cvs/cairo/cairo-demo/X11/cairo-demo.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** a/cairo-demo.c 3 Feb 2004 07:25:48 -0000 1.6
--- b/cairo-demo.c 17 Mar 2004 17:44:26 -0000 1.7
***************
*** 22,27 ****
GC gc;
#else /* CAIRO_HAS_XCB_SURFACE */
! WINDOW win;
! GCONTEXT gc;
#endif /* CAIRO_HAS_XCB_SURFACE */
int width, height;
--- 22,27 ----
GC gc;
#else /* CAIRO_HAS_XCB_SURFACE */
! XCBWINDOW win;
! XCBGCONTEXT gc;
#endif /* CAIRO_HAS_XCB_SURFACE */
int width, height;
***************
*** 29,33 ****
KeyCode quit_code;
#else /* CAIRO_HAS_XCB_SURFACE */
! VISUALTYPE *visual;
#endif /* CAIRO_HAS_XCB_SURFACE */
} win_t;
--- 29,33 ----
KeyCode quit_code;
#else /* CAIRO_HAS_XCB_SURFACE */
! XCBVISUALTYPE *visual;
#endif /* CAIRO_HAS_XCB_SURFACE */
} win_t;
***************
*** 223,227 ****
Drawable drawable = win->win;
#else /* CAIRO_HAS_XCB_SURFACE */
! DRAWABLE drawable;
drawable.window = win->win;
#endif /* CAIRO_HAS_XCB_SURFACE */
--- 223,227 ----
Drawable drawable = win->win;
#else /* CAIRO_HAS_XCB_SURFACE */
! XCBDRAWABLE drawable;
drawable.window = win->win;
#endif /* CAIRO_HAS_XCB_SURFACE */
***************
*** 307,320 ****
#ifdef CAIRO_HAS_XCB_SURFACE
static int
! id_to_visual(SCREEN *root, VISUALTYPE **visual)
{
! DEPTHIter di;
! VISUALTYPE *v;
! for(di = SCREENAllowedDepths(root); di.rem; DEPTHNext(&di))
{
int i;
! const int count = DEPTHVisualsLength(di.data);
! v = DEPTHVisuals(di.data);
for(i = 0; i < count; ++i)
if(v->visual_id.id == root->root_visual.id)
--- 307,320 ----
#ifdef CAIRO_HAS_XCB_SURFACE
static int
! id_to_visual(XCBSCREEN *root, XCBVISUALTYPE **visual)
{
! XCBDEPTHIter di;
! XCBVISUALTYPE *v;
! for(di = XCBSCREENAllowedDepths(root); di.rem; XCBDEPTHNext(&di))
{
int i;
! const int count = XCBDEPTHVisualsLength(di.data);
! v = XCBDEPTHVisuals(di.data);
for(i = 0; i < count; ++i)
if(v->visual_id.id == root->root_visual.id)
***************
*** 334,338 ****
Window root;
#else /* CAIRO_HAS_XCB_SURFACE */
! SCREEN *root = XCBConnSetupSuccessRepRoots(XCBGetSetup(win->dpy)).data;
CARD32 mask = XCBCWBackPixel | XCBCWEventMask;
CARD32 values[] = { root->black_pixel, StructureNotifyMask | ExposureMask };
--- 334,338 ----
Window root;
#else /* CAIRO_HAS_XCB_SURFACE */
! XCBSCREEN *root = XCBConnSetupSuccessRepRoots(XCBGetSetup(win->dpy)).data;
CARD32 mask = XCBCWBackPixel | XCBCWEventMask;
CARD32 values[] = { root->black_pixel, StructureNotifyMask | ExposureMask };
***************
*** 394,397 ****
--- 394,399 ----
#else /* CAIRO_HAS_XCB_SURFACE */
xev = XCBWaitEvent(win->dpy);
+ if(!xev)
+ return;
switch(xev->response_type) {
#endif /* CAIRO_HAS_XCB_SURFACE */
- Previous message: [cairo-commit] cairo/src cairo.h, 1.47, 1.48 cairo_surface.c, 1.22,
1.23 cairo_xcb_surface.c, 1.1, 1.2
- Next message: [cairo-commit] papers/opengl_freenix04 opengl_freenix04.tex, 1.32,
1.33 sinus.png, 1.2, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cairo-commit
mailing list