[Xcb-commit] PublicApi.mdwn
XCB site
xcb at freedesktop.org
Mon Nov 12 17:47:37 PST 2007
PublicApi.mdwn | 164 ++++++++++++++++++++++++++++++++-------------------------
1 file changed, 94 insertions(+), 70 deletions(-)
New commits:
commit 6d179518e61ab988ff5b348a90606d9564f6e204
Author: brian.thomas.will <brian.thomas.will at gmail.com>
Date: Mon Nov 12 17:47:36 2007 -0800
formatting cleanup
diff --git a/PublicApi.mdwn b/PublicApi.mdwn
index 2265d44..f3c2906 100644
--- a/PublicApi.mdwn
+++ b/PublicApi.mdwn
@@ -8,36 +8,36 @@ These types are declared in xcb.h.
<a name="xcb_connection_t"></a>
-### xcb\_connection\_t
+### `xcb_connection_t`
(xcb.h)
-`typedef struct xcb_connection_t xcb_connection_t`
+ typedef struct xcb_connection_t xcb_connection_t;
-An xcb\_connection\_t is an opaque structure containing all data that [[XCB|index]] needs to communicate with an X server. The structure is defined in xcbint.h.
+An `xcb_connection_t` is an opaque structure containing all data that XCB needs to communicate with an X server. The structure is defined in xcbint.h.
<a name="xcb_extension_t"></a>
-### xcb\_extension\_t
+### `xcb_extension_t`
(xcb.h)
-`typedef struct xcb_extension_t xcb_extension_t`
+ typedef struct xcb_extension_t xcb_extension_t;
-An xcb\_extension\_t is an opaque structure used as key for [xcb\_get\_extension\_data](#xcb_get_extension_data).
+An `xcb_extension_t` is an opaque structure used as key for [`xcb_get_extension_data`](#xcb_get_extension_data).
<a name="xcb_auth_info_t"></a>
-### xcb\_auth\_info\_t
+### `xcb_auth_info_t`
(xcb.h)
- typedef struct xcb_auth_info_t {
- int namelen;
- char *name;
- int datalen;
- char *data;
- } xcb_auth_info_t;
+ typedef struct xcb_auth_info_t {
+ int namelen;
+ char *name;
+ int datalen;
+ char *data;
+ } xcb_auth_info_t;
A container for authorization information to be sent to the X server.
@@ -54,33 +54,40 @@ These functions are declared in xcb.h.
<a name="xcb_connect"></a>
-## xcb\_connect
+## `xcb_connect`
-(xcb\_util.c)
+(`xcb_util.c`)
-`xcb_connection_t *xcb_connect(const char *display, int *screen)`
+ xcb_connection_t *
+ xcb_connect (const char *display,
+ int *screen );
Connects to the X server specified by `display`. If `display` is null, uses the value of the DISPLAY environment variable. If a particular screen on that server is preferred, the int pointed to by `screen` (if non-null) will be set to that screen; otherwise the screen will be set to 0.
<a name="xcb_connect_to_display_with_auth_info"></a>
-## xcb\_connect\_to\_display\_with\_auth\_info
+## `xcb_connect_to_display_with_auth_info`
-(xcb\_util.c)
+(`xcb_util.c`)
-`xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb_auth_info_t *auth, int *screen)`
+ xcb_connection_t *
+ xcb_connect_to_display_with_auth_info (const char *display,
+ xcb_auth_info_t *auth,
+ int *screen );
Connects to the X server specified by `display`, using the given authorization information. If a particular screen on that server is preferred, the int pointed to by `screen` (if non-null) will be set to that screen; otherwise the screen will be set to 0.
<a name="xcb_connect_to_fd"></a>
-## xcb\_connect\_to\_fd
+## `xcb_connect_to_fd`
-(xcb\_conn.c)
+(`xcb_conn.c`)
-`xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info)`
+ xcb_connection_t *
+ xcb_connect_to_fd (int fd,
+ xcb_auth_info_t *auth_info );
-Connects to an X server, given an open socket and a suitable [xcb\_auth\_info\_t](#xcb_auth_info_t).
+Connects to an X server, given an open socket and a suitable [`xcb_auth_info_t`](#xcb_auth_info_t).
<dl>
<dt>fd</dt>
@@ -95,15 +102,16 @@ Connects to an X server, given an open socket and a suitable [xcb\_auth\_info\_t
</dd>
</dl>
-See also [xcb\_connect](#xcb_connect).
+See also [`xcb_connect`](#xcb_connect).
<a name="xcb_disconnect"></a>
-## xcb\_disconnect
+## `xcb_disconnect`
-(xcb\_conn.c)
+(`xcb_conn.c`)
-`void xcb_disconnect(xcb_connection *c)`
+ void
+ xcb_disconnect (xcb_connection *c);
Closes the file descriptor and frees all memory associated with the connection.
@@ -116,11 +124,15 @@ Closes the file descriptor and frees all memory associated with the connection.
<a name="xcb_parse_display"></a>
-## xcb\_parse\_display
+## `xcb_parse_display`
-(xcb\_util.c)
+(`xcb_util.c`)
-`int xcb_parse_display(const char *name, char **host, int *display, int *screen)`
+ int
+ xcb_parse_display (const char *name,
+ char **host,
+ int *display,
+ int *screen );
Parses a display string `name` in the form documented by X(7x). Has no side effects on failure.
@@ -141,13 +153,14 @@ Parses a display string `name` in the form documented by X(7x). Has no side effe
<a name="xcb_get_setup"></a>
-## xcb\_get\_setup
+## `xcb_get_setup`
-(xcb\_conn.c)
+(`xcb_conn.c`)
-`const xcb_setup_t *xcb_get_setup(xcb_connection_t *c)`
+ const xcb_setup_t *
+ xcb_get_setup (xcb_connection_t *c);
-Accessor for the data returned by the server when the [xcb\_connection\_t](#xcb_connection_t) was initialized.
+Accessor for the data returned by the server when the [`xcb_connection_t`](#xcb_connection_t) was initialized.
This data includes
@@ -157,25 +170,27 @@ This data includes
- the server's maximum request length (in the absence of the BIG-REQUESTS extension),
- and other assorted information.
-See the X protocol specification and xcb\_types.h for more details.
+See the X protocol specification and `xcb_types.h` for more details.
<a name="xcb_get_file_descriptor"></a>
-## xcb\_get\_file\_descriptor
+## `xcb_get_file_descriptor`
-(xcb\_conn.c)
+(`xcb_conn.c`)
-`int xcb_get_file_descriptor(xcb_connection_t *c)`
+ int
+ xcb_get_file_descriptor (xcb_connection_t *c);
-Accessor for the file descriptor that was passed to the [xcb\_connect\_to\_fd](#xcb_connect_to_fd) call that returned `c`.
+Accessor for the file descriptor that was passed to the [`xcb_connect_to_fd`](#xcb_connect_to_fd) call that returned `c`.
<a name="xcb_get_maximum_request_length"></a>
-## xcb\_get\_maximum\_request\_length
+## `xcb_get_maximum_request_length`
-(xcb\_out.c)
+(`xcb_out.c`)
-`uint32_t xcb_get_maximum_request_length(xcb_connection_t *c)`
+ uint32_t
+ xcb_get_maximum_request_length (xcb_connection_t *c);
In the absence of the BIG-REQUESTS extension, returns the maximum_request_length field from the connection setup data, which may be as much as 65535. If the server supports BIG-REQUESTS, then the maximum_request_length field from the reply to the [[BigRequestsEnable]] request will be returned instead.
@@ -183,39 +198,43 @@ Note that this length is measured in four-byte units, making the theoretical max
<a name="xcb_wait_for_event"></a>
-## xcb\_wait\_for\_event
+## `xcb_wait_for_event`
-(xcb\_in.c [!] )
+(`xcb_in.c` [!] )
-`xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c)`
+ xcb_generic_event_t *
+ xcb_wait_for_event (xcb_connection_t *c);
Returns the next event or error from the server, or returns null in the event of an I/O error. Blocks until either an event or error arrive, or an I/O error occurs.
<a name="xcb_poll_for_event"></a>
-## xcb\_poll\_for\_event
+## `xcb_poll_for_event`
-(xcb\_in.c)
+(`xcb_in.c`)
-`xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c)`
+ xcb_generic_event_t *
+ xcb_poll_for_event (xcb_connection_t *c);
-Returns the next event or error from the server, if one is available, or returns null otherwise. If no event is available, that might be because an I/O error like connection close occurred while attempting to read the next event. You can use [xcb\_connection\_has\_error](#xcb_connection_has_error) to check for this condition.
+Returns the next event or error from the server, if one is available, or returns null otherwise. If no event is available, that might be because an I/O error like connection close occurred while attempting to read the next event. You can use [`xcb_connection_has_error](#xcb_connection_has_error) to check for this condition.
<a name="xcb_connection_has_error"></a>
-## xcb\_connection\_has\_error
+## `xcb_connection_has_error`
-`int xcb_connection_has_error(xcb_connection_t *c)`
+ int
+ xcb_connection_has_error (xcb_connection_t *c);
-Returns non-zero if the connection has an error or zero if the connection is still valid. If this ever returns non-zero, then the connection is invalid, as if xcb\_disconnect had been called.
+Returns non-zero if the connection has an error or zero if the connection is still valid. If this ever returns non-zero, then the connection is invalid, as if `xcb_disconnect` had been called.
<a name="xcb_flush"></a>
-## xcb\_flush
+## `xcb_flush`
-(xcb\_out.c)
+(`xcb_out.c`)
-`int xcb_flush(xcb_connection_t *c)`
+ int
+ xcb_flush (xcb_connection_t *c);
Forces any buffered output to be written to the server. Blocks until the write is complete.
@@ -223,33 +242,38 @@ Returns: 1 on success, 0 on failure
<a name="xcb_get_extension_data"></a>
-## xcb\_get\_extension\_data
+## `xcb_get_extension_data`
-(xcb\_ext.c)
+(`xcb_ext.c`)
-`const xcb_query_extension_reply_t *xcb_get_extension_data(xcb_connection_t *c, xcb_extension_t *ext)`
+ const xcb_query_extension_reply_t *
+ xcb_get_extension_data (xcb_connection_t *c,
+ xcb_extension_t *ext );
-This function is the primary interface to the "extension cache", which caches reply information from [[QueryExtension]] requests. Invoking this function may cause a call to xcb\_query\_extension to retrieve extension information from the server, and may block until extension data is received from the server.
+This function is the primary interface to the "extension cache", which caches reply information from [[QueryExtension]] requests. Invoking this function may cause a call to `xcb_query_extension` to retrieve extension information from the server, and may block until extension data is received from the server.
-Do **not** free the returned xcb\_query\_extension\_reply\_t - this storage is managed by the cache itself.
+Do **not** free the returned `xcb_query_extension_reply_t` - this storage is managed by the cache itself.
<a name="xcb_prefetch_extension_data"></a>
-## xcb\_prefetch\_extension\_data
+## `xcb_prefetch_extension_data`
-(xcb\_ext.c)
+(`xcb_ext.c`)
-`void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext)`
+ void
+ xcb_prefetch_extension_data (xcb_connection_t *c,
+ xcb_extension_t *ext );
-This function allows a "prefetch" of extension data into the extension cache. Invoking the function may cause a call to xcb\_query\_extension, but will not block waiting for the reply. [xcb\_get\_extension\_data](#xcb_get_extension_data) will return the prefetched data after possibly blocking while it is retrieved.
+This function allows a "prefetch" of extension data into the extension cache. Invoking the function may cause a call to `xcb_query_extension`, but will not block waiting for the reply. [`xcb_get_extension_data`](#xcb_get_extension_data) will return the prefetched data after possibly blocking while it is retrieved.
-## xcb\_generate\_id
+## `xcb_generate_id`
-(xcb\_xid.c)
+(`xcb_xid.c`)
-`uint32_t xcb_generate_id(xcb_connection *c)`
+ uint32_t
+ xcb_generate_id (xcb_connection *c);
-This function allocates an XID prior to creating a new X object. For example, xcb\_create\_window:
+This function allocates an XID prior to creating a new X object. For example, `xcb_create_window`:
- xcb_window_t window = xcb_generate_id(c);
- xcb_create_window( c, depth, window, ... );
+ xcb_window_t window = xcb_generate_id (connection);
+ xcb_create_window (connection, depth, window, ... );
More information about the xcb-commit
mailing list