Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:41

0001 /*
0002  * Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett.
0003  * All Rights Reserved.
0004  *
0005  * Permission is hereby granted, free of charge, to any person obtaining a
0006  * copy of this software and associated documentation files (the "Software"),
0007  * to deal in the Software without restriction, including without limitation
0008  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0009  * and/or sell copies of the Software, and to permit persons to whom the
0010  * Software is furnished to do so, subject to the following conditions:
0011  *
0012  * The above copyright notice and this permission notice shall be included in
0013  * all copies or substantial portions of the Software.
0014  *
0015  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0016  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0017  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0018  * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
0019  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0020  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  * Except as contained in this notice, the names of the authors or their
0023  * institutions shall not be used in advertising or otherwise to promote the
0024  * sale, use or other dealings in this Software without prior written
0025  * authorization from the authors.
0026  */
0027 
0028 #ifndef __XCB_H__
0029 #define __XCB_H__
0030 #include <sys/types.h>
0031 
0032 #if defined(__solaris__)
0033 #include <inttypes.h>
0034 #else
0035 #include <stdint.h>
0036 #endif
0037 
0038 #ifndef _WIN32
0039 #include <sys/uio.h>
0040 #else
0041 #include "xcb_windefs.h"
0042 #endif
0043 #include <pthread.h>
0044 
0045 
0046 #ifdef __cplusplus
0047 extern "C" {
0048 #endif
0049 
0050 /**
0051  * @file xcb.h
0052  */
0053 
0054 #ifdef __GNUC__
0055 #define XCB_PACKED __attribute__((__packed__))
0056 #else
0057 #define XCB_PACKED
0058 #endif
0059 
0060 /**
0061  * @defgroup XCB_Core_API XCB Core API
0062  * @brief Core API of the XCB library.
0063  *
0064  * @{
0065  */
0066 
0067 /* Pre-defined constants */
0068 
0069 /** Current protocol version */
0070 #define X_PROTOCOL 11
0071 
0072 /** Current minor version */
0073 #define X_PROTOCOL_REVISION 0
0074 
0075 /** X_TCP_PORT + display number = server port for TCP transport */
0076 #define X_TCP_PORT 6000
0077 
0078 /** xcb connection errors because of socket, pipe and other stream errors. */
0079 #define XCB_CONN_ERROR 1
0080 
0081 /** xcb connection shutdown because of extension not supported */
0082 #define XCB_CONN_CLOSED_EXT_NOTSUPPORTED 2
0083 
0084 /** malloc(), calloc() and realloc() error upon failure, for eg ENOMEM */
0085 #define XCB_CONN_CLOSED_MEM_INSUFFICIENT 3
0086 
0087 /** Connection closed, exceeding request length that server accepts. */
0088 #define XCB_CONN_CLOSED_REQ_LEN_EXCEED 4
0089 
0090 /** Connection closed, error during parsing display string. */
0091 #define XCB_CONN_CLOSED_PARSE_ERR 5
0092 
0093 /** Connection closed because the server does not have a screen matching the display. */
0094 #define XCB_CONN_CLOSED_INVALID_SCREEN 6
0095 
0096 /** Connection closed because some FD passing operation failed */
0097 #define XCB_CONN_CLOSED_FDPASSING_FAILED 7
0098 
0099 #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1))
0100 
0101 /* Opaque structures */
0102 
0103 /**
0104  * @brief XCB Connection structure.
0105  *
0106  * A structure that contain all data that  XCB needs to communicate with an X server.
0107  */
0108 typedef struct xcb_connection_t xcb_connection_t;  /**< Opaque structure containing all data that  XCB needs to communicate with an X server. */
0109 
0110 
0111 /* Other types */
0112 
0113 /**
0114  * @brief Generic iterator.
0115  *
0116  * A generic iterator structure.
0117  */
0118 typedef struct {
0119     void *data;   /**< Data of the current iterator */
0120     int rem;    /**< remaining elements */
0121     int index;  /**< index of the current iterator */
0122 } xcb_generic_iterator_t;
0123 
0124 /**
0125  * @brief Generic reply.
0126  *
0127  * A generic reply structure.
0128  */
0129 typedef struct {
0130     uint8_t   response_type;  /**< Type of the response */
0131     uint8_t  pad0;           /**< Padding */
0132     uint16_t sequence;       /**< Sequence number */
0133     uint32_t length;         /**< Length of the response */
0134 } xcb_generic_reply_t;
0135 
0136 /**
0137  * @brief Generic event.
0138  *
0139  * A generic event structure.
0140  */
0141 typedef struct {
0142     uint8_t   response_type;  /**< Type of the response */
0143     uint8_t  pad0;           /**< Padding */
0144     uint16_t sequence;       /**< Sequence number */
0145     uint32_t pad[7];         /**< Padding */
0146     uint32_t full_sequence;  /**< full sequence */
0147 } xcb_generic_event_t;
0148 
0149 /**
0150  * @brief Raw Generic event.
0151  *
0152  * A generic event structure as used on the wire, i.e., without the full_sequence field
0153  */
0154 typedef struct {
0155     uint8_t   response_type;  /**< Type of the response */
0156     uint8_t  pad0;           /**< Padding */
0157     uint16_t sequence;       /**< Sequence number */
0158     uint32_t pad[7];         /**< Padding */
0159 } xcb_raw_generic_event_t;
0160 
0161 /**
0162  * @brief GE event
0163  *
0164  * An event as sent by the XGE extension. The length field specifies the
0165  * number of 4-byte blocks trailing the struct.
0166  *
0167  * @deprecated Since some fields in this struct have unfortunate names, it is
0168  * recommended to use xcb_ge_generic_event_t instead.
0169  */
0170 typedef struct {
0171     uint8_t  response_type;  /**< Type of the response */
0172     uint8_t  pad0;           /**< Padding */
0173     uint16_t sequence;       /**< Sequence number */
0174     uint32_t length;
0175     uint16_t event_type;
0176     uint16_t pad1;
0177     uint32_t pad[5];         /**< Padding */
0178     uint32_t full_sequence;  /**< full sequence */
0179 } xcb_ge_event_t;
0180 
0181 /**
0182  * @brief Generic error.
0183  *
0184  * A generic error structure.
0185  */
0186 typedef struct {
0187     uint8_t   response_type;  /**< Type of the response */
0188     uint8_t   error_code;     /**< Error code */
0189     uint16_t sequence;       /**< Sequence number */
0190     uint32_t resource_id;     /** < Resource ID for requests with side effects only */
0191     uint16_t minor_code;      /** < Minor opcode of the failed request */
0192     uint8_t major_code;       /** < Major opcode of the failed request */
0193     uint8_t pad0;
0194     uint32_t pad[5];         /**< Padding */
0195     uint32_t full_sequence;  /**< full sequence */
0196 } xcb_generic_error_t;
0197 
0198 /**
0199  * @brief Generic cookie.
0200  *
0201  * A generic cookie structure.
0202  */
0203 typedef struct {
0204     unsigned int sequence;  /**< Sequence number */
0205 } xcb_void_cookie_t;
0206 
0207 
0208 /* Include the generated xproto header. */
0209 #include "xproto.h"
0210 
0211 
0212 /** XCB_NONE is the universal null resource or null atom parameter value for many core X requests */
0213 #define XCB_NONE 0L
0214 
0215 /** XCB_COPY_FROM_PARENT can be used for many xcb_create_window parameters */
0216 #define XCB_COPY_FROM_PARENT 0L
0217 
0218 /** XCB_CURRENT_TIME can be used in most requests that take an xcb_timestamp_t */
0219 #define XCB_CURRENT_TIME 0L
0220 
0221 /** XCB_NO_SYMBOL fills in unused entries in xcb_keysym_t tables */
0222 #define XCB_NO_SYMBOL 0L
0223 
0224 
0225 /* xcb_auth.c */
0226 
0227 /**
0228  * @brief Container for authorization information.
0229  *
0230  * A container for authorization information to be sent to the X server.
0231  */
0232 typedef struct {
0233     int   namelen;  /**< Length of the string name (as returned by strlen). */
0234     char *name;     /**< String containing the authentication protocol name, such as "MIT-MAGIC-COOKIE-1" or "XDM-AUTHORIZATION-1". */
0235     int   datalen;  /**< Length of the data member. */
0236     char *data;   /**< Data interpreted in a protocol-specific manner. */
0237 } xcb_auth_info_t;
0238 
0239 
0240 /* xcb_out.c */
0241 
0242 /**
0243  * @brief Forces any buffered output to be written to the server.
0244  * @param c The connection to the X server.
0245  * @return > @c 0 on success, <= @c 0 otherwise.
0246  *
0247  * Forces any buffered output to be written to the server. Blocks
0248  * until the write is complete.
0249  */
0250 int xcb_flush(xcb_connection_t *c);
0251 
0252 /**
0253  * @brief Returns the maximum request length that this server accepts.
0254  * @param c The connection to the X server.
0255  * @return The maximum request length field.
0256  *
0257  * In the absence of the BIG-REQUESTS extension, returns the
0258  * maximum request length field from the connection setup data, which
0259  * may be as much as 65535. If the server supports BIG-REQUESTS, then
0260  * the maximum request length field from the reply to the
0261  * BigRequestsEnable request will be returned instead.
0262  *
0263  * Note that this length is measured in four-byte units, making the
0264  * theoretical maximum lengths roughly 256kB without BIG-REQUESTS and
0265  * 16GB with.
0266  */
0267 uint32_t xcb_get_maximum_request_length(xcb_connection_t *c);
0268 
0269 /**
0270  * @brief Prefetch the maximum request length without blocking.
0271  * @param c The connection to the X server.
0272  *
0273  * Without blocking, does as much work as possible toward computing
0274  * the maximum request length accepted by the X server.
0275  *
0276  * Invoking this function may cause a call to xcb_big_requests_enable,
0277  * but will not block waiting for the reply.
0278  * xcb_get_maximum_request_length will return the prefetched data
0279  * after possibly blocking while the reply is retrieved.
0280  *
0281  * Note that in order for this function to be fully non-blocking, the
0282  * application must previously have called
0283  * xcb_prefetch_extension_data(c, &xcb_big_requests_id) and the reply
0284  * must have already arrived.
0285  */
0286 void xcb_prefetch_maximum_request_length(xcb_connection_t *c);
0287 
0288 
0289 /* xcb_in.c */
0290 
0291 /**
0292  * @brief Returns the next event or error from the server.
0293  * @param c The connection to the X server.
0294  * @return The next event from the server.
0295  *
0296  * Returns the next event or error from the server, or returns null in
0297  * the event of an I/O error. Blocks until either an event or error
0298  * arrive, or an I/O error occurs.
0299  */
0300 xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c);
0301 
0302 /**
0303  * @brief Returns the next event or error from the server.
0304  * @param c The connection to the X server.
0305  * @return The next event from the server.
0306  *
0307  * Returns the next event or error from the server, if one is
0308  * available, or returns @c NULL otherwise. If no event is available, that
0309  * might be because an I/O error like connection close occurred while
0310  * attempting to read the next event, in which case the connection is
0311  * shut down when this function returns.
0312  */
0313 xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c);
0314 
0315 /**
0316  * @brief Returns the next event without reading from the connection.
0317  * @param c The connection to the X server.
0318  * @return The next already queued event from the server.
0319  *
0320  * This is a version of xcb_poll_for_event that only examines the
0321  * event queue for new events. The function doesn't try to read new
0322  * events from the connection if no queued events are found.
0323  *
0324  * This function is useful for callers that know in advance that all
0325  * interesting events have already been read from the connection. For
0326  * example, callers might use xcb_wait_for_reply and be interested
0327  * only of events that preceded a specific reply.
0328  */
0329 xcb_generic_event_t *xcb_poll_for_queued_event(xcb_connection_t *c);
0330 
0331 typedef struct xcb_special_event xcb_special_event_t;
0332 
0333 /**
0334  * @brief Returns the next event from a special queue
0335  */
0336 xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c,
0337                                                 xcb_special_event_t *se);
0338 
0339 /**
0340  * @brief Returns the next event from a special queue, blocking until one arrives
0341  */
0342 xcb_generic_event_t *xcb_wait_for_special_event(xcb_connection_t *c,
0343                                                 xcb_special_event_t *se);
0344 /**
0345  * @typedef typedef struct xcb_extension_t xcb_extension_t
0346  */
0347 typedef struct xcb_extension_t xcb_extension_t;  /**< Opaque structure used as key for xcb_get_extension_data_t. */
0348 
0349 /**
0350  * @brief Listen for a special event
0351  */
0352 xcb_special_event_t *xcb_register_for_special_xge(xcb_connection_t *c,
0353                                                   xcb_extension_t *ext,
0354                                                   uint32_t eid,
0355                                                   uint32_t *stamp);
0356 
0357 /**
0358  * @brief Stop listening for a special event
0359  */
0360 void xcb_unregister_for_special_event(xcb_connection_t *c,
0361                                       xcb_special_event_t *se);
0362 
0363 /**
0364  * @brief Return the error for a request, or NULL if none can ever arrive.
0365  * @param c The connection to the X server.
0366  * @param cookie The request cookie.
0367  * @return The error for the request, or NULL if none can ever arrive.
0368  *
0369  * The xcb_void_cookie_t cookie supplied to this function must have resulted
0370  * from a call to xcb_[request_name]_checked().  This function will block
0371  * until one of two conditions happens.  If an error is received, it will be
0372  * returned.  If a reply to a subsequent request has already arrived, no error
0373  * can arrive for this request, so this function will return NULL.
0374  *
0375  * Note that this function will perform a sync if needed to ensure that the
0376  * sequence number will advance beyond that provided in cookie; this is a
0377  * convenience to avoid races in determining whether the sync is needed.
0378  */
0379 xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t cookie);
0380 
0381 /**
0382  * @brief Discards the reply for a request.
0383  * @param c The connection to the X server.
0384  * @param sequence The request sequence number from a cookie.
0385  *
0386  * Discards the reply for a request. Additionally, any error generated
0387  * by the request is also discarded (unless it was an _unchecked request
0388  * and the error has already arrived).
0389  *
0390  * This function will not block even if the reply is not yet available.
0391  *
0392  * Note that the sequence really does have to come from an xcb cookie;
0393  * this function is not designed to operate on socket-handoff replies.
0394  */
0395 void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence);
0396 
0397 /**
0398  * @brief Discards the reply for a request, given by a 64bit sequence number
0399  * @param c The connection to the X server.
0400  * @param sequence 64-bit sequence number as returned by xcb_send_request64().
0401  *
0402  * Discards the reply for a request. Additionally, any error generated
0403  * by the request is also discarded (unless it was an _unchecked request
0404  * and the error has already arrived).
0405  *
0406  * This function will not block even if the reply is not yet available.
0407  *
0408  * Note that the sequence really does have to come from xcb_send_request64();
0409  * the cookie sequence number is defined as "unsigned" int and therefore
0410  * not 64-bit on all platforms.
0411  * This function is not designed to operate on socket-handoff replies.
0412  *
0413  * Unlike its xcb_discard_reply() counterpart, the given sequence number is not
0414  * automatically "widened" to 64-bit.
0415  */
0416 void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence);
0417 
0418 /* xcb_ext.c */
0419 
0420 /**
0421  * @brief Caches reply information from QueryExtension requests.
0422  * @param c The connection.
0423  * @param ext The extension data.
0424  * @return A pointer to the xcb_query_extension_reply_t for the extension.
0425  *
0426  * This function is the primary interface to the "extension cache",
0427  * which caches reply information from QueryExtension
0428  * requests. Invoking this function may cause a call to
0429  * xcb_query_extension to retrieve extension information from the
0430  * server, and may block until extension data is received from the
0431  * server.
0432  *
0433  * The result must not be freed. This storage is managed by the cache
0434  * itself.
0435  */
0436 const struct xcb_query_extension_reply_t *xcb_get_extension_data(xcb_connection_t *c, xcb_extension_t *ext);
0437 
0438 /**
0439  * @brief Prefetch of extension data into the extension cache
0440  * @param c The connection.
0441  * @param ext The extension data.
0442  *
0443  * This function allows a "prefetch" of extension data into the
0444  * extension cache. Invoking the function may cause a call to
0445  * xcb_query_extension, but will not block waiting for the
0446  * reply. xcb_get_extension_data will return the prefetched data after
0447  * possibly blocking while it is retrieved.
0448  */
0449 void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext);
0450 
0451 
0452 /* xcb_conn.c */
0453 
0454 /**
0455  * @brief Access the data returned by the server.
0456  * @param c The connection.
0457  * @return A pointer to an xcb_setup_t structure.
0458  *
0459  * Accessor for the data returned by the server when the xcb_connection_t
0460  * was initialized. This data includes
0461  * - the server's required format for images,
0462  * - a list of available visuals,
0463  * - a list of available screens,
0464  * - the server's maximum request length (in the absence of the
0465  * BIG-REQUESTS extension),
0466  * - and other assorted information.
0467  *
0468  * See the X protocol specification for more details.
0469  *
0470  * The result must not be freed.
0471  */
0472 const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c);
0473 
0474 /**
0475  * @brief Access the file descriptor of the connection.
0476  * @param c The connection.
0477  * @return The file descriptor.
0478  *
0479  * Accessor for the file descriptor that was passed to the
0480  * xcb_connect_to_fd call that returned @p c.
0481  */
0482 int xcb_get_file_descriptor(xcb_connection_t *c);
0483 
0484 /**
0485  * @brief Test whether the connection has shut down due to a fatal error.
0486  * @param c The connection.
0487  * @return > 0 if the connection is in an error state; 0 otherwise.
0488  *
0489  * Some errors that occur in the context of an xcb_connection_t
0490  * are unrecoverable. When such an error occurs, the
0491  * connection is shut down and further operations on the
0492  * xcb_connection_t have no effect, but memory will not be freed until
0493  * xcb_disconnect() is called on the xcb_connection_t.
0494  *
0495  * @return XCB_CONN_ERROR, because of socket errors, pipe errors or other stream errors.
0496  * @return XCB_CONN_CLOSED_EXT_NOTSUPPORTED, when extension not supported.
0497  * @return XCB_CONN_CLOSED_MEM_INSUFFICIENT, when memory not available.
0498  * @return XCB_CONN_CLOSED_REQ_LEN_EXCEED, exceeding request length that server accepts.
0499  * @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string.
0500  * @return XCB_CONN_CLOSED_INVALID_SCREEN, because the server does not have a screen matching the display.
0501  */
0502 int xcb_connection_has_error(xcb_connection_t *c);
0503 
0504 /**
0505  * @brief Connects to the X server.
0506  * @param fd The file descriptor.
0507  * @param auth_info Authentication data.
0508  * @return A newly allocated xcb_connection_t structure.
0509  *
0510  * Connects to an X server, given the open socket @p fd and the
0511  * xcb_auth_info_t @p auth_info. The file descriptor @p fd is
0512  * bidirectionally connected to an X server. If the connection
0513  * should be unauthenticated, @p auth_info must be @c
0514  * NULL.
0515  *
0516  * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
0517  * Callers need to use xcb_connection_has_error() to check for failure.
0518  * When finished, use xcb_disconnect() to close the connection and free
0519  * the structure.
0520  */
0521 xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info);
0522 
0523 /**
0524  * @brief Closes the connection.
0525  * @param c The connection.
0526  *
0527  * Closes the file descriptor and frees all memory associated with the
0528  * connection @c c. If @p c is @c NULL, nothing is done.
0529  */
0530 void xcb_disconnect(xcb_connection_t *c);
0531 
0532 
0533 /* xcb_util.c */
0534 
0535 /**
0536  * @brief Parses a display string name in the form documented by X(7x).
0537  * @param name The name of the display.
0538  * @param host A pointer to a malloc'd copy of the hostname.
0539  * @param display A pointer to the display number.
0540  * @param screen A pointer to the screen number.
0541  * @return 0 on failure, non 0 otherwise.
0542  *
0543  * Parses the display string name @p display_name in the form
0544  * documented by X(7x). Has no side effects on failure. If
0545  * @p displayname is @c NULL or empty, it uses the environment
0546  * variable DISPLAY. @p hostp is a pointer to a newly allocated string
0547  * that contain the host name. @p displayp is set to the display
0548  * number and @p screenp to the preferred screen number. @p screenp
0549  * can be @c NULL. If @p displayname does not contain a screen number,
0550  * it is set to @c 0.
0551  */
0552 int xcb_parse_display(const char *name, char **host, int *display, int *screen);
0553 
0554 /**
0555  * @brief Connects to the X server.
0556  * @param displayname The name of the display.
0557  * @param screenp A pointer to a preferred screen number.
0558  * @return A newly allocated xcb_connection_t structure.
0559  *
0560  * Connects to the X server specified by @p displayname. If @p
0561  * displayname is @c NULL, uses the value of the DISPLAY environment
0562  * variable. If a particular screen on that server is preferred, the
0563  * int pointed to by @p screenp (if not @c NULL) will be set to that
0564  * screen; otherwise the screen will be set to 0.
0565  *
0566  * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
0567  * Callers need to use xcb_connection_has_error() to check for failure.
0568  * When finished, use xcb_disconnect() to close the connection and free
0569  * the structure.
0570  */
0571 xcb_connection_t *xcb_connect(const char *displayname, int *screenp);
0572 
0573 /**
0574  * @brief Connects to the X server, using an authorization information.
0575  * @param display The name of the display.
0576  * @param auth The authorization information.
0577  * @param screen A pointer to a preferred screen number.
0578  * @return A newly allocated xcb_connection_t structure.
0579  *
0580  * Connects to the X server specified by @p displayname, using the
0581  * authorization @p auth. If a particular screen on that server is
0582  * preferred, the int pointed to by @p screenp (if not @c NULL) will
0583  * be set to that screen; otherwise @p screenp will be set to 0.
0584  *
0585  * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
0586  * Callers need to use xcb_connection_has_error() to check for failure.
0587  * When finished, use xcb_disconnect() to close the connection and free
0588  * the structure.
0589  */
0590 xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb_auth_info_t *auth, int *screen);
0591 
0592 
0593 /* xcb_xid.c */
0594 
0595 /**
0596  * @brief Allocates an XID for a new object.
0597  * @param c The connection.
0598  * @return A newly allocated XID, or -1 on failure.
0599  *
0600  * Allocates an XID for a new object. Typically used just prior to
0601  * various object creation functions, such as xcb_create_window.
0602  */
0603 uint32_t xcb_generate_id(xcb_connection_t *c);
0604 
0605 
0606 /**
0607  * @brief Obtain number of bytes read from the connection.
0608  * @param c The connection
0609  * @return Number of bytes read from the server.
0610  *
0611  * Returns cumulative number of bytes received from the connection.
0612  *
0613  * This retrieves the total number of bytes read from this connection,
0614  * to be used for diagnostic/monitoring/informative purposes.
0615  */
0616 
0617 uint64_t
0618 xcb_total_read(xcb_connection_t *c);
0619 
0620 /**
0621  *
0622  * @brief Obtain number of bytes written to the connection.
0623  * @param c The connection
0624  * @return Number of bytes written to the server.
0625  *
0626  * Returns cumulative number of bytes sent to the connection.
0627  *
0628  * This retrieves the total number of bytes written to this connection,
0629  * to be used for diagnostic/monitoring/informative purposes.
0630  */
0631 
0632 uint64_t
0633 xcb_total_written(xcb_connection_t *c);
0634 
0635 /**
0636  * @}
0637  */
0638 
0639 #ifdef __cplusplus
0640 }
0641 #endif
0642 
0643 
0644 #endif /* __XCB_H__ */