X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb.h;h=abab165b04cf08c6566393dffb387a623058add9;hb=65ed274f05ba670eb02a55b098aed141fa9611ec;hp=85d065884c02652e9316a9fb8d879d7eaee11d9c;hpb=62749d54fd79b12123607599d58add126ce5de6e;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb.h b/src/xcb.h index 85d0658..abab165 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -29,8 +29,11 @@ #define __XCB_H__ #include -/* TODO: check for stdint in config? (HAVE_STDINT) fallback? */ +#if defined(__solaris__) +#include +#else #include +#endif /* FIXME: these names conflict with those defined in Xmd.h. */ #ifndef XMD_H @@ -44,7 +47,6 @@ typedef int16_t INT16; typedef int32_t INT32; #endif /* XMD_H */ -#include #include #include @@ -156,8 +158,7 @@ typedef struct { } XCBVoidCookie; -/* Include the generated xproto and xcb_types headers. */ -#include "xcb_types.h" +/* Include the generated xproto header. */ #include "xproto.h" @@ -271,6 +272,24 @@ XCBGenericEvent *XCBWaitForEvent(XCBConnection *c); */ XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error); +/** + * @brief Return the error for a request, or NULL if none can ever arrive. + * @param c: The connection to the X server. + * @param cookie: The request cookie. + * @return The error for the request, or NULL if none can ever arrive. + * + * The XCBVoidCookie cookie supplied to this function must have resulted from + * a call to XCB[RequestName]Checked(). This function will block until one of + * two conditions happens. If an error is received, it will be returned. If + * a reply to a subsequent request has already arrived, no error can arrive + * for this request, so this function will return NULL. + * + * Note that this function will perform a sync if needed to ensure that the + * sequence number will advance beyond that provided in cookie; this is a + * convenience to avoid races in determining whether the sync is needed. + */ +XCBGenericError *XCBRequestCheck(XCBConnection *c, XCBVoidCookie cookie); + /** * @brief Returns the last sequence number that the server is known to * have processed.