/* * This file automatically generated by xcbwrap.m4. * Edit at your peril. */ #include "xclint.h" #include "Xlibint.h" int XSelectInput(Display *dpy,Window window,long mask) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 value_mask = CWEventMask; const CARD32 value_list[] = { mask }; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangeWindowAttributes(c, XCLWINDOW(window), value_mask, (CARD32 *) value_list); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XDefineCursor(Display *dpy,Window window,Cursor cursor) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 value_mask = CWCursor; const CARD32 value_list[] = { cursor }; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangeWindowAttributes(c, XCLWINDOW(window), value_mask, (CARD32 *) value_list); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XSetWindowBackgroundPixmap(Display *dpy,Window window,Pixmap pixmap) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 value_mask = CWBackPixmap; const CARD32 value_list[] = { pixmap }; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangeWindowAttributes(c, XCLWINDOW(window), value_mask, (CARD32 *) value_list); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XSetWindowBackground(Display *dpy,Window window,unsigned long pixel) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 value_mask = CWBackPixel; const CARD32 value_list[] = { pixel }; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangeWindowAttributes(c, XCLWINDOW(window), value_mask, (CARD32 *) value_list); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XDestroyWindow(Display *dpy,Window window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBDestroyWindow(c, XCLWINDOW(window)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XDestroySubwindows(Display *dpy,Window window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBDestroySubwindows(c, XCLWINDOW(window)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XChangeSaveSet(Display *dpy,Window window,int mode) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangeSaveSet(c, mode, XCLWINDOW(window)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XReparentWindow(Display *dpy,Window window,Window parent,int x,int y) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBReparentWindow(c, XCLWINDOW(window), XCLWINDOW(parent), x, y); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XMapWindow(Display *dpy,Window window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBMapWindow(c, XCLWINDOW(window)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XMapSubwindows(Display *dpy,Window window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBMapSubwindows(c, XCLWINDOW(window)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUnmapWindow(Display *dpy,Window window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUnmapWindow(c, XCLWINDOW(window)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUnmapSubwindows(Display *dpy,Window window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUnmapSubwindows(c, XCLWINDOW(window)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XMoveWindow(Display *dpy,Window window,int x,int y) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 value_mask = CWX | CWY; const CARD32 value_list[] = { x, y }; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBConfigureWindow(c, XCLWINDOW(window), value_mask, (CARD32 *) value_list); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XMoveResizeWindow(Display *dpy,Window window,int x,int y,unsigned int width,unsigned int height) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 value_mask = CWX | CWY | CWWidth | CWHeight; const CARD32 value_list[] = { x, y, width, height }; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBConfigureWindow(c, XCLWINDOW(window), value_mask, (CARD32 *) value_list); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XResizeWindow(Display *dpy,Window window,unsigned int width,unsigned int height) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 value_mask = CWWidth | CWHeight; const CARD32 value_list[] = { width, height }; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBConfigureWindow(c, XCLWINDOW(window), value_mask, (CARD32 *) value_list); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XDeleteProperty(Display *dpy,Window window,Atom property) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBDeleteProperty(c, XCLWINDOW(window), XCLATOM(property)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XSetSelectionOwner(Display *dpy,Atom selection,Window owner,Time time) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBSetSelectionOwner(c, XCLWINDOW(owner), XCLATOM(selection), XCLTIMESTAMP(time)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XConvertSelection(Display *dpy,Atom selection,Atom target,Atom property,Window requestor,Time time) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBConvertSelection(c, XCLWINDOW(requestor), XCLATOM(selection), XCLATOM(target), XCLATOM(property), XCLTIMESTAMP(time)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUngrabPointer(Display *dpy,Time time) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUngrabPointer(c, XCLTIMESTAMP(time)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XGrabButton(Display *dpy,unsigned int button,unsigned int modifiers,Window grab_window,Bool owner_events,unsigned int event_mask,int pointer_mode,int keyboard_mode,Window confine_to,Cursor cursor) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBGrabButton(c, owner_events, XCLWINDOW(grab_window), event_mask, pointer_mode, keyboard_mode, XCLWINDOW(confine_to), XCLCURSOR(cursor), button, modifiers); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUngrabButton(Display *dpy,unsigned int button,unsigned int modifiers,Window grab_window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUngrabButton(c, button, XCLWINDOW(grab_window), modifiers); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XChangeActivePointerGrab(Display *dpy,unsigned int event_mask,Cursor cursor,Time time) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangeActivePointerGrab(c, XCLCURSOR(cursor), XCLTIMESTAMP(time), event_mask); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUngrabKeyboard(Display *dpy,Time time) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUngrabKeyboard(c, XCLTIMESTAMP(time)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XGrabKey(Display *dpy,int key,unsigned int modifiers,Window grab_window,Bool owner_events,int pointer_mode,int keyboard_mode) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBGrabKey(c, owner_events, XCLWINDOW(grab_window), modifiers, XCLKEYCODE(key), pointer_mode, keyboard_mode); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUngrabKey(Display *dpy,int key,unsigned int modifiers,Window grab_window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUngrabKey(c, key, XCLWINDOW(grab_window), modifiers); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XAllowEvents(Display *dpy,int mode,Time time) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBAllowEvents(c, mode, XCLTIMESTAMP(time)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XGrabServer(Display *dpy) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBGrabServer(c); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUngrabServer(Display *dpy) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUngrabServer(c); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XWarpPointer(Display *dpy,Window src_window,Window dst_window,int src_x,int src_y,unsigned int src_width,unsigned int src_height,int dst_x,int dst_y) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBWarpPointer(c, XCLWINDOW(src_window), XCLWINDOW(dst_window), src_x, src_y, src_width, src_height, dst_x, dst_y); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XSetInputFocus(Display *dpy,Window focus,int revert_to,Time time) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBSetInputFocus(c, revert_to, XCLWINDOW(focus), XCLTIMESTAMP(time)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUnloadFont(Display *dpy,Font font) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBCloseFont(c, XCLFONT(font)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } Pixmap XCreatePixmap(Display *dpy,Drawable drawable,unsigned int width,unsigned int height,unsigned int depth) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const Pixmap pid = XCBPIXMAPNew(c).xid; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBCreatePixmap(c, depth, XCLPIXMAP(pid), XCLDRAWABLE(drawable), width, height); _XGetXCBBufferIf(dpy, _XBufferLocked); return pid; } int XFreePixmap(Display *dpy,Pixmap pixmap) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBFreePixmap(c, XCLPIXMAP(pixmap)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XClearWindow(Display *dpy,Window window) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const BOOL exposures = 0; const INT16 x = 0, y = 0; const CARD16 width = 0, height = 0; _XPutXCBBufferIf(dpy, _XBufferLocked); XCBClearArea(c, exposures, XCLWINDOW(window), x, y, width, height); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XClearArea(Display *dpy,Window window,int x,int y,unsigned int width,unsigned int height,Bool exposures) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBClearArea(c, exposures, XCLWINDOW(window), x, y, width, height); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XCopyArea(Display *dpy,Drawable src_drawable,Drawable dst_drawable,GC gc,int src_x,int src_y,unsigned int width,unsigned int height,int dst_x,int dst_y) { XCBConnection *c = XCBConnectionOfDisplay(dpy); LockDisplay(dpy); FlushGC(dpy, gc); _XPutXCBBuffer(dpy); XCBCopyArea(c, XCLDRAWABLE(src_drawable), XCLDRAWABLE(dst_drawable), XCLGCONTEXT(gc->gid), src_x, src_y, dst_x, dst_y, width, height); _XGetXCBBuffer(dpy); UnlockDisplay(dpy); return 1; } int XCopyPlane(Display *dpy,Drawable src_drawable,Drawable dst_drawable,GC gc,int src_x,int src_y,unsigned int width,unsigned int height,int dst_x,int dst_y,unsigned long bit_plane) { XCBConnection *c = XCBConnectionOfDisplay(dpy); LockDisplay(dpy); FlushGC(dpy, gc); _XPutXCBBuffer(dpy); XCBCopyPlane(c, XCLDRAWABLE(src_drawable), XCLDRAWABLE(dst_drawable), XCLGCONTEXT(gc->gid), src_x, src_y, dst_x, dst_y, width, height, bit_plane); _XGetXCBBuffer(dpy); UnlockDisplay(dpy); return 1; } int XDrawPoint(Display *dpy,Drawable drawable,GC gc,int x,int y) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const BYTE coordinate_mode = CoordModeOrigin; const CARD16 points_len = 1; const XCBPOINT points[] = { { x, y } }; LockDisplay(dpy); FlushGC(dpy, gc); _XPutXCBBuffer(dpy); XCBPolyPoint(c, coordinate_mode, XCLDRAWABLE(drawable), XCLGCONTEXT(gc->gid), points_len, (XCBPOINT *) points); _XGetXCBBuffer(dpy); UnlockDisplay(dpy); return 1; } int XDrawLine(Display *dpy,Drawable drawable,GC gc,int x1,int y1,int x2,int y2) { XCBConnection *c = XCBConnectionOfDisplay(dpy); const CARD16 segments_len = 1; const XCBSEGMENT segments[] = { { x1, y1, x2, y2 } }; LockDisplay(dpy); FlushGC(dpy, gc); _XPutXCBBuffer(dpy); XCBPolySegment(c, XCLDRAWABLE(drawable), XCLGCONTEXT(gc->gid), segments_len, (XCBSEGMENT *) segments); _XGetXCBBuffer(dpy); UnlockDisplay(dpy); return 1; } int XFillPolygon(Display *dpy,Drawable drawable,GC gc,XPoint *points,int points_len,int shape,int coordinate_mode) { XCBConnection *c = XCBConnectionOfDisplay(dpy); LockDisplay(dpy); FlushGC(dpy, gc); _XPutXCBBuffer(dpy); XCBFillPoly(c, XCLDRAWABLE(drawable), XCLGCONTEXT(gc->gid), shape, coordinate_mode, points_len, (XCBPOINT *) points); _XGetXCBBuffer(dpy); UnlockDisplay(dpy); return 1; } int XFreeColormap(Display *dpy,Colormap cmap) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBFreeColormap(c, XCLCOLORMAP(cmap)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XInstallColormap(Display *dpy,Colormap cmap) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBInstallColormap(c, XCLCOLORMAP(cmap)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XUninstallColormap(Display *dpy,Colormap cmap) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBUninstallColormap(c, XCLCOLORMAP(cmap)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XFreeColors(Display *dpy,Colormap cmap,unsigned long *pixels,int pixels_len,unsigned long plane_mask) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBFreeColors(c, XCLCOLORMAP(cmap), plane_mask, pixels_len, (CARD32 *) pixels); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XFreeCursor(Display *dpy,Cursor cursor) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBFreeCursor(c, XCLCURSOR(cursor)); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XChangeKeyboardMapping(Display *dpy,int first_keycode,int keysyms_per_keycode,KeySym *keysyms,int keycode_count) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangeKeyboardMapping(c, keycode_count, XCLKEYCODE(first_keycode), keysyms_per_keycode, (XCBKEYSYM *) keysyms); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XBell(Display *dpy,int percent) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBBell(c, percent); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XChangePointerControl(Display *dpy,Bool do_acceleration,Bool do_threshold,int acceleration_numerator,int acceleration_denominator,int threshold) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBChangePointerControl(c, acceleration_numerator, acceleration_denominator, threshold, do_acceleration, do_threshold); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XSetScreenSaver(Display *dpy,int timeout,int interval,int prefer_blanking,int allow_exposures) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBSetScreenSaver(c, timeout, interval, prefer_blanking, allow_exposures); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XSetAccessControl(Display *dpy,int mode) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBSetAccessControl(c, mode); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XSetCloseDownMode(Display *dpy,int mode) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBSetCloseDownMode(c, mode); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XKillClient(Display *dpy,XID resource) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBKillClient(c, resource); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; } int XForceScreenSaver(Display *dpy,int mode) { XCBConnection *c = XCBConnectionOfDisplay(dpy); _XPutXCBBufferIf(dpy, _XBufferLocked); XCBForceScreenSaver(c, mode); _XGetXCBBufferIf(dpy, _XBufferLocked); return 1; }