xcb.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. /*
  2. * Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett.
  3. * All Rights Reserved.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a
  6. * copy of this software and associated documentation files (the "Software"),
  7. * to deal in the Software without restriction, including without limitation
  8. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  9. * and/or sell copies of the Software, and to permit persons to whom the
  10. * Software is furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in
  13. * all copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  19. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  20. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. * Except as contained in this notice, the names of the authors or their
  23. * institutions shall not be used in advertising or otherwise to promote the
  24. * sale, use or other dealings in this Software without prior written
  25. * authorization from the authors.
  26. */
  27. #ifndef __XCB_H__
  28. #define __XCB_H__
  29. #include <sys/types.h>
  30. #if defined(__solaris__)
  31. #include <inttypes.h>
  32. #else
  33. #include <stdint.h>
  34. #endif
  35. #ifndef _WIN32
  36. #include <sys/uio.h>
  37. #else
  38. #include "xcb_windefs.h"
  39. #endif
  40. #include <pthread.h>
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44. /**
  45. * @file xcb.h
  46. */
  47. #define XCB_PACKED __attribute__((__packed__))
  48. /**
  49. * @defgroup XCB_Core_API XCB Core API
  50. * @brief Core API of the XCB library.
  51. *
  52. * @{
  53. */
  54. /* Pre-defined constants */
  55. /** Current protocol version */
  56. #define X_PROTOCOL 11
  57. /** Current minor version */
  58. #define X_PROTOCOL_REVISION 0
  59. /** X_TCP_PORT + display number = server port for TCP transport */
  60. #define X_TCP_PORT 6000
  61. /** xcb connection errors because of socket, pipe and other stream errors. */
  62. #define XCB_CONN_ERROR 1
  63. /** xcb connection shutdown because of extension not supported */
  64. #define XCB_CONN_CLOSED_EXT_NOTSUPPORTED 2
  65. /** malloc(), calloc() and realloc() error upon failure, for eg ENOMEM */
  66. #define XCB_CONN_CLOSED_MEM_INSUFFICIENT 3
  67. /** Connection closed, exceeding request length that server accepts. */
  68. #define XCB_CONN_CLOSED_REQ_LEN_EXCEED 4
  69. /** Connection closed, error during parsing display string. */
  70. #define XCB_CONN_CLOSED_PARSE_ERR 5
  71. /** Connection closed because the server does not have a screen matching the display. */
  72. #define XCB_CONN_CLOSED_INVALID_SCREEN 6
  73. /** Connection closed because some FD passing operation failed */
  74. #define XCB_CONN_CLOSED_FDPASSING_FAILED 7
  75. #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1))
  76. /* Opaque structures */
  77. /**
  78. * @brief XCB Connection structure.
  79. *
  80. * A structure that contain all data that XCB needs to communicate with an X server.
  81. */
  82. typedef struct xcb_connection_t xcb_connection_t; /**< Opaque structure containing all data that XCB needs to communicate with an X server. */
  83. /* Other types */
  84. /**
  85. * @brief Generic iterator.
  86. *
  87. * A generic iterator structure.
  88. */
  89. typedef struct {
  90. void *data; /**< Data of the current iterator */
  91. int rem; /**< remaining elements */
  92. int index; /**< index of the current iterator */
  93. } xcb_generic_iterator_t;
  94. /**
  95. * @brief Generic reply.
  96. *
  97. * A generic reply structure.
  98. */
  99. typedef struct {
  100. uint8_t response_type; /**< Type of the response */
  101. uint8_t pad0; /**< Padding */
  102. uint16_t sequence; /**< Sequence number */
  103. uint32_t length; /**< Length of the response */
  104. } xcb_generic_reply_t;
  105. /**
  106. * @brief Generic event.
  107. *
  108. * A generic event structure.
  109. */
  110. typedef struct {
  111. uint8_t response_type; /**< Type of the response */
  112. uint8_t pad0; /**< Padding */
  113. uint16_t sequence; /**< Sequence number */
  114. uint32_t pad[7]; /**< Padding */
  115. uint32_t full_sequence; /**< full sequence */
  116. } xcb_generic_event_t;
  117. /**
  118. * @brief Raw Generic event.
  119. *
  120. * A generic event structure as used on the wire, i.e., without the full_sequence field
  121. */
  122. typedef struct {
  123. uint8_t response_type; /**< Type of the response */
  124. uint8_t pad0; /**< Padding */
  125. uint16_t sequence; /**< Sequence number */
  126. uint32_t pad[7]; /**< Padding */
  127. } xcb_raw_generic_event_t;
  128. /**
  129. * @brief GE event
  130. *
  131. * An event as sent by the XGE extension. The length field specifies the
  132. * number of 4-byte blocks trailing the struct.
  133. *
  134. * @deprecated Since some fields in this struct have unfortunate names, it is
  135. * recommended to use xcb_ge_generic_event_t instead.
  136. */
  137. typedef struct {
  138. uint8_t response_type; /**< Type of the response */
  139. uint8_t pad0; /**< Padding */
  140. uint16_t sequence; /**< Sequence number */
  141. uint32_t length;
  142. uint16_t event_type;
  143. uint16_t pad1;
  144. uint32_t pad[5]; /**< Padding */
  145. uint32_t full_sequence; /**< full sequence */
  146. } xcb_ge_event_t;
  147. /**
  148. * @brief Generic error.
  149. *
  150. * A generic error structure.
  151. */
  152. typedef struct {
  153. uint8_t response_type; /**< Type of the response */
  154. uint8_t error_code; /**< Error code */
  155. uint16_t sequence; /**< Sequence number */
  156. uint32_t resource_id; /** < Resource ID for requests with side effects only */
  157. uint16_t minor_code; /** < Minor opcode of the failed request */
  158. uint8_t major_code; /** < Major opcode of the failed request */
  159. uint8_t pad0;
  160. uint32_t pad[5]; /**< Padding */
  161. uint32_t full_sequence; /**< full sequence */
  162. } xcb_generic_error_t;
  163. /**
  164. * @brief Generic cookie.
  165. *
  166. * A generic cookie structure.
  167. */
  168. typedef struct {
  169. unsigned int sequence; /**< Sequence number */
  170. } xcb_void_cookie_t;
  171. /* Include the generated xproto header. */
  172. #include "xproto.h"
  173. /** XCB_NONE is the universal null resource or null atom parameter value for many core X requests */
  174. #define XCB_NONE 0L
  175. /** XCB_COPY_FROM_PARENT can be used for many xcb_create_window parameters */
  176. #define XCB_COPY_FROM_PARENT 0L
  177. /** XCB_CURRENT_TIME can be used in most requests that take an xcb_timestamp_t */
  178. #define XCB_CURRENT_TIME 0L
  179. /** XCB_NO_SYMBOL fills in unused entries in xcb_keysym_t tables */
  180. #define XCB_NO_SYMBOL 0L
  181. /* xcb_auth.c */
  182. /**
  183. * @brief Container for authorization information.
  184. *
  185. * A container for authorization information to be sent to the X server.
  186. */
  187. typedef struct xcb_auth_info_t {
  188. int namelen; /**< Length of the string name (as returned by strlen). */
  189. char *name; /**< String containing the authentication protocol name, such as "MIT-MAGIC-COOKIE-1" or "XDM-AUTHORIZATION-1". */
  190. int datalen; /**< Length of the data member. */
  191. char *data; /**< Data interpreted in a protocol-specific manner. */
  192. } xcb_auth_info_t;
  193. /* xcb_out.c */
  194. /**
  195. * @brief Forces any buffered output to be written to the server.
  196. * @param c The connection to the X server.
  197. * @return > @c 0 on success, <= @c 0 otherwise.
  198. *
  199. * Forces any buffered output to be written to the server. Blocks
  200. * until the write is complete.
  201. */
  202. int xcb_flush(xcb_connection_t *c);
  203. /**
  204. * @brief Returns the maximum request length that this server accepts.
  205. * @param c The connection to the X server.
  206. * @return The maximum request length field.
  207. *
  208. * In the absence of the BIG-REQUESTS extension, returns the
  209. * maximum request length field from the connection setup data, which
  210. * may be as much as 65535. If the server supports BIG-REQUESTS, then
  211. * the maximum request length field from the reply to the
  212. * BigRequestsEnable request will be returned instead.
  213. *
  214. * Note that this length is measured in four-byte units, making the
  215. * theoretical maximum lengths roughly 256kB without BIG-REQUESTS and
  216. * 16GB with.
  217. */
  218. uint32_t xcb_get_maximum_request_length(xcb_connection_t *c);
  219. /**
  220. * @brief Prefetch the maximum request length without blocking.
  221. * @param c The connection to the X server.
  222. *
  223. * Without blocking, does as much work as possible toward computing
  224. * the maximum request length accepted by the X server.
  225. *
  226. * Invoking this function may cause a call to xcb_big_requests_enable,
  227. * but will not block waiting for the reply.
  228. * xcb_get_maximum_request_length will return the prefetched data
  229. * after possibly blocking while the reply is retrieved.
  230. *
  231. * Note that in order for this function to be fully non-blocking, the
  232. * application must previously have called
  233. * xcb_prefetch_extension_data(c, &xcb_big_requests_id) and the reply
  234. * must have already arrived.
  235. */
  236. void xcb_prefetch_maximum_request_length(xcb_connection_t *c);
  237. /* xcb_in.c */
  238. /**
  239. * @brief Returns the next event or error from the server.
  240. * @param c The connection to the X server.
  241. * @return The next event from the server.
  242. *
  243. * Returns the next event or error from the server, or returns null in
  244. * the event of an I/O error. Blocks until either an event or error
  245. * arrive, or an I/O error occurs.
  246. */
  247. xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c);
  248. /**
  249. * @brief Returns the next event or error from the server.
  250. * @param c The connection to the X server.
  251. * @return The next event from the server.
  252. *
  253. * Returns the next event or error from the server, if one is
  254. * available, or returns @c NULL otherwise. If no event is available, that
  255. * might be because an I/O error like connection close occurred while
  256. * attempting to read the next event, in which case the connection is
  257. * shut down when this function returns.
  258. */
  259. xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c);
  260. /**
  261. * @brief Returns the next event without reading from the connection.
  262. * @param c The connection to the X server.
  263. * @return The next already queued event from the server.
  264. *
  265. * This is a version of xcb_poll_for_event that only examines the
  266. * event queue for new events. The function doesn't try to read new
  267. * events from the connection if no queued events are found.
  268. *
  269. * This function is useful for callers that know in advance that all
  270. * interesting events have already been read from the connection. For
  271. * example, callers might use xcb_wait_for_reply and be interested
  272. * only of events that preceded a specific reply.
  273. */
  274. xcb_generic_event_t *xcb_poll_for_queued_event(xcb_connection_t *c);
  275. typedef struct xcb_special_event xcb_special_event_t;
  276. /**
  277. * @brief Returns the next event from a special queue
  278. */
  279. xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c,
  280. xcb_special_event_t *se);
  281. /**
  282. * @brief Returns the next event from a special queue, blocking until one arrives
  283. */
  284. xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c,
  285. xcb_special_event_t *se);
  286. /**
  287. * @typedef typedef struct xcb_extension_t xcb_extension_t
  288. */
  289. typedef struct xcb_extension_t xcb_extension_t; /**< Opaque structure used as key for xcb_get_extension_data_t. */
  290. /**
  291. * @brief Listen for a special event
  292. */
  293. xcb_special_event_t *xcb_register_for_special_xge(xcb_connection_t *c,
  294. xcb_extension_t *ext,
  295. uint32_t eid,
  296. uint32_t *stamp);
  297. /**
  298. * @brief Stop listening for a special event
  299. */
  300. void xcb_unregister_for_special_event(xcb_connection_t *c,
  301. xcb_special_event_t *se);
  302. /**
  303. * @brief Return the error for a request, or NULL if none can ever arrive.
  304. * @param c The connection to the X server.
  305. * @param cookie The request cookie.
  306. * @return The error for the request, or NULL if none can ever arrive.
  307. *
  308. * The xcb_void_cookie_t cookie supplied to this function must have resulted
  309. * from a call to xcb_[request_name]_checked(). This function will block
  310. * until one of two conditions happens. If an error is received, it will be
  311. * returned. If a reply to a subsequent request has already arrived, no error
  312. * can arrive for this request, so this function will return NULL.
  313. *
  314. * Note that this function will perform a sync if needed to ensure that the
  315. * sequence number will advance beyond that provided in cookie; this is a
  316. * convenience to avoid races in determining whether the sync is needed.
  317. */
  318. xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t cookie);
  319. /**
  320. * @brief Discards the reply for a request.
  321. * @param c The connection to the X server.
  322. * @param sequence The request sequence number from a cookie.
  323. *
  324. * Discards the reply for a request. Additionally, any error generated
  325. * by the request is also discarded (unless it was an _unchecked request
  326. * and the error has already arrived).
  327. *
  328. * This function will not block even if the reply is not yet available.
  329. *
  330. * Note that the sequence really does have to come from an xcb cookie;
  331. * this function is not designed to operate on socket-handoff replies.
  332. */
  333. void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence);
  334. /**
  335. * @brief Discards the reply for a request, given by a 64bit sequence number
  336. * @param c The connection to the X server.
  337. * @param sequence 64-bit sequence number as returned by xcb_send_request64().
  338. *
  339. * Discards the reply for a request. Additionally, any error generated
  340. * by the request is also discarded (unless it was an _unchecked request
  341. * and the error has already arrived).
  342. *
  343. * This function will not block even if the reply is not yet available.
  344. *
  345. * Note that the sequence really does have to come from xcb_send_request64();
  346. * the cookie sequence number is defined as "unsigned" int and therefore
  347. * not 64-bit on all platforms.
  348. * This function is not designed to operate on socket-handoff replies.
  349. *
  350. * Unlike its xcb_discard_reply() counterpart, the given sequence number is not
  351. * automatically "widened" to 64-bit.
  352. */
  353. void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence);
  354. /* xcb_ext.c */
  355. /**
  356. * @brief Caches reply information from QueryExtension requests.
  357. * @param c The connection.
  358. * @param ext The extension data.
  359. * @return A pointer to the xcb_query_extension_reply_t for the extension.
  360. *
  361. * This function is the primary interface to the "extension cache",
  362. * which caches reply information from QueryExtension
  363. * requests. Invoking this function may cause a call to
  364. * xcb_query_extension to retrieve extension information from the
  365. * server, and may block until extension data is received from the
  366. * server.
  367. *
  368. * The result must not be freed. This storage is managed by the cache
  369. * itself.
  370. */
  371. const struct xcb_query_extension_reply_t *xcb_get_extension_data(xcb_connection_t *c, xcb_extension_t *ext);
  372. /**
  373. * @brief Prefetch of extension data into the extension cache
  374. * @param c The connection.
  375. * @param ext The extension data.
  376. *
  377. * This function allows a "prefetch" of extension data into the
  378. * extension cache. Invoking the function may cause a call to
  379. * xcb_query_extension, but will not block waiting for the
  380. * reply. xcb_get_extension_data will return the prefetched data after
  381. * possibly blocking while it is retrieved.
  382. */
  383. void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext);
  384. /* xcb_conn.c */
  385. /**
  386. * @brief Access the data returned by the server.
  387. * @param c The connection.
  388. * @return A pointer to an xcb_setup_t structure.
  389. *
  390. * Accessor for the data returned by the server when the xcb_connection_t
  391. * was initialized. This data includes
  392. * - the server's required format for images,
  393. * - a list of available visuals,
  394. * - a list of available screens,
  395. * - the server's maximum request length (in the absence of the
  396. * BIG-REQUESTS extension),
  397. * - and other assorted information.
  398. *
  399. * See the X protocol specification for more details.
  400. *
  401. * The result must not be freed.
  402. */
  403. const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c);
  404. /**
  405. * @brief Access the file descriptor of the connection.
  406. * @param c The connection.
  407. * @return The file descriptor.
  408. *
  409. * Accessor for the file descriptor that was passed to the
  410. * xcb_connect_to_fd call that returned @p c.
  411. */
  412. int xcb_get_file_descriptor(xcb_connection_t *c);
  413. /**
  414. * @brief Test whether the connection has shut down due to a fatal error.
  415. * @param c The connection.
  416. * @return > 0 if the connection is in an error state; 0 otherwise.
  417. *
  418. * Some errors that occur in the context of an xcb_connection_t
  419. * are unrecoverable. When such an error occurs, the
  420. * connection is shut down and further operations on the
  421. * xcb_connection_t have no effect, but memory will not be freed until
  422. * xcb_disconnect() is called on the xcb_connection_t.
  423. *
  424. * @return XCB_CONN_ERROR, because of socket errors, pipe errors or other stream errors.
  425. * @return XCB_CONN_CLOSED_EXT_NOTSUPPORTED, when extension not supported.
  426. * @return XCB_CONN_CLOSED_MEM_INSUFFICIENT, when memory not available.
  427. * @return XCB_CONN_CLOSED_REQ_LEN_EXCEED, exceeding request length that server accepts.
  428. * @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string.
  429. * @return XCB_CONN_CLOSED_INVALID_SCREEN, because the server does not have a screen matching the display.
  430. */
  431. int xcb_connection_has_error(xcb_connection_t *c);
  432. /**
  433. * @brief Connects to the X server.
  434. * @param fd The file descriptor.
  435. * @param auth_info Authentication data.
  436. * @return A newly allocated xcb_connection_t structure.
  437. *
  438. * Connects to an X server, given the open socket @p fd and the
  439. * xcb_auth_info_t @p auth_info. The file descriptor @p fd is
  440. * bidirectionally connected to an X server. If the connection
  441. * should be unauthenticated, @p auth_info must be @c
  442. * NULL.
  443. *
  444. * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
  445. * Callers need to use xcb_connection_has_error() to check for failure.
  446. * When finished, use xcb_disconnect() to close the connection and free
  447. * the structure.
  448. */
  449. xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info);
  450. /**
  451. * @brief Closes the connection.
  452. * @param c The connection.
  453. *
  454. * Closes the file descriptor and frees all memory associated with the
  455. * connection @c c. If @p c is @c NULL, nothing is done.
  456. */
  457. void xcb_disconnect(xcb_connection_t *c);
  458. /* xcb_util.c */
  459. /**
  460. * @brief Parses a display string name in the form documented by X(7x).
  461. * @param name The name of the display.
  462. * @param host A pointer to a malloc'd copy of the hostname.
  463. * @param display A pointer to the display number.
  464. * @param screen A pointer to the screen number.
  465. * @return 0 on failure, non 0 otherwise.
  466. *
  467. * Parses the display string name @p display_name in the form
  468. * documented by X(7x). Has no side effects on failure. If
  469. * @p displayname is @c NULL or empty, it uses the environment
  470. * variable DISPLAY. @p hostp is a pointer to a newly allocated string
  471. * that contain the host name. @p displayp is set to the display
  472. * number and @p screenp to the preferred screen number. @p screenp
  473. * can be @c NULL. If @p displayname does not contain a screen number,
  474. * it is set to @c 0.
  475. */
  476. int xcb_parse_display(const char *name, char **host, int *display, int *screen);
  477. /**
  478. * @brief Connects to the X server.
  479. * @param displayname The name of the display.
  480. * @param screenp A pointer to a preferred screen number.
  481. * @return A newly allocated xcb_connection_t structure.
  482. *
  483. * Connects to the X server specified by @p displayname. If @p
  484. * displayname is @c NULL, uses the value of the DISPLAY environment
  485. * variable. If a particular screen on that server is preferred, the
  486. * int pointed to by @p screenp (if not @c NULL) will be set to that
  487. * screen; otherwise the screen will be set to 0.
  488. *
  489. * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
  490. * Callers need to use xcb_connection_has_error() to check for failure.
  491. * When finished, use xcb_disconnect() to close the connection and free
  492. * the structure.
  493. */
  494. xcb_connection_t *xcb_connect(const char *displayname, int *screenp);
  495. /**
  496. * @brief Connects to the X server, using an authorization information.
  497. * @param display The name of the display.
  498. * @param auth The authorization information.
  499. * @param screen A pointer to a preferred screen number.
  500. * @return A newly allocated xcb_connection_t structure.
  501. *
  502. * Connects to the X server specified by @p displayname, using the
  503. * authorization @p auth. If a particular screen on that server is
  504. * preferred, the int pointed to by @p screenp (if not @c NULL) will
  505. * be set to that screen; otherwise @p screenp will be set to 0.
  506. *
  507. * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
  508. * Callers need to use xcb_connection_has_error() to check for failure.
  509. * When finished, use xcb_disconnect() to close the connection and free
  510. * the structure.
  511. */
  512. xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb_auth_info_t *auth, int *screen);
  513. /* xcb_xid.c */
  514. /**
  515. * @brief Allocates an XID for a new object.
  516. * @param c The connection.
  517. * @return A newly allocated XID.
  518. *
  519. * Allocates an XID for a new object. Typically used just prior to
  520. * various object creation functions, such as xcb_create_window.
  521. */
  522. uint32_t xcb_generate_id(xcb_connection_t *c);
  523. /**
  524. * @}
  525. */
  526. #ifdef __cplusplus
  527. }
  528. #endif
  529. #endif /* __XCB_H__ */