Move the remainder of the constants in X.h into XML enumerations.
[free-sw/xcb/libxcb] / src / xcb.h
index 27f57b8..8e990fd 100644 (file)
--- a/src/xcb.h
+++ b/src/xcb.h
@@ -32,6 +32,8 @@
 /* TODO: check for stdint in config? (HAVE_STDINT) fallback? */
 #include <stdint.h>
 
+/* FIXME: these names conflict with those defined in Xmd.h. */
+#ifndef XMD_H
 typedef uint8_t  BYTE;
 typedef uint8_t  BOOL;
 typedef uint8_t  CARD8;
@@ -40,6 +42,7 @@ typedef uint32_t CARD32;
 typedef int8_t   INT8;
 typedef int16_t  INT16;
 typedef int32_t  INT32;
+#endif /* XMD_H */
 
 #include <X11/X.h>
 #include <sys/uio.h>
@@ -80,7 +83,6 @@ extern "C" {
 
 #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1))
 
-
 /* Opaque structures */
 
 /**
@@ -157,6 +159,19 @@ typedef struct {
 #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 */
 
 /**
@@ -264,9 +279,10 @@ XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error);
  * processed. This function enables applications to determine whether
  * forcing a cookie is going to block.
  *
- * @todo review that function.
+ * @deprecated This function is deprecated in favor of XCBPollForReply.
+ * It must not be used in newly written code.
  */
-unsigned int XCBGetRequestRead(XCBConnection *c);
+unsigned int XCBGetRequestRead(XCBConnection *c) deprecated;
 
 
 /* xcb_ext.c */
@@ -280,7 +296,7 @@ typedef struct XCBExtension XCBExtension;  /**< Opaque structure used as key for
  * @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
@@ -313,7 +329,7 @@ void XCBPrefetchExtensionData(XCBConnection *c, XCBExtension *ext);
 /**
  * @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
@@ -328,7 +344,7 @@ void XCBPrefetchExtensionData(XCBConnection *c, XCBExtension *ext);
  *
  * The result must not be freed.
  */
-const XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c);
+const XCBSetup *XCBGetSetup(XCBConnection *c);
 
 /**
  * @brief Access the file descriptor of the connection.
@@ -473,6 +489,47 @@ int XCBSync(XCBConnection *c, XCBGenericError **e);
  */
 
 
+/* 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