X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fc-client.xsl;h=a15d824a16bed1fd17187a5937c034615b201186;hb=1c590d5a86ae854e53f388e40c952e92f11d59e6;hp=6049bac599f8fba1cc34f9e5665785ad177ff4ed;hpb=3e213a1becd3081e905e3711ff3fe3e4865cd7dd;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/c-client.xsl b/src/c-client.xsl index 6049bac..a15d824 100644 --- a/src/c-client.xsl +++ b/src/c-client.xsl @@ -26,7 +26,11 @@ authorization from the authors. --> + xmlns:e="http://exslt.org/common" + xmlns:func="http://exslt.org/functions" + xmlns:str="http://exslt.org/strings" + xmlns:xcb="http://xcb.freedesktop.org" + extension-element-prefixes="func str xcb"> @@ -43,12 +47,16 @@ authorization from the authors. + + + + - - - - - - - - - - @@ -90,19 +85,117 @@ authorization from the authors. - + { "" } - - - return XCBGetExtensionData(c, &XCBId); - + + + + xcb + + _ + + + + + + + + + + + + + _ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + char + + + + + + + + + + + + + + + + + + + + + + + + + + + + _ + + + + + + @@ -117,27 +210,26 @@ authorization from the authors. - - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -159,14 +251,14 @@ authorization from the authors. - + - XCB - + @@ -211,126 +301,174 @@ authorization from the authors. + parameter "request" must be the request node, which defaults to the + context node. --> - XCB + - - + + - Void + xcb_void - Cookie + _cookie_t + + + + + + + _checked + _unchecked + + + + + + + /** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + + + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + + */ + + + + + true + + + + + + - + - - + + + - + - + - - - - - - - - - true - - - + + + + + + + + - - + + - - + + - - - + + + /** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * _unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + - - return (XCBRep *) XCBWaitForReply(c, cookie.sequence, e); + + return (_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); - - - - - - - - - XCB ret; - ret.xid = XCBGenerateID(c); - return ret; - + + + + - + union - - + + - Event + _event_t - Error + _error_t - + - - + + - + - + - + @@ -348,21 +486,23 @@ authorization from the authors. + _t + _t - - + + - + - + @@ -381,6 +521,7 @@ authorization from the authors. + _t @@ -391,7 +532,8 @@ authorization from the authors. + _t @@ -442,6 +584,7 @@ authorization from the authors. + _t @@ -449,13 +592,13 @@ authorization from the authors. - + - + @@ -467,10 +610,11 @@ authorization from the authors. - + + _t @@ -481,12 +625,18 @@ authorization from the authors. - + + + + const + + _t + * @@ -501,6 +651,7 @@ authorization from the authors. + _t @@ -508,7 +659,7 @@ authorization from the authors. - + @@ -569,14 +720,14 @@ authorization from the authors. - static const XCBProtocolRequest xcb_req = { + static const xcb_protocol_request_t xcb_req = { /* count */ , /* ext */ - &XCB - - Id + & + + _id 0 , @@ -591,7 +742,11 @@ authorization from the authors. xcb_out; - + xcb_out.pad0 = 0; + + @@ -605,19 +760,26 @@ authorization from the authors. xcb_parts[].iov_base = (char *) ; xcb_parts[].iov_len = + --> + * sizeof( - + + + char + + + + + ) ; xcb_parts[].iov_base = 0; xcb_parts[].iov_len = -xcb_parts[].iov_len & 3; - xcb_ret.sequence = XCBSendRequest(c, - XCB_REQUEST_CHECKED + XCB_REQUEST_CHECKED 0 , xcb_parts + 2, &xcb_req); return xcb_ret; @@ -643,51 +805,39 @@ authorization from the authors. + + + + xcb_out.pad = 0; + memset(xcb_out.pad, 0, ); + + + - - + + - - - - - - - - - - - - - - - - - - - + select="$pass1/xcb/struct[@name=concat($ref, $kind, '_t')]" /> R + 1 - - End(Iter(R)) + + _end(__iterator(R)) - End(R) + __end(R) @@ -699,52 +849,51 @@ authorization from the authors. - + + /struct[concat(xcb:xcb-prefix(@name), '_t') + = current()/@type] + /*[self::valueparam + or self::list[.//*[not(self::value + or self::op)]]]" /> - - + + - return ( *) (); - XCBGenericIter prev = ; - return ( *) ((char *) prev.data + XCB_TYPE_PAD(, prev.index)); + -->, prev.index)); - - + + return ; - - - - Iter i; + + + + _iterator_t i; i.data = ( *) (); - XCBGenericIter prev = ; i.data = ( *) ((char *) prev.data + XCB_TYPE_PAD(()) + ( ); - XCBGenericIter child = ; - i.data = (( *) child.data) + ( @@ -794,32 +943,49 @@ authorization from the authors. - - + + /** + * Get the next element of the iterator + * @param i Pointer to a _iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(_t) + */ + - *R = i->data; - XCBGenericIter child = ; --i->rem; - i->data = ( *) child.data; + i->data = (_t *) child.data; i->index = child.index; --i->rem; ++i->data; - i->index += sizeof(); + i->index += sizeof(_t); - - - XCBGenericIter ret; + + /** + * Return the iterator pointing to the last element + * @param i An _iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + + xcb_generic_iterator_t ret; while(i.rem > 0) - Next(&i); + _next(&i); ret.data = i.data; ret.rem = i.rem; @@ -864,8 +1030,16 @@ authorization from the authors. * Edit at your peril. */ - +/** + * @defgroup XCB__API XCB API + * @brief XCB Protocol Implementation. + + * @{ + **/ + + + #ifndef #define @@ -877,8 +1051,23 @@ authorization from the authors. + + + + #define XCB__MAJOR_VERSION + + #define XCB__MINOR_VERSION + + + + + + - + + +#include <string.h> + #include <assert.h> #include "xcbext.h" #include ".h" @@ -890,6 +1079,10 @@ authorization from the authors. #endif + +/** + * @} + */ @@ -898,8 +1091,10 @@ authorization from the authors. + /** Opcode for . */ + #define - + @@ -942,7 +1137,7 @@ authorization from the authors. typedef - + ; @@ -958,8 +1153,14 @@ authorization from the authors. + /** + * @brief + **/ + typedef struct + + { @@ -967,7 +1168,7 @@ authorization from the authors. - ; + ; /**< */ } @@ -980,7 +1181,9 @@ authorization from the authors. - typedef enum { + typedef enum + + { , @@ -1010,8 +1213,35 @@ authorization from the authors. - - + + + + + + +/***************************************************************************** + ** + ** + + + ** + + + + + ** @param + + + + + + + + ** @returns + ** + *****************************************************************************/ + + @@ -1029,6 +1259,7 @@ authorization from the authors. + /**< */ @@ -1052,6 +1283,11 @@ authorization from the authors. + + + + + @@ -1143,7 +1379,7 @@ authorization from the authors. - + pad