* authorization from the authors.
*/
-#ifndef __XCB_H
-#define __XCB_H
+#ifndef __XCB_H__
+#define __XCB_H__
#include <sys/types.h>
-/* TODO: check for stdint in config? (HAVE_STDINT) fallback? */
+#if defined(__solaris__)
+#include <inttypes.h>
+#else
#include <stdint.h>
+#endif
/* FIXME: these names conflict with those defined in Xmd.h. */
#ifndef XMD_H
typedef int32_t INT32;
#endif /* XMD_H */
-#include <X11/X.h>
#include <sys/uio.h>
#include <pthread.h>
+
#ifdef __cplusplus
extern "C" {
#endif
+
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
#define deprecated __attribute__((__deprecated__))
#else
#define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1))
-
-/** XCBNone is the universal null resource or null atom parameter value for many core X requests */
-#define XCBNone 0L
-
-/** XCBCopyFromParent can be used for many CreateWindow parameters */
-#define XCBCopyFromParent 0L
-
/* Opaque structures */
/**
} XCBVoidCookie;
-/* Include the generated xproto and xcb_types headers. */
-#include "xcb_types.h"
+/* Include the generated xproto header. */
#include "xproto.h"
+/** XCBNone is the universal null resource or null atom parameter value for many core X requests */
+#define XCBNone 0L
+
+/** XCBCopyFromParent can be used for many CreateWindow parameters */
+#define XCBCopyFromParent 0L
+
+/** XCBCurrentTime can be used in most requests that take an XCBTIMESTAMP */
+#define XCBCurrentTime 0L
+
+/** XCBNoSymbol fills in unused entries in XCBKEYSYM tables */
+#define XCBNoSymbol 0L
+
+
/* xcb_auth.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.
* @brief Caches reply information from QueryExtension requests.
* @param c: The connection.
* @param ext: The extension data.
- * @return A pointer to a XCBConnSetupSuccessRep pointer.
+ * @return A pointer to the XCBQueryExtensionRep for the extension.
*
* This function is the primary interface to the "extension cache",
* which caches reply information from QueryExtension
/**
* @brief Access the data returned by the server.
* @param c: The connection.
- * @return A pointer to a XCBConnSetupSuccessRep pointer.
+ * @return A pointer to an XCBSetup structure.
*
* Accessor for the data returned by the server when the XCBConnection
* was initialized. This data includes
*
* The result must not be freed.
*/
-const XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c);
+const XCBSetup *XCBGetSetup(XCBConnection *c);
/**
* @brief Access the file descriptor of the connection.
* @param e: A pointer to an error.
* @return @c 1 on success, @c 0 otherwise.
*
- * Blocks the calling thread for the duration of one round trip to the
- * server, ensuring that all events and errors caused by previous
- * requests are available to XCB.
+ * @deprecated This function is deprecated. It must not be used in
+ * newly written code. XCBFlush is more efficient.
+ * Use XCBAuxSync if absolutely necessary.
*/
-int XCBSync(XCBConnection *c, XCBGenericError **e);
+int XCBSync(XCBConnection *c, XCBGenericError **e) deprecated;
/**
*/
+/* Old names for connection-setup types, to be removed before 1.0. */
+
+typedef XCBSetupReq XCBConnSetupReq deprecated;
+typedef XCBSetupReqIter XCBConnSetupReqIter deprecated;
+typedef XCBSetupFailed XCBConnSetupFailedRep deprecated;
+typedef XCBSetupFailedIter XCBConnSetupFailedRepIter deprecated;
+typedef XCBSetupAuthenticate XCBConnSetupAuthenticateRep deprecated;
+typedef XCBSetupAuthenticateIter XCBConnSetupAuthenticateRepIter deprecated;
+typedef XCBSetup XCBConnSetupSuccessRep deprecated;
+typedef XCBSetupIter XCBConnSetupSuccessRepIter deprecated;
+
+char *XCBConnSetupReqAuthorizationProtocolName(XCBSetupReq *R) deprecated;
+int XCBConnSetupReqAuthorizationProtocolNameLength(XCBSetupReq *R) deprecated;
+XCBGenericIter XCBConnSetupReqAuthorizationProtocolNameEnd(XCBSetupReq *R) deprecated;
+char *XCBConnSetupReqAuthorizationProtocolData(XCBSetupReq *R) deprecated;
+int XCBConnSetupReqAuthorizationProtocolDataLength(XCBSetupReq *R) deprecated;
+XCBGenericIter XCBConnSetupReqAuthorizationProtocolDataEnd(XCBSetupReq *R) deprecated;
+void XCBConnSetupReqNext(XCBSetupReqIter *i) deprecated;
+XCBGenericIter XCBConnSetupReqEnd(XCBSetupReqIter i) deprecated;
+char *XCBConnSetupFailedRepReason(XCBSetupFailed *R) deprecated;
+int XCBConnSetupFailedRepReasonLength(XCBSetupFailed *R) deprecated;
+XCBGenericIter XCBConnSetupFailedRepReasonEnd(XCBSetupFailed *R) deprecated;
+void XCBConnSetupFailedRepNext(XCBSetupFailedIter *i) deprecated;
+XCBGenericIter XCBConnSetupFailedRepEnd(XCBSetupFailedIter i) deprecated;
+char *XCBConnSetupAuthenticateRepReason(XCBSetupAuthenticate *R) deprecated;
+int XCBConnSetupAuthenticateRepReasonLength(XCBSetupAuthenticate *R) deprecated;
+XCBGenericIter XCBConnSetupAuthenticateRepReasonEnd(XCBSetupAuthenticate *R) deprecated;
+void XCBConnSetupAuthenticateRepNext(XCBSetupAuthenticateIter *i) deprecated;
+XCBGenericIter XCBConnSetupAuthenticateRepEnd(XCBSetupAuthenticateIter i) deprecated;
+char *XCBConnSetupSuccessRepVendor(XCBSetup *R) deprecated;
+int XCBConnSetupSuccessRepVendorLength(XCBSetup *R) deprecated;
+XCBGenericIter XCBConnSetupSuccessRepVendorEnd(XCBSetup *R) deprecated;
+XCBFORMAT *XCBConnSetupSuccessRepPixmapFormats(XCBSetup *R) deprecated;
+int XCBConnSetupSuccessRepPixmapFormatsLength(XCBSetup *R) deprecated;
+XCBFORMATIter XCBConnSetupSuccessRepPixmapFormatsIter(XCBSetup *R) deprecated;
+int XCBConnSetupSuccessRepRootsLength(XCBSetup *R) deprecated;
+XCBSCREENIter XCBConnSetupSuccessRepRootsIter(XCBSetup *R) deprecated;
+void XCBConnSetupSuccessRepNext(XCBSetupIter *i) deprecated;
+XCBGenericIter XCBConnSetupSuccessRepEnd(XCBSetupIter i) deprecated;
+
+
#ifdef __cplusplus
}
#endif
-#endif
+
+#endif /* __XCB_H__ */