diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-11-22 20:31:34 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2012-11-22 20:31:34 +0000 |
commit | 5cc22f3ebb0e7e2c512088be308c666e695daec4 (patch) | |
tree | 1f0fc03bf4f47ec2d71309b70d97499cc73eeb1b /lib | |
parent | 0020ec3315ff8cb6aeae2358cd40dcb2940198dc (diff) |
Update to libxcb 1.9.0.
tested by ajacoutot@ and naddy@ on a full ports build
Diffstat (limited to 'lib')
69 files changed, 12766 insertions, 1217 deletions
diff --git a/lib/libxcb/libxcb-dri2/shlib_version b/lib/libxcb/libxcb-dri2/shlib_version index 3d7c908e4..dea2b62ca 100644 --- a/lib/libxcb/libxcb-dri2/shlib_version +++ b/lib/libxcb/libxcb-dri2/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=1 +minor=2 diff --git a/lib/libxcb/libxcb-glx/shlib_version b/lib/libxcb/libxcb-glx/shlib_version index 3d7c908e4..dea2b62ca 100644 --- a/lib/libxcb/libxcb-glx/shlib_version +++ b/lib/libxcb/libxcb-glx/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=1 +minor=2 diff --git a/lib/libxcb/libxcb-randr/shlib_version b/lib/libxcb/libxcb-randr/shlib_version index 1edea46de..893819d18 100644 --- a/lib/libxcb/libxcb-randr/shlib_version +++ b/lib/libxcb/libxcb-randr/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-record/shlib_version b/lib/libxcb/libxcb-record/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-record/shlib_version +++ b/lib/libxcb/libxcb-record/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-render/shlib_version b/lib/libxcb/libxcb-render/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-render/shlib_version +++ b/lib/libxcb/libxcb-render/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-res/shlib_version b/lib/libxcb/libxcb-res/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-res/shlib_version +++ b/lib/libxcb/libxcb-res/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-screensaver/shlib_version b/lib/libxcb/libxcb-screensaver/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-screensaver/shlib_version +++ b/lib/libxcb/libxcb-screensaver/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-shape/shlib_version b/lib/libxcb/libxcb-shape/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-shape/shlib_version +++ b/lib/libxcb/libxcb-shape/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-sync/shlib_version b/lib/libxcb/libxcb-sync/shlib_version index 3d7c908e4..dea2b62ca 100644 --- a/lib/libxcb/libxcb-sync/shlib_version +++ b/lib/libxcb/libxcb-sync/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=1 +minor=2 diff --git a/lib/libxcb/libxcb-xf86dri/shlib_version b/lib/libxcb/libxcb-xf86dri/shlib_version index 893819d18..c8860078e 100644 --- a/lib/libxcb/libxcb-xf86dri/shlib_version +++ b/lib/libxcb/libxcb-xf86dri/shlib_version @@ -1,2 +1,2 @@ major=1 -minor=1 +minor=2 diff --git a/lib/libxcb/libxcb-xfixes/shlib_version b/lib/libxcb/libxcb-xfixes/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-xfixes/shlib_version +++ b/lib/libxcb/libxcb-xfixes/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-xinerama/shlib_version b/lib/libxcb/libxcb-xinerama/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-xinerama/shlib_version +++ b/lib/libxcb/libxcb-xinerama/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-xprint/shlib_version b/lib/libxcb/libxcb-xprint/shlib_version index 97c9f92d6..1edea46de 100644 --- a/lib/libxcb/libxcb-xprint/shlib_version +++ b/lib/libxcb/libxcb-xprint/shlib_version @@ -1,2 +1,2 @@ -major=0 +major=1 minor=0 diff --git a/lib/libxcb/libxcb-xv/shlib_version b/lib/libxcb/libxcb-xv/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-xv/shlib_version +++ b/lib/libxcb/libxcb-xv/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb-xvmc/shlib_version b/lib/libxcb/libxcb-xvmc/shlib_version index 97c9f92d6..3d7c908e4 100644 --- a/lib/libxcb/libxcb-xvmc/shlib_version +++ b/lib/libxcb/libxcb-xvmc/shlib_version @@ -1,2 +1,2 @@ major=0 -minor=0 +minor=1 diff --git a/lib/libxcb/libxcb/shlib_version b/lib/libxcb/libxcb/shlib_version index b363be444..c87e1c60d 100644 --- a/lib/libxcb/libxcb/shlib_version +++ b/lib/libxcb/libxcb/shlib_version @@ -1,2 +1,2 @@ major=2 -minor=3 +minor=4 diff --git a/lib/libxcb/src/Makefile b/lib/libxcb/src/Makefile index a78ec8ee6..2185039bd 100644 --- a/lib/libxcb/src/Makefile +++ b/lib/libxcb/src/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.3 2012/03/27 19:14:21 matthieu Exp $ +# $OpenBSD: Makefile,v 1.4 2012/11/22 20:31:32 matthieu Exp $ DATADIR= ${X11BASE}/share PYTHON= python${PYTHON_VERSION} @@ -50,4 +50,7 @@ clean: .xml.h: ${PYTHON} ${LIBXCB}/src/c_client.py -p ${PYTHONDIR} $< + .include <bsd.xorg.mk> + +${SRCS} ${HDRS}: ${LIBXCB}/src/c_client.py diff --git a/lib/libxcb/src/bigreq.c b/lib/libxcb/src/bigreq.c index 85ef5c681..e8f9131ad 100644 --- a/lib/libxcb/src/bigreq.c +++ b/lib/libxcb/src/bigreq.c @@ -3,11 +3,18 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "bigreq.h" +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) + xcb_extension_t xcb_big_requests_id = { "BIG-REQUESTS", 0 }; @@ -39,6 +46,7 @@ xcb_big_requests_enable (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -72,6 +80,7 @@ xcb_big_requests_enable_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/bigreq.h b/lib/libxcb/src/bigreq.h index d259d03a8..7f84f63e9 100644 --- a/lib/libxcb/src/bigreq.h +++ b/lib/libxcb/src/bigreq.h @@ -54,7 +54,7 @@ typedef struct xcb_big_requests_enable_reply_t { } xcb_big_requests_enable_reply_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -75,7 +75,7 @@ xcb_big_requests_enable_cookie_t xcb_big_requests_enable (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/composite.c b/lib/libxcb/src/composite.c index 1e81362e2..35862a57f 100644 --- a/lib/libxcb/src/composite.c +++ b/lib/libxcb/src/composite.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "composite.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" #include "render.h" #include "shape.h" @@ -49,6 +56,7 @@ xcb_composite_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -88,6 +96,7 @@ xcb_composite_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -148,6 +157,7 @@ xcb_composite_redirect_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -188,6 +198,7 @@ xcb_composite_redirect_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -228,6 +239,7 @@ xcb_composite_redirect_subwindows_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -268,6 +280,7 @@ xcb_composite_redirect_subwindows (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -308,6 +321,7 @@ xcb_composite_unredirect_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -348,6 +362,7 @@ xcb_composite_unredirect_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -388,6 +403,7 @@ xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -428,6 +444,7 @@ xcb_composite_unredirect_subwindows (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -467,6 +484,7 @@ xcb_composite_create_region_from_border_clip_checked (xcb_connection_t *c /* xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -506,6 +524,7 @@ xcb_composite_create_region_from_border_clip (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -545,6 +564,7 @@ xcb_composite_name_window_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -584,6 +604,7 @@ xcb_composite_name_window_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -620,6 +641,7 @@ xcb_composite_get_overlay_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -656,6 +678,7 @@ xcb_composite_get_overlay_window_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -712,6 +735,7 @@ xcb_composite_release_overlay_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -748,6 +772,7 @@ xcb_composite_release_overlay_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/composite.h b/lib/libxcb/src/composite.h index ff4118bfe..f9231454b 100644 --- a/lib/libxcb/src/composite.h +++ b/lib/libxcb/src/composite.h @@ -200,7 +200,7 @@ typedef struct xcb_composite_release_overlay_window_request_t { } xcb_composite_release_overlay_window_request_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -225,7 +225,7 @@ xcb_composite_query_version (xcb_connection_t *c /**< */, uint32_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -284,7 +284,7 @@ xcb_composite_query_version_reply (xcb_connection_t *c /** xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -312,7 +312,7 @@ xcb_composite_redirect_window_checked (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -337,7 +337,7 @@ xcb_composite_redirect_window (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -365,7 +365,7 @@ xcb_composite_redirect_subwindows_checked (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -390,7 +390,7 @@ xcb_composite_redirect_subwindows (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -418,7 +418,7 @@ xcb_composite_unredirect_window_checked (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -443,7 +443,7 @@ xcb_composite_unredirect_window (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -471,7 +471,7 @@ xcb_composite_unredirect_subwindows_checked (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -496,7 +496,7 @@ xcb_composite_unredirect_subwindows (xcb_connection_t *c /**< */, uint8_t update /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -524,7 +524,7 @@ xcb_composite_create_region_from_border_clip_checked (xcb_connection_t *c /* xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -549,7 +549,7 @@ xcb_composite_create_region_from_border_clip (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -577,7 +577,7 @@ xcb_composite_name_window_pixmap_checked (xcb_connection_t *c /**< */, xcb_pixmap_t pixmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -602,7 +602,7 @@ xcb_composite_name_window_pixmap (xcb_connection_t *c /**< */, xcb_pixmap_t pixmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -625,7 +625,7 @@ xcb_composite_get_overlay_window (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -682,7 +682,7 @@ xcb_composite_get_overlay_window_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -708,7 +708,7 @@ xcb_composite_release_overlay_window_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/damage.c b/lib/libxcb/src/damage.c index 307f4fb2d..6b385384b 100644 --- a/lib/libxcb/src/damage.c +++ b/lib/libxcb/src/damage.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "damage.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" #include "render.h" #include "shape.h" @@ -87,6 +94,7 @@ xcb_damage_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -126,6 +134,7 @@ xcb_damage_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -189,6 +198,7 @@ xcb_damage_create_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -232,6 +242,7 @@ xcb_damage_create (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -268,6 +279,7 @@ xcb_damage_destroy_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -304,6 +316,7 @@ xcb_damage_destroy (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -346,6 +359,7 @@ xcb_damage_subtract_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -388,6 +402,7 @@ xcb_damage_subtract (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -427,6 +442,7 @@ xcb_damage_add_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -466,6 +482,7 @@ xcb_damage_add (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/damage.h b/lib/libxcb/src/damage.h index cdaf1e93d..545e530e5 100644 --- a/lib/libxcb/src/damage.h +++ b/lib/libxcb/src/damage.h @@ -210,7 +210,7 @@ xcb_generic_iterator_t xcb_damage_damage_end (xcb_damage_damage_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -235,7 +235,7 @@ xcb_damage_query_version (xcb_connection_t *c /**< */, uint32_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -294,7 +294,7 @@ xcb_damage_query_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -324,7 +324,7 @@ xcb_damage_create_checked (xcb_connection_t *c /**< */, uint8_t level /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -351,7 +351,7 @@ xcb_damage_create (xcb_connection_t *c /**< */, uint8_t level /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -377,7 +377,7 @@ xcb_damage_destroy_checked (xcb_connection_t *c /**< */, xcb_damage_damage_t damage /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -400,7 +400,7 @@ xcb_damage_destroy (xcb_connection_t *c /**< */, xcb_damage_damage_t damage /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -430,7 +430,7 @@ xcb_damage_subtract_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t parts /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -457,7 +457,7 @@ xcb_damage_subtract (xcb_connection_t *c /**< */, xcb_xfixes_region_t parts /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -485,7 +485,7 @@ xcb_damage_add_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t region /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/dpms.c b/lib/libxcb/src/dpms.c index 3b7e0eb10..952809f0c 100644 --- a/lib/libxcb/src/dpms.c +++ b/lib/libxcb/src/dpms.c @@ -3,11 +3,18 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "dpms.h" +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) + xcb_extension_t xcb_dpms_id = { "DPMS", 0 }; @@ -45,6 +52,7 @@ xcb_dpms_get_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -84,6 +92,7 @@ xcb_dpms_get_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -137,6 +146,7 @@ xcb_dpms_capable (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -170,6 +180,7 @@ xcb_dpms_capable_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -223,6 +234,7 @@ xcb_dpms_get_timeouts (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -256,6 +268,7 @@ xcb_dpms_get_timeouts_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -318,6 +331,7 @@ xcb_dpms_set_timeouts_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -360,6 +374,7 @@ xcb_dpms_set_timeouts (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -393,6 +408,7 @@ xcb_dpms_enable_checked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -426,6 +442,7 @@ xcb_dpms_enable (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -459,6 +476,7 @@ xcb_dpms_disable_checked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -492,6 +510,7 @@ xcb_dpms_disable (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -528,6 +547,7 @@ xcb_dpms_force_level_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -564,6 +584,7 @@ xcb_dpms_force_level (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -597,6 +618,7 @@ xcb_dpms_info (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -630,6 +652,7 @@ xcb_dpms_info_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/dpms.h b/lib/libxcb/src/dpms.h index a002aa692..38f2e95d7 100644 --- a/lib/libxcb/src/dpms.h +++ b/lib/libxcb/src/dpms.h @@ -212,7 +212,7 @@ typedef struct xcb_dpms_info_reply_t { } xcb_dpms_info_reply_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -237,7 +237,7 @@ xcb_dpms_get_version (xcb_connection_t *c /**< */, uint16_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -296,7 +296,7 @@ xcb_dpms_get_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -317,7 +317,7 @@ xcb_dpms_capable_cookie_t xcb_dpms_capable (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -372,7 +372,7 @@ xcb_dpms_capable_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -393,7 +393,7 @@ xcb_dpms_get_timeouts_cookie_t xcb_dpms_get_timeouts (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -448,7 +448,7 @@ xcb_dpms_get_timeouts_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -478,7 +478,7 @@ xcb_dpms_set_timeouts_checked (xcb_connection_t *c /**< */, uint16_t off_timeout /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -505,7 +505,7 @@ xcb_dpms_set_timeouts (xcb_connection_t *c /**< */, uint16_t off_timeout /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -529,7 +529,7 @@ xcb_void_cookie_t xcb_dpms_enable_checked (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -550,7 +550,7 @@ xcb_void_cookie_t xcb_dpms_enable (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -574,7 +574,7 @@ xcb_void_cookie_t xcb_dpms_disable_checked (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -595,7 +595,7 @@ xcb_void_cookie_t xcb_dpms_disable (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -621,7 +621,7 @@ xcb_dpms_force_level_checked (xcb_connection_t *c /**< */, uint16_t power_level /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -644,7 +644,7 @@ xcb_dpms_force_level (xcb_connection_t *c /**< */, uint16_t power_level /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -665,7 +665,7 @@ xcb_dpms_info_cookie_t xcb_dpms_info (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/dri2.c b/lib/libxcb/src/dri2.c index 54ce217b4..cd581bba7 100644 --- a/lib/libxcb/src/dri2.c +++ b/lib/libxcb/src/dri2.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "dri2.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_dri2_id = { "DRI2", 0 }; @@ -122,6 +129,7 @@ xcb_dri2_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -161,6 +169,7 @@ xcb_dri2_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -185,6 +194,59 @@ xcb_dri2_query_version_reply (xcb_connection_t *c /**< */, return (xcb_dri2_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_dri2_connect_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_dri2_connect_reply_t *_aux = (xcb_dri2_connect_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_dri2_connect_reply_t); + xcb_tmp += xcb_block_len; + /* driver_name */ + xcb_block_len += _aux->driver_name_length * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* alignment_pad */ + xcb_block_len += (((_aux->driver_name_length + 3) & (~3)) - _aux->driver_name_length) * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* device_name */ + xcb_block_len += _aux->device_name_length * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -220,6 +282,7 @@ xcb_dri2_connect (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -259,6 +322,7 @@ xcb_dri2_connect_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -329,7 +393,7 @@ void * xcb_dri2_connect_alignment_pad (const xcb_dri2_connect_reply_t *R /**< */) { xcb_generic_iterator_t prev = xcb_dri2_connect_driver_name_end(R); - return (void *) ((char *) prev.data + XCB_TYPE_PAD(void, prev.index) + 0); + return (void *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0); } @@ -478,6 +542,7 @@ xcb_dri2_authenticate (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -517,6 +582,7 @@ xcb_dri2_authenticate_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -573,6 +639,7 @@ xcb_dri2_create_drawable_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -609,6 +676,7 @@ xcb_dri2_create_drawable (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -645,6 +713,7 @@ xcb_dri2_destroy_drawable_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -681,10 +750,40 @@ xcb_dri2_destroy_drawable (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_dri2_get_buffers_sizeof (const void *_buffer /**< */, + uint32_t attachments_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_dri2_get_buffers_request_t); + xcb_tmp += xcb_block_len; + /* attachments */ + xcb_block_len += attachments_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -724,10 +823,12 @@ xcb_dri2_get_buffers (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attachments */ xcb_parts[4].iov_base = (char *) attachments; xcb_parts[4].iov_len = attachments_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -771,10 +872,12 @@ xcb_dri2_get_buffers_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attachments */ xcb_parts[4].iov_base = (char *) attachments; xcb_parts[4].iov_len = attachments_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -892,6 +995,7 @@ xcb_dri2_copy_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -937,6 +1041,7 @@ xcb_dri2_copy_region_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -961,6 +1066,35 @@ xcb_dri2_copy_region_reply (xcb_connection_t *c /**< */, return (xcb_dri2_copy_region_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_dri2_get_buffers_with_format_sizeof (const void *_buffer /**< */, + uint32_t attachments_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_dri2_get_buffers_with_format_request_t); + xcb_tmp += xcb_block_len; + /* attachments */ + xcb_block_len += attachments_len * sizeof(xcb_dri2_attach_format_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_dri2_attach_format_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1000,10 +1134,12 @@ xcb_dri2_get_buffers_with_format (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_dri2_attach_format_t attachments */ xcb_parts[4].iov_base = (char *) attachments; xcb_parts[4].iov_len = attachments_len * sizeof(xcb_dri2_attach_format_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1047,10 +1183,12 @@ xcb_dri2_get_buffers_with_format_unchecked (xcb_connection_t *c / xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_dri2_attach_format_t attachments */ xcb_parts[4].iov_base = (char *) attachments; xcb_parts[4].iov_len = attachments_len * sizeof(xcb_dri2_attach_format_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1177,6 +1315,7 @@ xcb_dri2_swap_buffers (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1231,6 +1370,7 @@ xcb_dri2_swap_buffers_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1287,6 +1427,7 @@ xcb_dri2_get_msc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1323,6 +1464,7 @@ xcb_dri2_get_msc_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1397,6 +1539,7 @@ xcb_dri2_wait_msc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1451,6 +1594,7 @@ xcb_dri2_wait_msc_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1513,6 +1657,7 @@ xcb_dri2_wait_sbc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1555,6 +1700,7 @@ xcb_dri2_wait_sbc_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1614,6 +1760,7 @@ xcb_dri2_swap_interval_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1653,6 +1800,7 @@ xcb_dri2_swap_interval (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/dri2.h b/lib/libxcb/src/dri2.h index 004d7bdb3..aa0d9c787 100644 --- a/lib/libxcb/src/dri2.h +++ b/lib/libxcb/src/dri2.h @@ -602,7 +602,7 @@ xcb_generic_iterator_t xcb_dri2_attach_format_end (xcb_dri2_attach_format_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -627,7 +627,7 @@ xcb_dri2_query_version (xcb_connection_t *c /**< */, uint32_t minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -685,8 +685,11 @@ xcb_dri2_query_version_reply (xcb_connection_t *c /**< */, xcb_dri2_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_dri2_connect_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -711,7 +714,7 @@ xcb_dri2_connect (xcb_connection_t *c /**< */, uint32_t driver_type /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -887,7 +890,7 @@ xcb_dri2_connect_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -912,7 +915,7 @@ xcb_dri2_authenticate (xcb_connection_t *c /**< */, uint32_t magic /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -971,7 +974,7 @@ xcb_dri2_authenticate_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -997,7 +1000,7 @@ xcb_dri2_create_drawable_checked (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1020,7 +1023,7 @@ xcb_dri2_create_drawable (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1046,7 +1049,7 @@ xcb_dri2_destroy_drawable_checked (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1068,8 +1071,12 @@ xcb_void_cookie_t xcb_dri2_destroy_drawable (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); +int +xcb_dri2_get_buffers_sizeof (const void *_buffer /**< */, + uint32_t attachments_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1098,7 +1105,7 @@ xcb_dri2_get_buffers (xcb_connection_t *c /**< */, const uint32_t *attachments /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1200,7 +1207,7 @@ xcb_dri2_get_buffers_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1229,7 +1236,7 @@ xcb_dri2_copy_region (xcb_connection_t *c /**< */, uint32_t src /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1291,8 +1298,12 @@ xcb_dri2_copy_region_reply (xcb_connection_t *c /**< */, xcb_dri2_copy_region_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_dri2_get_buffers_with_format_sizeof (const void *_buffer /**< */, + uint32_t attachments_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1321,7 +1332,7 @@ xcb_dri2_get_buffers_with_format (xcb_connection_t *c /**< */, const xcb_dri2_attach_format_t *attachments /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1423,7 +1434,7 @@ xcb_dri2_get_buffers_with_format_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1458,7 +1469,7 @@ xcb_dri2_swap_buffers (xcb_connection_t *c /**< */, uint32_t remainder_lo /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1527,7 +1538,7 @@ xcb_dri2_swap_buffers_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1550,7 +1561,7 @@ xcb_dri2_get_msc (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1607,7 +1618,7 @@ xcb_dri2_get_msc_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1642,7 +1653,7 @@ xcb_dri2_wait_msc (xcb_connection_t *c /**< */, uint32_t remainder_lo /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1711,7 +1722,7 @@ xcb_dri2_wait_msc_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1738,7 +1749,7 @@ xcb_dri2_wait_sbc (xcb_connection_t *c /**< */, uint32_t target_sbc_lo /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1799,7 +1810,7 @@ xcb_dri2_wait_sbc_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1827,7 +1838,7 @@ xcb_dri2_swap_interval_checked (xcb_connection_t *c /**< */, uint32_t interval /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/glx.c b/lib/libxcb/src/glx.c index 956a82014..26971c4e7 100644 --- a/lib/libxcb/src/glx.c +++ b/lib/libxcb/src/glx.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "glx.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_glx_id = { "GLX", 0 }; @@ -391,6 +398,35 @@ xcb_glx_context_tag_end (xcb_glx_context_tag_iterator_t i /**< */) return ret; } +int +xcb_glx_render_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_render_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += data_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -427,10 +463,12 @@ xcb_glx_render_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -471,14 +509,45 @@ xcb_glx_render (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_render_large_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_render_large_request_t *_aux = (xcb_glx_render_large_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_render_large_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->data_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -522,10 +591,12 @@ xcb_glx_render_large_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -573,10 +644,12 @@ xcb_glx_render_large (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -626,6 +699,7 @@ xcb_glx_create_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -675,6 +749,7 @@ xcb_glx_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -711,6 +786,7 @@ xcb_glx_destroy_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -747,6 +823,7 @@ xcb_glx_destroy_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -789,6 +866,7 @@ xcb_glx_make_current (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -831,6 +909,7 @@ xcb_glx_make_current_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -887,6 +966,7 @@ xcb_glx_is_direct (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -923,6 +1003,7 @@ xcb_glx_is_direct_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -982,6 +1063,7 @@ xcb_glx_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1021,6 +1103,7 @@ xcb_glx_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1077,6 +1160,7 @@ xcb_glx_wait_gl_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1113,6 +1197,7 @@ xcb_glx_wait_gl (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1149,6 +1234,7 @@ xcb_glx_wait_x_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1185,6 +1271,7 @@ xcb_glx_wait_x (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1230,6 +1317,7 @@ xcb_glx_copy_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1275,6 +1363,7 @@ xcb_glx_copy_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1314,6 +1403,7 @@ xcb_glx_swap_buffers_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1353,6 +1443,7 @@ xcb_glx_swap_buffers (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1401,6 +1492,7 @@ xcb_glx_use_x_font_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1449,6 +1541,7 @@ xcb_glx_use_x_font (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1494,6 +1587,7 @@ xcb_glx_create_glx_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1539,10 +1633,40 @@ xcb_glx_create_glx_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_get_visual_configs_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_visual_configs_reply_t *_aux = (xcb_glx_get_visual_configs_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_visual_configs_reply_t); + xcb_tmp += xcb_block_len; + /* property_list */ + xcb_block_len += _aux->length * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1575,6 +1699,7 @@ xcb_glx_get_visual_configs (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1611,6 +1736,7 @@ xcb_glx_get_visual_configs_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1719,6 +1845,7 @@ xcb_glx_destroy_glx_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1755,10 +1882,40 @@ xcb_glx_destroy_glx_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_vendor_private_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_vendor_private_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += data_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1798,10 +1955,12 @@ xcb_glx_vendor_private_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1845,14 +2004,45 @@ xcb_glx_vendor_private (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_vendor_private_with_reply_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_vendor_private_with_reply_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += data_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1892,10 +2082,12 @@ xcb_glx_vendor_private_with_reply (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1939,10 +2131,12 @@ xcb_glx_vendor_private_with_reply_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2051,6 +2245,7 @@ xcb_glx_query_extensions_string (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2087,6 +2282,7 @@ xcb_glx_query_extensions_string_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2111,6 +2307,35 @@ xcb_glx_query_extensions_string_reply (xcb_connection_t return (xcb_glx_query_extensions_string_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_query_server_string_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_query_server_string_reply_t *_aux = (xcb_glx_query_server_string_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_query_server_string_reply_t); + xcb_tmp += xcb_block_len; + /* string */ + xcb_block_len += _aux->str_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2146,6 +2371,7 @@ xcb_glx_query_server_string (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2185,6 +2411,7 @@ xcb_glx_query_server_string_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2261,6 +2488,35 @@ xcb_glx_query_server_string_reply (xcb_connection_t *c /** return (xcb_glx_query_server_string_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_client_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_client_info_request_t *_aux = (xcb_glx_client_info_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_client_info_request_t); + xcb_tmp += xcb_block_len; + /* string */ + xcb_block_len += _aux->str_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2301,10 +2557,12 @@ xcb_glx_client_info_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = str_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2349,14 +2607,45 @@ xcb_glx_client_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = str_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_get_fb_configs_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_fb_configs_reply_t *_aux = (xcb_glx_get_fb_configs_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_fb_configs_reply_t); + xcb_tmp += xcb_block_len; + /* property_list */ + xcb_block_len += _aux->length * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2389,6 +2678,7 @@ xcb_glx_get_fb_configs (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2425,6 +2715,7 @@ xcb_glx_get_fb_configs_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2501,6 +2792,35 @@ xcb_glx_get_fb_configs_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_fb_configs_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_create_pixmap_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_create_pixmap_request_t *_aux = (xcb_glx_create_pixmap_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_create_pixmap_request_t); + xcb_tmp += xcb_block_len; + /* attribs */ + xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2547,10 +2867,12 @@ xcb_glx_create_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2601,10 +2923,12 @@ xcb_glx_create_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2641,6 +2965,7 @@ xcb_glx_destroy_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2677,6 +3002,7 @@ xcb_glx_destroy_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2729,6 +3055,7 @@ xcb_glx_create_new_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2781,10 +3108,40 @@ xcb_glx_create_new_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_query_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_query_context_reply_t *_aux = (xcb_glx_query_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_query_context_reply_t); + xcb_tmp += xcb_block_len; + /* attribs */ + xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2817,6 +3174,7 @@ xcb_glx_query_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2853,6 +3211,7 @@ xcb_glx_query_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2970,6 +3329,7 @@ xcb_glx_make_context_current (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3015,6 +3375,7 @@ xcb_glx_make_context_current_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3039,6 +3400,35 @@ xcb_glx_make_context_current_reply (xcb_connection_t *c / return (xcb_glx_make_context_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_create_pbuffer_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_create_pbuffer_request_t *_aux = (xcb_glx_create_pbuffer_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_create_pbuffer_request_t); + xcb_tmp += xcb_block_len; + /* attribs */ + xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3082,10 +3472,12 @@ xcb_glx_create_pbuffer_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3133,10 +3525,12 @@ xcb_glx_create_pbuffer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3173,6 +3567,7 @@ xcb_glx_destroy_pbuffer_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3209,10 +3604,40 @@ xcb_glx_destroy_pbuffer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_get_drawable_attributes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_drawable_attributes_reply_t *_aux = (xcb_glx_get_drawable_attributes_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_drawable_attributes_reply_t); + xcb_tmp += xcb_block_len; + /* attribs */ + xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3245,6 +3670,7 @@ xcb_glx_get_drawable_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3281,6 +3707,7 @@ xcb_glx_get_drawable_attributes_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3357,6 +3784,35 @@ xcb_glx_get_drawable_attributes_reply (xcb_connection_t return (xcb_glx_get_drawable_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_change_drawable_attributes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_change_drawable_attributes_request_t *_aux = (xcb_glx_change_drawable_attributes_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_change_drawable_attributes_request_t); + xcb_tmp += xcb_block_len; + /* attribs */ + xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3394,10 +3850,12 @@ xcb_glx_change_drawable_attributes_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3439,14 +3897,45 @@ xcb_glx_change_drawable_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_create_window_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_create_window_request_t *_aux = (xcb_glx_create_window_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_create_window_request_t); + xcb_tmp += xcb_block_len; + /* attribs */ + xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3493,10 +3982,12 @@ xcb_glx_create_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3547,10 +4038,12 @@ xcb_glx_create_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3587,6 +4080,7 @@ xcb_glx_delete_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3623,10 +4117,64 @@ xcb_glx_delete_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_set_client_info_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_set_client_info_arb_request_t *_aux = (xcb_glx_set_client_info_arb_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_set_client_info_arb_request_t); + xcb_tmp += xcb_block_len; + /* gl_versions */ + xcb_block_len += (_aux->num_versions * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* gl_extension_string */ + xcb_block_len += _aux->gl_str_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* glx_extension_string */ + xcb_block_len += _aux->glx_str_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3677,18 +4225,22 @@ xcb_glx_set_client_info_arb_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t gl_versions */ xcb_parts[4].iov_base = (char *) gl_versions; xcb_parts[4].iov_len = (num_versions * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* char gl_extension_string */ xcb_parts[6].iov_base = (char *) gl_extension_string; xcb_parts[6].iov_len = gl_str_len * sizeof(char); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* char glx_extension_string */ xcb_parts[8].iov_base = (char *) glx_extension_string; xcb_parts[8].iov_len = glx_str_len * sizeof(char); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3743,22 +4295,55 @@ xcb_glx_set_client_info_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t gl_versions */ xcb_parts[4].iov_base = (char *) gl_versions; xcb_parts[4].iov_len = (num_versions * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* char gl_extension_string */ xcb_parts[6].iov_base = (char *) gl_extension_string; xcb_parts[6].iov_len = gl_str_len * sizeof(char); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* char glx_extension_string */ xcb_parts[8].iov_base = (char *) glx_extension_string; xcb_parts[8].iov_len = glx_str_len * sizeof(char); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_create_context_attribs_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_create_context_attribs_arb_request_t *_aux = (xcb_glx_create_context_attribs_arb_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_create_context_attribs_arb_request_t); + xcb_tmp += xcb_block_len; + /* attribs */ + xcb_block_len += (_aux->num_attribs * 2) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3809,10 +4394,12 @@ xcb_glx_create_context_attribs_arb_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3867,14 +4454,69 @@ xcb_glx_create_context_attribs_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t attribs */ xcb_parts[4].iov_base = (char *) attribs; xcb_parts[4].iov_len = (num_attribs * 2) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_set_client_info_2arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_set_client_info_2arb_request_t *_aux = (xcb_glx_set_client_info_2arb_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_set_client_info_2arb_request_t); + xcb_tmp += xcb_block_len; + /* gl_versions */ + xcb_block_len += (_aux->num_versions * 3) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* gl_extension_string */ + xcb_block_len += _aux->gl_str_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* glx_extension_string */ + xcb_block_len += _aux->glx_str_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3925,18 +4567,22 @@ xcb_glx_set_client_info_2arb_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t gl_versions */ xcb_parts[4].iov_base = (char *) gl_versions; xcb_parts[4].iov_len = (num_versions * 3) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* char gl_extension_string */ xcb_parts[6].iov_base = (char *) gl_extension_string; xcb_parts[6].iov_len = gl_str_len * sizeof(char); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* char glx_extension_string */ xcb_parts[8].iov_base = (char *) glx_extension_string; xcb_parts[8].iov_len = glx_str_len * sizeof(char); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3991,18 +4637,22 @@ xcb_glx_set_client_info_2arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t gl_versions */ xcb_parts[4].iov_base = (char *) gl_versions; xcb_parts[4].iov_len = (num_versions * 3) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* char gl_extension_string */ xcb_parts[6].iov_base = (char *) gl_extension_string; xcb_parts[6].iov_len = gl_str_len * sizeof(char); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* char glx_extension_string */ xcb_parts[8].iov_base = (char *) glx_extension_string; xcb_parts[8].iov_len = glx_str_len * sizeof(char); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4045,6 +4695,7 @@ xcb_glx_new_list_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4087,6 +4738,7 @@ xcb_glx_new_list (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4123,6 +4775,7 @@ xcb_glx_end_list_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4159,6 +4812,7 @@ xcb_glx_end_list (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4201,6 +4855,7 @@ xcb_glx_delete_lists_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4243,6 +4898,7 @@ xcb_glx_delete_lists (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4282,6 +4938,7 @@ xcb_glx_gen_lists (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4321,6 +4978,7 @@ xcb_glx_gen_lists_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4383,6 +5041,7 @@ xcb_glx_feedback_buffer_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4425,6 +5084,7 @@ xcb_glx_feedback_buffer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4464,6 +5124,7 @@ xcb_glx_select_buffer_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4503,10 +5164,40 @@ xcb_glx_select_buffer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_render_mode_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_render_mode_reply_t *_aux = (xcb_glx_render_mode_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_render_mode_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4542,6 +5233,7 @@ xcb_glx_render_mode (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4581,6 +5273,7 @@ xcb_glx_render_mode_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4689,6 +5382,7 @@ xcb_glx_finish (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4725,6 +5419,7 @@ xcb_glx_finish_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4787,6 +5482,7 @@ xcb_glx_pixel_storef_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4829,6 +5525,7 @@ xcb_glx_pixel_storef (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4871,6 +5568,7 @@ xcb_glx_pixel_storei_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4913,10 +5611,40 @@ xcb_glx_pixel_storei (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_read_pixels_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_read_pixels_reply_t *_aux = (xcb_glx_read_pixels_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_read_pixels_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4973,6 +5701,7 @@ xcb_glx_read_pixels (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5033,6 +5762,7 @@ xcb_glx_read_pixels_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5109,6 +5839,35 @@ xcb_glx_read_pixels_reply (xcb_connection_t *c /**< */, return (xcb_glx_read_pixels_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_booleanv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_booleanv_reply_t *_aux = (xcb_glx_get_booleanv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_booleanv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5144,6 +5903,7 @@ xcb_glx_get_booleanv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5183,6 +5943,7 @@ xcb_glx_get_booleanv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5259,6 +6020,35 @@ xcb_glx_get_booleanv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_booleanv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_clip_plane_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_clip_plane_reply_t *_aux = (xcb_glx_get_clip_plane_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_clip_plane_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length / 2) * sizeof(xcb_glx_float64_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float64_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5294,6 +6084,7 @@ xcb_glx_get_clip_plane (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5333,6 +6124,7 @@ xcb_glx_get_clip_plane_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5409,6 +6201,35 @@ xcb_glx_get_clip_plane_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_clip_plane_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_doublev_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_doublev_reply_t *_aux = (xcb_glx_get_doublev_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_doublev_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float64_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float64_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5444,6 +6265,7 @@ xcb_glx_get_doublev (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5483,6 +6305,7 @@ xcb_glx_get_doublev_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5591,6 +6414,7 @@ xcb_glx_get_error (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5627,6 +6451,7 @@ xcb_glx_get_error_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5651,6 +6476,35 @@ xcb_glx_get_error_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_error_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_floatv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_floatv_reply_t *_aux = (xcb_glx_get_floatv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_floatv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5686,6 +6540,7 @@ xcb_glx_get_floatv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5725,6 +6580,7 @@ xcb_glx_get_floatv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5801,6 +6657,35 @@ xcb_glx_get_floatv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_floatv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_integerv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_integerv_reply_t *_aux = (xcb_glx_get_integerv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_integerv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5836,6 +6721,7 @@ xcb_glx_get_integerv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5875,6 +6761,7 @@ xcb_glx_get_integerv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5951,6 +6838,35 @@ xcb_glx_get_integerv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_integerv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_lightfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_lightfv_reply_t *_aux = (xcb_glx_get_lightfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_lightfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5989,6 +6905,7 @@ xcb_glx_get_lightfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6031,6 +6948,7 @@ xcb_glx_get_lightfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6107,6 +7025,35 @@ xcb_glx_get_lightfv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_lightfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_lightiv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_lightiv_reply_t *_aux = (xcb_glx_get_lightiv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_lightiv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6145,6 +7092,7 @@ xcb_glx_get_lightiv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6187,6 +7135,7 @@ xcb_glx_get_lightiv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6263,6 +7212,35 @@ xcb_glx_get_lightiv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_lightiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_mapdv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_mapdv_reply_t *_aux = (xcb_glx_get_mapdv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_mapdv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float64_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float64_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6301,6 +7279,7 @@ xcb_glx_get_mapdv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6343,6 +7322,7 @@ xcb_glx_get_mapdv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6419,6 +7399,35 @@ xcb_glx_get_mapdv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_mapdv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_mapfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_mapfv_reply_t *_aux = (xcb_glx_get_mapfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_mapfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6457,6 +7466,7 @@ xcb_glx_get_mapfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6499,6 +7509,7 @@ xcb_glx_get_mapfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6575,6 +7586,35 @@ xcb_glx_get_mapfv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_mapfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_mapiv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_mapiv_reply_t *_aux = (xcb_glx_get_mapiv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_mapiv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6613,6 +7653,7 @@ xcb_glx_get_mapiv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6655,6 +7696,7 @@ xcb_glx_get_mapiv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6731,6 +7773,35 @@ xcb_glx_get_mapiv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_mapiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_materialfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_materialfv_reply_t *_aux = (xcb_glx_get_materialfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_materialfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6769,6 +7840,7 @@ xcb_glx_get_materialfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6811,6 +7883,7 @@ xcb_glx_get_materialfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6887,6 +7960,35 @@ xcb_glx_get_materialfv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_materialfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_materialiv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_materialiv_reply_t *_aux = (xcb_glx_get_materialiv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_materialiv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6925,6 +8027,7 @@ xcb_glx_get_materialiv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6967,6 +8070,7 @@ xcb_glx_get_materialiv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7043,6 +8147,35 @@ xcb_glx_get_materialiv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_materialiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_pixel_mapfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_pixel_mapfv_reply_t *_aux = (xcb_glx_get_pixel_mapfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_pixel_mapfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7078,6 +8211,7 @@ xcb_glx_get_pixel_mapfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7117,6 +8251,7 @@ xcb_glx_get_pixel_mapfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7193,6 +8328,35 @@ xcb_glx_get_pixel_mapfv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_pixel_mapfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_pixel_mapuiv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_pixel_mapuiv_reply_t *_aux = (xcb_glx_get_pixel_mapuiv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_pixel_mapuiv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7228,6 +8392,7 @@ xcb_glx_get_pixel_mapuiv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7267,6 +8432,7 @@ xcb_glx_get_pixel_mapuiv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7343,6 +8509,35 @@ xcb_glx_get_pixel_mapuiv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_pixel_mapuiv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_pixel_mapusv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_pixel_mapusv_reply_t *_aux = (xcb_glx_get_pixel_mapusv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_pixel_mapusv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7378,6 +8573,7 @@ xcb_glx_get_pixel_mapusv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7417,6 +8613,7 @@ xcb_glx_get_pixel_mapusv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7493,6 +8690,35 @@ xcb_glx_get_pixel_mapusv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_pixel_mapusv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_polygon_stipple_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_polygon_stipple_reply_t *_aux = (xcb_glx_get_polygon_stipple_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_polygon_stipple_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7528,6 +8754,7 @@ xcb_glx_get_polygon_stipple (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7567,6 +8794,7 @@ xcb_glx_get_polygon_stipple_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7643,6 +8871,35 @@ xcb_glx_get_polygon_stipple_reply (xcb_connection_t *c /** return (xcb_glx_get_polygon_stipple_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_string_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_string_reply_t *_aux = (xcb_glx_get_string_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_string_reply_t); + xcb_tmp += xcb_block_len; + /* string */ + xcb_block_len += _aux->n * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7678,6 +8935,7 @@ xcb_glx_get_string (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7717,6 +8975,7 @@ xcb_glx_get_string_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7793,6 +9052,35 @@ xcb_glx_get_string_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_string_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_envfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_envfv_reply_t *_aux = (xcb_glx_get_tex_envfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_envfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7831,6 +9119,7 @@ xcb_glx_get_tex_envfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7873,6 +9162,7 @@ xcb_glx_get_tex_envfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7949,6 +9239,35 @@ xcb_glx_get_tex_envfv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_tex_envfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_enviv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_enviv_reply_t *_aux = (xcb_glx_get_tex_enviv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_enviv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7987,6 +9306,7 @@ xcb_glx_get_tex_enviv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8029,6 +9349,7 @@ xcb_glx_get_tex_enviv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8105,6 +9426,35 @@ xcb_glx_get_tex_enviv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_tex_enviv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_gendv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_gendv_reply_t *_aux = (xcb_glx_get_tex_gendv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_gendv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float64_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float64_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8143,6 +9493,7 @@ xcb_glx_get_tex_gendv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8185,6 +9536,7 @@ xcb_glx_get_tex_gendv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8261,6 +9613,35 @@ xcb_glx_get_tex_gendv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_tex_gendv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_genfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_genfv_reply_t *_aux = (xcb_glx_get_tex_genfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_genfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8299,6 +9680,7 @@ xcb_glx_get_tex_genfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8341,6 +9723,7 @@ xcb_glx_get_tex_genfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8417,6 +9800,35 @@ xcb_glx_get_tex_genfv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_tex_genfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_geniv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_geniv_reply_t *_aux = (xcb_glx_get_tex_geniv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_geniv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8455,6 +9867,7 @@ xcb_glx_get_tex_geniv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8497,6 +9910,7 @@ xcb_glx_get_tex_geniv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8573,6 +9987,35 @@ xcb_glx_get_tex_geniv_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_tex_geniv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_image_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_image_reply_t *_aux = (xcb_glx_get_tex_image_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_image_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8620,6 +10063,7 @@ xcb_glx_get_tex_image (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8671,6 +10115,7 @@ xcb_glx_get_tex_image_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8747,6 +10192,35 @@ xcb_glx_get_tex_image_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_tex_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_parameterfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_parameterfv_reply_t *_aux = (xcb_glx_get_tex_parameterfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_parameterfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8785,6 +10259,7 @@ xcb_glx_get_tex_parameterfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8827,6 +10302,7 @@ xcb_glx_get_tex_parameterfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8903,6 +10379,35 @@ xcb_glx_get_tex_parameterfv_reply (xcb_connection_t *c /** return (xcb_glx_get_tex_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_parameteriv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_parameteriv_reply_t *_aux = (xcb_glx_get_tex_parameteriv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_parameteriv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8941,6 +10446,7 @@ xcb_glx_get_tex_parameteriv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8983,6 +10489,7 @@ xcb_glx_get_tex_parameteriv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9059,6 +10566,35 @@ xcb_glx_get_tex_parameteriv_reply (xcb_connection_t *c /** return (xcb_glx_get_tex_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_level_parameterfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_level_parameterfv_reply_t *_aux = (xcb_glx_get_tex_level_parameterfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_level_parameterfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9100,6 +10636,7 @@ xcb_glx_get_tex_level_parameterfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9145,6 +10682,7 @@ xcb_glx_get_tex_level_parameterfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9221,6 +10759,35 @@ xcb_glx_get_tex_level_parameterfv_reply (xcb_connection_t return (xcb_glx_get_tex_level_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_tex_level_parameteriv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_tex_level_parameteriv_reply_t *_aux = (xcb_glx_get_tex_level_parameteriv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_tex_level_parameteriv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9262,6 +10829,7 @@ xcb_glx_get_tex_level_parameteriv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9307,6 +10875,7 @@ xcb_glx_get_tex_level_parameteriv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9418,6 +10987,7 @@ xcb_glx_is_list (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9457,6 +11027,7 @@ xcb_glx_is_list_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9513,6 +11084,7 @@ xcb_glx_flush_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9549,10 +11121,40 @@ xcb_glx_flush (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_are_textures_resident_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_are_textures_resident_request_t *_aux = (xcb_glx_are_textures_resident_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_are_textures_resident_request_t); + xcb_tmp += xcb_block_len; + /* textures */ + xcb_block_len += _aux->n * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9590,10 +11192,12 @@ xcb_glx_are_textures_resident (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t textures */ xcb_parts[4].iov_base = (char *) textures; xcb_parts[4].iov_len = n * sizeof(xcb_glx_bool32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9635,10 +11239,12 @@ xcb_glx_are_textures_resident_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t textures */ xcb_parts[4].iov_base = (char *) textures; xcb_parts[4].iov_len = n * sizeof(xcb_glx_bool32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9715,6 +11321,35 @@ xcb_glx_are_textures_resident_reply (xcb_connection_t *c return (xcb_glx_are_textures_resident_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_delete_textures_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_delete_textures_request_t *_aux = (xcb_glx_delete_textures_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_delete_textures_request_t); + xcb_tmp += xcb_block_len; + /* textures */ + xcb_block_len += _aux->n * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9752,10 +11387,12 @@ xcb_glx_delete_textures_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t textures */ xcb_parts[4].iov_base = (char *) textures; xcb_parts[4].iov_len = n * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9797,14 +11434,45 @@ xcb_glx_delete_textures (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t textures */ xcb_parts[4].iov_base = (char *) textures; xcb_parts[4].iov_len = n * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_gen_textures_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_gen_textures_reply_t *_aux = (xcb_glx_gen_textures_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_gen_textures_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->length * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9840,6 +11508,7 @@ xcb_glx_gen_textures (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9879,6 +11548,7 @@ xcb_glx_gen_textures_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9990,6 +11660,7 @@ xcb_glx_is_texture (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10029,6 +11700,7 @@ xcb_glx_is_texture_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10053,6 +11725,35 @@ xcb_glx_is_texture_reply (xcb_connection_t *c /**< */, return (xcb_glx_is_texture_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_color_table_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_color_table_reply_t *_aux = (xcb_glx_get_color_table_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_color_table_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10097,6 +11798,7 @@ xcb_glx_get_color_table (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10145,6 +11847,7 @@ xcb_glx_get_color_table_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10221,6 +11924,35 @@ xcb_glx_get_color_table_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_color_table_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_color_table_parameterfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_color_table_parameterfv_reply_t *_aux = (xcb_glx_get_color_table_parameterfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_color_table_parameterfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10259,6 +11991,7 @@ xcb_glx_get_color_table_parameterfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10301,6 +12034,7 @@ xcb_glx_get_color_table_parameterfv_unchecked (xcb_connection_t *c /**< */ xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10377,6 +12111,35 @@ xcb_glx_get_color_table_parameterfv_reply (xcb_connection_t return (xcb_glx_get_color_table_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_color_table_parameteriv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_color_table_parameteriv_reply_t *_aux = (xcb_glx_get_color_table_parameteriv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_color_table_parameteriv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10415,6 +12178,7 @@ xcb_glx_get_color_table_parameteriv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10457,6 +12221,7 @@ xcb_glx_get_color_table_parameteriv_unchecked (xcb_connection_t *c /**< */ xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10533,6 +12298,35 @@ xcb_glx_get_color_table_parameteriv_reply (xcb_connection_t return (xcb_glx_get_color_table_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_convolution_filter_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_convolution_filter_reply_t *_aux = (xcb_glx_get_convolution_filter_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_convolution_filter_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10577,6 +12371,7 @@ xcb_glx_get_convolution_filter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10625,6 +12420,7 @@ xcb_glx_get_convolution_filter_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10701,6 +12497,35 @@ xcb_glx_get_convolution_filter_reply (xcb_connection_t * return (xcb_glx_get_convolution_filter_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_convolution_parameterfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_convolution_parameterfv_reply_t *_aux = (xcb_glx_get_convolution_parameterfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_convolution_parameterfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10739,6 +12564,7 @@ xcb_glx_get_convolution_parameterfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10781,6 +12607,7 @@ xcb_glx_get_convolution_parameterfv_unchecked (xcb_connection_t *c /**< */ xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10857,6 +12684,35 @@ xcb_glx_get_convolution_parameterfv_reply (xcb_connection_t return (xcb_glx_get_convolution_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_convolution_parameteriv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_convolution_parameteriv_reply_t *_aux = (xcb_glx_get_convolution_parameteriv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_convolution_parameteriv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10895,6 +12751,7 @@ xcb_glx_get_convolution_parameteriv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10937,6 +12794,7 @@ xcb_glx_get_convolution_parameteriv_unchecked (xcb_connection_t *c /**< */ xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11013,6 +12871,35 @@ xcb_glx_get_convolution_parameteriv_reply (xcb_connection_t return (xcb_glx_get_convolution_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_separable_filter_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_separable_filter_reply_t *_aux = (xcb_glx_get_separable_filter_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_separable_filter_reply_t); + xcb_tmp += xcb_block_len; + /* rows_and_cols */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11057,6 +12944,7 @@ xcb_glx_get_separable_filter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11105,6 +12993,7 @@ xcb_glx_get_separable_filter_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11181,6 +13070,35 @@ xcb_glx_get_separable_filter_reply (xcb_connection_t *c / return (xcb_glx_get_separable_filter_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_histogram_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_histogram_reply_t *_aux = (xcb_glx_get_histogram_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_histogram_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11228,6 +13146,7 @@ xcb_glx_get_histogram (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11279,6 +13198,7 @@ xcb_glx_get_histogram_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11355,6 +13275,35 @@ xcb_glx_get_histogram_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_histogram_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_histogram_parameterfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_histogram_parameterfv_reply_t *_aux = (xcb_glx_get_histogram_parameterfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_histogram_parameterfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11393,6 +13342,7 @@ xcb_glx_get_histogram_parameterfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11435,6 +13385,7 @@ xcb_glx_get_histogram_parameterfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11511,6 +13462,35 @@ xcb_glx_get_histogram_parameterfv_reply (xcb_connection_t return (xcb_glx_get_histogram_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_histogram_parameteriv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_histogram_parameteriv_reply_t *_aux = (xcb_glx_get_histogram_parameteriv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_histogram_parameteriv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11549,6 +13529,7 @@ xcb_glx_get_histogram_parameteriv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11591,6 +13572,7 @@ xcb_glx_get_histogram_parameteriv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11667,6 +13649,35 @@ xcb_glx_get_histogram_parameteriv_reply (xcb_connection_t return (xcb_glx_get_histogram_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_minmax_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_minmax_reply_t *_aux = (xcb_glx_get_minmax_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_minmax_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11714,6 +13725,7 @@ xcb_glx_get_minmax (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11765,6 +13777,7 @@ xcb_glx_get_minmax_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11841,6 +13854,35 @@ xcb_glx_get_minmax_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_minmax_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_minmax_parameterfv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_minmax_parameterfv_reply_t *_aux = (xcb_glx_get_minmax_parameterfv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_minmax_parameterfv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(xcb_glx_float32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_glx_float32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11879,6 +13921,7 @@ xcb_glx_get_minmax_parameterfv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11921,6 +13964,7 @@ xcb_glx_get_minmax_parameterfv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11997,6 +14041,35 @@ xcb_glx_get_minmax_parameterfv_reply (xcb_connection_t * return (xcb_glx_get_minmax_parameterfv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_minmax_parameteriv_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_minmax_parameteriv_reply_t *_aux = (xcb_glx_get_minmax_parameteriv_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_minmax_parameteriv_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12035,6 +14108,7 @@ xcb_glx_get_minmax_parameteriv (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12077,6 +14151,7 @@ xcb_glx_get_minmax_parameteriv_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12153,6 +14228,35 @@ xcb_glx_get_minmax_parameteriv_reply (xcb_connection_t * return (xcb_glx_get_minmax_parameteriv_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_compressed_tex_image_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_compressed_tex_image_arb_reply_t *_aux = (xcb_glx_get_compressed_tex_image_arb_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_compressed_tex_image_arb_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12191,6 +14295,7 @@ xcb_glx_get_compressed_tex_image_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12233,6 +14338,7 @@ xcb_glx_get_compressed_tex_image_arb_unchecked (xcb_connection_t *c /**< * xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12309,6 +14415,35 @@ xcb_glx_get_compressed_tex_image_arb_reply (xcb_connection_t return (xcb_glx_get_compressed_tex_image_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_delete_queries_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_delete_queries_arb_request_t *_aux = (xcb_glx_delete_queries_arb_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_delete_queries_arb_request_t); + xcb_tmp += xcb_block_len; + /* ids */ + xcb_block_len += _aux->n * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12346,10 +14481,12 @@ xcb_glx_delete_queries_arb_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t ids */ xcb_parts[4].iov_base = (char *) ids; xcb_parts[4].iov_len = n * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12391,14 +14528,45 @@ xcb_glx_delete_queries_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t ids */ xcb_parts[4].iov_base = (char *) ids; xcb_parts[4].iov_len = n * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_glx_gen_queries_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_gen_queries_arb_reply_t *_aux = (xcb_glx_gen_queries_arb_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_gen_queries_arb_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->length * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12434,6 +14602,7 @@ xcb_glx_gen_queries_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12473,6 +14642,7 @@ xcb_glx_gen_queries_arb_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12584,6 +14754,7 @@ xcb_glx_is_query_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12623,6 +14794,7 @@ xcb_glx_is_query_arb_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12647,6 +14819,35 @@ xcb_glx_is_query_arb_reply (xcb_connection_t *c /**< */, return (xcb_glx_is_query_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_queryiv_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_queryiv_arb_reply_t *_aux = (xcb_glx_get_queryiv_arb_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_queryiv_arb_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12685,6 +14886,7 @@ xcb_glx_get_queryiv_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12727,6 +14929,7 @@ xcb_glx_get_queryiv_arb_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12803,6 +15006,35 @@ xcb_glx_get_queryiv_arb_reply (xcb_connection_t *c /**< */, return (xcb_glx_get_queryiv_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_query_objectiv_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_query_objectiv_arb_reply_t *_aux = (xcb_glx_get_query_objectiv_arb_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_query_objectiv_arb_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12841,6 +15073,7 @@ xcb_glx_get_query_objectiv_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12883,6 +15116,7 @@ xcb_glx_get_query_objectiv_arb_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12959,6 +15193,35 @@ xcb_glx_get_query_objectiv_arb_reply (xcb_connection_t * return (xcb_glx_get_query_objectiv_arb_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_glx_get_query_objectuiv_arb_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_glx_get_query_objectuiv_arb_reply_t *_aux = (xcb_glx_get_query_objectuiv_arb_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_glx_get_query_objectuiv_arb_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->n * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12997,6 +15260,7 @@ xcb_glx_get_query_objectuiv_arb (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13039,6 +15303,7 @@ xcb_glx_get_query_objectuiv_arb_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/glx.h b/lib/libxcb/src/glx.h index 78f2a7357..061dd556b 100644 --- a/lib/libxcb/src/glx.h +++ b/lib/libxcb/src/glx.h @@ -3526,8 +3526,12 @@ xcb_glx_context_tag_next (xcb_glx_context_tag_iterator_t *i /**< */); xcb_generic_iterator_t xcb_glx_context_tag_end (xcb_glx_context_tag_iterator_t i /**< */); +int +xcb_glx_render_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3557,7 +3561,7 @@ xcb_glx_render_checked (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3583,8 +3587,11 @@ xcb_glx_render (xcb_connection_t *c /**< */, uint32_t data_len /**< */, const uint8_t *data /**< */); +int +xcb_glx_render_large_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3618,7 +3625,7 @@ xcb_glx_render_large_checked (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3649,7 +3656,7 @@ xcb_glx_render_large (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3683,7 +3690,7 @@ xcb_glx_create_context_checked (xcb_connection_t *c /**< */, uint8_t is_direct /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3714,7 +3721,7 @@ xcb_glx_create_context (xcb_connection_t *c /**< */, uint8_t is_direct /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3740,7 +3747,7 @@ xcb_glx_destroy_context_checked (xcb_connection_t *c /**< */, xcb_glx_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3763,7 +3770,7 @@ xcb_glx_destroy_context (xcb_connection_t *c /**< */, xcb_glx_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3790,7 +3797,7 @@ xcb_glx_make_current (xcb_connection_t *c /**< */, xcb_glx_context_tag_t old_context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3851,7 +3858,7 @@ xcb_glx_make_current_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3874,7 +3881,7 @@ xcb_glx_is_direct (xcb_connection_t *c /**< */, xcb_glx_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3931,7 +3938,7 @@ xcb_glx_is_direct_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3956,7 +3963,7 @@ xcb_glx_query_version (xcb_connection_t *c /**< */, uint32_t minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4015,7 +4022,7 @@ xcb_glx_query_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4041,7 +4048,7 @@ xcb_glx_wait_gl_checked (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4064,7 +4071,7 @@ xcb_glx_wait_gl (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4090,7 +4097,7 @@ xcb_glx_wait_x_checked (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4113,7 +4120,7 @@ xcb_glx_wait_x (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4145,7 +4152,7 @@ xcb_glx_copy_context_checked (xcb_connection_t *c /**< */, xcb_glx_context_tag_t src_context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4174,7 +4181,7 @@ xcb_glx_copy_context (xcb_connection_t *c /**< */, xcb_glx_context_tag_t src_context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4202,7 +4209,7 @@ xcb_glx_swap_buffers_checked (xcb_connection_t *c /**< */, xcb_glx_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4227,7 +4234,7 @@ xcb_glx_swap_buffers (xcb_connection_t *c /**< */, xcb_glx_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4261,7 +4268,7 @@ xcb_glx_use_x_font_checked (xcb_connection_t *c /**< */, uint32_t list_base /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4292,7 +4299,7 @@ xcb_glx_use_x_font (xcb_connection_t *c /**< */, uint32_t list_base /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4324,7 +4331,7 @@ xcb_glx_create_glx_pixmap_checked (xcb_connection_t *c /**< */, xcb_glx_pixmap_t glx_pixmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4352,8 +4359,11 @@ xcb_glx_create_glx_pixmap (xcb_connection_t *c /**< */, xcb_pixmap_t pixmap /**< */, xcb_glx_pixmap_t glx_pixmap /**< */); +int +xcb_glx_get_visual_configs_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4376,7 +4386,7 @@ xcb_glx_get_visual_configs (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4472,7 +4482,7 @@ xcb_glx_get_visual_configs_reply (xcb_connection_t *c /**< xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4498,7 +4508,7 @@ xcb_glx_destroy_glx_pixmap_checked (xcb_connection_t *c /**< */, xcb_glx_pixmap_t glx_pixmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4520,8 +4530,12 @@ xcb_void_cookie_t xcb_glx_destroy_glx_pixmap (xcb_connection_t *c /**< */, xcb_glx_pixmap_t glx_pixmap /**< */); +int +xcb_glx_vendor_private_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4553,7 +4567,7 @@ xcb_glx_vendor_private_checked (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4581,8 +4595,12 @@ xcb_glx_vendor_private (xcb_connection_t *c /**< */, uint32_t data_len /**< */, const uint8_t *data /**< */); +int +xcb_glx_vendor_private_with_reply_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4611,7 +4629,7 @@ xcb_glx_vendor_private_with_reply (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4713,7 +4731,7 @@ xcb_glx_vendor_private_with_reply_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4736,7 +4754,7 @@ xcb_glx_query_extensions_string (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4792,8 +4810,11 @@ xcb_glx_query_extensions_string_reply (xcb_connection_t xcb_glx_query_extensions_string_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_query_server_string_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4818,7 +4839,7 @@ xcb_glx_query_server_string (xcb_connection_t *c /**< */, uint32_t name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4915,8 +4936,11 @@ xcb_glx_query_server_string_reply (xcb_connection_t *c /** xcb_glx_query_server_string_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_client_info_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4948,7 +4972,7 @@ xcb_glx_client_info_checked (xcb_connection_t *c /**< */, const char *string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4976,8 +5000,11 @@ xcb_glx_client_info (xcb_connection_t *c /**< */, uint32_t str_len /**< */, const char *string /**< */); +int +xcb_glx_get_fb_configs_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5000,7 +5027,7 @@ xcb_glx_get_fb_configs (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5095,8 +5122,11 @@ xcb_glx_get_fb_configs_reply (xcb_connection_t *c /**< */, xcb_glx_get_fb_configs_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_create_pixmap_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5132,7 +5162,7 @@ xcb_glx_create_pixmap_checked (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5165,7 +5195,7 @@ xcb_glx_create_pixmap (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5191,7 +5221,7 @@ xcb_glx_destroy_pixmap_checked (xcb_connection_t *c /**< */, xcb_glx_pixmap_t glx_pixmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5214,7 +5244,7 @@ xcb_glx_destroy_pixmap (xcb_connection_t *c /**< */, xcb_glx_pixmap_t glx_pixmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5250,7 +5280,7 @@ xcb_glx_create_new_context_checked (xcb_connection_t *c /**< */, uint8_t is_direct /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5282,8 +5312,11 @@ xcb_glx_create_new_context (xcb_connection_t *c /**< */, xcb_glx_context_t share_list /**< */, uint8_t is_direct /**< */); +int +xcb_glx_query_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5306,7 +5339,7 @@ xcb_glx_query_context (xcb_connection_t *c /**< */, xcb_glx_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5402,7 +5435,7 @@ xcb_glx_query_context_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5431,7 +5464,7 @@ xcb_glx_make_context_current (xcb_connection_t *c /**< */, xcb_glx_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5493,8 +5526,11 @@ xcb_glx_make_context_current_reply (xcb_connection_t *c / xcb_glx_make_context_current_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_create_pbuffer_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5528,7 +5564,7 @@ xcb_glx_create_pbuffer_checked (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5559,7 +5595,7 @@ xcb_glx_create_pbuffer (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5585,7 +5621,7 @@ xcb_glx_destroy_pbuffer_checked (xcb_connection_t *c /**< */, xcb_glx_pbuffer_t pbuffer /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5607,8 +5643,11 @@ xcb_void_cookie_t xcb_glx_destroy_pbuffer (xcb_connection_t *c /**< */, xcb_glx_pbuffer_t pbuffer /**< */); +int +xcb_glx_get_drawable_attributes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5631,7 +5670,7 @@ xcb_glx_get_drawable_attributes (xcb_connection_t *c /**< */, xcb_glx_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5726,8 +5765,11 @@ xcb_glx_get_drawable_attributes_reply (xcb_connection_t xcb_glx_get_drawable_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_change_drawable_attributes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5757,7 +5799,7 @@ xcb_glx_change_drawable_attributes_checked (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5783,8 +5825,11 @@ xcb_glx_change_drawable_attributes (xcb_connection_t *c /**< */, uint32_t num_attribs /**< */, const uint32_t *attribs /**< */); +int +xcb_glx_create_window_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5820,7 +5865,7 @@ xcb_glx_create_window_checked (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5853,7 +5898,7 @@ xcb_glx_create_window (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5879,7 +5924,7 @@ xcb_glx_delete_window_checked (xcb_connection_t *c /**< */, xcb_glx_window_t glxwindow /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5901,8 +5946,11 @@ xcb_void_cookie_t xcb_glx_delete_window (xcb_connection_t *c /**< */, xcb_glx_window_t glxwindow /**< */); +int +xcb_glx_set_client_info_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5942,7 +5990,7 @@ xcb_glx_set_client_info_arb_checked (xcb_connection_t *c /**< */, const char *glx_extension_string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5978,8 +6026,11 @@ xcb_glx_set_client_info_arb (xcb_connection_t *c /**< */, const char *gl_extension_string /**< */, const char *glx_extension_string /**< */); +int +xcb_glx_create_context_attribs_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6017,7 +6068,7 @@ xcb_glx_create_context_attribs_arb_checked (xcb_connection_t *c /**< */, const uint32_t *attribs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6051,8 +6102,11 @@ xcb_glx_create_context_attribs_arb (xcb_connection_t *c /**< */, uint32_t num_attribs /**< */, const uint32_t *attribs /**< */); +int +xcb_glx_set_client_info_2arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6092,7 +6146,7 @@ xcb_glx_set_client_info_2arb_checked (xcb_connection_t *c /**< */, const char *glx_extension_string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6129,7 +6183,7 @@ xcb_glx_set_client_info_2arb (xcb_connection_t *c /**< */, const char *glx_extension_string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6159,7 +6213,7 @@ xcb_glx_new_list_checked (xcb_connection_t *c /**< */, uint32_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6186,7 +6240,7 @@ xcb_glx_new_list (xcb_connection_t *c /**< */, uint32_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6212,7 +6266,7 @@ xcb_glx_end_list_checked (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6235,7 +6289,7 @@ xcb_glx_end_list (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6265,7 +6319,7 @@ xcb_glx_delete_lists_checked (xcb_connection_t *c /**< */, int32_t range /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6292,7 +6346,7 @@ xcb_glx_delete_lists (xcb_connection_t *c /**< */, int32_t range /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6317,7 +6371,7 @@ xcb_glx_gen_lists (xcb_connection_t *c /**< */, int32_t range /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6376,7 +6430,7 @@ xcb_glx_gen_lists_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6406,7 +6460,7 @@ xcb_glx_feedback_buffer_checked (xcb_connection_t *c /**< */, int32_t type /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6433,7 +6487,7 @@ xcb_glx_feedback_buffer (xcb_connection_t *c /**< */, int32_t type /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6461,7 +6515,7 @@ xcb_glx_select_buffer_checked (xcb_connection_t *c /**< */, int32_t size /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6485,8 +6539,11 @@ xcb_glx_select_buffer (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */, int32_t size /**< */); +int +xcb_glx_render_mode_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6511,7 +6568,7 @@ xcb_glx_render_mode (xcb_connection_t *c /**< */, uint32_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6609,7 +6666,7 @@ xcb_glx_render_mode_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6632,7 +6689,7 @@ xcb_glx_finish (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6689,7 +6746,7 @@ xcb_glx_finish_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6719,7 +6776,7 @@ xcb_glx_pixel_storef_checked (xcb_connection_t *c /**< */, xcb_glx_float32_t datum /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6746,7 +6803,7 @@ xcb_glx_pixel_storef (xcb_connection_t *c /**< */, xcb_glx_float32_t datum /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6776,7 +6833,7 @@ xcb_glx_pixel_storei_checked (xcb_connection_t *c /**< */, int32_t datum /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6802,8 +6859,11 @@ xcb_glx_pixel_storei (xcb_connection_t *c /**< */, uint32_t pname /**< */, int32_t datum /**< */); +int +xcb_glx_read_pixels_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6842,7 +6902,7 @@ xcb_glx_read_pixels (xcb_connection_t *c /**< */, uint8_t lsb_first /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6953,8 +7013,11 @@ xcb_glx_read_pixels_reply (xcb_connection_t *c /**< */, xcb_glx_read_pixels_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_booleanv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6979,7 +7042,7 @@ xcb_glx_get_booleanv (xcb_connection_t *c /**< */, int32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7076,8 +7139,11 @@ xcb_glx_get_booleanv_reply (xcb_connection_t *c /**< */, xcb_glx_get_booleanv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_clip_plane_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7102,7 +7168,7 @@ xcb_glx_get_clip_plane (xcb_connection_t *c /**< */, int32_t plane /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7199,8 +7265,11 @@ xcb_glx_get_clip_plane_reply (xcb_connection_t *c /**< */, xcb_glx_get_clip_plane_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_doublev_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7225,7 +7294,7 @@ xcb_glx_get_doublev (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7323,7 +7392,7 @@ xcb_glx_get_doublev_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7346,7 +7415,7 @@ xcb_glx_get_error (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7402,8 +7471,11 @@ xcb_glx_get_error_reply (xcb_connection_t *c /**< */, xcb_glx_get_error_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_floatv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7428,7 +7500,7 @@ xcb_glx_get_floatv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7525,8 +7597,11 @@ xcb_glx_get_floatv_reply (xcb_connection_t *c /**< */, xcb_glx_get_floatv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_integerv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7551,7 +7626,7 @@ xcb_glx_get_integerv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7648,8 +7723,11 @@ xcb_glx_get_integerv_reply (xcb_connection_t *c /**< */, xcb_glx_get_integerv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_lightfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7676,7 +7754,7 @@ xcb_glx_get_lightfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7775,8 +7853,11 @@ xcb_glx_get_lightfv_reply (xcb_connection_t *c /**< */, xcb_glx_get_lightfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_lightiv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7803,7 +7884,7 @@ xcb_glx_get_lightiv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7902,8 +7983,11 @@ xcb_glx_get_lightiv_reply (xcb_connection_t *c /**< */, xcb_glx_get_lightiv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_mapdv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7930,7 +8014,7 @@ xcb_glx_get_mapdv (xcb_connection_t *c /**< */, uint32_t query /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8029,8 +8113,11 @@ xcb_glx_get_mapdv_reply (xcb_connection_t *c /**< */, xcb_glx_get_mapdv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_mapfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8057,7 +8144,7 @@ xcb_glx_get_mapfv (xcb_connection_t *c /**< */, uint32_t query /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8156,8 +8243,11 @@ xcb_glx_get_mapfv_reply (xcb_connection_t *c /**< */, xcb_glx_get_mapfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_mapiv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8184,7 +8274,7 @@ xcb_glx_get_mapiv (xcb_connection_t *c /**< */, uint32_t query /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8283,8 +8373,11 @@ xcb_glx_get_mapiv_reply (xcb_connection_t *c /**< */, xcb_glx_get_mapiv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_materialfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8311,7 +8404,7 @@ xcb_glx_get_materialfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8410,8 +8503,11 @@ xcb_glx_get_materialfv_reply (xcb_connection_t *c /**< */, xcb_glx_get_materialfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_materialiv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8438,7 +8534,7 @@ xcb_glx_get_materialiv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8537,8 +8633,11 @@ xcb_glx_get_materialiv_reply (xcb_connection_t *c /**< */, xcb_glx_get_materialiv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_pixel_mapfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8563,7 +8662,7 @@ xcb_glx_get_pixel_mapfv (xcb_connection_t *c /**< */, uint32_t map /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8660,8 +8759,11 @@ xcb_glx_get_pixel_mapfv_reply (xcb_connection_t *c /**< */, xcb_glx_get_pixel_mapfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_pixel_mapuiv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8686,7 +8788,7 @@ xcb_glx_get_pixel_mapuiv (xcb_connection_t *c /**< */, uint32_t map /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8783,8 +8885,11 @@ xcb_glx_get_pixel_mapuiv_reply (xcb_connection_t *c /**< */, xcb_glx_get_pixel_mapuiv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_pixel_mapusv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8809,7 +8914,7 @@ xcb_glx_get_pixel_mapusv (xcb_connection_t *c /**< */, uint32_t map /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8906,8 +9011,11 @@ xcb_glx_get_pixel_mapusv_reply (xcb_connection_t *c /**< */, xcb_glx_get_pixel_mapusv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_polygon_stipple_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8932,7 +9040,7 @@ xcb_glx_get_polygon_stipple (xcb_connection_t *c /**< */, uint8_t lsb_first /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9029,8 +9137,11 @@ xcb_glx_get_polygon_stipple_reply (xcb_connection_t *c /** xcb_glx_get_polygon_stipple_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_string_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9055,7 +9166,7 @@ xcb_glx_get_string (xcb_connection_t *c /**< */, uint32_t name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9152,8 +9263,11 @@ xcb_glx_get_string_reply (xcb_connection_t *c /**< */, xcb_glx_get_string_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_envfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9180,7 +9294,7 @@ xcb_glx_get_tex_envfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9279,8 +9393,11 @@ xcb_glx_get_tex_envfv_reply (xcb_connection_t *c /**< */, xcb_glx_get_tex_envfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_enviv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9307,7 +9424,7 @@ xcb_glx_get_tex_enviv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9406,8 +9523,11 @@ xcb_glx_get_tex_enviv_reply (xcb_connection_t *c /**< */, xcb_glx_get_tex_enviv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_gendv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9434,7 +9554,7 @@ xcb_glx_get_tex_gendv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9533,8 +9653,11 @@ xcb_glx_get_tex_gendv_reply (xcb_connection_t *c /**< */, xcb_glx_get_tex_gendv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_genfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9561,7 +9684,7 @@ xcb_glx_get_tex_genfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9660,8 +9783,11 @@ xcb_glx_get_tex_genfv_reply (xcb_connection_t *c /**< */, xcb_glx_get_tex_genfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_geniv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9688,7 +9814,7 @@ xcb_glx_get_tex_geniv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9787,8 +9913,11 @@ xcb_glx_get_tex_geniv_reply (xcb_connection_t *c /**< */, xcb_glx_get_tex_geniv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_image_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9821,7 +9950,7 @@ xcb_glx_get_tex_image (xcb_connection_t *c /**< */, uint8_t swap_bytes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9926,8 +10055,11 @@ xcb_glx_get_tex_image_reply (xcb_connection_t *c /**< */, xcb_glx_get_tex_image_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_parameterfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9954,7 +10086,7 @@ xcb_glx_get_tex_parameterfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10053,8 +10185,11 @@ xcb_glx_get_tex_parameterfv_reply (xcb_connection_t *c /** xcb_glx_get_tex_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_parameteriv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10081,7 +10216,7 @@ xcb_glx_get_tex_parameteriv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10180,8 +10315,11 @@ xcb_glx_get_tex_parameteriv_reply (xcb_connection_t *c /** xcb_glx_get_tex_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_level_parameterfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10210,7 +10348,7 @@ xcb_glx_get_tex_level_parameterfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10311,8 +10449,11 @@ xcb_glx_get_tex_level_parameterfv_reply (xcb_connection_t xcb_glx_get_tex_level_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_tex_level_parameteriv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10341,7 +10482,7 @@ xcb_glx_get_tex_level_parameteriv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10443,7 +10584,7 @@ xcb_glx_get_tex_level_parameteriv_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10468,7 +10609,7 @@ xcb_glx_is_list (xcb_connection_t *c /**< */, uint32_t list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10527,7 +10668,7 @@ xcb_glx_is_list_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10553,7 +10694,7 @@ xcb_glx_flush_checked (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10575,8 +10716,11 @@ xcb_void_cookie_t xcb_glx_flush (xcb_connection_t *c /**< */, xcb_glx_context_tag_t context_tag /**< */); +int +xcb_glx_are_textures_resident_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10603,7 +10747,7 @@ xcb_glx_are_textures_resident (xcb_connection_t *c /**< */, const uint32_t *textures /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10702,8 +10846,11 @@ xcb_glx_are_textures_resident_reply (xcb_connection_t *c xcb_glx_are_textures_resident_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_delete_textures_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10733,7 +10880,7 @@ xcb_glx_delete_textures_checked (xcb_connection_t *c /**< */, const uint32_t *textures /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10759,8 +10906,11 @@ xcb_glx_delete_textures (xcb_connection_t *c /**< */, int32_t n /**< */, const uint32_t *textures /**< */); +int +xcb_glx_gen_textures_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10785,7 +10935,7 @@ xcb_glx_gen_textures (xcb_connection_t *c /**< */, int32_t n /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10883,7 +11033,7 @@ xcb_glx_gen_textures_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10908,7 +11058,7 @@ xcb_glx_is_texture (xcb_connection_t *c /**< */, uint32_t texture /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10966,8 +11116,11 @@ xcb_glx_is_texture_reply (xcb_connection_t *c /**< */, xcb_glx_is_texture_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_color_table_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10998,7 +11151,7 @@ xcb_glx_get_color_table (xcb_connection_t *c /**< */, uint8_t swap_bytes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11101,8 +11254,11 @@ xcb_glx_get_color_table_reply (xcb_connection_t *c /**< */, xcb_glx_get_color_table_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_color_table_parameterfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11129,7 +11285,7 @@ xcb_glx_get_color_table_parameterfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11228,8 +11384,11 @@ xcb_glx_get_color_table_parameterfv_reply (xcb_connection_t xcb_glx_get_color_table_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_color_table_parameteriv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11256,7 +11415,7 @@ xcb_glx_get_color_table_parameteriv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11355,8 +11514,11 @@ xcb_glx_get_color_table_parameteriv_reply (xcb_connection_t xcb_glx_get_color_table_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_convolution_filter_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11387,7 +11549,7 @@ xcb_glx_get_convolution_filter (xcb_connection_t *c /**< */, uint8_t swap_bytes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11490,8 +11652,11 @@ xcb_glx_get_convolution_filter_reply (xcb_connection_t * xcb_glx_get_convolution_filter_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_convolution_parameterfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11518,7 +11683,7 @@ xcb_glx_get_convolution_parameterfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11617,8 +11782,11 @@ xcb_glx_get_convolution_parameterfv_reply (xcb_connection_t xcb_glx_get_convolution_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_convolution_parameteriv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11645,7 +11813,7 @@ xcb_glx_get_convolution_parameteriv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11744,8 +11912,11 @@ xcb_glx_get_convolution_parameteriv_reply (xcb_connection_t xcb_glx_get_convolution_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_separable_filter_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11776,7 +11947,7 @@ xcb_glx_get_separable_filter (xcb_connection_t *c /**< */, uint8_t swap_bytes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11879,8 +12050,11 @@ xcb_glx_get_separable_filter_reply (xcb_connection_t *c / xcb_glx_get_separable_filter_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_histogram_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11913,7 +12087,7 @@ xcb_glx_get_histogram (xcb_connection_t *c /**< */, uint8_t reset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12018,8 +12192,11 @@ xcb_glx_get_histogram_reply (xcb_connection_t *c /**< */, xcb_glx_get_histogram_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_histogram_parameterfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12046,7 +12223,7 @@ xcb_glx_get_histogram_parameterfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12145,8 +12322,11 @@ xcb_glx_get_histogram_parameterfv_reply (xcb_connection_t xcb_glx_get_histogram_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_histogram_parameteriv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12173,7 +12353,7 @@ xcb_glx_get_histogram_parameteriv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12272,8 +12452,11 @@ xcb_glx_get_histogram_parameteriv_reply (xcb_connection_t xcb_glx_get_histogram_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_minmax_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12306,7 +12489,7 @@ xcb_glx_get_minmax (xcb_connection_t *c /**< */, uint8_t reset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12411,8 +12594,11 @@ xcb_glx_get_minmax_reply (xcb_connection_t *c /**< */, xcb_glx_get_minmax_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_minmax_parameterfv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12439,7 +12625,7 @@ xcb_glx_get_minmax_parameterfv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12538,8 +12724,11 @@ xcb_glx_get_minmax_parameterfv_reply (xcb_connection_t * xcb_glx_get_minmax_parameterfv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_minmax_parameteriv_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12566,7 +12755,7 @@ xcb_glx_get_minmax_parameteriv (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12665,8 +12854,11 @@ xcb_glx_get_minmax_parameteriv_reply (xcb_connection_t * xcb_glx_get_minmax_parameteriv_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_compressed_tex_image_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12693,7 +12885,7 @@ xcb_glx_get_compressed_tex_image_arb (xcb_connection_t *c /**< */, int32_t level /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12792,8 +12984,11 @@ xcb_glx_get_compressed_tex_image_arb_reply (xcb_connection_t xcb_glx_get_compressed_tex_image_arb_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_delete_queries_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12823,7 +13018,7 @@ xcb_glx_delete_queries_arb_checked (xcb_connection_t *c /**< */, const uint32_t *ids /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12849,8 +13044,11 @@ xcb_glx_delete_queries_arb (xcb_connection_t *c /**< */, int32_t n /**< */, const uint32_t *ids /**< */); +int +xcb_glx_gen_queries_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12875,7 +13073,7 @@ xcb_glx_gen_queries_arb (xcb_connection_t *c /**< */, int32_t n /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12973,7 +13171,7 @@ xcb_glx_gen_queries_arb_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12998,7 +13196,7 @@ xcb_glx_is_query_arb (xcb_connection_t *c /**< */, uint32_t id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13056,8 +13254,11 @@ xcb_glx_is_query_arb_reply (xcb_connection_t *c /**< */, xcb_glx_is_query_arb_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_queryiv_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13084,7 +13285,7 @@ xcb_glx_get_queryiv_arb (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13183,8 +13384,11 @@ xcb_glx_get_queryiv_arb_reply (xcb_connection_t *c /**< */, xcb_glx_get_queryiv_arb_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_query_objectiv_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13211,7 +13415,7 @@ xcb_glx_get_query_objectiv_arb (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13310,8 +13514,11 @@ xcb_glx_get_query_objectiv_arb_reply (xcb_connection_t * xcb_glx_get_query_objectiv_arb_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_glx_get_query_objectuiv_arb_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13338,7 +13545,7 @@ xcb_glx_get_query_objectuiv_arb (xcb_connection_t *c /**< */, uint32_t pname /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/randr.c b/lib/libxcb/src/randr.c index 1956ee033..0232af802 100644 --- a/lib/libxcb/src/randr.c +++ b/lib/libxcb/src/randr.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "randr.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" #include "render.h" @@ -164,6 +171,35 @@ xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i /**< */) return ret; } +int +xcb_randr_refresh_rates_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_refresh_rates_t *_aux = (xcb_randr_refresh_rates_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_refresh_rates_t); + xcb_tmp += xcb_block_len; + /* rates */ + xcb_block_len += _aux->nRates * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -230,10 +266,11 @@ void xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i /**< */) { xcb_randr_refresh_rates_t *R = i->data; - xcb_generic_iterator_t child = xcb_randr_refresh_rates_rates_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_randr_refresh_rates_t *)(((char *)R) + xcb_randr_refresh_rates_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_randr_refresh_rates_t *) child.data; - i->index = child.index; } @@ -293,6 +330,7 @@ xcb_randr_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -332,6 +370,7 @@ xcb_randr_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -404,6 +443,7 @@ xcb_randr_set_screen_config (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -456,6 +496,7 @@ xcb_randr_set_screen_config_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -516,6 +557,7 @@ xcb_randr_select_input_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -556,10 +598,57 @@ xcb_randr_select_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_randr_get_screen_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_screen_info_reply_t *_aux = (xcb_randr_get_screen_info_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_randr_get_screen_info_reply_t); + xcb_tmp += xcb_block_len; + /* sizes */ + xcb_block_len += _aux->nSizes * sizeof(xcb_randr_screen_size_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_screen_size_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* rates */ + for(i=0; i<(_aux->nInfo - _aux->nSizes); i++) { + xcb_tmp_len = xcb_randr_refresh_rates_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_randr_refresh_rates_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -592,6 +681,7 @@ xcb_randr_get_screen_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -628,6 +718,7 @@ xcb_randr_get_screen_info_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -773,6 +864,7 @@ xcb_randr_get_screen_size_range (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -809,6 +901,7 @@ xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -877,6 +970,7 @@ xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -925,6 +1019,7 @@ xcb_randr_set_screen_size (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -967,6 +1062,71 @@ xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i /**< */) return ret; } +int +xcb_randr_get_screen_resources_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_screen_resources_reply_t *_aux = (xcb_randr_get_screen_resources_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_get_screen_resources_reply_t); + xcb_tmp += xcb_block_len; + /* crtcs */ + xcb_block_len += _aux->num_crtcs * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_crtc_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* outputs */ + xcb_block_len += _aux->num_outputs * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_output_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* modes */ + xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_mode_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* names */ + xcb_block_len += _aux->names_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -999,6 +1159,7 @@ xcb_randr_get_screen_resources (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1035,6 +1196,7 @@ xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1273,6 +1435,71 @@ xcb_randr_get_screen_resources_reply (xcb_connection_t * return (xcb_randr_get_screen_resources_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_get_output_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_output_info_reply_t *_aux = (xcb_randr_get_output_info_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_get_output_info_reply_t); + xcb_tmp += xcb_block_len; + /* crtcs */ + xcb_block_len += _aux->num_crtcs * sizeof(xcb_randr_output_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_crtc_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* modes */ + xcb_block_len += _aux->num_modes * sizeof(xcb_randr_output_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_mode_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* clones */ + xcb_block_len += _aux->num_clones * sizeof(xcb_randr_output_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_output_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* name */ + xcb_block_len += _aux->name_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1308,6 +1535,7 @@ xcb_randr_get_output_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1347,6 +1575,7 @@ xcb_randr_get_output_info_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1585,6 +1814,35 @@ xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */ return (xcb_randr_get_output_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_list_output_properties_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_list_output_properties_reply_t *_aux = (xcb_randr_list_output_properties_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_list_output_properties_reply_t); + xcb_tmp += xcb_block_len; + /* atoms */ + xcb_block_len += _aux->num_atoms * sizeof(xcb_atom_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_atom_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1617,6 +1875,7 @@ xcb_randr_list_output_properties (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1653,6 +1912,7 @@ xcb_randr_list_output_properties_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1729,6 +1989,35 @@ xcb_randr_list_output_properties_reply (xcb_connection_t return (xcb_randr_list_output_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_query_output_property_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_query_output_property_reply_t *_aux = (xcb_randr_query_output_property_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_query_output_property_reply_t); + xcb_tmp += xcb_block_len; + /* validValues */ + xcb_block_len += _aux->length * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1764,6 +2053,7 @@ xcb_randr_query_output_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1803,6 +2093,7 @@ xcb_randr_query_output_property_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1879,6 +2170,35 @@ xcb_randr_query_output_property_reply (xcb_connection_t return (xcb_randr_query_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_configure_output_property_sizeof (const void *_buffer /**< */, + uint32_t values_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_configure_output_property_request_t); + xcb_tmp += xcb_block_len; + /* values */ + xcb_block_len += values_len * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1925,10 +2245,12 @@ xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* int32_t values */ xcb_parts[4].iov_base = (char *) values; xcb_parts[4].iov_len = values_len * sizeof(int32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1979,14 +2301,45 @@ xcb_randr_configure_output_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* int32_t values */ xcb_parts[4].iov_base = (char *) values; xcb_parts[4].iov_len = values_len * sizeof(int32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_randr_change_output_property_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_change_output_property_request_t *_aux = (xcb_randr_change_output_property_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_change_output_property_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += ((_aux->num_units * _aux->format) / 8) * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2037,10 +2390,12 @@ xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* void data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2095,10 +2450,12 @@ xcb_randr_change_output_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* void data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = ((num_units * format) / 8) * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2138,6 +2495,7 @@ xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2177,10 +2535,40 @@ xcb_randr_delete_output_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_randr_get_output_property_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_output_property_reply_t *_aux = (xcb_randr_get_output_property_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_get_output_property_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->num_items * (_aux->format / 8)) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2232,6 +2620,7 @@ xcb_randr_get_output_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2287,6 +2676,7 @@ xcb_randr_get_output_property_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2363,6 +2753,35 @@ xcb_randr_get_output_property_reply (xcb_connection_t *c return (xcb_randr_get_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_create_mode_sizeof (const void *_buffer /**< */, + uint32_t name_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_create_mode_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2402,10 +2821,12 @@ xcb_randr_create_mode (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2449,10 +2870,12 @@ xcb_randr_create_mode_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2509,6 +2932,7 @@ xcb_randr_destroy_mode_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2545,6 +2969,7 @@ xcb_randr_destroy_mode (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2584,6 +3009,7 @@ xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2623,6 +3049,7 @@ xcb_randr_add_output_mode (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2662,6 +3089,7 @@ xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2701,10 +3129,52 @@ xcb_randr_delete_output_mode (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_randr_get_crtc_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_crtc_info_reply_t *_aux = (xcb_randr_get_crtc_info_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_get_crtc_info_reply_t); + xcb_tmp += xcb_block_len; + /* outputs */ + xcb_block_len += _aux->num_outputs * sizeof(xcb_randr_output_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_output_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* possible */ + xcb_block_len += _aux->num_possible_outputs * sizeof(xcb_randr_output_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_output_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2740,6 +3210,7 @@ xcb_randr_get_crtc_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2779,6 +3250,7 @@ xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2909,6 +3381,35 @@ xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */, return (xcb_randr_get_crtc_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_set_crtc_config_sizeof (const void *_buffer /**< */, + uint32_t outputs_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_set_crtc_config_request_t); + xcb_tmp += xcb_block_len; + /* outputs */ + xcb_block_len += outputs_len * sizeof(xcb_randr_output_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_output_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2964,10 +3465,12 @@ xcb_randr_set_crtc_config (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_randr_output_t outputs */ xcb_parts[4].iov_base = (char *) outputs; xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3027,10 +3530,12 @@ xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_randr_output_t outputs */ xcb_parts[4].iov_base = (char *) outputs; xcb_parts[4].iov_len = outputs_len * sizeof(xcb_timestamp_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3087,6 +3592,7 @@ xcb_randr_get_crtc_gamma_size (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3123,6 +3629,7 @@ xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3147,6 +3654,59 @@ xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t *c return (xcb_randr_get_crtc_gamma_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_get_crtc_gamma_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_crtc_gamma_reply_t *_aux = (xcb_randr_get_crtc_gamma_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_get_crtc_gamma_reply_t); + xcb_tmp += xcb_block_len; + /* red */ + xcb_block_len += _aux->size * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* green */ + xcb_block_len += _aux->size * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* blue */ + xcb_block_len += _aux->size * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3179,6 +3739,7 @@ xcb_randr_get_crtc_gamma (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3215,6 +3776,7 @@ xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3399,6 +3961,59 @@ xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */, return (xcb_randr_get_crtc_gamma_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_set_crtc_gamma_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_set_crtc_gamma_request_t *_aux = (xcb_randr_set_crtc_gamma_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_set_crtc_gamma_request_t); + xcb_tmp += xcb_block_len; + /* red */ + xcb_block_len += _aux->size * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* green */ + xcb_block_len += _aux->size * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* blue */ + xcb_block_len += _aux->size * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3441,18 +4056,22 @@ xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint16_t red */ xcb_parts[4].iov_base = (char *) red; xcb_parts[4].iov_len = size * sizeof(uint16_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* uint16_t green */ xcb_parts[6].iov_base = (char *) green; xcb_parts[6].iov_len = size * sizeof(uint16_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* uint16_t blue */ xcb_parts[8].iov_base = (char *) blue; xcb_parts[8].iov_len = size * sizeof(uint16_t); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3499,22 +4118,91 @@ xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint16_t red */ xcb_parts[4].iov_base = (char *) red; xcb_parts[4].iov_len = size * sizeof(uint16_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* uint16_t green */ xcb_parts[6].iov_base = (char *) green; xcb_parts[6].iov_len = size * sizeof(uint16_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* uint16_t blue */ xcb_parts[8].iov_base = (char *) blue; xcb_parts[8].iov_len = size * sizeof(uint16_t); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_randr_get_screen_resources_current_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_screen_resources_current_reply_t *_aux = (xcb_randr_get_screen_resources_current_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_get_screen_resources_current_reply_t); + xcb_tmp += xcb_block_len; + /* crtcs */ + xcb_block_len += _aux->num_crtcs * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_crtc_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* outputs */ + xcb_block_len += _aux->num_outputs * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_output_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* modes */ + xcb_block_len += _aux->num_modes * sizeof(xcb_randr_mode_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_randr_mode_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* names */ + xcb_block_len += _aux->names_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3547,6 +4235,7 @@ xcb_randr_get_screen_resources_current (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3583,6 +4272,7 @@ xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3821,6 +4511,48 @@ xcb_randr_get_screen_resources_current_reply (xcb_connection_t return (xcb_randr_get_screen_resources_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_randr_set_crtc_transform_sizeof (const void *_buffer /**< */, + uint32_t filter_params_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_set_crtc_transform_request_t *_aux = (xcb_randr_set_crtc_transform_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_set_crtc_transform_request_t); + xcb_tmp += xcb_block_len; + /* filter_name */ + xcb_block_len += _aux->filter_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* filter_params */ + xcb_block_len += filter_params_len * sizeof(xcb_render_fixed_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_fixed_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3866,14 +4598,17 @@ xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char filter_name */ xcb_parts[4].iov_base = (char *) filter_name; xcb_parts[4].iov_len = filter_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_fixed_t filter_params */ xcb_parts[6].iov_base = (char *) filter_params; xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3923,18 +4658,86 @@ xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char filter_name */ xcb_parts[4].iov_base = (char *) filter_name; xcb_parts[4].iov_len = filter_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_fixed_t filter_params */ xcb_parts[6].iov_base = (char *) filter_params; xcb_parts[6].iov_len = filter_params_len * sizeof(xcb_render_fixed_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_randr_get_crtc_transform_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_randr_get_crtc_transform_reply_t *_aux = (xcb_randr_get_crtc_transform_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_randr_get_crtc_transform_reply_t); + xcb_tmp += xcb_block_len; + /* pending_filter_name */ + xcb_block_len += _aux->pending_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* pending_params */ + xcb_block_len += _aux->pending_nparams * sizeof(xcb_render_fixed_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_fixed_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* current_filter_name */ + xcb_block_len += _aux->current_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* current_params */ + xcb_block_len += _aux->current_nparams * sizeof(xcb_render_fixed_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_fixed_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3967,6 +4770,7 @@ xcb_randr_get_crtc_transform (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4003,6 +4807,7 @@ xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4273,6 +5078,7 @@ xcb_randr_get_panning (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4309,6 +5115,7 @@ xcb_randr_get_panning_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4404,6 +5211,7 @@ xcb_randr_set_panning (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4479,6 +5287,7 @@ xcb_randr_set_panning_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4538,6 +5347,7 @@ xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4577,6 +5387,7 @@ xcb_randr_set_output_primary (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4613,6 +5424,7 @@ xcb_randr_get_output_primary (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4649,6 +5461,7 @@ xcb_randr_get_output_primary_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/randr.h b/lib/libxcb/src/randr.h index 1035c4043..4f4f2104c 100644 --- a/lib/libxcb/src/randr.h +++ b/lib/libxcb/src/randr.h @@ -1379,6 +1379,9 @@ xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i /**< */); xcb_generic_iterator_t xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i /**< */); +int +xcb_randr_refresh_rates_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1462,7 +1465,7 @@ xcb_generic_iterator_t xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1487,7 +1490,7 @@ xcb_randr_query_version (xcb_connection_t *c /**< */, uint32_t minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1546,7 +1549,7 @@ xcb_randr_query_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1579,7 +1582,7 @@ xcb_randr_set_screen_config (xcb_connection_t *c /**< */, uint16_t rate /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1646,7 +1649,7 @@ xcb_randr_set_screen_config_reply (xcb_connection_t *c /** xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1674,7 +1677,7 @@ xcb_randr_select_input_checked (xcb_connection_t *c /**< */, uint16_t enable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1698,8 +1701,11 @@ xcb_randr_select_input (xcb_connection_t *c /**< */, xcb_window_t window /**< */, uint16_t enable /**< */); +int +xcb_randr_get_screen_info_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1722,7 +1728,7 @@ xcb_randr_get_screen_info (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1844,7 +1850,7 @@ xcb_randr_get_screen_info_reply (xcb_connection_t *c /**< */ xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1867,7 +1873,7 @@ xcb_randr_get_screen_size_range (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1924,7 +1930,7 @@ xcb_randr_get_screen_size_range_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1958,7 +1964,7 @@ xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */, uint32_t mm_height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2031,8 +2037,11 @@ xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i /**< */); xcb_generic_iterator_t xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i /**< */); +int +xcb_randr_get_screen_resources_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2055,7 +2064,7 @@ xcb_randr_get_screen_resources (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2267,8 +2276,11 @@ xcb_randr_get_screen_resources_reply (xcb_connection_t * xcb_randr_get_screen_resources_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_get_output_info_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2293,7 +2305,7 @@ xcb_randr_get_output_info (xcb_connection_t *c /**< */, xcb_timestamp_t config_timestamp /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2507,8 +2519,11 @@ xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */ xcb_randr_get_output_info_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_list_output_properties_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2531,7 +2546,7 @@ xcb_randr_list_output_properties (xcb_connection_t *c /**< */, xcb_randr_output_t output /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2626,8 +2641,11 @@ xcb_randr_list_output_properties_reply (xcb_connection_t xcb_randr_list_output_properties_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_query_output_property_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2652,7 +2670,7 @@ xcb_randr_query_output_property (xcb_connection_t *c /**< */, xcb_atom_t property /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2749,8 +2767,12 @@ xcb_randr_query_output_property_reply (xcb_connection_t xcb_randr_query_output_property_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_configure_output_property_sizeof (const void *_buffer /**< */, + uint32_t values_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2786,7 +2808,7 @@ xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */, const int32_t *values /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2818,8 +2840,11 @@ xcb_randr_configure_output_property (xcb_connection_t *c /**< */, uint32_t values_len /**< */, const int32_t *values /**< */); +int +xcb_randr_change_output_property_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2857,7 +2882,7 @@ xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */, const void *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2892,7 +2917,7 @@ xcb_randr_change_output_property (xcb_connection_t *c /**< */, const void *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2920,7 +2945,7 @@ xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */, xcb_atom_t property /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2944,8 +2969,11 @@ xcb_randr_delete_output_property (xcb_connection_t *c /**< */, xcb_randr_output_t output /**< */, xcb_atom_t property /**< */); +int +xcb_randr_get_output_property_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2980,7 +3008,7 @@ xcb_randr_get_output_property (xcb_connection_t *c /**< */, uint8_t pending /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3087,8 +3115,12 @@ xcb_randr_get_output_property_reply (xcb_connection_t *c xcb_randr_get_output_property_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_create_mode_sizeof (const void *_buffer /**< */, + uint32_t name_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3117,7 +3149,7 @@ xcb_randr_create_mode (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3180,7 +3212,7 @@ xcb_randr_create_mode_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3206,7 +3238,7 @@ xcb_randr_destroy_mode_checked (xcb_connection_t *c /**< */, xcb_randr_mode_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3229,7 +3261,7 @@ xcb_randr_destroy_mode (xcb_connection_t *c /**< */, xcb_randr_mode_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3257,7 +3289,7 @@ xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */, xcb_randr_mode_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3282,7 +3314,7 @@ xcb_randr_add_output_mode (xcb_connection_t *c /**< */, xcb_randr_mode_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3310,7 +3342,7 @@ xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */, xcb_randr_mode_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3334,8 +3366,11 @@ xcb_randr_delete_output_mode (xcb_connection_t *c /**< */, xcb_randr_output_t output /**< */, xcb_randr_mode_t mode /**< */); +int +xcb_randr_get_crtc_info_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3360,7 +3395,7 @@ xcb_randr_get_crtc_info (xcb_connection_t *c /**< */, xcb_timestamp_t config_timestamp /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3496,8 +3531,12 @@ xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */, xcb_randr_get_crtc_info_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_set_crtc_config_sizeof (const void *_buffer /**< */, + uint32_t outputs_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3536,7 +3575,7 @@ xcb_randr_set_crtc_config (xcb_connection_t *c /**< */, const xcb_randr_output_t *outputs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3609,7 +3648,7 @@ xcb_randr_set_crtc_config_reply (xcb_connection_t *c /**< */ xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3632,7 +3671,7 @@ xcb_randr_get_crtc_gamma_size (xcb_connection_t *c /**< */, xcb_randr_crtc_t crtc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3688,8 +3727,11 @@ xcb_randr_get_crtc_gamma_size_reply (xcb_connection_t *c xcb_randr_get_crtc_gamma_size_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_get_crtc_gamma_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3712,7 +3754,7 @@ xcb_randr_get_crtc_gamma (xcb_connection_t *c /**< */, xcb_randr_crtc_t crtc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3885,8 +3927,11 @@ xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */, xcb_randr_get_crtc_gamma_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_set_crtc_gamma_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3920,7 +3965,7 @@ xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */, const uint16_t *blue /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3950,8 +3995,11 @@ xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */, const uint16_t *green /**< */, const uint16_t *blue /**< */); +int +xcb_randr_get_screen_resources_current_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3974,7 +4022,7 @@ xcb_randr_get_screen_resources_current (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4186,8 +4234,12 @@ xcb_randr_get_screen_resources_current_reply (xcb_connection_t xcb_randr_get_screen_resources_current_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_randr_set_crtc_transform_sizeof (const void *_buffer /**< */, + uint32_t filter_params_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4223,7 +4275,7 @@ xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */, const xcb_render_fixed_t *filter_params /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4255,8 +4307,11 @@ xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */, uint32_t filter_params_len /**< */, const xcb_render_fixed_t *filter_params /**< */); +int +xcb_randr_get_crtc_transform_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4279,7 +4334,7 @@ xcb_randr_get_crtc_transform (xcb_connection_t *c /**< */, xcb_randr_crtc_t crtc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4492,7 +4547,7 @@ xcb_randr_get_crtc_transform_reply (xcb_connection_t *c / xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4515,7 +4570,7 @@ xcb_randr_get_panning (xcb_connection_t *c /**< */, xcb_randr_crtc_t crtc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4572,7 +4627,7 @@ xcb_randr_get_panning_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4621,7 +4676,7 @@ xcb_randr_set_panning (xcb_connection_t *c /**< */, int16_t border_bottom /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4704,7 +4759,7 @@ xcb_randr_set_panning_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4732,7 +4787,7 @@ xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */, xcb_randr_output_t output /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4757,7 +4812,7 @@ xcb_randr_set_output_primary (xcb_connection_t *c /**< */, xcb_randr_output_t output /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4780,7 +4835,7 @@ xcb_randr_get_output_primary (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/record.c b/lib/libxcb/src/record.c index da439ef1c..84fdebbbd 100644 --- a/lib/libxcb/src/record.c +++ b/lib/libxcb/src/record.c @@ -3,11 +3,18 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "record.h" +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) + xcb_extension_t xcb_record_id = { "RECORD", 0 }; @@ -276,6 +283,35 @@ xcb_record_client_spec_end (xcb_record_client_spec_iterator_t i /**< */) return ret; } +int +xcb_record_client_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_record_client_info_t *_aux = (xcb_record_client_info_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_record_client_info_t); + xcb_tmp += xcb_block_len; + /* ranges */ + xcb_block_len += _aux->num_ranges * sizeof(xcb_record_range_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_record_range_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -342,10 +378,11 @@ void xcb_record_client_info_next (xcb_record_client_info_iterator_t *i /**< */) { xcb_record_client_info_t *R = i->data; - xcb_generic_iterator_t child = xcb_record_range_end(xcb_record_client_info_ranges_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_record_client_info_t *)(((char *)R) + xcb_record_client_info_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_record_client_info_t *) child.data; - i->index = child.index; } @@ -405,6 +442,7 @@ xcb_record_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -444,6 +482,7 @@ xcb_record_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -468,6 +507,47 @@ xcb_record_query_version_reply (xcb_connection_t *c /**< */, return (xcb_record_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_record_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_record_create_context_request_t *_aux = (xcb_record_create_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_record_create_context_request_t); + xcb_tmp += xcb_block_len; + /* client_specs */ + xcb_block_len += _aux->num_client_specs * sizeof(xcb_record_client_spec_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_record_client_spec_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* ranges */ + xcb_block_len += _aux->num_ranges * sizeof(xcb_record_range_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_record_range_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -514,14 +594,17 @@ xcb_record_create_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_record_client_spec_t client_specs */ xcb_parts[4].iov_base = (char *) client_specs; xcb_parts[4].iov_len = num_client_specs * sizeof(xcb_record_client_spec_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_record_range_t ranges */ xcb_parts[6].iov_base = (char *) ranges; xcb_parts[6].iov_len = num_ranges * sizeof(xcb_record_range_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -572,18 +655,62 @@ xcb_record_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_record_client_spec_t client_specs */ xcb_parts[4].iov_base = (char *) client_specs; xcb_parts[4].iov_len = num_client_specs * sizeof(xcb_record_client_spec_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_record_range_t ranges */ xcb_parts[6].iov_base = (char *) ranges; xcb_parts[6].iov_len = num_ranges * sizeof(xcb_record_range_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_record_register_clients_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_record_register_clients_request_t *_aux = (xcb_record_register_clients_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_record_register_clients_request_t); + xcb_tmp += xcb_block_len; + /* client_specs */ + xcb_block_len += _aux->num_client_specs * sizeof(xcb_record_client_spec_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_record_client_spec_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* ranges */ + xcb_block_len += _aux->num_ranges * sizeof(xcb_record_range_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_record_range_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -630,14 +757,17 @@ xcb_record_register_clients_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_record_client_spec_t client_specs */ xcb_parts[4].iov_base = (char *) client_specs; xcb_parts[4].iov_len = num_client_specs * sizeof(xcb_record_client_spec_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_record_range_t ranges */ xcb_parts[6].iov_base = (char *) ranges; xcb_parts[6].iov_len = num_ranges * sizeof(xcb_record_range_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -688,18 +818,50 @@ xcb_record_register_clients (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_record_client_spec_t client_specs */ xcb_parts[4].iov_base = (char *) client_specs; xcb_parts[4].iov_len = num_client_specs * sizeof(xcb_record_client_spec_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_record_range_t ranges */ xcb_parts[6].iov_base = (char *) ranges; xcb_parts[6].iov_len = num_ranges * sizeof(xcb_record_range_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_record_unregister_clients_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_record_unregister_clients_request_t *_aux = (xcb_record_unregister_clients_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_record_unregister_clients_request_t); + xcb_tmp += xcb_block_len; + /* client_specs */ + xcb_block_len += _aux->num_client_specs * sizeof(xcb_record_client_spec_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_record_client_spec_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -737,10 +899,12 @@ xcb_record_unregister_clients_checked (xcb_connection_t *c /**< * xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_record_client_spec_t client_specs */ xcb_parts[4].iov_base = (char *) client_specs; xcb_parts[4].iov_len = num_client_specs * sizeof(xcb_record_client_spec_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -782,14 +946,50 @@ xcb_record_unregister_clients (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_record_client_spec_t client_specs */ xcb_parts[4].iov_base = (char *) client_specs; xcb_parts[4].iov_len = num_client_specs * sizeof(xcb_record_client_spec_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_record_get_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_record_get_context_reply_t *_aux = (xcb_record_get_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_record_get_context_reply_t); + xcb_tmp += xcb_block_len; + /* intercepted_clients */ + for(i=0; i<_aux->num_intercepted_clients; i++) { + xcb_tmp_len = xcb_record_client_info_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_record_client_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -822,6 +1022,7 @@ xcb_record_get_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -858,6 +1059,7 @@ xcb_record_get_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -918,6 +1120,35 @@ xcb_record_get_context_reply (xcb_connection_t *c /**< */, return (xcb_record_get_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_record_enable_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_record_enable_context_reply_t *_aux = (xcb_record_enable_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_record_enable_context_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -950,6 +1181,7 @@ xcb_record_enable_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -986,6 +1218,7 @@ xcb_record_enable_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1094,6 +1327,7 @@ xcb_record_disable_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1130,6 +1364,7 @@ xcb_record_disable_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1166,6 +1401,7 @@ xcb_record_free_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1202,6 +1438,7 @@ xcb_record_free_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/record.h b/lib/libxcb/src/record.h index ed499eb66..51ec99ae8 100644 --- a/lib/libxcb/src/record.h +++ b/lib/libxcb/src/record.h @@ -652,6 +652,9 @@ xcb_record_client_spec_next (xcb_record_client_spec_iterator_t *i /**< */); xcb_generic_iterator_t xcb_record_client_spec_end (xcb_record_client_spec_iterator_t i /**< */); +int +xcb_record_client_info_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -735,7 +738,7 @@ xcb_generic_iterator_t xcb_record_client_info_end (xcb_record_client_info_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -760,7 +763,7 @@ xcb_record_query_version (xcb_connection_t *c /**< */, uint16_t minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -818,8 +821,11 @@ xcb_record_query_version_reply (xcb_connection_t *c /**< */, xcb_record_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_record_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -855,7 +861,7 @@ xcb_record_create_context_checked (xcb_connection_t *c /**< */, const xcb_record_range_t *ranges /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -887,8 +893,11 @@ xcb_record_create_context (xcb_connection_t *c /**< */, const xcb_record_client_spec_t *client_specs /**< */, const xcb_record_range_t *ranges /**< */); +int +xcb_record_register_clients_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -924,7 +933,7 @@ xcb_record_register_clients_checked (xcb_connection_t *c /**< */, const xcb_record_range_t *ranges /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -956,8 +965,11 @@ xcb_record_register_clients (xcb_connection_t *c /**< */, const xcb_record_client_spec_t *client_specs /**< */, const xcb_record_range_t *ranges /**< */); +int +xcb_record_unregister_clients_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -987,7 +999,7 @@ xcb_record_unregister_clients_checked (xcb_connection_t *c /**< * const xcb_record_client_spec_t *client_specs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1013,8 +1025,11 @@ xcb_record_unregister_clients (xcb_connection_t *c /**< */, uint32_t num_client_specs /**< */, const xcb_record_client_spec_t *client_specs /**< */); +int +xcb_record_get_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1037,7 +1052,7 @@ xcb_record_get_context (xcb_connection_t *c /**< */, xcb_record_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1119,8 +1134,11 @@ xcb_record_get_context_reply (xcb_connection_t *c /**< */, xcb_record_get_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_record_enable_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1143,7 +1161,7 @@ xcb_record_enable_context (xcb_connection_t *c /**< */, xcb_record_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1239,7 +1257,7 @@ xcb_record_enable_context_reply (xcb_connection_t *c /**< */ xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1265,7 +1283,7 @@ xcb_record_disable_context_checked (xcb_connection_t *c /**< */, xcb_record_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1288,7 +1306,7 @@ xcb_record_disable_context (xcb_connection_t *c /**< */, xcb_record_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1314,7 +1332,7 @@ xcb_record_free_context_checked (xcb_connection_t *c /**< */, xcb_record_context_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/render.c b/lib/libxcb/src/render.c index b251f8814..7e5379cfc 100644 --- a/lib/libxcb/src/render.c +++ b/lib/libxcb/src/render.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "render.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_render_id = { "RENDER", 0 }; @@ -315,6 +322,35 @@ xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */) return ret; } +int +xcb_render_pictdepth_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_pictdepth_t *_aux = (xcb_render_pictdepth_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_pictdepth_t); + xcb_tmp += xcb_block_len; + /* visuals */ + xcb_block_len += _aux->num_visuals * sizeof(xcb_render_pictvisual_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_pictvisual_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -381,10 +417,11 @@ void xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */) { xcb_render_pictdepth_t *R = i->data; - xcb_generic_iterator_t child = xcb_render_pictvisual_end(xcb_render_pictdepth_visuals_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_render_pictdepth_t *)(((char *)R) + xcb_render_pictdepth_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_render_pictdepth_t *) child.data; - i->index = child.index; } @@ -409,6 +446,40 @@ xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */) return ret; } +int +xcb_render_pictscreen_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_pictscreen_t *_aux = (xcb_render_pictscreen_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_render_pictscreen_t); + xcb_tmp += xcb_block_len; + /* depths */ + for(i=0; i<_aux->num_depths; i++) { + xcb_tmp_len = xcb_render_pictdepth_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_render_pictdepth_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -459,10 +530,11 @@ void xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i /**< */) { xcb_render_pictscreen_t *R = i->data; - xcb_generic_iterator_t child = xcb_render_pictdepth_end(xcb_render_pictscreen_depths_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_render_pictscreen_t *)(((char *)R) + xcb_render_pictscreen_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_render_pictscreen_t *) child.data; - i->index = child.index; } @@ -788,6 +860,7 @@ xcb_render_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -827,6 +900,7 @@ xcb_render_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -851,6 +925,64 @@ xcb_render_query_version_reply (xcb_connection_t *c /**< */, return (xcb_render_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_render_query_pict_formats_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_query_pict_formats_reply_t *_aux = (xcb_render_query_pict_formats_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_render_query_pict_formats_reply_t); + xcb_tmp += xcb_block_len; + /* formats */ + xcb_block_len += _aux->num_formats * sizeof(xcb_render_pictforminfo_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_pictforminfo_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* screens */ + for(i=0; i<_aux->num_screens; i++) { + xcb_tmp_len = xcb_render_pictscreen_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_render_pictscreen_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* subpixels */ + xcb_block_len += _aux->num_subpixel * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -880,6 +1012,7 @@ xcb_render_query_pict_formats (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -913,6 +1046,7 @@ xcb_render_query_pict_formats_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1080,6 +1214,35 @@ xcb_render_query_pict_formats_reply (xcb_connection_t *c return (xcb_render_query_pict_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_render_query_pict_index_values_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_query_pict_index_values_reply_t *_aux = (xcb_render_query_pict_index_values_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_query_pict_index_values_reply_t); + xcb_tmp += xcb_block_len; + /* values */ + xcb_block_len += _aux->num_values * sizeof(xcb_render_indexvalue_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_indexvalue_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1112,6 +1275,7 @@ xcb_render_query_pict_index_values (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1148,6 +1312,7 @@ xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c /**< * xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1224,6 +1389,35 @@ xcb_render_query_pict_index_values_reply (xcb_connection_t return (xcb_render_query_pict_index_values_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_render_create_picture_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_create_picture_request_t *_aux = (xcb_render_create_picture_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_create_picture_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1267,10 +1461,12 @@ xcb_render_create_picture_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1318,14 +1514,45 @@ xcb_render_create_picture (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_change_picture_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_change_picture_request_t *_aux = (xcb_render_change_picture_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_change_picture_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1363,10 +1590,12 @@ xcb_render_change_picture_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1408,14 +1637,45 @@ xcb_render_change_picture (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_set_picture_clip_rectangles_request_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1458,10 +1718,12 @@ xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< * xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1508,10 +1770,12 @@ xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1548,6 +1812,7 @@ xcb_render_free_picture_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1584,6 +1849,7 @@ xcb_render_free_picture (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1654,6 +1920,7 @@ xcb_render_composite_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1724,10 +1991,40 @@ xcb_render_composite (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_trapezoids_sizeof (const void *_buffer /**< */, + uint32_t traps_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_trapezoids_request_t); + xcb_tmp += xcb_block_len; + /* traps */ + xcb_block_len += traps_len * sizeof(xcb_render_trapezoid_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_trapezoid_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1780,10 +2077,12 @@ xcb_render_trapezoids_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_trapezoid_t traps */ xcb_parts[4].iov_base = (char *) traps; xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1840,14 +2139,45 @@ xcb_render_trapezoids (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_trapezoid_t traps */ xcb_parts[4].iov_base = (char *) traps; xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trapezoid_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_triangles_sizeof (const void *_buffer /**< */, + uint32_t triangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_triangles_request_t); + xcb_tmp += xcb_block_len; + /* triangles */ + xcb_block_len += triangles_len * sizeof(xcb_render_triangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_triangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1900,10 +2230,12 @@ xcb_render_triangles_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_triangle_t triangles */ xcb_parts[4].iov_base = (char *) triangles; xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1960,14 +2292,45 @@ xcb_render_triangles (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_triangle_t triangles */ xcb_parts[4].iov_base = (char *) triangles; xcb_parts[4].iov_len = triangles_len * sizeof(xcb_render_triangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_tri_strip_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_tri_strip_request_t); + xcb_tmp += xcb_block_len; + /* points */ + xcb_block_len += points_len * sizeof(xcb_render_pointfix_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_pointfix_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2020,10 +2383,12 @@ xcb_render_tri_strip_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_pointfix_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2080,14 +2445,45 @@ xcb_render_tri_strip (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_pointfix_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_tri_fan_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_tri_fan_request_t); + xcb_tmp += xcb_block_len; + /* points */ + xcb_block_len += points_len * sizeof(xcb_render_pointfix_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_pointfix_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2140,10 +2536,12 @@ xcb_render_tri_fan_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_pointfix_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2200,10 +2598,12 @@ xcb_render_tri_fan (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_pointfix_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_render_pointfix_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2243,6 +2643,7 @@ xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2282,6 +2683,7 @@ xcb_render_create_glyph_set (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2321,6 +2723,7 @@ xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2360,6 +2763,7 @@ xcb_render_reference_glyph_set (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2396,6 +2800,7 @@ xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2432,10 +2837,65 @@ xcb_render_free_glyph_set (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_add_glyphs_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_add_glyphs_request_t *_aux = (xcb_render_add_glyphs_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_add_glyphs_request_t); + xcb_tmp += xcb_block_len; + /* glyphids */ + xcb_block_len += _aux->glyphs_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* glyphs */ + xcb_block_len += _aux->glyphs_len * sizeof(xcb_render_glyphinfo_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_glyphinfo_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* data */ + xcb_block_len += data_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2479,18 +2939,22 @@ xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t glyphids */ xcb_parts[4].iov_base = (char *) glyphids; xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_glyphinfo_t glyphs */ xcb_parts[6].iov_base = (char *) glyphs; xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* uint8_t data */ xcb_parts[8].iov_base = (char *) data; xcb_parts[8].iov_len = data_len * sizeof(uint8_t); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2538,22 +3002,55 @@ xcb_render_add_glyphs (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t glyphids */ xcb_parts[4].iov_base = (char *) glyphids; xcb_parts[4].iov_len = glyphs_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_glyphinfo_t glyphs */ xcb_parts[6].iov_base = (char *) glyphs; xcb_parts[6].iov_len = glyphs_len * sizeof(xcb_render_glyphinfo_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* uint8_t data */ xcb_parts[8].iov_base = (char *) data; xcb_parts[8].iov_len = data_len * sizeof(uint8_t); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_free_glyphs_sizeof (const void *_buffer /**< */, + uint32_t glyphs_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_free_glyphs_request_t); + xcb_tmp += xcb_block_len; + /* glyphs */ + xcb_block_len += glyphs_len * sizeof(xcb_render_glyph_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_glyph_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2590,10 +3087,12 @@ xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_glyph_t glyphs */ xcb_parts[4].iov_base = (char *) glyphs; xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2634,14 +3133,45 @@ xcb_render_free_glyphs (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_glyph_t glyphs */ xcb_parts[4].iov_base = (char *) glyphs; xcb_parts[4].iov_len = glyphs_len * sizeof(xcb_render_glyph_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_composite_glyphs_8_sizeof (const void *_buffer /**< */, + uint32_t glyphcmds_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_composite_glyphs_8_request_t); + xcb_tmp += xcb_block_len; + /* glyphcmds */ + xcb_block_len += glyphcmds_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2697,10 +3227,12 @@ xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t glyphcmds */ xcb_parts[4].iov_base = (char *) glyphcmds; xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2760,14 +3292,45 @@ xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t glyphcmds */ xcb_parts[4].iov_base = (char *) glyphcmds; xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_composite_glyphs_16_sizeof (const void *_buffer /**< */, + uint32_t glyphcmds_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_composite_glyphs_16_request_t); + xcb_tmp += xcb_block_len; + /* glyphcmds */ + xcb_block_len += glyphcmds_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2823,10 +3386,12 @@ xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t glyphcmds */ xcb_parts[4].iov_base = (char *) glyphcmds; xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2886,14 +3451,45 @@ xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t glyphcmds */ xcb_parts[4].iov_base = (char *) glyphcmds; xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_composite_glyphs_32_sizeof (const void *_buffer /**< */, + uint32_t glyphcmds_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_composite_glyphs_32_request_t); + xcb_tmp += xcb_block_len; + /* glyphcmds */ + xcb_block_len += glyphcmds_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2949,10 +3545,12 @@ xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t glyphcmds */ xcb_parts[4].iov_base = (char *) glyphcmds; xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3012,14 +3610,45 @@ xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t glyphcmds */ xcb_parts[4].iov_base = (char *) glyphcmds; xcb_parts[4].iov_len = glyphcmds_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_fill_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rects_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_fill_rectangles_request_t); + xcb_tmp += xcb_block_len; + /* rects */ + xcb_block_len += rects_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3063,10 +3692,12 @@ xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rects */ xcb_parts[4].iov_base = (char *) rects; xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3114,10 +3745,12 @@ xcb_render_fill_rectangles (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rects */ xcb_parts[4].iov_base = (char *) rects; xcb_parts[4].iov_len = rects_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3163,6 +3796,7 @@ xcb_render_create_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3208,6 +3842,7 @@ xcb_render_create_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3285,6 +3920,7 @@ xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3324,10 +3960,57 @@ xcb_render_set_picture_transform (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_query_filters_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_query_filters_reply_t *_aux = (xcb_render_query_filters_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_render_query_filters_reply_t); + xcb_tmp += xcb_block_len; + /* aliases */ + xcb_block_len += _aux->num_aliases * sizeof(uint16_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint16_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* filters */ + for(i=0; i<_aux->num_filters; i++) { + xcb_tmp_len = xcb_str_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_str_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3360,6 +4043,7 @@ xcb_render_query_filters (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3396,6 +4080,7 @@ xcb_render_query_filters_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3509,6 +4194,48 @@ xcb_render_query_filters_reply (xcb_connection_t *c /**< */, return (xcb_render_query_filters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_render_set_picture_filter_sizeof (const void *_buffer /**< */, + uint32_t values_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_set_picture_filter_request_t *_aux = (xcb_render_set_picture_filter_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_set_picture_filter_request_t); + xcb_tmp += xcb_block_len; + /* filter */ + xcb_block_len += _aux->filter_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* values */ + xcb_block_len += values_len * sizeof(xcb_render_fixed_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_fixed_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3551,14 +4278,17 @@ xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char filter */ xcb_parts[4].iov_base = (char *) filter; xcb_parts[4].iov_len = filter_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_fixed_t values */ xcb_parts[6].iov_base = (char *) values; xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3605,14 +4335,17 @@ xcb_render_set_picture_filter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char filter */ xcb_parts[4].iov_base = (char *) filter; xcb_parts[4].iov_len = filter_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_fixed_t values */ xcb_parts[6].iov_base = (char *) values; xcb_parts[6].iov_len = values_len * sizeof(xcb_render_fixed_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3655,6 +4388,35 @@ xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */) return ret; } +int +xcb_render_create_anim_cursor_sizeof (const void *_buffer /**< */, + uint32_t cursors_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_create_anim_cursor_request_t); + xcb_tmp += xcb_block_len; + /* cursors */ + xcb_block_len += cursors_len * sizeof(xcb_render_animcursorelt_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_animcursorelt_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3691,10 +4453,12 @@ xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_animcursorelt_t cursors */ xcb_parts[4].iov_base = (char *) cursors; xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3735,10 +4499,12 @@ xcb_render_create_anim_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_animcursorelt_t cursors */ xcb_parts[4].iov_base = (char *) cursors; xcb_parts[4].iov_len = cursors_len * sizeof(xcb_render_animcursorelt_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3819,6 +4585,35 @@ xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */) return ret; } +int +xcb_render_add_traps_sizeof (const void *_buffer /**< */, + uint32_t traps_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_add_traps_request_t); + xcb_tmp += xcb_block_len; + /* traps */ + xcb_block_len += traps_len * sizeof(xcb_render_trap_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_trap_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3861,10 +4656,12 @@ xcb_render_add_traps_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_trap_t traps */ xcb_parts[4].iov_base = (char *) traps; xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3911,10 +4708,12 @@ xcb_render_add_traps (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_trap_t traps */ xcb_parts[4].iov_base = (char *) traps; xcb_parts[4].iov_len = traps_len * sizeof(xcb_render_trap_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3954,6 +4753,7 @@ xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3993,10 +4793,52 @@ xcb_render_create_solid_fill (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_create_linear_gradient_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_create_linear_gradient_request_t *_aux = (xcb_render_create_linear_gradient_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_create_linear_gradient_request_t); + xcb_tmp += xcb_block_len; + /* stops */ + xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_fixed_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* colors */ + xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_color_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4042,14 +4884,17 @@ xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_fixed_t stops */ xcb_parts[4].iov_base = (char *) stops; xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_color_t colors */ xcb_parts[6].iov_base = (char *) colors; xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4099,18 +4944,62 @@ xcb_render_create_linear_gradient (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_fixed_t stops */ xcb_parts[4].iov_base = (char *) stops; xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_color_t colors */ xcb_parts[6].iov_base = (char *) colors; xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_create_radial_gradient_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_create_radial_gradient_request_t *_aux = (xcb_render_create_radial_gradient_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_create_radial_gradient_request_t); + xcb_tmp += xcb_block_len; + /* stops */ + xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_fixed_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* colors */ + xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_color_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4162,14 +5051,17 @@ xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_fixed_t stops */ xcb_parts[4].iov_base = (char *) stops; xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_color_t colors */ xcb_parts[6].iov_base = (char *) colors; xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4225,18 +5117,62 @@ xcb_render_create_radial_gradient (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_fixed_t stops */ xcb_parts[4].iov_base = (char *) stops; xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_color_t colors */ xcb_parts[6].iov_base = (char *) colors; xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_render_create_conical_gradient_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_render_create_conical_gradient_request_t *_aux = (xcb_render_create_conical_gradient_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_render_create_conical_gradient_request_t); + xcb_tmp += xcb_block_len; + /* stops */ + xcb_block_len += _aux->num_stops * sizeof(xcb_render_fixed_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_fixed_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* colors */ + xcb_block_len += _aux->num_stops * sizeof(xcb_render_color_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_render_color_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4282,14 +5218,17 @@ xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */ xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_fixed_t stops */ xcb_parts[4].iov_base = (char *) stops; xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_color_t colors */ xcb_parts[6].iov_base = (char *) colors; xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4339,14 +5278,17 @@ xcb_render_create_conical_gradient (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_render_fixed_t stops */ xcb_parts[4].iov_base = (char *) stops; xcb_parts[4].iov_len = num_stops * sizeof(xcb_render_fixed_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_render_color_t colors */ xcb_parts[6].iov_base = (char *) colors; xcb_parts[6].iov_len = num_stops * sizeof(xcb_render_color_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/render.h b/lib/libxcb/src/render.h index 04d24e697..eb7f0424d 100644 --- a/lib/libxcb/src/render.h +++ b/lib/libxcb/src/render.h @@ -1468,6 +1468,9 @@ xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */); xcb_generic_iterator_t xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */); +int +xcb_render_pictdepth_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1550,6 +1553,9 @@ xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */); xcb_generic_iterator_t xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */); +int +xcb_render_pictscreen_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1921,7 +1927,7 @@ xcb_generic_iterator_t xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1946,7 +1952,7 @@ xcb_render_query_version (xcb_connection_t *c /**< */, uint32_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2004,8 +2010,11 @@ xcb_render_query_version_reply (xcb_connection_t *c /**< */, xcb_render_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_render_query_pict_formats_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2026,7 +2035,7 @@ xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2184,8 +2193,11 @@ xcb_render_query_pict_formats_reply (xcb_connection_t *c xcb_render_query_pict_formats_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_render_query_pict_index_values_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2208,7 +2220,7 @@ xcb_render_query_pict_index_values (xcb_connection_t *c /**< */, xcb_render_pictformat_t format /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2303,8 +2315,11 @@ xcb_render_query_pict_index_values_reply (xcb_connection_t xcb_render_query_pict_index_values_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_render_create_picture_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2338,7 +2353,7 @@ xcb_render_create_picture_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2368,8 +2383,11 @@ xcb_render_create_picture (xcb_connection_t *c /**< */, uint32_t value_mask /**< */, const uint32_t *value_list /**< */); +int +xcb_render_change_picture_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2399,7 +2417,7 @@ xcb_render_change_picture_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2425,8 +2443,12 @@ xcb_render_change_picture (xcb_connection_t *c /**< */, uint32_t value_mask /**< */, const uint32_t *value_list /**< */); +int +xcb_render_set_picture_clip_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2460,7 +2482,7 @@ xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< * const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2491,7 +2513,7 @@ xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2517,7 +2539,7 @@ xcb_render_free_picture_checked (xcb_connection_t *c /**< */, xcb_render_picture_t picture /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2540,7 +2562,7 @@ xcb_render_free_picture (xcb_connection_t *c /**< */, xcb_render_picture_t picture /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2588,7 +2610,7 @@ xcb_render_composite_checked (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2632,8 +2654,12 @@ xcb_render_composite (xcb_connection_t *c /**< */, uint16_t width /**< */, uint16_t height /**< */); +int +xcb_render_trapezoids_sizeof (const void *_buffer /**< */, + uint32_t traps_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2673,7 +2699,7 @@ xcb_render_trapezoids_checked (xcb_connection_t *c /**< */, const xcb_render_trapezoid_t *traps /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2709,8 +2735,12 @@ xcb_render_trapezoids (xcb_connection_t *c /**< */, uint32_t traps_len /**< */, const xcb_render_trapezoid_t *traps /**< */); +int +xcb_render_triangles_sizeof (const void *_buffer /**< */, + uint32_t triangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2750,7 +2780,7 @@ xcb_render_triangles_checked (xcb_connection_t *c /**< */, const xcb_render_triangle_t *triangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2786,8 +2816,12 @@ xcb_render_triangles (xcb_connection_t *c /**< */, uint32_t triangles_len /**< */, const xcb_render_triangle_t *triangles /**< */); +int +xcb_render_tri_strip_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2827,7 +2861,7 @@ xcb_render_tri_strip_checked (xcb_connection_t *c /**< */, const xcb_render_pointfix_t *points /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2863,8 +2897,12 @@ xcb_render_tri_strip (xcb_connection_t *c /**< */, uint32_t points_len /**< */, const xcb_render_pointfix_t *points /**< */); +int +xcb_render_tri_fan_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2904,7 +2942,7 @@ xcb_render_tri_fan_checked (xcb_connection_t *c /**< */, const xcb_render_pointfix_t *points /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2941,7 +2979,7 @@ xcb_render_tri_fan (xcb_connection_t *c /**< */, const xcb_render_pointfix_t *points /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2969,7 +3007,7 @@ xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */, xcb_render_pictformat_t format /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2994,7 +3032,7 @@ xcb_render_create_glyph_set (xcb_connection_t *c /**< */, xcb_render_pictformat_t format /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3022,7 +3060,7 @@ xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */, xcb_render_glyphset_t existing /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3047,7 +3085,7 @@ xcb_render_reference_glyph_set (xcb_connection_t *c /**< */, xcb_render_glyphset_t existing /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3073,7 +3111,7 @@ xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */, xcb_render_glyphset_t glyphset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3095,8 +3133,12 @@ xcb_void_cookie_t xcb_render_free_glyph_set (xcb_connection_t *c /**< */, xcb_render_glyphset_t glyphset /**< */); +int +xcb_render_add_glyphs_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3132,7 +3174,7 @@ xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3164,8 +3206,12 @@ xcb_render_add_glyphs (xcb_connection_t *c /**< */, uint32_t data_len /**< */, const uint8_t *data /**< */); +int +xcb_render_free_glyphs_sizeof (const void *_buffer /**< */, + uint32_t glyphs_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3195,7 +3241,7 @@ xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */, const xcb_render_glyph_t *glyphs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3221,8 +3267,12 @@ xcb_render_free_glyphs (xcb_connection_t *c /**< */, uint32_t glyphs_len /**< */, const xcb_render_glyph_t *glyphs /**< */); +int +xcb_render_composite_glyphs_8_sizeof (const void *_buffer /**< */, + uint32_t glyphcmds_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3264,7 +3314,7 @@ xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */, const uint8_t *glyphcmds /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3302,8 +3352,12 @@ xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */, uint32_t glyphcmds_len /**< */, const uint8_t *glyphcmds /**< */); +int +xcb_render_composite_glyphs_16_sizeof (const void *_buffer /**< */, + uint32_t glyphcmds_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3345,7 +3399,7 @@ xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */, const uint8_t *glyphcmds /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3383,8 +3437,12 @@ xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */, uint32_t glyphcmds_len /**< */, const uint8_t *glyphcmds /**< */); +int +xcb_render_composite_glyphs_32_sizeof (const void *_buffer /**< */, + uint32_t glyphcmds_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3426,7 +3484,7 @@ xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */, const uint8_t *glyphcmds /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3464,8 +3522,12 @@ xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */, uint32_t glyphcmds_len /**< */, const uint8_t *glyphcmds /**< */); +int +xcb_render_fill_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rects_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3499,7 +3561,7 @@ xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */, const xcb_rectangle_t *rects /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3530,7 +3592,7 @@ xcb_render_fill_rectangles (xcb_connection_t *c /**< */, const xcb_rectangle_t *rects /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3562,7 +3624,7 @@ xcb_render_create_cursor_checked (xcb_connection_t *c /**< */, uint16_t y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3634,7 +3696,7 @@ xcb_generic_iterator_t xcb_render_transform_end (xcb_render_transform_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3662,7 +3724,7 @@ xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */, xcb_render_transform_t transform /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3686,8 +3748,11 @@ xcb_render_set_picture_transform (xcb_connection_t *c /**< */, xcb_render_picture_t picture /**< */, xcb_render_transform_t transform /**< */); +int +xcb_render_query_filters_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3710,7 +3775,7 @@ xcb_render_query_filters (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3831,8 +3896,12 @@ xcb_render_query_filters_reply (xcb_connection_t *c /**< */, xcb_render_query_filters_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_render_set_picture_filter_sizeof (const void *_buffer /**< */, + uint32_t values_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3866,7 +3935,7 @@ xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */, const xcb_render_fixed_t *values /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3939,8 +4008,12 @@ xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */); xcb_generic_iterator_t xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */); +int +xcb_render_create_anim_cursor_sizeof (const void *_buffer /**< */, + uint32_t cursors_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3970,7 +4043,7 @@ xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< const xcb_render_animcursorelt_t *cursors /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4082,8 +4155,12 @@ xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */); xcb_generic_iterator_t xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */); +int +xcb_render_add_traps_sizeof (const void *_buffer /**< */, + uint32_t traps_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4117,7 +4194,7 @@ xcb_render_add_traps_checked (xcb_connection_t *c /**< */, const xcb_render_trap_t *traps /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4148,7 +4225,7 @@ xcb_render_add_traps (xcb_connection_t *c /**< */, const xcb_render_trap_t *traps /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4176,7 +4253,7 @@ xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */, xcb_render_color_t color /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4200,8 +4277,11 @@ xcb_render_create_solid_fill (xcb_connection_t *c /**< */, xcb_render_picture_t picture /**< */, xcb_render_color_t color /**< */); +int +xcb_render_create_linear_gradient_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4237,7 +4317,7 @@ xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */, const xcb_render_color_t *colors /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4269,8 +4349,11 @@ xcb_render_create_linear_gradient (xcb_connection_t *c /**< */, const xcb_render_fixed_t *stops /**< */, const xcb_render_color_t *colors /**< */); +int +xcb_render_create_radial_gradient_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4310,7 +4393,7 @@ xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */, const xcb_render_color_t *colors /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4346,8 +4429,11 @@ xcb_render_create_radial_gradient (xcb_connection_t *c /**< */, const xcb_render_fixed_t *stops /**< */, const xcb_render_color_t *colors /**< */); +int +xcb_render_create_conical_gradient_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4383,7 +4469,7 @@ xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */ const xcb_render_color_t *colors /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/res.c b/lib/libxcb/src/res.c index e08af792f..a5b76e73c 100644 --- a/lib/libxcb/src/res.c +++ b/lib/libxcb/src/res.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "res.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_res_id = { "X-Resource", 0 }; @@ -122,6 +129,7 @@ xcb_res_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -161,6 +169,7 @@ xcb_res_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -185,6 +194,35 @@ xcb_res_query_version_reply (xcb_connection_t *c /**< */, return (xcb_res_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_res_query_clients_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_res_query_clients_reply_t *_aux = (xcb_res_query_clients_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_res_query_clients_reply_t); + xcb_tmp += xcb_block_len; + /* clients */ + xcb_block_len += _aux->num_clients * sizeof(xcb_res_client_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_res_client_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -214,6 +252,7 @@ xcb_res_query_clients (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -247,6 +286,7 @@ xcb_res_query_clients_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -323,6 +363,35 @@ xcb_res_query_clients_reply (xcb_connection_t *c /**< */, return (xcb_res_query_clients_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_res_query_client_resources_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_res_query_client_resources_reply_t *_aux = (xcb_res_query_client_resources_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_res_query_client_resources_reply_t); + xcb_tmp += xcb_block_len; + /* types */ + xcb_block_len += _aux->num_types * sizeof(xcb_res_type_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_res_type_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -355,6 +424,7 @@ xcb_res_query_client_resources (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -391,6 +461,7 @@ xcb_res_query_client_resources_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -499,6 +570,7 @@ xcb_res_query_client_pixmap_bytes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -535,6 +607,7 @@ xcb_res_query_client_pixmap_bytes_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/res.h b/lib/libxcb/src/res.h index 96fc6b6ef..b6a030fca 100644 --- a/lib/libxcb/src/res.h +++ b/lib/libxcb/src/res.h @@ -273,7 +273,7 @@ xcb_generic_iterator_t xcb_res_type_end (xcb_res_type_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -298,7 +298,7 @@ xcb_res_query_version (xcb_connection_t *c /**< */, uint8_t client_minor /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -356,8 +356,11 @@ xcb_res_query_version_reply (xcb_connection_t *c /**< */, xcb_res_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_res_query_clients_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -378,7 +381,7 @@ xcb_res_query_clients_cookie_t xcb_res_query_clients (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -471,8 +474,11 @@ xcb_res_query_clients_reply (xcb_connection_t *c /**< */, xcb_res_query_clients_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_res_query_client_resources_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -495,7 +501,7 @@ xcb_res_query_client_resources (xcb_connection_t *c /**< */, uint32_t xid /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -591,7 +597,7 @@ xcb_res_query_client_resources_reply (xcb_connection_t * xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -614,7 +620,7 @@ xcb_res_query_client_pixmap_bytes (xcb_connection_t *c /**< */, uint32_t xid /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/screensaver.c b/lib/libxcb/src/screensaver.c index 9e33b928b..349531da8 100644 --- a/lib/libxcb/src/screensaver.c +++ b/lib/libxcb/src/screensaver.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "screensaver.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_screensaver_id = { "MIT-SCREEN-SAVER", 0 }; @@ -47,6 +54,7 @@ xcb_screensaver_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -87,6 +95,7 @@ xcb_screensaver_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -143,6 +152,7 @@ xcb_screensaver_query_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -179,6 +189,7 @@ xcb_screensaver_query_info_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -238,6 +249,7 @@ xcb_screensaver_select_input_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -277,10 +289,40 @@ xcb_screensaver_select_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_screensaver_set_attributes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_screensaver_set_attributes_request_t *_aux = (xcb_screensaver_set_attributes_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_screensaver_set_attributes_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -342,10 +384,12 @@ xcb_screensaver_set_attributes_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -411,10 +455,12 @@ xcb_screensaver_set_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -451,6 +497,7 @@ xcb_screensaver_unset_attributes_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -487,6 +534,7 @@ xcb_screensaver_unset_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -524,6 +572,7 @@ xcb_screensaver_suspend_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -561,6 +610,7 @@ xcb_screensaver_suspend (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/screensaver.h b/lib/libxcb/src/screensaver.h index a722a37e5..5f38e264e 100644 --- a/lib/libxcb/src/screensaver.h +++ b/lib/libxcb/src/screensaver.h @@ -198,7 +198,7 @@ typedef struct xcb_screensaver_notify_event_t { } xcb_screensaver_notify_event_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -223,7 +223,7 @@ xcb_screensaver_query_version (xcb_connection_t *c /**< */, uint8_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -282,7 +282,7 @@ xcb_screensaver_query_version_reply (xcb_connection_t *c xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -305,7 +305,7 @@ xcb_screensaver_query_info (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -362,7 +362,7 @@ xcb_screensaver_query_info_reply (xcb_connection_t *c /**< xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -390,7 +390,7 @@ xcb_screensaver_select_input_checked (xcb_connection_t *c /**< */, uint32_t event_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -414,8 +414,11 @@ xcb_screensaver_select_input (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */, uint32_t event_mask /**< */); +int +xcb_screensaver_set_attributes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -461,7 +464,7 @@ xcb_screensaver_set_attributes_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -504,7 +507,7 @@ xcb_screensaver_set_attributes (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -530,7 +533,7 @@ xcb_screensaver_unset_attributes_checked (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -553,7 +556,7 @@ xcb_screensaver_unset_attributes (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -579,7 +582,7 @@ xcb_screensaver_suspend_checked (xcb_connection_t *c /**< */, uint8_t suspend /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/shape.c b/lib/libxcb/src/shape.c index 948522581..98621c498 100644 --- a/lib/libxcb/src/shape.c +++ b/lib/libxcb/src/shape.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "shape.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_shape_id = { "SHAPE", 0 }; @@ -116,6 +123,7 @@ xcb_shape_query_version (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -149,6 +157,7 @@ xcb_shape_query_version_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -173,6 +182,35 @@ xcb_shape_query_version_reply (xcb_connection_t *c /**< */, return (xcb_shape_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_shape_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_shape_rectangles_request_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -225,10 +263,12 @@ xcb_shape_rectangles_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -285,10 +325,12 @@ xcb_shape_rectangles (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -341,6 +383,7 @@ xcb_shape_mask_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -393,6 +436,7 @@ xcb_shape_mask (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -448,6 +492,7 @@ xcb_shape_combine_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -503,6 +548,7 @@ xcb_shape_combine (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -549,6 +595,7 @@ xcb_shape_offset_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -595,6 +642,7 @@ xcb_shape_offset (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -631,6 +679,7 @@ xcb_shape_query_extents (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -667,6 +716,7 @@ xcb_shape_query_extents_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -727,6 +777,7 @@ xcb_shape_select_input_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -767,6 +818,7 @@ xcb_shape_select_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -803,6 +855,7 @@ xcb_shape_input_selected (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -839,6 +892,7 @@ xcb_shape_input_selected_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -863,6 +917,35 @@ xcb_shape_input_selected_reply (xcb_connection_t *c /**< */, return (xcb_shape_input_selected_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_shape_get_rectangles_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_shape_get_rectangles_reply_t *_aux = (xcb_shape_get_rectangles_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_shape_get_rectangles_reply_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += _aux->rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -899,6 +982,7 @@ xcb_shape_get_rectangles (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -939,6 +1023,7 @@ xcb_shape_get_rectangles_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/shape.h b/lib/libxcb/src/shape.h index 107d2ff74..63919b42c 100644 --- a/lib/libxcb/src/shape.h +++ b/lib/libxcb/src/shape.h @@ -393,7 +393,7 @@ xcb_generic_iterator_t xcb_shape_kind_end (xcb_shape_kind_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -414,7 +414,7 @@ xcb_shape_query_version_cookie_t xcb_shape_query_version (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -468,8 +468,12 @@ xcb_shape_query_version_reply (xcb_connection_t *c /**< */, xcb_shape_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_shape_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -509,7 +513,7 @@ xcb_shape_rectangles_checked (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -546,7 +550,7 @@ xcb_shape_rectangles (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -582,7 +586,7 @@ xcb_shape_mask_checked (xcb_connection_t *c /**< */, xcb_pixmap_t source_bitmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -615,7 +619,7 @@ xcb_shape_mask (xcb_connection_t *c /**< */, xcb_pixmap_t source_bitmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -653,7 +657,7 @@ xcb_shape_combine_checked (xcb_connection_t *c /**< */, xcb_window_t source_window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -688,7 +692,7 @@ xcb_shape_combine (xcb_connection_t *c /**< */, xcb_window_t source_window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -720,7 +724,7 @@ xcb_shape_offset_checked (xcb_connection_t *c /**< */, int16_t y_offset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -749,7 +753,7 @@ xcb_shape_offset (xcb_connection_t *c /**< */, int16_t y_offset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -772,7 +776,7 @@ xcb_shape_query_extents (xcb_connection_t *c /**< */, xcb_window_t destination_window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -829,7 +833,7 @@ xcb_shape_query_extents_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -857,7 +861,7 @@ xcb_shape_select_input_checked (xcb_connection_t *c /**< */, uint8_t enable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -882,7 +886,7 @@ xcb_shape_select_input (xcb_connection_t *c /**< */, uint8_t enable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -905,7 +909,7 @@ xcb_shape_input_selected (xcb_connection_t *c /**< */, xcb_window_t destination_window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -961,8 +965,11 @@ xcb_shape_input_selected_reply (xcb_connection_t *c /**< */, xcb_shape_input_selected_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_shape_get_rectangles_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -987,7 +994,7 @@ xcb_shape_get_rectangles (xcb_connection_t *c /**< */, xcb_shape_kind_t source_kind /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/shm.c b/lib/libxcb/src/shm.c index c1637a865..0a1c23873 100644 --- a/lib/libxcb/src/shm.c +++ b/lib/libxcb/src/shm.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "shm.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_shm_id = { "MIT-SHM", 0 }; @@ -78,6 +85,7 @@ xcb_shm_query_version (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -111,6 +119,7 @@ xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -174,6 +183,7 @@ xcb_shm_attach_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -217,6 +227,7 @@ xcb_shm_attach (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -253,6 +264,7 @@ xcb_shm_detach_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -289,6 +301,7 @@ xcb_shm_detach (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -368,6 +381,7 @@ xcb_shm_put_image_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -447,6 +461,7 @@ xcb_shm_put_image (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -508,6 +523,7 @@ xcb_shm_get_image (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -569,6 +585,7 @@ xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -644,6 +661,7 @@ xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -699,6 +717,7 @@ xcb_shm_create_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/shm.h b/lib/libxcb/src/shm.h index bcb60d81f..315f37e9b 100644 --- a/lib/libxcb/src/shm.h +++ b/lib/libxcb/src/shm.h @@ -255,7 +255,7 @@ xcb_generic_iterator_t xcb_shm_seg_end (xcb_shm_seg_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -276,7 +276,7 @@ xcb_shm_query_version_cookie_t xcb_shm_query_version (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -331,7 +331,7 @@ xcb_shm_query_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -361,7 +361,7 @@ xcb_shm_attach_checked (xcb_connection_t *c /**< */, uint8_t read_only /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -388,7 +388,7 @@ xcb_shm_attach (xcb_connection_t *c /**< */, uint8_t read_only /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -414,7 +414,7 @@ xcb_shm_detach_checked (xcb_connection_t *c /**< */, xcb_shm_seg_t shmseg /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -437,7 +437,7 @@ xcb_shm_detach (xcb_connection_t *c /**< */, xcb_shm_seg_t shmseg /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -491,7 +491,7 @@ xcb_shm_put_image_checked (xcb_connection_t *c /**< */, uint32_t offset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -542,7 +542,7 @@ xcb_shm_put_image (xcb_connection_t *c /**< */, uint32_t offset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -581,7 +581,7 @@ xcb_shm_get_image (xcb_connection_t *c /**< */, uint32_t offset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -654,7 +654,7 @@ xcb_shm_get_image_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -692,7 +692,7 @@ xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */, uint32_t offset /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/sync.c b/lib/libxcb/src/sync.c index 9e024d603..1f352756d 100644 --- a/lib/libxcb/src/sync.c +++ b/lib/libxcb/src/sync.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "sync.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_sync_id = { "SYNC", 0 }; @@ -163,6 +170,35 @@ xcb_sync_int64_end (xcb_sync_int64_iterator_t i /**< */) return ret; } +int +xcb_sync_systemcounter_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_sync_systemcounter_t *_aux = (xcb_sync_systemcounter_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_sync_systemcounter_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -229,10 +265,11 @@ void xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i /**< */) { xcb_sync_systemcounter_t *R = i->data; - xcb_generic_iterator_t child = xcb_sync_systemcounter_name_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_sync_systemcounter_t *)(((char *)R) + xcb_sync_systemcounter_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_sync_systemcounter_t *) child.data; - i->index = child.index; } @@ -368,6 +405,7 @@ xcb_sync_initialize (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -407,6 +445,7 @@ xcb_sync_initialize_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -431,6 +470,40 @@ xcb_sync_initialize_reply (xcb_connection_t *c /**< */, return (xcb_sync_initialize_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_sync_list_system_counters_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_sync_list_system_counters_reply_t *_aux = (xcb_sync_list_system_counters_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_sync_list_system_counters_reply_t); + xcb_tmp += xcb_block_len; + /* counters */ + for(i=0; i<_aux->counters_len; i++) { + xcb_tmp_len = xcb_sync_systemcounter_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_sync_systemcounter_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -460,6 +533,7 @@ xcb_sync_list_system_counters (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -493,6 +567,7 @@ xcb_sync_list_system_counters_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -588,6 +663,7 @@ xcb_sync_create_counter_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -627,6 +703,7 @@ xcb_sync_create_counter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -663,6 +740,7 @@ xcb_sync_destroy_counter_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -699,6 +777,7 @@ xcb_sync_destroy_counter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -735,6 +814,7 @@ xcb_sync_query_counter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -771,6 +851,7 @@ xcb_sync_query_counter_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -795,6 +876,35 @@ xcb_sync_query_counter_reply (xcb_connection_t *c /**< */, return (xcb_sync_query_counter_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_sync_await_sizeof (const void *_buffer /**< */, + uint32_t wait_list_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_sync_await_request_t); + xcb_tmp += xcb_block_len; + /* wait_list */ + xcb_block_len += wait_list_len * sizeof(xcb_sync_waitcondition_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_sync_waitcondition_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -828,10 +938,12 @@ xcb_sync_await_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_sync_waitcondition_t wait_list */ xcb_parts[4].iov_base = (char *) wait_list; xcb_parts[4].iov_len = wait_list_len * sizeof(xcb_sync_waitcondition_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -869,10 +981,12 @@ xcb_sync_await (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_sync_waitcondition_t wait_list */ xcb_parts[4].iov_base = (char *) wait_list; xcb_parts[4].iov_len = wait_list_len * sizeof(xcb_sync_waitcondition_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -912,6 +1026,7 @@ xcb_sync_change_counter_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -951,6 +1066,7 @@ xcb_sync_change_counter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -990,6 +1106,7 @@ xcb_sync_set_counter_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1029,10 +1146,40 @@ xcb_sync_set_counter (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_sync_create_alarm_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_sync_create_alarm_request_t *_aux = (xcb_sync_create_alarm_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_sync_create_alarm_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1070,10 +1217,12 @@ xcb_sync_create_alarm_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1115,14 +1264,45 @@ xcb_sync_create_alarm (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_sync_change_alarm_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_sync_change_alarm_request_t *_aux = (xcb_sync_change_alarm_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_sync_change_alarm_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1160,10 +1340,12 @@ xcb_sync_change_alarm_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1205,10 +1387,12 @@ xcb_sync_change_alarm (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1245,6 +1429,7 @@ xcb_sync_destroy_alarm_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1281,6 +1466,7 @@ xcb_sync_destroy_alarm (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1317,6 +1503,7 @@ xcb_sync_query_alarm (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1353,6 +1540,7 @@ xcb_sync_query_alarm_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1412,6 +1600,7 @@ xcb_sync_set_priority_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1451,6 +1640,7 @@ xcb_sync_set_priority (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1487,6 +1677,7 @@ xcb_sync_get_priority (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1523,6 +1714,7 @@ xcb_sync_get_priority_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1585,6 +1777,7 @@ xcb_sync_create_fence_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1627,6 +1820,7 @@ xcb_sync_create_fence (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1663,6 +1857,7 @@ xcb_sync_trigger_fence_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1699,6 +1894,7 @@ xcb_sync_trigger_fence (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1735,6 +1931,7 @@ xcb_sync_reset_fence_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1771,6 +1968,7 @@ xcb_sync_reset_fence (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1807,6 +2005,7 @@ xcb_sync_destroy_fence_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1843,6 +2042,7 @@ xcb_sync_destroy_fence (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1879,6 +2079,7 @@ xcb_sync_query_fence (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1915,6 +2116,7 @@ xcb_sync_query_fence_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1939,6 +2141,35 @@ xcb_sync_query_fence_reply (xcb_connection_t *c /**< */, return (xcb_sync_query_fence_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_sync_await_fence_sizeof (const void *_buffer /**< */, + uint32_t fence_list_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_sync_await_fence_request_t); + xcb_tmp += xcb_block_len; + /* fence_list */ + xcb_block_len += fence_list_len * sizeof(xcb_sync_fence_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_sync_fence_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1972,10 +2203,12 @@ xcb_sync_await_fence_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_sync_fence_t fence_list */ xcb_parts[4].iov_base = (char *) fence_list; xcb_parts[4].iov_len = fence_list_len * sizeof(xcb_sync_fence_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2013,10 +2246,12 @@ xcb_sync_await_fence (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_sync_fence_t fence_list */ xcb_parts[4].iov_base = (char *) fence_list; xcb_parts[4].iov_len = fence_list_len * sizeof(xcb_sync_fence_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/sync.h b/lib/libxcb/src/sync.h index e30f6a45b..3d0069d7e 100644 --- a/lib/libxcb/src/sync.h +++ b/lib/libxcb/src/sync.h @@ -776,6 +776,9 @@ xcb_sync_int64_next (xcb_sync_int64_iterator_t *i /**< */); xcb_generic_iterator_t xcb_sync_int64_end (xcb_sync_int64_iterator_t i /**< */); +int +xcb_sync_systemcounter_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -945,7 +948,7 @@ xcb_generic_iterator_t xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -970,7 +973,7 @@ xcb_sync_initialize (xcb_connection_t *c /**< */, uint8_t desired_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1028,8 +1031,11 @@ xcb_sync_initialize_reply (xcb_connection_t *c /**< */, xcb_sync_initialize_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_sync_list_system_counters_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1050,7 +1056,7 @@ xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1131,7 +1137,7 @@ xcb_sync_list_system_counters_reply (xcb_connection_t *c xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1159,7 +1165,7 @@ xcb_sync_create_counter_checked (xcb_connection_t *c /**< */, xcb_sync_int64_t initial_value /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1184,7 +1190,7 @@ xcb_sync_create_counter (xcb_connection_t *c /**< */, xcb_sync_int64_t initial_value /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1210,7 +1216,7 @@ xcb_sync_destroy_counter_checked (xcb_connection_t *c /**< */, xcb_sync_counter_t counter /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1233,7 +1239,7 @@ xcb_sync_destroy_counter (xcb_connection_t *c /**< */, xcb_sync_counter_t counter /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1256,7 +1262,7 @@ xcb_sync_query_counter (xcb_connection_t *c /**< */, xcb_sync_counter_t counter /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1312,8 +1318,12 @@ xcb_sync_query_counter_reply (xcb_connection_t *c /**< */, xcb_sync_query_counter_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_sync_await_sizeof (const void *_buffer /**< */, + uint32_t wait_list_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1341,7 +1351,7 @@ xcb_sync_await_checked (xcb_connection_t *c /**< */, const xcb_sync_waitcondition_t *wait_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1366,7 +1376,7 @@ xcb_sync_await (xcb_connection_t *c /**< */, const xcb_sync_waitcondition_t *wait_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1394,7 +1404,7 @@ xcb_sync_change_counter_checked (xcb_connection_t *c /**< */, xcb_sync_int64_t amount /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1419,7 +1429,7 @@ xcb_sync_change_counter (xcb_connection_t *c /**< */, xcb_sync_int64_t amount /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1447,7 +1457,7 @@ xcb_sync_set_counter_checked (xcb_connection_t *c /**< */, xcb_sync_int64_t value /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1471,8 +1481,11 @@ xcb_sync_set_counter (xcb_connection_t *c /**< */, xcb_sync_counter_t counter /**< */, xcb_sync_int64_t value /**< */); +int +xcb_sync_create_alarm_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1502,7 +1515,7 @@ xcb_sync_create_alarm_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1528,8 +1541,11 @@ xcb_sync_create_alarm (xcb_connection_t *c /**< */, uint32_t value_mask /**< */, const uint32_t *value_list /**< */); +int +xcb_sync_change_alarm_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1559,7 +1575,7 @@ xcb_sync_change_alarm_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1586,7 +1602,7 @@ xcb_sync_change_alarm (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1612,7 +1628,7 @@ xcb_sync_destroy_alarm_checked (xcb_connection_t *c /**< */, xcb_sync_alarm_t alarm /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1635,7 +1651,7 @@ xcb_sync_destroy_alarm (xcb_connection_t *c /**< */, xcb_sync_alarm_t alarm /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1658,7 +1674,7 @@ xcb_sync_query_alarm (xcb_connection_t *c /**< */, xcb_sync_alarm_t alarm /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1715,7 +1731,7 @@ xcb_sync_query_alarm_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1743,7 +1759,7 @@ xcb_sync_set_priority_checked (xcb_connection_t *c /**< */, int32_t priority /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1768,7 +1784,7 @@ xcb_sync_set_priority (xcb_connection_t *c /**< */, int32_t priority /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1791,7 +1807,7 @@ xcb_sync_get_priority (xcb_connection_t *c /**< */, uint32_t id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1848,7 +1864,7 @@ xcb_sync_get_priority_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1878,7 +1894,7 @@ xcb_sync_create_fence_checked (xcb_connection_t *c /**< */, uint8_t initially_triggered /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1905,7 +1921,7 @@ xcb_sync_create_fence (xcb_connection_t *c /**< */, uint8_t initially_triggered /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1931,7 +1947,7 @@ xcb_sync_trigger_fence_checked (xcb_connection_t *c /**< */, xcb_sync_fence_t fence /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1954,7 +1970,7 @@ xcb_sync_trigger_fence (xcb_connection_t *c /**< */, xcb_sync_fence_t fence /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1980,7 +1996,7 @@ xcb_sync_reset_fence_checked (xcb_connection_t *c /**< */, xcb_sync_fence_t fence /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2003,7 +2019,7 @@ xcb_sync_reset_fence (xcb_connection_t *c /**< */, xcb_sync_fence_t fence /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2029,7 +2045,7 @@ xcb_sync_destroy_fence_checked (xcb_connection_t *c /**< */, xcb_sync_fence_t fence /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2052,7 +2068,7 @@ xcb_sync_destroy_fence (xcb_connection_t *c /**< */, xcb_sync_fence_t fence /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2075,7 +2091,7 @@ xcb_sync_query_fence (xcb_connection_t *c /**< */, xcb_sync_fence_t fence /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2131,8 +2147,12 @@ xcb_sync_query_fence_reply (xcb_connection_t *c /**< */, xcb_sync_query_fence_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_sync_await_fence_sizeof (const void *_buffer /**< */, + uint32_t fence_list_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2160,7 +2180,7 @@ xcb_sync_await_fence_checked (xcb_connection_t *c /**< */, const xcb_sync_fence_t *fence_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xc_misc.c b/lib/libxcb/src/xc_misc.c index 6120354c1..101fd15d5 100644 --- a/lib/libxcb/src/xc_misc.c +++ b/lib/libxcb/src/xc_misc.c @@ -3,11 +3,18 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xc_misc.h" +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) + xcb_extension_t xcb_xc_misc_id = { "XC-MISC", 0 }; @@ -45,6 +52,7 @@ xcb_xc_misc_get_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -84,6 +92,7 @@ xcb_xc_misc_get_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -137,6 +146,7 @@ xcb_xc_misc_get_xid_range (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -170,6 +180,7 @@ xcb_xc_misc_get_xid_range_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -194,6 +205,35 @@ xcb_xc_misc_get_xid_range_reply (xcb_connection_t *c /**< */ return (xcb_xc_misc_get_xid_range_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xc_misc_get_xid_list_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xc_misc_get_xid_list_reply_t *_aux = (xcb_xc_misc_get_xid_list_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xc_misc_get_xid_list_reply_t); + xcb_tmp += xcb_block_len; + /* ids */ + xcb_block_len += _aux->ids_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -226,6 +266,7 @@ xcb_xc_misc_get_xid_list (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -262,6 +303,7 @@ xcb_xc_misc_get_xid_list_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xc_misc.h b/lib/libxcb/src/xc_misc.h index 0e655e7a2..91ee811eb 100644 --- a/lib/libxcb/src/xc_misc.h +++ b/lib/libxcb/src/xc_misc.h @@ -120,7 +120,7 @@ typedef struct xcb_xc_misc_get_xid_list_reply_t { } xcb_xc_misc_get_xid_list_reply_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -145,7 +145,7 @@ xcb_xc_misc_get_version (xcb_connection_t *c /**< */, uint16_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -204,7 +204,7 @@ xcb_xc_misc_get_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -225,7 +225,7 @@ xcb_xc_misc_get_xid_range_cookie_t xcb_xc_misc_get_xid_range (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -279,8 +279,11 @@ xcb_xc_misc_get_xid_range_reply (xcb_connection_t *c /**< */ xcb_xc_misc_get_xid_range_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xc_misc_get_xid_list_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -303,7 +306,7 @@ xcb_xc_misc_get_xid_list (xcb_connection_t *c /**< */, uint32_t count /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xevie.c b/lib/libxcb/src/xevie.c index a326553b1..4a68de89f 100644 --- a/lib/libxcb/src/xevie.c +++ b/lib/libxcb/src/xevie.c @@ -3,11 +3,18 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xevie.h" +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) + xcb_extension_t xcb_xevie_id = { "XEVIE", 0 }; @@ -45,6 +52,7 @@ xcb_xevie_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -84,6 +92,7 @@ xcb_xevie_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -140,6 +149,7 @@ xcb_xevie_start (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -176,6 +186,7 @@ xcb_xevie_start_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -232,6 +243,7 @@ xcb_xevie_end (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -268,6 +280,7 @@ xcb_xevie_end_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -366,6 +379,7 @@ xcb_xevie_send (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -406,6 +420,7 @@ xcb_xevie_send_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -462,6 +477,7 @@ xcb_xevie_select_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -498,6 +514,7 @@ xcb_xevie_select_input_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xevie.h b/lib/libxcb/src/xevie.h index 5eb439750..7a67da198 100644 --- a/lib/libxcb/src/xevie.h +++ b/lib/libxcb/src/xevie.h @@ -205,7 +205,7 @@ typedef struct xcb_xevie_select_input_reply_t { } xcb_xevie_select_input_reply_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -230,7 +230,7 @@ xcb_xevie_query_version (xcb_connection_t *c /**< */, uint16_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -289,7 +289,7 @@ xcb_xevie_query_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -312,7 +312,7 @@ xcb_xevie_start (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -369,7 +369,7 @@ xcb_xevie_start_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -392,7 +392,7 @@ xcb_xevie_end (xcb_connection_t *c /**< */, uint32_t cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -492,7 +492,7 @@ xcb_generic_iterator_t xcb_xevie_event_end (xcb_xevie_event_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -517,7 +517,7 @@ xcb_xevie_send (xcb_connection_t *c /**< */, uint32_t data_type /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -576,7 +576,7 @@ xcb_xevie_send_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -599,7 +599,7 @@ xcb_xevie_select_input (xcb_connection_t *c /**< */, uint32_t event_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xf86dri.c b/lib/libxcb/src/xf86dri.c index 443f4b901..c203c3b78 100644 --- a/lib/libxcb/src/xf86dri.c +++ b/lib/libxcb/src/xf86dri.c @@ -3,11 +3,18 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xf86dri.h" +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) + xcb_extension_t xcb_xf86dri_id = { "XFree86-DRI", 0 }; @@ -77,6 +84,7 @@ xcb_xf86dri_query_version (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -110,6 +118,7 @@ xcb_xf86dri_query_version_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -166,6 +175,7 @@ xcb_xf86dri_query_direct_rendering_capable (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -202,6 +212,7 @@ xcb_xf86dri_query_direct_rendering_capable_unchecked (xcb_connection_t *c /**< xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -226,6 +237,35 @@ xcb_xf86dri_query_direct_rendering_capable_reply (xcb_connection_t return (xcb_xf86dri_query_direct_rendering_capable_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xf86dri_open_connection_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xf86dri_open_connection_reply_t *_aux = (xcb_xf86dri_open_connection_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xf86dri_open_connection_reply_t); + xcb_tmp += xcb_block_len; + /* bus_id */ + xcb_block_len += _aux->bus_id_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -258,6 +298,7 @@ xcb_xf86dri_open_connection (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -294,6 +335,7 @@ xcb_xf86dri_open_connection_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -402,6 +444,7 @@ xcb_xf86dri_close_connection_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -438,10 +481,40 @@ xcb_xf86dri_close_connection (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xf86dri_get_client_driver_name_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xf86dri_get_client_driver_name_reply_t *_aux = (xcb_xf86dri_get_client_driver_name_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xf86dri_get_client_driver_name_reply_t); + xcb_tmp += xcb_block_len; + /* client_driver_name */ + xcb_block_len += _aux->client_driver_name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -474,6 +547,7 @@ xcb_xf86dri_get_client_driver_name (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -510,6 +584,7 @@ xcb_xf86dri_get_client_driver_name_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -624,6 +699,7 @@ xcb_xf86dri_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -666,6 +742,7 @@ xcb_xf86dri_create_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -725,6 +802,7 @@ xcb_xf86dri_destroy_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -764,6 +842,7 @@ xcb_xf86dri_destroy_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -803,6 +882,7 @@ xcb_xf86dri_create_drawable (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -842,6 +922,7 @@ xcb_xf86dri_create_drawable_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -901,6 +982,7 @@ xcb_xf86dri_destroy_drawable_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -940,10 +1022,52 @@ xcb_xf86dri_destroy_drawable (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xf86dri_get_drawable_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xf86dri_get_drawable_info_reply_t *_aux = (xcb_xf86dri_get_drawable_info_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xf86dri_get_drawable_info_reply_t); + xcb_tmp += xcb_block_len; + /* clip_rects */ + xcb_block_len += _aux->num_clip_rects * sizeof(xcb_xf86dri_drm_clip_rect_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_xf86dri_drm_clip_rect_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* back_clip_rects */ + xcb_block_len += _aux->num_back_clip_rects * sizeof(xcb_xf86dri_drm_clip_rect_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_xf86dri_drm_clip_rect_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -979,6 +1103,7 @@ xcb_xf86dri_get_drawable_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1018,6 +1143,7 @@ xcb_xf86dri_get_drawable_info_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1148,6 +1274,35 @@ xcb_xf86dri_get_drawable_info_reply (xcb_connection_t *c return (xcb_xf86dri_get_drawable_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xf86dri_get_device_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xf86dri_get_device_info_reply_t *_aux = (xcb_xf86dri_get_device_info_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xf86dri_get_device_info_reply_t); + xcb_tmp += xcb_block_len; + /* device_private */ + xcb_block_len += _aux->device_private_size * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1180,6 +1335,7 @@ xcb_xf86dri_get_device_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1216,6 +1372,7 @@ xcb_xf86dri_get_device_info_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1327,6 +1484,7 @@ xcb_xf86dri_auth_connection (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1366,6 +1524,7 @@ xcb_xf86dri_auth_connection_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xf86dri.h b/lib/libxcb/src/xf86dri.h index 66f5fe2b4..fb32e2434 100644 --- a/lib/libxcb/src/xf86dri.h +++ b/lib/libxcb/src/xf86dri.h @@ -433,7 +433,7 @@ xcb_generic_iterator_t xcb_xf86dri_drm_clip_rect_end (xcb_xf86dri_drm_clip_rect_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -454,7 +454,7 @@ xcb_xf86dri_query_version_cookie_t xcb_xf86dri_query_version (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -509,7 +509,7 @@ xcb_xf86dri_query_version_reply (xcb_connection_t *c /**< */ xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -532,7 +532,7 @@ xcb_xf86dri_query_direct_rendering_capable (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -588,8 +588,11 @@ xcb_xf86dri_query_direct_rendering_capable_reply (xcb_connection_t xcb_xf86dri_query_direct_rendering_capable_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xf86dri_open_connection_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -612,7 +615,7 @@ xcb_xf86dri_open_connection (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -708,7 +711,7 @@ xcb_xf86dri_open_connection_reply (xcb_connection_t *c /** xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -734,7 +737,7 @@ xcb_xf86dri_close_connection_checked (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -756,8 +759,11 @@ xcb_void_cookie_t xcb_xf86dri_close_connection (xcb_connection_t *c /**< */, uint32_t screen /**< */); +int +xcb_xf86dri_get_client_driver_name_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -780,7 +786,7 @@ xcb_xf86dri_get_client_driver_name (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -876,7 +882,7 @@ xcb_xf86dri_get_client_driver_name_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -903,7 +909,7 @@ xcb_xf86dri_create_context (xcb_connection_t *c /**< */, uint32_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -964,7 +970,7 @@ xcb_xf86dri_create_context_reply (xcb_connection_t *c /**< xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -992,7 +998,7 @@ xcb_xf86dri_destroy_context_checked (xcb_connection_t *c /**< */, uint32_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1017,7 +1023,7 @@ xcb_xf86dri_destroy_context (xcb_connection_t *c /**< */, uint32_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1042,7 +1048,7 @@ xcb_xf86dri_create_drawable (xcb_connection_t *c /**< */, uint32_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1101,7 +1107,7 @@ xcb_xf86dri_create_drawable_reply (xcb_connection_t *c /** xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1129,7 +1135,7 @@ xcb_xf86dri_destroy_drawable_checked (xcb_connection_t *c /**< */, uint32_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1153,8 +1159,11 @@ xcb_xf86dri_destroy_drawable (xcb_connection_t *c /**< */, uint32_t screen /**< */, uint32_t drawable /**< */); +int +xcb_xf86dri_get_drawable_info_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1179,7 +1188,7 @@ xcb_xf86dri_get_drawable_info (xcb_connection_t *c /**< */, uint32_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1315,8 +1324,11 @@ xcb_xf86dri_get_drawable_info_reply (xcb_connection_t *c xcb_xf86dri_get_drawable_info_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xf86dri_get_device_info_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1339,7 +1351,7 @@ xcb_xf86dri_get_device_info (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1435,7 +1447,7 @@ xcb_xf86dri_get_device_info_reply (xcb_connection_t *c /** xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1460,7 +1472,7 @@ xcb_xf86dri_auth_connection (xcb_connection_t *c /**< */, uint32_t magic /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xfixes.c b/lib/libxcb/src/xfixes.c index 541918ce1..4c0dc84b6 100644 --- a/lib/libxcb/src/xfixes.c +++ b/lib/libxcb/src/xfixes.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xfixes.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" #include "render.h" #include "shape.h" @@ -48,6 +55,7 @@ xcb_xfixes_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -87,6 +95,7 @@ xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -153,6 +162,7 @@ xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -199,6 +209,7 @@ xcb_xfixes_change_save_set (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -241,6 +252,7 @@ xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -283,6 +295,7 @@ xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -322,6 +335,7 @@ xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -361,10 +375,40 @@ xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xfixes_get_cursor_image_reply_t *_aux = (xcb_xfixes_get_cursor_image_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_reply_t); + xcb_tmp += xcb_block_len; + /* cursor_image */ + xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -394,6 +438,7 @@ xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -427,6 +472,7 @@ xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -541,6 +587,35 @@ xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */) return ret; } +int +xcb_xfixes_create_region_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_create_region_request_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -577,10 +652,12 @@ xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -621,10 +698,12 @@ xcb_xfixes_create_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -664,6 +743,7 @@ xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -703,6 +783,7 @@ xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -746,6 +827,7 @@ xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -789,6 +871,7 @@ xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -828,6 +911,7 @@ xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -867,6 +951,7 @@ xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -906,6 +991,7 @@ xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -945,6 +1031,7 @@ xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -981,6 +1068,7 @@ xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1017,10 +1105,40 @@ xcb_xfixes_destroy_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xfixes_set_region_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_set_region_request_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1057,10 +1175,12 @@ xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1101,10 +1221,12 @@ xcb_xfixes_set_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1144,6 +1266,7 @@ xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1183,6 +1306,7 @@ xcb_xfixes_copy_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1225,6 +1349,7 @@ xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1267,6 +1392,7 @@ xcb_xfixes_union_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1309,6 +1435,7 @@ xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1351,6 +1478,7 @@ xcb_xfixes_intersect_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1393,6 +1521,7 @@ xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1435,6 +1564,7 @@ xcb_xfixes_subtract_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1477,6 +1607,7 @@ xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1519,6 +1650,7 @@ xcb_xfixes_invert_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1561,6 +1693,7 @@ xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1603,6 +1736,7 @@ xcb_xfixes_translate_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1642,6 +1776,7 @@ xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1681,10 +1816,40 @@ xcb_xfixes_region_extents (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xfixes_fetch_region_reply_t *_aux = (xcb_xfixes_fetch_region_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_fetch_region_reply_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += (_aux->length / 2) * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1717,6 +1882,7 @@ xcb_xfixes_fetch_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1753,6 +1919,7 @@ xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1870,6 +2037,7 @@ xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1915,6 +2083,7 @@ xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1964,6 +2133,7 @@ xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2013,6 +2183,7 @@ xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2058,6 +2229,7 @@ xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2103,10 +2275,40 @@ xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xfixes_set_cursor_name_request_t *_aux = (xcb_xfixes_set_cursor_name_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_set_cursor_name_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->nbytes * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2145,10 +2347,12 @@ xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = nbytes * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2191,14 +2395,45 @@ xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = nbytes * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xfixes_get_cursor_name_reply_t *_aux = (xcb_xfixes_get_cursor_name_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_get_cursor_name_reply_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->nbytes * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2231,6 +2466,7 @@ xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2267,6 +2503,7 @@ xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2343,6 +2580,47 @@ xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< return (xcb_xfixes_get_cursor_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xfixes_get_cursor_image_and_name_reply_t *_aux = (xcb_xfixes_get_cursor_image_and_name_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_get_cursor_image_and_name_reply_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->nbytes * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* cursor_image */ + xcb_block_len += (_aux->width * _aux->height) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2372,6 +2650,7 @@ xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2405,6 +2684,7 @@ xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2570,6 +2850,7 @@ xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2609,10 +2890,40 @@ xcb_xfixes_change_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xfixes_change_cursor_by_name_request_t *_aux = (xcb_xfixes_change_cursor_by_name_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xfixes_change_cursor_by_name_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->nbytes * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2651,10 +2962,12 @@ xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = nbytes * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2697,10 +3010,12 @@ xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = nbytes * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2752,6 +3067,7 @@ xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2803,6 +3119,7 @@ xcb_xfixes_expand_region (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2839,6 +3156,7 @@ xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2875,6 +3193,7 @@ xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2911,6 +3230,7 @@ xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2947,6 +3267,7 @@ xcb_xfixes_show_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xfixes.h b/lib/libxcb/src/xfixes.h index 4d7eb0900..b67aa8513 100644 --- a/lib/libxcb/src/xfixes.h +++ b/lib/libxcb/src/xfixes.h @@ -683,7 +683,7 @@ typedef struct xcb_xfixes_show_cursor_request_t { } xcb_xfixes_show_cursor_request_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -708,7 +708,7 @@ xcb_xfixes_query_version (xcb_connection_t *c /**< */, uint32_t client_minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -767,7 +767,7 @@ xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -799,7 +799,7 @@ xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -828,7 +828,7 @@ xcb_xfixes_change_save_set (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -858,7 +858,7 @@ xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */, uint32_t event_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -885,7 +885,7 @@ xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */, uint32_t event_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -913,7 +913,7 @@ xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */, uint32_t event_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -937,8 +937,11 @@ xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */, xcb_window_t window /**< */, uint32_t event_mask /**< */); +int +xcb_xfixes_get_cursor_image_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -959,7 +962,7 @@ xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1095,8 +1098,12 @@ xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */); xcb_generic_iterator_t xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */); +int +xcb_xfixes_create_region_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1126,7 +1133,7 @@ xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1153,7 +1160,7 @@ xcb_xfixes_create_region (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1181,7 +1188,7 @@ xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */, xcb_pixmap_t bitmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1206,7 +1213,7 @@ xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */, xcb_pixmap_t bitmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1236,7 +1243,7 @@ xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */, xcb_shape_kind_t kind /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1263,7 +1270,7 @@ xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */, xcb_shape_kind_t kind /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1291,7 +1298,7 @@ xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */, xcb_gcontext_t gc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1316,7 +1323,7 @@ xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */, xcb_gcontext_t gc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1344,7 +1351,7 @@ xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */, xcb_render_picture_t picture /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1369,7 +1376,7 @@ xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */, xcb_render_picture_t picture /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1395,7 +1402,7 @@ xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t region /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1417,8 +1424,12 @@ xcb_void_cookie_t xcb_xfixes_destroy_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t region /**< */); +int +xcb_xfixes_set_region_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1448,7 +1459,7 @@ xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1475,7 +1486,7 @@ xcb_xfixes_set_region (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1503,7 +1514,7 @@ xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1528,7 +1539,7 @@ xcb_xfixes_copy_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1558,7 +1569,7 @@ xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1585,7 +1596,7 @@ xcb_xfixes_union_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1615,7 +1626,7 @@ xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1642,7 +1653,7 @@ xcb_xfixes_intersect_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1672,7 +1683,7 @@ xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1699,7 +1710,7 @@ xcb_xfixes_subtract_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1729,7 +1740,7 @@ xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1756,7 +1767,7 @@ xcb_xfixes_invert_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1786,7 +1797,7 @@ xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */, int16_t dy /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1813,7 +1824,7 @@ xcb_xfixes_translate_region (xcb_connection_t *c /**< */, int16_t dy /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1841,7 +1852,7 @@ xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1865,8 +1876,11 @@ xcb_xfixes_region_extents (xcb_connection_t *c /**< */, xcb_xfixes_region_t source /**< */, xcb_xfixes_region_t destination /**< */); +int +xcb_xfixes_fetch_region_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1889,7 +1903,7 @@ xcb_xfixes_fetch_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t region /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1985,7 +1999,7 @@ xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2017,7 +2031,7 @@ xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */, int16_t y_origin /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2046,7 +2060,7 @@ xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */, int16_t y_origin /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2080,7 +2094,7 @@ xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */, xcb_xfixes_region_t region /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2111,7 +2125,7 @@ xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */, xcb_xfixes_region_t region /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2143,7 +2157,7 @@ xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */, int16_t y_origin /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2171,8 +2185,11 @@ xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */, int16_t x_origin /**< */, int16_t y_origin /**< */); +int +xcb_xfixes_set_cursor_name_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2202,7 +2219,7 @@ xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2228,8 +2245,11 @@ xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */, uint16_t nbytes /**< */, const char *name /**< */); +int +xcb_xfixes_get_cursor_name_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2252,7 +2272,7 @@ xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */, xcb_cursor_t cursor /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2347,8 +2367,11 @@ xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< xcb_xfixes_get_cursor_name_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xfixes_get_cursor_image_and_name_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2369,7 +2392,7 @@ xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2502,7 +2525,7 @@ xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2530,7 +2553,7 @@ xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */, xcb_cursor_t destination /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2554,8 +2577,11 @@ xcb_xfixes_change_cursor (xcb_connection_t *c /**< */, xcb_cursor_t source /**< */, xcb_cursor_t destination /**< */); +int +xcb_xfixes_change_cursor_by_name_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2585,7 +2611,7 @@ xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2612,7 +2638,7 @@ xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2648,7 +2674,7 @@ xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */, uint16_t bottom /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2681,7 +2707,7 @@ xcb_xfixes_expand_region (xcb_connection_t *c /**< */, uint16_t bottom /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2707,7 +2733,7 @@ xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2730,7 +2756,7 @@ xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2756,7 +2782,7 @@ xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xinerama.c b/lib/libxcb/src/xinerama.c index 7ed8dd1a6..e660be267 100644 --- a/lib/libxcb/src/xinerama.c +++ b/lib/libxcb/src/xinerama.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xinerama.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_xinerama_id = { "XINERAMA", 0 }; @@ -84,6 +91,7 @@ xcb_xinerama_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -123,6 +131,7 @@ xcb_xinerama_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -179,6 +188,7 @@ xcb_xinerama_get_state (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -215,6 +225,7 @@ xcb_xinerama_get_state_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -271,6 +282,7 @@ xcb_xinerama_get_screen_count (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -307,6 +319,7 @@ xcb_xinerama_get_screen_count_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -366,6 +379,7 @@ xcb_xinerama_get_screen_size (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -405,6 +419,7 @@ xcb_xinerama_get_screen_size_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -458,6 +473,7 @@ xcb_xinerama_is_active (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -491,6 +507,7 @@ xcb_xinerama_is_active_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -515,6 +532,35 @@ xcb_xinerama_is_active_reply (xcb_connection_t *c /**< */, return (xcb_xinerama_is_active_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xinerama_query_screens_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xinerama_query_screens_reply_t *_aux = (xcb_xinerama_query_screens_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xinerama_query_screens_reply_t); + xcb_tmp += xcb_block_len; + /* screen_info */ + xcb_block_len += _aux->number * sizeof(xcb_xinerama_screen_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_xinerama_screen_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -544,6 +590,7 @@ xcb_xinerama_query_screens (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -577,6 +624,7 @@ xcb_xinerama_query_screens_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xinerama.h b/lib/libxcb/src/xinerama.h index 5dee91896..f18a96c79 100644 --- a/lib/libxcb/src/xinerama.h +++ b/lib/libxcb/src/xinerama.h @@ -278,7 +278,7 @@ xcb_generic_iterator_t xcb_xinerama_screen_info_end (xcb_xinerama_screen_info_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -303,7 +303,7 @@ xcb_xinerama_query_version (xcb_connection_t *c /**< */, uint8_t minor /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -362,7 +362,7 @@ xcb_xinerama_query_version_reply (xcb_connection_t *c /**< xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -385,7 +385,7 @@ xcb_xinerama_get_state (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -442,7 +442,7 @@ xcb_xinerama_get_state_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -465,7 +465,7 @@ xcb_xinerama_get_screen_count (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -522,7 +522,7 @@ xcb_xinerama_get_screen_count_reply (xcb_connection_t *c xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -547,7 +547,7 @@ xcb_xinerama_get_screen_size (xcb_connection_t *c /**< */, uint32_t screen /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -606,7 +606,7 @@ xcb_xinerama_get_screen_size_reply (xcb_connection_t *c / xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -627,7 +627,7 @@ xcb_xinerama_is_active_cookie_t xcb_xinerama_is_active (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -681,8 +681,11 @@ xcb_xinerama_is_active_reply (xcb_connection_t *c /**< */, xcb_xinerama_is_active_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xinerama_query_screens_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -703,7 +706,7 @@ xcb_xinerama_query_screens_cookie_t xcb_xinerama_query_screens (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xinput.c b/lib/libxcb/src/xinput.c index c6e581e55..ca5d27382 100644 --- a/lib/libxcb/src/xinput.c +++ b/lib/libxcb/src/xinput.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xinput.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_input_id = { "XInputExtension", 0 }; @@ -87,6 +94,35 @@ xcb_input_event_class_end (xcb_input_event_class_iterator_t i /**< */) return ret; } +int +xcb_input_get_extension_version_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_get_extension_version_request_t *_aux = (xcb_input_get_extension_version_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_get_extension_version_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -122,10 +158,12 @@ xcb_input_get_extension_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -165,10 +203,12 @@ xcb_input_get_extension_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -231,6 +271,35 @@ xcb_input_device_info_end (xcb_input_device_info_iterator_t i /**< */) return ret; } +int +xcb_input_list_input_devices_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_list_input_devices_reply_t *_aux = (xcb_input_list_input_devices_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_list_input_devices_reply_t); + xcb_tmp += xcb_block_len; + /* devices */ + xcb_block_len += _aux->devices_len * sizeof(xcb_input_device_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_device_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -260,6 +329,7 @@ xcb_input_list_input_devices (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -293,6 +363,7 @@ xcb_input_list_input_devices_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -521,6 +592,35 @@ xcb_input_axis_info_end (xcb_input_axis_info_iterator_t i /**< */) return ret; } +int +xcb_input_valuator_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_valuator_info_t *_aux = (xcb_input_valuator_info_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_valuator_info_t); + xcb_tmp += xcb_block_len; + /* axes */ + xcb_block_len += _aux->axes_len * sizeof(xcb_input_axis_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_axis_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -587,10 +687,11 @@ void xcb_input_valuator_info_next (xcb_input_valuator_info_iterator_t *i /**< */) { xcb_input_valuator_info_t *R = i->data; - xcb_generic_iterator_t child = xcb_input_axis_info_end(xcb_input_valuator_info_axes_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_input_valuator_info_t *)(((char *)R) + xcb_input_valuator_info_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_input_valuator_info_t *) child.data; - i->index = child.index; } @@ -653,6 +754,35 @@ xcb_input_input_class_info_end (xcb_input_input_class_info_iterator_t i /**< */ return ret; } +int +xcb_input_open_device_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_open_device_reply_t *_aux = (xcb_input_open_device_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_open_device_reply_t); + xcb_tmp += xcb_block_len; + /* class_info */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_input_class_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_input_class_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -686,6 +816,7 @@ xcb_input_open_device (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -723,6 +854,7 @@ xcb_input_open_device_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -832,6 +964,7 @@ xcb_input_close_device_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -869,6 +1002,7 @@ xcb_input_close_device (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -909,6 +1043,7 @@ xcb_input_set_device_mode (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -949,6 +1084,7 @@ xcb_input_set_device_mode_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -973,6 +1109,35 @@ xcb_input_set_device_mode_reply (xcb_connection_t *c /**< */ return (xcb_input_set_device_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_input_select_extension_event_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_select_extension_event_request_t *_aux = (xcb_input_select_extension_event_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_select_extension_event_request_t); + xcb_tmp += xcb_block_len; + /* classes */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1011,10 +1176,12 @@ xcb_input_select_extension_event_checked (xcb_connection_t *c /**< xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1057,14 +1224,57 @@ xcb_input_select_extension_event (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_input_get_selected_extension_events_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_get_selected_extension_events_reply_t *_aux = (xcb_input_get_selected_extension_events_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_get_selected_extension_events_reply_t); + xcb_tmp += xcb_block_len; + /* this_classes */ + xcb_block_len += _aux->num_this_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* all_classes */ + xcb_block_len += _aux->num_all_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1097,6 +1307,7 @@ xcb_input_get_selected_extension_events (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1133,6 +1344,7 @@ xcb_input_get_selected_extension_events_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1263,6 +1475,35 @@ xcb_input_get_selected_extension_events_reply (xcb_connection_t return (xcb_input_get_selected_extension_events_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_input_change_device_dont_propagate_list_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_change_device_dont_propagate_list_request_t *_aux = (xcb_input_change_device_dont_propagate_list_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_change_device_dont_propagate_list_request_t); + xcb_tmp += xcb_block_len; + /* classes */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1304,10 +1545,12 @@ xcb_input_change_device_dont_propagate_list_checked (xcb_connection_t xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1353,14 +1596,45 @@ xcb_input_change_device_dont_propagate_list (xcb_connection_t *c / xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_input_get_device_dont_propagate_list_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_get_device_dont_propagate_list_reply_t *_aux = (xcb_input_get_device_dont_propagate_list_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_get_device_dont_propagate_list_reply_t); + xcb_tmp += xcb_block_len; + /* classes */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1393,6 +1667,7 @@ xcb_input_get_device_dont_propagate_list (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1429,6 +1704,7 @@ xcb_input_get_device_dont_propagate_list_unchecked (xcb_connection_t *c /**< */ xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1543,6 +1819,7 @@ xcb_input_get_device_motion_events (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1585,6 +1862,7 @@ xcb_input_get_device_motion_events_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1680,6 +1958,7 @@ xcb_input_change_keyboard_device (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1717,6 +1996,7 @@ xcb_input_change_keyboard_device_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1780,6 +2060,7 @@ xcb_input_change_pointer_device (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1823,6 +2104,7 @@ xcb_input_change_pointer_device_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1847,6 +2129,35 @@ xcb_input_change_pointer_device_reply (xcb_connection_t return (xcb_input_change_pointer_device_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_input_grab_device_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_grab_device_request_t *_aux = (xcb_input_grab_device_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_grab_device_request_t); + xcb_tmp += xcb_block_len; + /* classes */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1900,10 +2211,12 @@ xcb_input_grab_device (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1961,10 +2274,12 @@ xcb_input_grab_device_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2024,6 +2339,7 @@ xcb_input_ungrab_device_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2063,10 +2379,40 @@ xcb_input_ungrab_device (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_input_grab_device_key_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_grab_device_key_request_t *_aux = (xcb_input_grab_device_key_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_grab_device_key_request_t); + xcb_tmp += xcb_block_len; + /* classes */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2126,10 +2472,12 @@ xcb_input_grab_device_key_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2193,10 +2541,12 @@ xcb_input_grab_device_key (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2245,6 +2595,7 @@ xcb_input_ungrab_device_key_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2293,10 +2644,40 @@ xcb_input_ungrab_device_key (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_input_grab_device_button_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_grab_device_button_request_t *_aux = (xcb_input_grab_device_button_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_grab_device_button_request_t); + xcb_tmp += xcb_block_len; + /* classes */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2356,10 +2737,12 @@ xcb_input_grab_device_button_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2423,10 +2806,12 @@ xcb_input_grab_device_button (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[4].iov_base = (char *) classes; xcb_parts[4].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2475,6 +2860,7 @@ xcb_input_ungrab_device_button_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2523,6 +2909,7 @@ xcb_input_ungrab_device_button (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2565,6 +2952,7 @@ xcb_input_allow_device_events_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2607,6 +2995,7 @@ xcb_input_allow_device_events (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2644,6 +3033,7 @@ xcb_input_get_device_focus (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2681,6 +3071,7 @@ xcb_input_get_device_focus_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2746,6 +3137,7 @@ xcb_input_set_device_focus_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2791,6 +3183,7 @@ xcb_input_set_device_focus (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2828,6 +3221,7 @@ xcb_input_get_feedback_control (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2865,6 +3259,7 @@ xcb_input_get_feedback_control_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3041,6 +3436,35 @@ xcb_input_integer_feedback_state_end (xcb_input_integer_feedback_state_iterator_ return ret; } +int +xcb_input_string_feedback_state_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_string_feedback_state_t *_aux = (xcb_input_string_feedback_state_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_string_feedback_state_t); + xcb_tmp += xcb_block_len; + /* keysyms */ + xcb_block_len += _aux->num_keysyms * sizeof(xcb_keysym_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keysym_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3107,10 +3531,11 @@ void xcb_input_string_feedback_state_next (xcb_input_string_feedback_state_iterator_t *i /**< */) { xcb_input_string_feedback_state_t *R = i->data; - xcb_generic_iterator_t child = xcb_input_string_feedback_state_keysyms_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_input_string_feedback_state_t *)(((char *)R) + xcb_input_string_feedback_state_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_input_string_feedback_state_t *) child.data; - i->index = child.index; } @@ -3363,6 +3788,35 @@ xcb_input_integer_feedback_ctl_end (xcb_input_integer_feedback_ctl_iterator_t i return ret; } +int +xcb_input_string_feedback_ctl_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_string_feedback_ctl_t *_aux = (xcb_input_string_feedback_ctl_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_string_feedback_ctl_t); + xcb_tmp += xcb_block_len; + /* keysyms */ + xcb_block_len += _aux->num_keysyms * sizeof(xcb_keysym_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keysym_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3429,10 +3883,11 @@ void xcb_input_string_feedback_ctl_next (xcb_input_string_feedback_ctl_iterator_t *i /**< */) { xcb_input_string_feedback_ctl_t *R = i->data; - xcb_generic_iterator_t child = xcb_input_string_feedback_ctl_keysyms_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_input_string_feedback_ctl_t *)(((char *)R) + xcb_input_string_feedback_ctl_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_input_string_feedback_ctl_t *) child.data; - i->index = child.index; } @@ -3533,6 +3988,35 @@ xcb_input_led_feedback_ctl_end (xcb_input_led_feedback_ctl_iterator_t i /**< */ return ret; } +int +xcb_input_get_device_key_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_get_device_key_mapping_reply_t *_aux = (xcb_input_get_device_key_mapping_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_get_device_key_mapping_reply_t); + xcb_tmp += xcb_block_len; + /* keysyms */ + xcb_block_len += _aux->length * sizeof(xcb_keysym_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keysym_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3571,6 +4055,7 @@ xcb_input_get_device_key_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3613,6 +4098,7 @@ xcb_input_get_device_key_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3689,6 +4175,35 @@ xcb_input_get_device_key_mapping_reply (xcb_connection_t return (xcb_input_get_device_key_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_input_change_device_key_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_change_device_key_mapping_request_t *_aux = (xcb_input_change_device_key_mapping_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_change_device_key_mapping_request_t); + xcb_tmp += xcb_block_len; + /* keysyms */ + xcb_block_len += (_aux->keycode_count * _aux->keysyms_per_keycode) * sizeof(xcb_keysym_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keysym_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3732,10 +4247,12 @@ xcb_input_change_device_key_mapping_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_keysym_t keysyms */ xcb_parts[4].iov_base = (char *) keysyms; xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3783,14 +4300,45 @@ xcb_input_change_device_key_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_keysym_t keysyms */ xcb_parts[4].iov_base = (char *) keysyms; xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_input_get_device_modifier_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_get_device_modifier_mapping_reply_t *_aux = (xcb_input_get_device_modifier_mapping_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_get_device_modifier_mapping_reply_t); + xcb_tmp += xcb_block_len; + /* keymaps */ + xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3824,6 +4372,7 @@ xcb_input_get_device_modifier_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3861,6 +4410,7 @@ xcb_input_get_device_modifier_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3937,6 +4487,35 @@ xcb_input_get_device_modifier_mapping_reply (xcb_connection_t return (xcb_input_get_device_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_input_set_device_modifier_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_set_device_modifier_mapping_request_t *_aux = (xcb_input_set_device_modifier_mapping_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_set_device_modifier_mapping_request_t); + xcb_tmp += xcb_block_len; + /* keymaps */ + xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3975,10 +4554,12 @@ xcb_input_set_device_modifier_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t keymaps */ xcb_parts[4].iov_base = (char *) keymaps; xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4021,10 +4602,12 @@ xcb_input_set_device_modifier_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t keymaps */ xcb_parts[4].iov_base = (char *) keymaps; xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4049,6 +4632,35 @@ xcb_input_set_device_modifier_mapping_reply (xcb_connection_t return (xcb_input_set_device_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_input_get_device_button_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_get_device_button_mapping_reply_t *_aux = (xcb_input_get_device_button_mapping_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_get_device_button_mapping_reply_t); + xcb_tmp += xcb_block_len; + /* map */ + xcb_block_len += _aux->map_size * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4082,6 +4694,7 @@ xcb_input_get_device_button_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4119,6 +4732,7 @@ xcb_input_get_device_button_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4195,6 +4809,35 @@ xcb_input_get_device_button_mapping_reply (xcb_connection_t return (xcb_input_get_device_button_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_input_set_device_button_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_set_device_button_mapping_request_t *_aux = (xcb_input_set_device_button_mapping_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_set_device_button_mapping_request_t); + xcb_tmp += xcb_block_len; + /* map */ + xcb_block_len += _aux->map_size * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4233,10 +4876,12 @@ xcb_input_set_device_button_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t map */ xcb_parts[4].iov_base = (char *) map; xcb_parts[4].iov_len = map_size * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4279,10 +4924,12 @@ xcb_input_set_device_button_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t map */ xcb_parts[4].iov_base = (char *) map; xcb_parts[4].iov_len = map_size * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4340,6 +4987,7 @@ xcb_input_query_device_state (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4377,6 +5025,7 @@ xcb_input_query_device_state_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4515,6 +5164,35 @@ xcb_input_button_state_end (xcb_input_button_state_iterator_t i /**< */) return ret; } +int +xcb_input_valuator_state_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_valuator_state_t *_aux = (xcb_input_valuator_state_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_valuator_state_t); + xcb_tmp += xcb_block_len; + /* valuators */ + xcb_block_len += _aux->num_valuators * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4581,10 +5259,11 @@ void xcb_input_valuator_state_next (xcb_input_valuator_state_iterator_t *i /**< */) { xcb_input_valuator_state_t *R = i->data; - xcb_generic_iterator_t child = xcb_input_valuator_state_valuators_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_input_valuator_state_t *)(((char *)R) + xcb_input_valuator_state_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_input_valuator_state_t *) child.data; - i->index = child.index; } @@ -4609,6 +5288,47 @@ xcb_input_valuator_state_end (xcb_input_valuator_state_iterator_t i /**< */) return ret; } +int +xcb_input_send_extension_event_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_send_extension_event_request_t *_aux = (xcb_input_send_extension_event_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_send_extension_event_request_t); + xcb_tmp += xcb_block_len; + /* events */ + xcb_block_len += (_aux->num_events * 32) * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* classes */ + xcb_block_len += _aux->num_classes * sizeof(xcb_input_event_class_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_input_event_class_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4658,14 +5378,17 @@ xcb_input_send_extension_event_checked (xcb_connection_t *c /**< * xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char events */ xcb_parts[4].iov_base = (char *) events; xcb_parts[4].iov_len = (num_events * 32) * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[6].iov_base = (char *) classes; xcb_parts[6].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4719,14 +5442,17 @@ xcb_input_send_extension_event (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char events */ xcb_parts[4].iov_base = (char *) events; xcb_parts[4].iov_len = (num_events * 32) * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_input_event_class_t classes */ xcb_parts[6].iov_base = (char *) classes; xcb_parts[6].iov_len = num_classes * sizeof(xcb_input_event_class_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4772,6 +5498,7 @@ xcb_input_device_bell_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4817,10 +5544,40 @@ xcb_input_device_bell (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_input_set_device_valuators_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_set_device_valuators_request_t *_aux = (xcb_input_set_device_valuators_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_set_device_valuators_request_t); + xcb_tmp += xcb_block_len; + /* valuators */ + xcb_block_len += _aux->num_valuators * sizeof(int32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(int32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -4862,10 +5619,12 @@ xcb_input_set_device_valuators (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* int32_t valuators */ xcb_parts[4].iov_base = (char *) valuators; xcb_parts[4].iov_len = num_valuators * sizeof(int32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4911,10 +5670,12 @@ xcb_input_set_device_valuators_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* int32_t valuators */ xcb_parts[4].iov_base = (char *) valuators; xcb_parts[4].iov_len = num_valuators * sizeof(int32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4975,6 +5736,7 @@ xcb_input_get_device_control (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5015,6 +5777,7 @@ xcb_input_get_device_control_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5077,6 +5840,59 @@ xcb_input_device_state_end (xcb_input_device_state_iterator_t i /**< */) return ret; } +int +xcb_input_device_resolution_state_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_device_resolution_state_t *_aux = (xcb_input_device_resolution_state_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_device_resolution_state_t); + xcb_tmp += xcb_block_len; + /* resolution_values */ + xcb_block_len += _aux->num_valuators * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* resolution_min */ + xcb_block_len += _aux->num_valuators * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* resolution_max */ + xcb_block_len += _aux->num_valuators * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5251,10 +6067,11 @@ void xcb_input_device_resolution_state_next (xcb_input_device_resolution_state_iterator_t *i /**< */) { xcb_input_device_resolution_state_t *R = i->data; - xcb_generic_iterator_t child = xcb_input_device_resolution_state_resolution_max_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_input_device_resolution_state_t *)(((char *)R) + xcb_input_device_resolution_state_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_input_device_resolution_state_t *) child.data; - i->index = child.index; } @@ -5469,6 +6286,35 @@ xcb_input_device_ctl_end (xcb_input_device_ctl_iterator_t i /**< */) return ret; } +int +xcb_input_device_resolution_ctl_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_input_device_resolution_ctl_t *_aux = (xcb_input_device_resolution_ctl_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_input_device_resolution_ctl_t); + xcb_tmp += xcb_block_len; + /* resolution_values */ + xcb_block_len += _aux->num_valuators * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5535,10 +6381,11 @@ void xcb_input_device_resolution_ctl_next (xcb_input_device_resolution_ctl_iterator_t *i /**< */) { xcb_input_device_resolution_ctl_t *R = i->data; - xcb_generic_iterator_t child = xcb_input_device_resolution_ctl_resolution_values_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_input_device_resolution_ctl_t *)(((char *)R) + xcb_input_device_resolution_ctl_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_input_device_resolution_ctl_t *) child.data; - i->index = child.index; } diff --git a/lib/libxcb/src/xinput.h b/lib/libxcb/src/xinput.h index b4d3c47a6..b6ba38014 100644 --- a/lib/libxcb/src/xinput.h +++ b/lib/libxcb/src/xinput.h @@ -2087,8 +2087,11 @@ xcb_input_event_class_next (xcb_input_event_class_iterator_t *i /**< */); xcb_generic_iterator_t xcb_input_event_class_end (xcb_input_event_class_iterator_t i /**< */); +int +xcb_input_get_extension_version_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2113,7 +2116,7 @@ xcb_input_get_extension_version (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2214,8 +2217,11 @@ xcb_input_device_info_next (xcb_input_device_info_iterator_t *i /**< */); xcb_generic_iterator_t xcb_input_device_info_end (xcb_input_device_info_iterator_t i /**< */); +int +xcb_input_list_input_devices_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2236,7 +2242,7 @@ xcb_input_list_input_devices_cookie_t xcb_input_list_input_devices (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2501,6 +2507,9 @@ xcb_input_axis_info_next (xcb_input_axis_info_iterator_t *i /**< */); xcb_generic_iterator_t xcb_input_axis_info_end (xcb_input_axis_info_iterator_t i /**< */); +int +xcb_input_valuator_info_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -2626,8 +2635,11 @@ xcb_input_input_class_info_next (xcb_input_input_class_info_iterator_t *i /**< xcb_generic_iterator_t xcb_input_input_class_info_end (xcb_input_input_class_info_iterator_t i /**< */); +int +xcb_input_open_device_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2650,7 +2662,7 @@ xcb_input_open_device (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2746,7 +2758,7 @@ xcb_input_open_device_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2772,7 +2784,7 @@ xcb_input_close_device_checked (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2795,7 +2807,7 @@ xcb_input_close_device (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2820,7 +2832,7 @@ xcb_input_set_device_mode (xcb_connection_t *c /**< */, uint8_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2878,8 +2890,11 @@ xcb_input_set_device_mode_reply (xcb_connection_t *c /**< */ xcb_input_set_device_mode_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_input_select_extension_event_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2909,7 +2924,7 @@ xcb_input_select_extension_event_checked (xcb_connection_t *c /**< const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2935,8 +2950,11 @@ xcb_input_select_extension_event (xcb_connection_t *c /**< */, uint16_t num_classes /**< */, const xcb_input_event_class_t *classes /**< */); +int +xcb_input_get_selected_extension_events_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2959,7 +2977,7 @@ xcb_input_get_selected_extension_events (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3093,8 +3111,11 @@ xcb_input_get_selected_extension_events_reply (xcb_connection_t xcb_input_get_selected_extension_events_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_input_change_device_dont_propagate_list_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3126,7 +3147,7 @@ xcb_input_change_device_dont_propagate_list_checked (xcb_connection_t const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3154,8 +3175,11 @@ xcb_input_change_device_dont_propagate_list (xcb_connection_t *c / uint8_t mode /**< */, const xcb_input_event_class_t *classes /**< */); +int +xcb_input_get_device_dont_propagate_list_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3178,7 +3202,7 @@ xcb_input_get_device_dont_propagate_list (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3274,7 +3298,7 @@ xcb_input_get_device_dont_propagate_list_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3301,7 +3325,7 @@ xcb_input_get_device_motion_events (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3405,7 +3429,7 @@ xcb_generic_iterator_t xcb_input_device_time_coord_end (xcb_input_device_time_coord_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3428,7 +3452,7 @@ xcb_input_change_keyboard_device (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3485,7 +3509,7 @@ xcb_input_change_keyboard_device_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3512,7 +3536,7 @@ xcb_input_change_pointer_device (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3572,8 +3596,11 @@ xcb_input_change_pointer_device_reply (xcb_connection_t xcb_input_change_pointer_device_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_input_grab_device_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3610,7 +3637,7 @@ xcb_input_grab_device (xcb_connection_t *c /**< */, const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3681,7 +3708,7 @@ xcb_input_grab_device_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3709,7 +3736,7 @@ xcb_input_ungrab_device_checked (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3733,8 +3760,11 @@ xcb_input_ungrab_device (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */, uint8_t device_id /**< */); +int +xcb_input_grab_device_key_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3778,7 +3808,7 @@ xcb_input_grab_device_key_checked (xcb_connection_t *c /**< */, const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3819,7 +3849,7 @@ xcb_input_grab_device_key (xcb_connection_t *c /**< */, const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3853,7 +3883,7 @@ xcb_input_ungrab_device_key_checked (xcb_connection_t *c /**< */, uint8_t grabbed_device /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3883,8 +3913,11 @@ xcb_input_ungrab_device_key (xcb_connection_t *c /**< */, uint8_t key /**< */, uint8_t grabbed_device /**< */); +int +xcb_input_grab_device_button_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3928,7 +3961,7 @@ xcb_input_grab_device_button_checked (xcb_connection_t *c /**< */, const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3969,7 +4002,7 @@ xcb_input_grab_device_button (xcb_connection_t *c /**< */, const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4003,7 +4036,7 @@ xcb_input_ungrab_device_button_checked (xcb_connection_t *c /**< */, uint8_t grabbed_device /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4034,7 +4067,7 @@ xcb_input_ungrab_device_button (xcb_connection_t *c /**< */, uint8_t grabbed_device /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4064,7 +4097,7 @@ xcb_input_allow_device_events_checked (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4091,7 +4124,7 @@ xcb_input_allow_device_events (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4114,7 +4147,7 @@ xcb_input_get_device_focus (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4171,7 +4204,7 @@ xcb_input_get_device_focus_reply (xcb_connection_t *c /**< xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4203,7 +4236,7 @@ xcb_input_set_device_focus_checked (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4232,7 +4265,7 @@ xcb_input_set_device_focus (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4255,7 +4288,7 @@ xcb_input_get_feedback_control (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -4483,6 +4516,9 @@ xcb_input_integer_feedback_state_next (xcb_input_integer_feedback_state_iterator xcb_generic_iterator_t xcb_input_integer_feedback_state_end (xcb_input_integer_feedback_state_iterator_t i /**< */); +int +xcb_input_string_feedback_state_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -4823,6 +4859,9 @@ xcb_input_integer_feedback_ctl_next (xcb_input_integer_feedback_ctl_iterator_t * xcb_generic_iterator_t xcb_input_integer_feedback_ctl_end (xcb_input_integer_feedback_ctl_iterator_t i /**< */); +int +xcb_input_string_feedback_ctl_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -4991,8 +5030,11 @@ xcb_input_led_feedback_ctl_next (xcb_input_led_feedback_ctl_iterator_t *i /**< xcb_generic_iterator_t xcb_input_led_feedback_ctl_end (xcb_input_led_feedback_ctl_iterator_t i /**< */); +int +xcb_input_get_device_key_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5019,7 +5061,7 @@ xcb_input_get_device_key_mapping (xcb_connection_t *c /**< */, uint8_t count /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5118,8 +5160,11 @@ xcb_input_get_device_key_mapping_reply (xcb_connection_t xcb_input_get_device_key_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_input_change_device_key_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5153,7 +5198,7 @@ xcb_input_change_device_key_mapping_checked (xcb_connection_t *c /**< */, const xcb_keysym_t *keysyms /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5183,8 +5228,11 @@ xcb_input_change_device_key_mapping (xcb_connection_t *c /**< */, uint8_t keycode_count /**< */, const xcb_keysym_t *keysyms /**< */); +int +xcb_input_get_device_modifier_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5207,7 +5255,7 @@ xcb_input_get_device_modifier_mapping (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5302,8 +5350,11 @@ xcb_input_get_device_modifier_mapping_reply (xcb_connection_t xcb_input_get_device_modifier_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_input_set_device_modifier_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5330,7 +5381,7 @@ xcb_input_set_device_modifier_mapping (xcb_connection_t *c /**< */, const uint8_t *keymaps /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5390,8 +5441,11 @@ xcb_input_set_device_modifier_mapping_reply (xcb_connection_t xcb_input_set_device_modifier_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_input_get_device_button_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5414,7 +5468,7 @@ xcb_input_get_device_button_mapping (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5509,8 +5563,11 @@ xcb_input_get_device_button_mapping_reply (xcb_connection_t xcb_input_get_device_button_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_input_set_device_button_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5537,7 +5594,7 @@ xcb_input_set_device_button_mapping (xcb_connection_t *c /**< */, const uint8_t *map /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5598,7 +5655,7 @@ xcb_input_set_device_button_mapping_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5621,7 +5678,7 @@ xcb_input_query_device_state (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5806,6 +5863,9 @@ xcb_input_button_state_next (xcb_input_button_state_iterator_t *i /**< */); xcb_generic_iterator_t xcb_input_button_state_end (xcb_input_button_state_iterator_t i /**< */); +int +xcb_input_valuator_state_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -5888,8 +5948,11 @@ xcb_input_valuator_state_next (xcb_input_valuator_state_iterator_t *i /**< */); xcb_generic_iterator_t xcb_input_valuator_state_end (xcb_input_valuator_state_iterator_t i /**< */); +int +xcb_input_send_extension_event_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5927,7 +5990,7 @@ xcb_input_send_extension_event_checked (xcb_connection_t *c /**< * const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5962,7 +6025,7 @@ xcb_input_send_extension_event (xcb_connection_t *c /**< */, const xcb_input_event_class_t *classes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5994,7 +6057,7 @@ xcb_input_device_bell_checked (xcb_connection_t *c /**< */, int8_t percent /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6022,8 +6085,11 @@ xcb_input_device_bell (xcb_connection_t *c /**< */, uint8_t feedback_class /**< */, int8_t percent /**< */); +int +xcb_input_set_device_valuators_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6052,7 +6118,7 @@ xcb_input_set_device_valuators (xcb_connection_t *c /**< */, const int32_t *valuators /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6115,7 +6181,7 @@ xcb_input_set_device_valuators_reply (xcb_connection_t * xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6140,7 +6206,7 @@ xcb_input_get_device_control (xcb_connection_t *c /**< */, uint8_t device_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6241,6 +6307,9 @@ xcb_input_device_state_next (xcb_input_device_state_iterator_t *i /**< */); xcb_generic_iterator_t xcb_input_device_state_end (xcb_input_device_state_iterator_t i /**< */); +int +xcb_input_device_resolution_state_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -6616,6 +6685,9 @@ xcb_input_device_ctl_next (xcb_input_device_ctl_iterator_t *i /**< */); xcb_generic_iterator_t xcb_input_device_ctl_end (xcb_input_device_ctl_iterator_t i /**< */); +int +xcb_input_device_resolution_ctl_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** diff --git a/lib/libxcb/src/xprint.c b/lib/libxcb/src/xprint.c index 666575557..5e8ffea1c 100644 --- a/lib/libxcb/src/xprint.c +++ b/lib/libxcb/src/xprint.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xprint.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_x_print_id = { "XpExtension", 0 }; @@ -49,6 +56,147 @@ xcb_x_print_string8_end (xcb_x_print_string8_iterator_t i /**< */) return ret; } +int +xcb_x_print_printer_serialize (void **_buffer /**< */, + const xcb_x_print_printer_t *_aux /**< */, + const xcb_x_print_string8_t *name /**< */, + const xcb_x_print_string8_t *description /**< */) +{ + char *xcb_out = *_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_align_to; + + unsigned int xcb_pad = 0; + char xcb_pad0[3] = {0, 0, 0}; + struct iovec xcb_parts[5]; + unsigned int xcb_parts_idx = 0; + unsigned int xcb_block_len = 0; + unsigned int i; + char *xcb_tmp; + + /* xcb_x_print_printer_t.nameLen */ + xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->nameLen; + xcb_block_len += sizeof(uint32_t); + xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(uint32_t); + /* name */ + xcb_parts[xcb_parts_idx].iov_base = (char *) name; + xcb_block_len += _aux->nameLen * sizeof(xcb_x_print_string8_t); + xcb_parts[xcb_parts_idx].iov_len = _aux->nameLen * sizeof(xcb_x_print_string8_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* xcb_x_print_printer_t.descLen */ + xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->descLen; + xcb_block_len += sizeof(uint32_t); + xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(uint32_t); + /* description */ + xcb_parts[xcb_parts_idx].iov_base = (char *) description; + xcb_block_len += _aux->descLen * sizeof(xcb_x_print_string8_t); + xcb_parts[xcb_parts_idx].iov_len = _aux->descLen * sizeof(xcb_x_print_string8_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; + xcb_parts[xcb_parts_idx].iov_len = xcb_pad; + xcb_parts_idx++; + xcb_pad = 0; + } + xcb_block_len = 0; + + if (NULL == xcb_out) { + /* allocate memory */ + xcb_out = malloc(xcb_buffer_len); + *_buffer = xcb_out; + } + + xcb_tmp = xcb_out; + for(i=0; i<xcb_parts_idx; i++) { + if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) + memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); + if (0 != xcb_parts[i].iov_len) + xcb_tmp += xcb_parts[i].iov_len; + } + + return xcb_buffer_len; +} + +int +xcb_x_print_printer_unserialize (const void *_buffer /**< */, + xcb_x_print_printer_t **_aux /**< */) +{ + char *xcb_tmp = (char *)_buffer; + xcb_x_print_printer_t xcb_out; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + xcb_x_print_string8_t *name; + int name_len; + xcb_x_print_string8_t *description; + int description_len; + + /* xcb_x_print_printer_t.nameLen */ + xcb_out.nameLen = *(uint32_t *)xcb_tmp; + xcb_block_len += sizeof(uint32_t); + xcb_tmp += sizeof(uint32_t); + xcb_align_to = ALIGNOF(uint32_t); + /* name */ + name = (xcb_x_print_string8_t *)xcb_tmp; + name_len = xcb_out.nameLen * sizeof(xcb_x_print_string8_t); + xcb_block_len += name_len; + xcb_tmp += name_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* xcb_x_print_printer_t.descLen */ + xcb_out.descLen = *(uint32_t *)xcb_tmp; + xcb_block_len += sizeof(uint32_t); + xcb_tmp += sizeof(uint32_t); + xcb_align_to = ALIGNOF(uint32_t); + /* description */ + description = (xcb_x_print_string8_t *)xcb_tmp; + description_len = xcb_out.descLen * sizeof(xcb_x_print_string8_t); + xcb_block_len += description_len; + xcb_tmp += description_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + if (NULL == _aux) + return xcb_buffer_len; + + if (NULL == *_aux) { + /* allocate memory */ + *_aux = malloc(xcb_buffer_len); + } + + xcb_tmp = ((char *)*_aux)+xcb_buffer_len; + xcb_tmp -= description_len; + memmove(xcb_tmp, description, description_len); + xcb_tmp -= name_len; + memmove(xcb_tmp, name, name_len); + **_aux = xcb_out; + + return xcb_buffer_len; +} + +int +xcb_x_print_printer_sizeof (const void *_buffer /**< */) +{ + return xcb_x_print_printer_unserialize(_buffer, NULL); +} + /***************************************************************************** ** @@ -104,23 +252,6 @@ xcb_x_print_printer_name_end (const xcb_x_print_printer_t *R /**< */) /***************************************************************************** ** - ** uint32_t xcb_x_print_printer_desc_len - ** - ** @param const xcb_x_print_printer_t *R - ** @returns uint32_t - ** - *****************************************************************************/ - -uint32_t -xcb_x_print_printer_desc_len (const xcb_x_print_printer_t *R /**< */) -{ - xcb_generic_iterator_t prev = xcb_x_print_printer_name_end(R); - return * (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0); -} - - -/***************************************************************************** - ** ** xcb_x_print_string8_t * xcb_x_print_printer_description ** ** @param const xcb_x_print_printer_t *R @@ -148,7 +279,7 @@ xcb_x_print_printer_description (const xcb_x_print_printer_t *R /**< */) int xcb_x_print_printer_description_length (const xcb_x_print_printer_t *R /**< */) { - return xcb_x_print_printer_desc_len(R); + return R->descLen; } @@ -166,7 +297,7 @@ xcb_x_print_printer_description_end (const xcb_x_print_printer_t *R /**< */) { xcb_generic_iterator_t i; xcb_generic_iterator_t child = xcb_x_print_printer_name_end(R); - i.data = ((xcb_x_print_string8_t *) child.data) + (xcb_x_print_printer_desc_len(R)); + i.data = ((xcb_x_print_string8_t *) child.data) + (R->descLen); i.rem = 0; i.index = (char *) i.data - (char *) R; return i; @@ -186,10 +317,11 @@ void xcb_x_print_printer_next (xcb_x_print_printer_iterator_t *i /**< */) { xcb_x_print_printer_t *R = i->data; - xcb_generic_iterator_t child = xcb_x_print_printer_description_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_x_print_printer_t *)(((char *)R) + xcb_x_print_printer_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_x_print_printer_t *) child.data; - i->index = child.index; } @@ -281,6 +413,7 @@ xcb_x_print_print_query_version (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -314,6 +447,7 @@ xcb_x_print_print_query_version_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -338,6 +472,47 @@ xcb_x_print_print_query_version_reply (xcb_connection_t return (xcb_x_print_print_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_x_print_print_get_printer_list_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_x_print_print_get_printer_list_request_t *_aux = (xcb_x_print_print_get_printer_list_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_print_get_printer_list_request_t); + xcb_tmp += xcb_block_len; + /* printer_name */ + xcb_block_len += _aux->printerNameLen * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* locale */ + xcb_block_len += _aux->localeLen * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -377,14 +552,17 @@ xcb_x_print_print_get_printer_list (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t printer_name */ xcb_parts[4].iov_base = (char *) printer_name; xcb_parts[4].iov_len = printerNameLen * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_x_print_string8_t locale */ xcb_parts[6].iov_base = (char *) locale; xcb_parts[6].iov_len = localeLen * sizeof(xcb_x_print_string8_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -428,14 +606,17 @@ xcb_x_print_print_get_printer_list_unchecked (xcb_connection_t *c /* xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t printer_name */ xcb_parts[4].iov_base = (char *) printer_name; xcb_parts[4].iov_len = printerNameLen * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_x_print_string8_t locale */ xcb_parts[6].iov_base = (char *) locale; xcb_parts[6].iov_len = localeLen * sizeof(xcb_x_print_string8_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -493,7 +674,18 @@ xcb_x_print_print_get_printer_list_reply (xcb_connection_t xcb_x_print_print_get_printer_list_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */) { - return (xcb_x_print_print_get_printer_list_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); + xcb_x_print_print_get_printer_list_reply_t *reply = (xcb_x_print_print_get_printer_list_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); + int i; + xcb_x_print_printer_iterator_t printers_iter = xcb_x_print_print_get_printer_list_printers_iterator(reply); + int printers_len = xcb_x_print_print_get_printer_list_printers_length(reply); + xcb_x_print_printer_t *printers_data; + /* special cases: transform parts of the reply to match XCB data structures */ + for(i=0; i<printers_len; i++) { + printers_data = printers_iter.data; + xcb_x_print_printer_unserialize((const void *)printers_data, &printers_data); + xcb_x_print_printer_next(&printers_iter); + } + return reply; } @@ -525,6 +717,7 @@ xcb_x_print_print_rehash_printer_list_checked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -558,10 +751,52 @@ xcb_x_print_print_rehash_printer_list (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_x_print_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_x_print_create_context_request_t *_aux = (xcb_x_print_create_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_create_context_request_t); + xcb_tmp += xcb_block_len; + /* printerName */ + xcb_block_len += _aux->printerNameLen * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* locale */ + xcb_block_len += _aux->localeLen * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -604,14 +839,17 @@ xcb_x_print_create_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t printerName */ xcb_parts[4].iov_base = (char *) printerName; xcb_parts[4].iov_len = printerNameLen * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_x_print_string8_t locale */ xcb_parts[6].iov_base = (char *) locale; xcb_parts[6].iov_len = localeLen * sizeof(xcb_x_print_string8_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -658,14 +896,17 @@ xcb_x_print_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t printerName */ xcb_parts[4].iov_base = (char *) printerName; xcb_parts[4].iov_len = printerNameLen * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_x_print_string8_t locale */ xcb_parts[6].iov_base = (char *) locale; xcb_parts[6].iov_len = localeLen * sizeof(xcb_x_print_string8_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -702,6 +943,7 @@ xcb_x_print_print_set_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -738,6 +980,7 @@ xcb_x_print_print_set_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -771,6 +1014,7 @@ xcb_x_print_print_get_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -804,6 +1048,7 @@ xcb_x_print_print_get_context_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -860,6 +1105,7 @@ xcb_x_print_print_destroy_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -896,6 +1142,7 @@ xcb_x_print_print_destroy_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -929,6 +1176,7 @@ xcb_x_print_print_get_screen_of_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -962,6 +1210,7 @@ xcb_x_print_print_get_screen_of_context_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1018,6 +1267,7 @@ xcb_x_print_print_start_job_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1054,6 +1304,7 @@ xcb_x_print_print_start_job (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1090,6 +1341,7 @@ xcb_x_print_print_end_job_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1126,6 +1378,7 @@ xcb_x_print_print_end_job (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1162,6 +1415,7 @@ xcb_x_print_print_start_doc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1198,6 +1452,7 @@ xcb_x_print_print_start_doc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1234,6 +1489,7 @@ xcb_x_print_print_end_doc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1270,10 +1526,66 @@ xcb_x_print_print_end_doc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_x_print_print_put_document_data_sizeof (const void *_buffer /**< */, + uint32_t doc_format_len /**< */, + uint32_t options_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_x_print_print_put_document_data_request_t *_aux = (xcb_x_print_print_put_document_data_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_print_put_document_data_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->len_data * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* doc_format */ + xcb_block_len += doc_format_len * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* options */ + xcb_block_len += options_len * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1325,18 +1637,22 @@ xcb_x_print_print_put_document_data_checked (xcb_connection_t *c /** xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = len_data * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_x_print_string8_t doc_format */ xcb_parts[6].iov_base = (char *) doc_format; xcb_parts[6].iov_len = doc_format_len * sizeof(xcb_x_print_string8_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* xcb_x_print_string8_t options */ xcb_parts[8].iov_base = (char *) options; xcb_parts[8].iov_len = options_len * sizeof(xcb_x_print_string8_t); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1392,22 +1708,55 @@ xcb_x_print_print_put_document_data (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = len_data * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + /* xcb_x_print_string8_t doc_format */ xcb_parts[6].iov_base = (char *) doc_format; xcb_parts[6].iov_len = doc_format_len * sizeof(xcb_x_print_string8_t); xcb_parts[7].iov_base = 0; xcb_parts[7].iov_len = -xcb_parts[6].iov_len & 3; + /* xcb_x_print_string8_t options */ xcb_parts[8].iov_base = (char *) options; xcb_parts[8].iov_len = options_len * sizeof(xcb_x_print_string8_t); xcb_parts[9].iov_base = 0; xcb_parts[9].iov_len = -xcb_parts[8].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_x_print_print_get_document_data_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_x_print_print_get_document_data_reply_t *_aux = (xcb_x_print_print_get_document_data_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_print_get_document_data_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += _aux->dataLen * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1443,6 +1792,7 @@ xcb_x_print_print_get_document_data (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1482,6 +1832,7 @@ xcb_x_print_print_get_document_data_unchecked (xcb_connection_t *c /**< * xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1590,6 +1941,7 @@ xcb_x_print_print_start_page_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1626,6 +1978,7 @@ xcb_x_print_print_start_page (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1663,6 +2016,7 @@ xcb_x_print_print_end_page_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1700,10 +2054,40 @@ xcb_x_print_print_end_page (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_x_print_print_select_input_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_x_print_print_select_input_request_t *_aux = (xcb_x_print_print_select_input_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_print_select_input_request_t); + xcb_tmp += xcb_block_len; + /* event_list */ + xcb_block_len += xcb_popcount(_aux->event_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1741,10 +2125,12 @@ xcb_x_print_print_select_input_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t event_list */ xcb_parts[4].iov_base = (char *) event_list; xcb_parts[4].iov_len = xcb_popcount(event_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1786,14 +2172,183 @@ xcb_x_print_print_select_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t event_list */ xcb_parts[4].iov_base = (char *) event_list; xcb_parts[4].iov_len = xcb_popcount(event_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_x_print_print_input_selected_serialize (void **_buffer /**< */, + const xcb_x_print_print_input_selected_reply_t *_aux /**< */, + const uint32_t *event_list /**< */, + const uint32_t *all_events_list /**< */) +{ + char *xcb_out = *_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_align_to; + + unsigned int xcb_pad = 0; + char xcb_pad0[3] = {0, 0, 0}; + struct iovec xcb_parts[6]; + unsigned int xcb_parts_idx = 0; + unsigned int xcb_block_len = 0; + unsigned int i; + char *xcb_tmp; + + /* xcb_x_print_print_input_selected_reply_t.pad0 */ + xcb_parts[xcb_parts_idx].iov_base = (char *) &xcb_pad; + xcb_block_len += sizeof(uint8_t); + xcb_parts[xcb_parts_idx].iov_len = sizeof(uint8_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(uint8_t); + /* xcb_x_print_print_input_selected_reply_t.event_mask */ + xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->event_mask; + xcb_block_len += sizeof(uint32_t); + xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(uint32_t); + /* event_list */ + xcb_parts[xcb_parts_idx].iov_base = (char *) event_list; + xcb_block_len += xcb_popcount(_aux->event_mask) * sizeof(uint32_t); + xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(_aux->event_mask) * sizeof(uint32_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(uint32_t); + /* xcb_x_print_print_input_selected_reply_t.all_events_mask */ + xcb_parts[xcb_parts_idx].iov_base = (char *) &_aux->all_events_mask; + xcb_block_len += sizeof(uint32_t); + xcb_parts[xcb_parts_idx].iov_len = sizeof(uint32_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(uint32_t); + /* all_events_list */ + xcb_parts[xcb_parts_idx].iov_base = (char *) all_events_list; + xcb_block_len += xcb_popcount(_aux->all_events_mask) * sizeof(uint32_t); + xcb_parts[xcb_parts_idx].iov_len = xcb_popcount(_aux->all_events_mask) * sizeof(uint32_t); + xcb_parts_idx++; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_parts[xcb_parts_idx].iov_base = xcb_pad0; + xcb_parts[xcb_parts_idx].iov_len = xcb_pad; + xcb_parts_idx++; + xcb_pad = 0; + } + xcb_block_len = 0; + + if (NULL == xcb_out) { + /* allocate memory */ + xcb_out = malloc(xcb_buffer_len); + *_buffer = xcb_out; + } + + xcb_tmp = xcb_out; + for(i=0; i<xcb_parts_idx; i++) { + if (0 != xcb_parts[i].iov_base && 0 != xcb_parts[i].iov_len) + memcpy(xcb_tmp, xcb_parts[i].iov_base, xcb_parts[i].iov_len); + if (0 != xcb_parts[i].iov_len) + xcb_tmp += xcb_parts[i].iov_len; + } + + return xcb_buffer_len; +} + +int +xcb_x_print_print_input_selected_unserialize (const void *_buffer /**< */, + xcb_x_print_print_input_selected_reply_t **_aux /**< */) +{ + char *xcb_tmp = (char *)_buffer; + xcb_x_print_print_input_selected_reply_t xcb_out; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + uint32_t *event_list; + int event_list_len; + uint32_t *all_events_list; + int all_events_list_len; + + /* xcb_x_print_print_input_selected_reply_t.response_type */ + xcb_out.response_type = *(uint8_t *)xcb_tmp; + xcb_block_len += sizeof(uint8_t); + xcb_tmp += sizeof(uint8_t); + xcb_align_to = ALIGNOF(uint8_t); + /* xcb_x_print_print_input_selected_reply_t.pad0 */ + xcb_out.pad0 = *(uint8_t *)xcb_tmp; + xcb_block_len += sizeof(uint8_t); + xcb_tmp += sizeof(uint8_t); + xcb_align_to = ALIGNOF(uint8_t); + /* xcb_x_print_print_input_selected_reply_t.sequence */ + xcb_out.sequence = *(uint16_t *)xcb_tmp; + xcb_block_len += sizeof(uint16_t); + xcb_tmp += sizeof(uint16_t); + xcb_align_to = ALIGNOF(uint16_t); + /* xcb_x_print_print_input_selected_reply_t.length */ + xcb_out.length = *(uint32_t *)xcb_tmp; + xcb_block_len += sizeof(uint32_t); + xcb_tmp += sizeof(uint32_t); + xcb_align_to = ALIGNOF(uint32_t); + /* xcb_x_print_print_input_selected_reply_t.event_mask */ + xcb_out.event_mask = *(uint32_t *)xcb_tmp; + xcb_block_len += sizeof(uint32_t); + xcb_tmp += sizeof(uint32_t); + xcb_align_to = ALIGNOF(uint32_t); + /* event_list */ + event_list = (uint32_t *)xcb_tmp; + event_list_len = xcb_popcount(xcb_out.event_mask) * sizeof(uint32_t); + xcb_block_len += event_list_len; + xcb_tmp += event_list_len; + xcb_align_to = ALIGNOF(uint32_t); + /* xcb_x_print_print_input_selected_reply_t.all_events_mask */ + xcb_out.all_events_mask = *(uint32_t *)xcb_tmp; + xcb_block_len += sizeof(uint32_t); + xcb_tmp += sizeof(uint32_t); + xcb_align_to = ALIGNOF(uint32_t); + /* all_events_list */ + all_events_list = (uint32_t *)xcb_tmp; + all_events_list_len = xcb_popcount(xcb_out.all_events_mask) * sizeof(uint32_t); + xcb_block_len += all_events_list_len; + xcb_tmp += all_events_list_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + if (NULL == _aux) + return xcb_buffer_len; + + if (NULL == *_aux) { + /* allocate memory */ + *_aux = malloc(xcb_buffer_len); + } + + xcb_tmp = ((char *)*_aux)+xcb_buffer_len; + xcb_tmp -= all_events_list_len; + memmove(xcb_tmp, all_events_list, all_events_list_len); + xcb_tmp -= event_list_len; + memmove(xcb_tmp, event_list, event_list_len); + **_aux = xcb_out; + + return xcb_buffer_len; +} + +int +xcb_x_print_print_input_selected_sizeof (const void *_buffer /**< */) +{ + return xcb_x_print_print_input_selected_unserialize(_buffer, NULL); +} + /***************************************************************************** ** @@ -1826,6 +2381,7 @@ xcb_x_print_print_input_selected (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1862,6 +2418,7 @@ xcb_x_print_print_input_selected_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1921,23 +2478,6 @@ xcb_x_print_print_input_selected_event_list_end (const xcb_x_print_print_input_s /***************************************************************************** ** - ** uint32_t xcb_x_print_print_input_selected_all_events_mask - ** - ** @param const xcb_x_print_print_input_selected_reply_t *R - ** @returns uint32_t - ** - *****************************************************************************/ - -uint32_t -xcb_x_print_print_input_selected_all_events_mask (const xcb_x_print_print_input_selected_reply_t *R /**< */) -{ - xcb_generic_iterator_t prev = xcb_x_print_print_input_selected_event_list_end(R); - return * (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0); -} - - -/***************************************************************************** - ** ** uint32_t * xcb_x_print_print_input_selected_all_events_list ** ** @param const xcb_x_print_print_input_selected_reply_t *R @@ -1965,7 +2505,7 @@ xcb_x_print_print_input_selected_all_events_list (const xcb_x_print_print_input_ int xcb_x_print_print_input_selected_all_events_list_length (const xcb_x_print_print_input_selected_reply_t *R /**< */) { - return xcb_popcount(xcb_x_print_print_input_selected_all_events_mask(R)); + return xcb_popcount(R->all_events_mask); } @@ -1983,7 +2523,7 @@ xcb_x_print_print_input_selected_all_events_list_end (const xcb_x_print_print_in { xcb_generic_iterator_t i; xcb_generic_iterator_t child = xcb_x_print_print_input_selected_event_list_end(R); - i.data = ((uint32_t *) child.data) + (xcb_popcount(xcb_x_print_print_input_selected_all_events_mask(R))); + i.data = ((uint32_t *) child.data) + (xcb_popcount(R->all_events_mask)); i.rem = 0; i.index = (char *) i.data - (char *) R; return i; @@ -2045,6 +2585,7 @@ xcb_x_print_print_get_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2085,6 +2626,7 @@ xcb_x_print_print_get_attributes_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2109,6 +2651,35 @@ xcb_x_print_print_get_attributes_reply (xcb_connection_t return (xcb_x_print_print_get_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_x_print_print_get_one_attributes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_x_print_print_get_one_attributes_request_t *_aux = (xcb_x_print_print_get_one_attributes_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_print_get_one_attributes_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->nameLen * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2150,10 +2721,12 @@ xcb_x_print_print_get_one_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = nameLen * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2199,10 +2772,12 @@ xcb_x_print_print_get_one_attributes_unchecked (xcb_connection_t *c xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = nameLen * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2279,6 +2854,35 @@ xcb_x_print_print_get_one_attributes_reply (xcb_connection_t return (xcb_x_print_print_get_one_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_x_print_print_set_attributes_sizeof (const void *_buffer /**< */, + uint32_t attributes_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_print_set_attributes_request_t); + xcb_tmp += xcb_block_len; + /* attributes */ + xcb_block_len += attributes_len * sizeof(xcb_x_print_string8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_x_print_string8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2325,10 +2929,12 @@ xcb_x_print_print_set_attributes_checked (xcb_connection_t *c /**< * xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t attributes */ xcb_parts[4].iov_base = (char *) attributes; xcb_parts[4].iov_len = attributes_len * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2379,10 +2985,12 @@ xcb_x_print_print_set_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_x_print_string8_t attributes */ xcb_parts[4].iov_base = (char *) attributes; xcb_parts[4].iov_len = attributes_len * sizeof(xcb_x_print_string8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2419,6 +3027,7 @@ xcb_x_print_print_get_page_dimensions (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2455,6 +3064,7 @@ xcb_x_print_print_get_page_dimensions_unchecked (xcb_connection_t *c /**< xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2479,6 +3089,35 @@ xcb_x_print_print_get_page_dimensions_reply (xcb_connection_t return (xcb_x_print_print_get_page_dimensions_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_x_print_print_query_screens_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_x_print_print_query_screens_reply_t *_aux = (xcb_x_print_print_query_screens_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_x_print_print_query_screens_reply_t); + xcb_tmp += xcb_block_len; + /* roots */ + xcb_block_len += _aux->listCount * sizeof(xcb_window_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_window_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2508,6 +3147,7 @@ xcb_x_print_print_query_screens (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2541,6 +3181,7 @@ xcb_x_print_print_query_screens_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2652,6 +3293,7 @@ xcb_x_print_print_set_image_resolution (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2691,6 +3333,7 @@ xcb_x_print_print_set_image_resolution_unchecked (xcb_connection_t *c /** xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2747,6 +3390,7 @@ xcb_x_print_print_get_image_resolution (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2783,6 +3427,7 @@ xcb_x_print_print_get_image_resolution_unchecked (xcb_connection_t *c /** xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xprint.h b/lib/libxcb/src/xprint.h index e983b8bd4..470642ffb 100644 --- a/lib/libxcb/src/xprint.h +++ b/lib/libxcb/src/xprint.h @@ -757,6 +757,19 @@ xcb_x_print_string8_next (xcb_x_print_string8_iterator_t *i /**< */); xcb_generic_iterator_t xcb_x_print_string8_end (xcb_x_print_string8_iterator_t i /**< */); +int +xcb_x_print_printer_serialize (void **_buffer /**< */, + const xcb_x_print_printer_t *_aux /**< */, + const xcb_x_print_string8_t *name /**< */, + const xcb_x_print_string8_t *description /**< */); + +int +xcb_x_print_printer_unserialize (const void *_buffer /**< */, + xcb_x_print_printer_t **_aux /**< */); + +int +xcb_x_print_printer_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -799,19 +812,6 @@ xcb_x_print_printer_name_end (const xcb_x_print_printer_t *R /**< */); /***************************************************************************** ** - ** uint32_t xcb_x_print_printer_desc_len - ** - ** @param const xcb_x_print_printer_t *R - ** @returns uint32_t - ** - *****************************************************************************/ - -uint32_t -xcb_x_print_printer_desc_len (const xcb_x_print_printer_t *R /**< */); - - -/***************************************************************************** - ** ** xcb_x_print_string8_t * xcb_x_print_printer_description ** ** @param const xcb_x_print_printer_t *R @@ -935,7 +935,7 @@ xcb_generic_iterator_t xcb_x_print_pcontext_end (xcb_x_print_pcontext_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -956,7 +956,7 @@ xcb_x_print_print_query_version_cookie_t xcb_x_print_print_query_version (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1010,8 +1010,11 @@ xcb_x_print_print_query_version_reply (xcb_connection_t xcb_x_print_print_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_x_print_print_get_printer_list_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1040,7 +1043,7 @@ xcb_x_print_print_get_printer_list (xcb_connection_t *c /**< */, const xcb_x_print_string8_t *locale /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1129,7 +1132,7 @@ xcb_x_print_print_get_printer_list_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1153,7 +1156,7 @@ xcb_void_cookie_t xcb_x_print_print_rehash_printer_list_checked (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1173,8 +1176,11 @@ xcb_x_print_print_rehash_printer_list_checked (xcb_connection_t *c /**< */); xcb_void_cookie_t xcb_x_print_print_rehash_printer_list (xcb_connection_t *c /**< */); +int +xcb_x_print_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1208,7 +1214,7 @@ xcb_x_print_create_context_checked (xcb_connection_t *c /**< */, const xcb_x_print_string8_t *locale /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1239,7 +1245,7 @@ xcb_x_print_create_context (xcb_connection_t *c /**< */, const xcb_x_print_string8_t *locale /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1265,7 +1271,7 @@ xcb_x_print_print_set_context_checked (xcb_connection_t *c /**< */, uint32_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1288,7 +1294,7 @@ xcb_x_print_print_set_context (xcb_connection_t *c /**< */, uint32_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1309,7 +1315,7 @@ xcb_x_print_print_get_context_cookie_t xcb_x_print_print_get_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1364,7 +1370,7 @@ xcb_x_print_print_get_context_reply (xcb_connection_t *c xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1390,7 +1396,7 @@ xcb_x_print_print_destroy_context_checked (xcb_connection_t *c /**< */, uint32_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1413,7 +1419,7 @@ xcb_x_print_print_destroy_context (xcb_connection_t *c /**< */, uint32_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1434,7 +1440,7 @@ xcb_x_print_print_get_screen_of_context_cookie_t xcb_x_print_print_get_screen_of_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1489,7 +1495,7 @@ xcb_x_print_print_get_screen_of_context_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1515,7 +1521,7 @@ xcb_x_print_print_start_job_checked (xcb_connection_t *c /**< */, uint8_t output_mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1538,7 +1544,7 @@ xcb_x_print_print_start_job (xcb_connection_t *c /**< */, uint8_t output_mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1564,7 +1570,7 @@ xcb_x_print_print_end_job_checked (xcb_connection_t *c /**< */, uint8_t cancel /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1587,7 +1593,7 @@ xcb_x_print_print_end_job (xcb_connection_t *c /**< */, uint8_t cancel /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1613,7 +1619,7 @@ xcb_x_print_print_start_doc_checked (xcb_connection_t *c /**< */, uint8_t driver_mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1636,7 +1642,7 @@ xcb_x_print_print_start_doc (xcb_connection_t *c /**< */, uint8_t driver_mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1662,7 +1668,7 @@ xcb_x_print_print_end_doc_checked (xcb_connection_t *c /**< */, uint8_t cancel /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1684,8 +1690,13 @@ xcb_void_cookie_t xcb_x_print_print_end_doc (xcb_connection_t *c /**< */, uint8_t cancel /**< */); +int +xcb_x_print_print_put_document_data_sizeof (const void *_buffer /**< */, + uint32_t doc_format_len /**< */, + uint32_t options_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1727,7 +1738,7 @@ xcb_x_print_print_put_document_data_checked (xcb_connection_t *c /** const xcb_x_print_string8_t *options /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1765,8 +1776,11 @@ xcb_x_print_print_put_document_data (xcb_connection_t *c /**< */, uint32_t options_len /**< */, const xcb_x_print_string8_t *options /**< */); +int +xcb_x_print_print_get_document_data_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1791,7 +1805,7 @@ xcb_x_print_print_get_document_data (xcb_connection_t *c /**< */, uint32_t max_bytes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1889,7 +1903,7 @@ xcb_x_print_print_get_document_data_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1915,7 +1929,7 @@ xcb_x_print_print_start_page_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1938,7 +1952,7 @@ xcb_x_print_print_start_page (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1964,7 +1978,7 @@ xcb_x_print_print_end_page_checked (xcb_connection_t *c /**< */, uint8_t cancel /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1986,8 +2000,11 @@ xcb_void_cookie_t xcb_x_print_print_end_page (xcb_connection_t *c /**< */, uint8_t cancel /**< */); +int +xcb_x_print_print_select_input_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2017,7 +2034,7 @@ xcb_x_print_print_select_input_checked (xcb_connection_t *c /**< */, const uint32_t *event_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2043,8 +2060,21 @@ xcb_x_print_print_select_input (xcb_connection_t *c /**< */, uint32_t event_mask /**< */, const uint32_t *event_list /**< */); +int +xcb_x_print_print_input_selected_serialize (void **_buffer /**< */, + const xcb_x_print_print_input_selected_reply_t *_aux /**< */, + const uint32_t *event_list /**< */, + const uint32_t *all_events_list /**< */); + +int +xcb_x_print_print_input_selected_unserialize (const void *_buffer /**< */, + xcb_x_print_print_input_selected_reply_t **_aux /**< */); + +int +xcb_x_print_print_input_selected_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2067,7 +2097,7 @@ xcb_x_print_print_input_selected (xcb_connection_t *c /**< */, xcb_x_print_pcontext_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2134,19 +2164,6 @@ xcb_x_print_print_input_selected_event_list_end (const xcb_x_print_print_input_s /***************************************************************************** ** - ** uint32_t xcb_x_print_print_input_selected_all_events_mask - ** - ** @param const xcb_x_print_print_input_selected_reply_t *R - ** @returns uint32_t - ** - *****************************************************************************/ - -uint32_t -xcb_x_print_print_input_selected_all_events_mask (const xcb_x_print_print_input_selected_reply_t *R /**< */); - - -/***************************************************************************** - ** ** uint32_t * xcb_x_print_print_input_selected_all_events_list ** ** @param const xcb_x_print_print_input_selected_reply_t *R @@ -2215,7 +2232,7 @@ xcb_x_print_print_input_selected_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2240,7 +2257,7 @@ xcb_x_print_print_get_attributes (xcb_connection_t *c /**< */, uint8_t pool /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2298,8 +2315,11 @@ xcb_x_print_print_get_attributes_reply (xcb_connection_t xcb_x_print_print_get_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_x_print_print_get_one_attributes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2328,7 +2348,7 @@ xcb_x_print_print_get_one_attributes (xcb_connection_t *c /**< */, const xcb_x_print_string8_t *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2429,8 +2449,12 @@ xcb_x_print_print_get_one_attributes_reply (xcb_connection_t xcb_x_print_print_get_one_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_x_print_print_set_attributes_sizeof (const void *_buffer /**< */, + uint32_t attributes_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2466,7 +2490,7 @@ xcb_x_print_print_set_attributes_checked (xcb_connection_t *c /**< * const xcb_x_print_string8_t *attributes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2499,7 +2523,7 @@ xcb_x_print_print_set_attributes (xcb_connection_t *c /**< */, const xcb_x_print_string8_t *attributes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2522,7 +2546,7 @@ xcb_x_print_print_get_page_dimensions (xcb_connection_t *c /**< */, xcb_x_print_pcontext_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2578,8 +2602,11 @@ xcb_x_print_print_get_page_dimensions_reply (xcb_connection_t xcb_x_print_print_get_page_dimensions_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_x_print_print_query_screens_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2600,7 +2627,7 @@ xcb_x_print_print_query_screens_cookie_t xcb_x_print_print_query_screens (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2694,7 +2721,7 @@ xcb_x_print_print_query_screens_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2719,7 +2746,7 @@ xcb_x_print_print_set_image_resolution (xcb_connection_t *c /**< */, uint16_t image_resolution /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2778,7 +2805,7 @@ xcb_x_print_print_set_image_resolution_reply (xcb_connection_t xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2801,7 +2828,7 @@ xcb_x_print_print_get_image_resolution (xcb_connection_t *c /**< */, xcb_x_print_pcontext_t context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xproto.c b/lib/libxcb/src/xproto.c index 975e6279d..499f8c7c5 100644 --- a/lib/libxcb/src/xproto.c +++ b/lib/libxcb/src/xproto.c @@ -3,11 +3,18 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xproto.h" +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) + /***************************************************************************** ** @@ -768,6 +775,35 @@ xcb_visualtype_end (xcb_visualtype_iterator_t i /**< */) return ret; } +int +xcb_depth_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_depth_t *_aux = (xcb_depth_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_depth_t); + xcb_tmp += xcb_block_len; + /* visuals */ + xcb_block_len += _aux->visuals_len * sizeof(xcb_visualtype_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_visualtype_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -834,10 +870,11 @@ void xcb_depth_next (xcb_depth_iterator_t *i /**< */) { xcb_depth_t *R = i->data; - xcb_generic_iterator_t child = xcb_visualtype_end(xcb_depth_visuals_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_depth_t *)(((char *)R) + xcb_depth_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_depth_t *) child.data; - i->index = child.index; } @@ -862,6 +899,40 @@ xcb_depth_end (xcb_depth_iterator_t i /**< */) return ret; } +int +xcb_screen_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_screen_t *_aux = (xcb_screen_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_screen_t); + xcb_tmp += xcb_block_len; + /* allowed_depths */ + for(i=0; i<_aux->allowed_depths_len; i++) { + xcb_tmp_len = xcb_depth_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_depth_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -912,10 +983,11 @@ void xcb_screen_next (xcb_screen_iterator_t *i /**< */) { xcb_screen_t *R = i->data; - xcb_generic_iterator_t child = xcb_depth_end(xcb_screen_allowed_depths_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_screen_t *)(((char *)R) + xcb_screen_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_screen_t *) child.data; - i->index = child.index; } @@ -940,6 +1012,47 @@ xcb_screen_end (xcb_screen_iterator_t i /**< */) return ret; } +int +xcb_setup_request_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_setup_request_t *_aux = (xcb_setup_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_setup_request_t); + xcb_tmp += xcb_block_len; + /* authorization_protocol_name */ + xcb_block_len += _aux->authorization_protocol_name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* authorization_protocol_data */ + xcb_block_len += _aux->authorization_protocol_data_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1060,10 +1173,11 @@ void xcb_setup_request_next (xcb_setup_request_iterator_t *i /**< */) { xcb_setup_request_t *R = i->data; - xcb_generic_iterator_t child = xcb_setup_request_authorization_protocol_data_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_setup_request_t *)(((char *)R) + xcb_setup_request_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_setup_request_t *) child.data; - i->index = child.index; } @@ -1088,6 +1202,35 @@ xcb_setup_request_end (xcb_setup_request_iterator_t i /**< */) return ret; } +int +xcb_setup_failed_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_setup_failed_t *_aux = (xcb_setup_failed_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_setup_failed_t); + xcb_tmp += xcb_block_len; + /* reason */ + xcb_block_len += _aux->reason_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1154,10 +1297,11 @@ void xcb_setup_failed_next (xcb_setup_failed_iterator_t *i /**< */) { xcb_setup_failed_t *R = i->data; - xcb_generic_iterator_t child = xcb_setup_failed_reason_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_setup_failed_t *)(((char *)R) + xcb_setup_failed_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_setup_failed_t *) child.data; - i->index = child.index; } @@ -1182,6 +1326,35 @@ xcb_setup_failed_end (xcb_setup_failed_iterator_t i /**< */) return ret; } +int +xcb_setup_authenticate_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_setup_authenticate_t *_aux = (xcb_setup_authenticate_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_setup_authenticate_t); + xcb_tmp += xcb_block_len; + /* reason */ + xcb_block_len += (_aux->length * 4) * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1248,10 +1421,11 @@ void xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t *i /**< */) { xcb_setup_authenticate_t *R = i->data; - xcb_generic_iterator_t child = xcb_setup_authenticate_reason_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_setup_authenticate_t *)(((char *)R) + xcb_setup_authenticate_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_setup_authenticate_t *) child.data; - i->index = child.index; } @@ -1276,6 +1450,64 @@ xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i /**< */) return ret; } +int +xcb_setup_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_setup_t *_aux = (xcb_setup_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_setup_t); + xcb_tmp += xcb_block_len; + /* vendor */ + xcb_block_len += _aux->vendor_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* pixmap_formats */ + xcb_block_len += _aux->pixmap_formats_len * sizeof(xcb_format_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_format_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* roots */ + for(i=0; i<_aux->roots_len; i++) { + xcb_tmp_len = xcb_screen_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_screen_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1433,10 +1665,11 @@ void xcb_setup_next (xcb_setup_iterator_t *i /**< */) { xcb_setup_t *R = i->data; - xcb_generic_iterator_t child = xcb_screen_end(xcb_setup_roots_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_setup_t *)(((char *)R) + xcb_setup_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_setup_t *) child.data; - i->index = child.index; } @@ -1499,6 +1732,35 @@ xcb_client_message_data_end (xcb_client_message_data_iterator_t i /**< */) return ret; } +int +xcb_create_window_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_create_window_request_t *_aux = (xcb_create_window_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_create_window_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1563,10 +1825,12 @@ xcb_create_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1635,14 +1899,45 @@ xcb_create_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_change_window_attributes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_change_window_attributes_request_t *_aux = (xcb_change_window_attributes_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_change_window_attributes_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1681,10 +1976,12 @@ xcb_change_window_attributes_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1727,10 +2024,12 @@ xcb_change_window_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1768,6 +2067,7 @@ xcb_get_window_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1805,6 +2105,7 @@ xcb_get_window_attributes_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1862,6 +2163,7 @@ xcb_destroy_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1899,6 +2201,7 @@ xcb_destroy_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1936,6 +2239,7 @@ xcb_destroy_subwindows_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1973,6 +2277,7 @@ xcb_destroy_subwindows (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2012,6 +2317,7 @@ xcb_change_save_set_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2051,6 +2357,7 @@ xcb_change_save_set (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2097,6 +2404,7 @@ xcb_reparent_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2143,6 +2451,7 @@ xcb_reparent_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2180,6 +2489,7 @@ xcb_map_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2217,6 +2527,7 @@ xcb_map_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2254,6 +2565,7 @@ xcb_map_subwindows_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2291,6 +2603,7 @@ xcb_map_subwindows (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2328,6 +2641,7 @@ xcb_unmap_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2365,6 +2679,7 @@ xcb_unmap_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2402,6 +2717,7 @@ xcb_unmap_subwindows_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2439,10 +2755,40 @@ xcb_unmap_subwindows (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_configure_window_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_configure_window_request_t *_aux = (xcb_configure_window_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_configure_window_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2482,10 +2828,12 @@ xcb_configure_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2529,10 +2877,12 @@ xcb_configure_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2572,6 +2922,7 @@ xcb_circulate_window_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2611,6 +2962,7 @@ xcb_circulate_window (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2648,6 +3000,7 @@ xcb_get_geometry (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2685,6 +3038,7 @@ xcb_get_geometry_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2709,6 +3063,35 @@ xcb_get_geometry_reply (xcb_connection_t *c /**< */, return (xcb_get_geometry_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_query_tree_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_query_tree_reply_t *_aux = (xcb_query_tree_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_query_tree_reply_t); + xcb_tmp += xcb_block_len; + /* children */ + xcb_block_len += _aux->children_len * sizeof(xcb_window_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_window_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2742,6 +3125,7 @@ xcb_query_tree (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2779,6 +3163,7 @@ xcb_query_tree_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2855,6 +3240,35 @@ xcb_query_tree_reply (xcb_connection_t *c /**< */, return (xcb_query_tree_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_intern_atom_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_intern_atom_request_t *_aux = (xcb_intern_atom_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_intern_atom_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2893,10 +3307,12 @@ xcb_intern_atom (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2939,10 +3355,12 @@ xcb_intern_atom_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2967,6 +3385,35 @@ xcb_intern_atom_reply (xcb_connection_t *c /**< */, return (xcb_intern_atom_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_get_atom_name_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_atom_name_reply_t *_aux = (xcb_get_atom_name_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_get_atom_name_reply_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3000,6 +3447,7 @@ xcb_get_atom_name (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3037,6 +3485,7 @@ xcb_get_atom_name_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3113,6 +3562,35 @@ xcb_get_atom_name_reply (xcb_connection_t *c /**< */, return (xcb_get_atom_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_change_property_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_change_property_request_t *_aux = (xcb_change_property_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_change_property_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += ((_aux->data_len * _aux->format) / 8) * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3163,10 +3641,12 @@ xcb_change_property_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* void data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = ((data_len * format) / 8) * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3221,10 +3701,12 @@ xcb_change_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* void data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = ((data_len * format) / 8) * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3265,6 +3747,7 @@ xcb_delete_property_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3305,10 +3788,40 @@ xcb_delete_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_get_property_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_property_reply_t *_aux = (xcb_get_property_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_get_property_reply_t); + xcb_tmp += xcb_block_len; + /* value */ + xcb_block_len += (_aux->value_len * (_aux->format / 8)) * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3356,6 +3869,7 @@ xcb_get_property (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3407,6 +3921,7 @@ xcb_get_property_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3483,6 +3998,35 @@ xcb_get_property_reply (xcb_connection_t *c /**< */, return (xcb_get_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_list_properties_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_list_properties_reply_t *_aux = (xcb_list_properties_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_list_properties_reply_t); + xcb_tmp += xcb_block_len; + /* atoms */ + xcb_block_len += _aux->atoms_len * sizeof(xcb_atom_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_atom_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -3516,6 +4060,7 @@ xcb_list_properties (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3553,6 +4098,7 @@ xcb_list_properties_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3668,6 +4214,7 @@ xcb_set_selection_owner_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3711,6 +4258,7 @@ xcb_set_selection_owner (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3748,6 +4296,7 @@ xcb_get_selection_owner (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3785,6 +4334,7 @@ xcb_get_selection_owner_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3854,6 +4404,7 @@ xcb_convert_selection_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3903,6 +4454,7 @@ xcb_convert_selection (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3948,6 +4500,7 @@ xcb_send_event_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3993,6 +4546,7 @@ xcb_send_event (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4050,6 +4604,7 @@ xcb_grab_pointer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4107,6 +4662,7 @@ xcb_grab_pointer_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4164,6 +4720,7 @@ xcb_ungrab_pointer_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4201,6 +4758,7 @@ xcb_ungrab_pointer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4262,6 +4820,7 @@ xcb_grab_button_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4323,6 +4882,7 @@ xcb_grab_button (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4366,6 +4926,7 @@ xcb_ungrab_button_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4409,6 +4970,7 @@ xcb_ungrab_button (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4453,6 +5015,7 @@ xcb_change_active_pointer_grab_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4497,6 +5060,7 @@ xcb_change_active_pointer_grab (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4546,6 +5110,7 @@ xcb_grab_keyboard (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4595,6 +5160,7 @@ xcb_grab_keyboard_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4652,6 +5218,7 @@ xcb_ungrab_keyboard_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4689,6 +5256,7 @@ xcb_ungrab_keyboard (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4741,6 +5309,7 @@ xcb_grab_key_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4793,6 +5362,7 @@ xcb_grab_key (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4836,6 +5406,7 @@ xcb_ungrab_key_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4879,6 +5450,7 @@ xcb_ungrab_key (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4918,6 +5490,7 @@ xcb_allow_events_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4957,6 +5530,7 @@ xcb_allow_events (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -4991,6 +5565,7 @@ xcb_grab_server_checked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5025,6 +5600,7 @@ xcb_grab_server (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5059,6 +5635,7 @@ xcb_ungrab_server_checked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5093,6 +5670,7 @@ xcb_ungrab_server (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5130,6 +5708,7 @@ xcb_query_pointer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5167,6 +5746,7 @@ xcb_query_pointer_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5229,6 +5809,35 @@ xcb_timecoord_end (xcb_timecoord_iterator_t i /**< */) return ret; } +int +xcb_get_motion_events_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_motion_events_reply_t *_aux = (xcb_get_motion_events_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_get_motion_events_reply_t); + xcb_tmp += xcb_block_len; + /* events */ + xcb_block_len += _aux->events_len * sizeof(xcb_timecoord_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_timecoord_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5268,6 +5877,7 @@ xcb_get_motion_events (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5311,6 +5921,7 @@ xcb_get_motion_events_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5429,6 +6040,7 @@ xcb_translate_coordinates (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5475,6 +6087,7 @@ xcb_translate_coordinates_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5553,6 +6166,7 @@ xcb_warp_pointer_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5611,6 +6225,7 @@ xcb_warp_pointer (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5653,6 +6268,7 @@ xcb_set_input_focus_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5695,6 +6311,7 @@ xcb_set_input_focus (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5729,6 +6346,7 @@ xcb_get_input_focus (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5763,6 +6381,7 @@ xcb_get_input_focus_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5817,6 +6436,7 @@ xcb_query_keymap (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5851,6 +6471,7 @@ xcb_query_keymap_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5875,6 +6496,35 @@ xcb_query_keymap_reply (xcb_connection_t *c /**< */, return (xcb_query_keymap_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_open_font_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_open_font_request_t *_aux = (xcb_open_font_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_open_font_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -5914,10 +6564,12 @@ xcb_open_font_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -5961,10 +6613,12 @@ xcb_open_font (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6002,6 +6656,7 @@ xcb_close_font_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6039,6 +6694,7 @@ xcb_close_font (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6119,6 +6775,47 @@ xcb_charinfo_end (xcb_charinfo_iterator_t i /**< */) return ret; } +int +xcb_query_font_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_query_font_reply_t *_aux = (xcb_query_font_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_query_font_reply_t); + xcb_tmp += xcb_block_len; + /* properties */ + xcb_block_len += _aux->properties_len * sizeof(xcb_fontprop_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_fontprop_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* char_infos */ + xcb_block_len += _aux->char_infos_len * sizeof(xcb_charinfo_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_charinfo_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6152,6 +6849,7 @@ xcb_query_font (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6189,6 +6887,7 @@ xcb_query_font_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6319,6 +7018,35 @@ xcb_query_font_reply (xcb_connection_t *c /**< */, return (xcb_query_font_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_query_text_extents_sizeof (const void *_buffer /**< */, + uint32_t string_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_query_text_extents_request_t); + xcb_tmp += xcb_block_len; + /* string */ + xcb_block_len += string_len * sizeof(xcb_char2b_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_char2b_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6356,10 +7084,12 @@ xcb_query_text_extents (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_char2b_t string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6401,10 +7131,12 @@ xcb_query_text_extents_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_char2b_t string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6429,6 +7161,35 @@ xcb_query_text_extents_reply (xcb_connection_t *c /**< */, return (xcb_query_text_extents_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_str_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_str_t *_aux = (xcb_str_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_str_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6495,10 +7256,11 @@ void xcb_str_next (xcb_str_iterator_t *i /**< */) { xcb_str_t *R = i->data; - xcb_generic_iterator_t child = xcb_str_name_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_str_t *)(((char *)R) + xcb_str_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_str_t *) child.data; - i->index = child.index; } @@ -6523,6 +7285,35 @@ xcb_str_end (xcb_str_iterator_t i /**< */) return ret; } +int +xcb_list_fonts_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_list_fonts_request_t *_aux = (xcb_list_fonts_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_list_fonts_request_t); + xcb_tmp += xcb_block_len; + /* pattern */ + xcb_block_len += _aux->pattern_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6561,10 +7352,12 @@ xcb_list_fonts (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char pattern */ xcb_parts[4].iov_base = (char *) pattern; xcb_parts[4].iov_len = pattern_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6607,10 +7400,12 @@ xcb_list_fonts_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char pattern */ xcb_parts[4].iov_base = (char *) pattern; xcb_parts[4].iov_len = pattern_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6671,6 +7466,35 @@ xcb_list_fonts_reply (xcb_connection_t *c /**< */, return (xcb_list_fonts_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_list_fonts_with_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_list_fonts_with_info_request_t *_aux = (xcb_list_fonts_with_info_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_list_fonts_with_info_request_t); + xcb_tmp += xcb_block_len; + /* pattern */ + xcb_block_len += _aux->pattern_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6709,10 +7533,12 @@ xcb_list_fonts_with_info (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char pattern */ xcb_parts[4].iov_base = (char *) pattern; xcb_parts[4].iov_len = pattern_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6755,10 +7581,12 @@ xcb_list_fonts_with_info_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char pattern */ xcb_parts[4].iov_base = (char *) pattern; xcb_parts[4].iov_len = pattern_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6889,6 +7717,40 @@ xcb_list_fonts_with_info_reply (xcb_connection_t *c /**< */, return (xcb_list_fonts_with_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_set_font_path_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_set_font_path_request_t *_aux = (xcb_set_font_path_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_set_font_path_request_t); + xcb_tmp += xcb_block_len; + /* font */ + for(i=0; i<_aux->font_qty; i++) { + xcb_tmp_len = xcb_str_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_str_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -6916,6 +7778,9 @@ xcb_set_font_path_checked (xcb_connection_t *c /**< */, struct iovec xcb_parts[6]; xcb_void_cookie_t xcb_ret; xcb_set_font_path_request_t xcb_out; + unsigned int i; + unsigned int xcb_tmp_len; + char *xcb_tmp; xcb_out.pad0 = 0; xcb_out.font_qty = font_qty; @@ -6925,10 +7790,18 @@ xcb_set_font_path_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_str_t font */ xcb_parts[4].iov_base = (char *) font; - xcb_parts[4].iov_len = font_qty * sizeof(xcb_str_t); + xcb_parts[4].iov_len = 0; + xcb_tmp = (char *)font; + for(i=0; i<font_qty; i++) { + xcb_tmp_len = xcb_str_sizeof(xcb_tmp); + xcb_parts[4].iov_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -6960,6 +7833,9 @@ xcb_set_font_path (xcb_connection_t *c /**< */, struct iovec xcb_parts[6]; xcb_void_cookie_t xcb_ret; xcb_set_font_path_request_t xcb_out; + unsigned int i; + unsigned int xcb_tmp_len; + char *xcb_tmp; xcb_out.pad0 = 0; xcb_out.font_qty = font_qty; @@ -6969,14 +7845,56 @@ xcb_set_font_path (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_str_t font */ xcb_parts[4].iov_base = (char *) font; - xcb_parts[4].iov_len = font_qty * sizeof(xcb_str_t); + xcb_parts[4].iov_len = 0; + xcb_tmp = (char *)font; + for(i=0; i<font_qty; i++) { + xcb_tmp_len = xcb_str_sizeof(xcb_tmp); + xcb_parts[4].iov_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_get_font_path_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_font_path_reply_t *_aux = (xcb_get_font_path_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_get_font_path_reply_t); + xcb_tmp += xcb_block_len; + /* path */ + for(i=0; i<_aux->path_len; i++) { + xcb_tmp_len = xcb_str_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_str_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7007,6 +7925,7 @@ xcb_get_font_path (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7041,6 +7960,7 @@ xcb_get_font_path_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7145,6 +8065,7 @@ xcb_create_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7193,6 +8114,7 @@ xcb_create_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7230,6 +8152,7 @@ xcb_free_pixmap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7267,10 +8190,40 @@ xcb_free_pixmap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_create_gc_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_create_gc_request_t *_aux = (xcb_create_gc_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_create_gc_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7312,10 +8265,12 @@ xcb_create_gc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7361,14 +8316,45 @@ xcb_create_gc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_change_gc_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_change_gc_request_t *_aux = (xcb_change_gc_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_change_gc_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7407,10 +8393,12 @@ xcb_change_gc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7453,10 +8441,12 @@ xcb_change_gc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7500,6 +8490,7 @@ xcb_copy_gc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7543,10 +8534,40 @@ xcb_copy_gc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_set_dashes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_set_dashes_request_t *_aux = (xcb_set_dashes_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_set_dashes_request_t); + xcb_tmp += xcb_block_len; + /* dashes */ + xcb_block_len += _aux->dashes_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7588,10 +8609,12 @@ xcb_set_dashes_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t dashes */ xcb_parts[4].iov_base = (char *) dashes; xcb_parts[4].iov_len = dashes_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7637,14 +8660,45 @@ xcb_set_dashes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t dashes */ xcb_parts[4].iov_base = (char *) dashes; xcb_parts[4].iov_len = dashes_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_set_clip_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_set_clip_rectangles_request_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -7690,10 +8744,12 @@ xcb_set_clip_rectangles_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7743,10 +8799,12 @@ xcb_set_clip_rectangles (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7784,6 +8842,7 @@ xcb_free_gc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7821,6 +8880,7 @@ xcb_free_gc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7872,6 +8932,7 @@ xcb_clear_area_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7923,6 +8984,7 @@ xcb_clear_area (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -7984,6 +9046,7 @@ xcb_copy_area_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8045,6 +9108,7 @@ xcb_copy_area (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8109,6 +9173,7 @@ xcb_copy_plane_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8173,10 +9238,40 @@ xcb_copy_plane (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_poly_point_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_point_request_t); + xcb_tmp += xcb_block_len; + /* points */ + xcb_block_len += points_len * sizeof(xcb_point_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_point_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8219,10 +9314,12 @@ xcb_poly_point_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_point_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8269,14 +9366,45 @@ xcb_poly_point (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_point_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_poly_line_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_line_request_t); + xcb_tmp += xcb_block_len; + /* points */ + xcb_block_len += points_len * sizeof(xcb_point_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_point_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8319,10 +9447,12 @@ xcb_poly_line_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_point_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8369,10 +9499,12 @@ xcb_poly_line (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_point_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8415,6 +9547,35 @@ xcb_segment_end (xcb_segment_iterator_t i /**< */) return ret; } +int +xcb_poly_segment_sizeof (const void *_buffer /**< */, + uint32_t segments_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_segment_request_t); + xcb_tmp += xcb_block_len; + /* segments */ + xcb_block_len += segments_len * sizeof(xcb_segment_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_segment_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8455,10 +9616,12 @@ xcb_poly_segment_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_segment_t segments */ xcb_parts[4].iov_base = (char *) segments; xcb_parts[4].iov_len = segments_len * sizeof(xcb_segment_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8503,14 +9666,45 @@ xcb_poly_segment (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_segment_t segments */ xcb_parts[4].iov_base = (char *) segments; xcb_parts[4].iov_len = segments_len * sizeof(xcb_segment_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_poly_rectangle_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_rectangle_request_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8551,10 +9745,12 @@ xcb_poly_rectangle_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8599,14 +9795,45 @@ xcb_poly_rectangle (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_poly_arc_sizeof (const void *_buffer /**< */, + uint32_t arcs_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_arc_request_t); + xcb_tmp += xcb_block_len; + /* arcs */ + xcb_block_len += arcs_len * sizeof(xcb_arc_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_arc_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8647,10 +9874,12 @@ xcb_poly_arc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_arc_t arcs */ xcb_parts[4].iov_base = (char *) arcs; xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8695,14 +9924,45 @@ xcb_poly_arc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_arc_t arcs */ xcb_parts[4].iov_base = (char *) arcs; xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_fill_poly_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_fill_poly_request_t); + xcb_tmp += xcb_block_len; + /* points */ + xcb_block_len += points_len * sizeof(xcb_point_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_point_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8750,10 +10010,12 @@ xcb_fill_poly_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_point_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8805,14 +10067,45 @@ xcb_fill_poly (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_point_t points */ xcb_parts[4].iov_base = (char *) points; xcb_parts[4].iov_len = points_len * sizeof(xcb_point_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_poly_fill_rectangle_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_fill_rectangle_request_t); + xcb_tmp += xcb_block_len; + /* rectangles */ + xcb_block_len += rectangles_len * sizeof(xcb_rectangle_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_rectangle_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8853,10 +10146,12 @@ xcb_poly_fill_rectangle_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8901,14 +10196,45 @@ xcb_poly_fill_rectangle (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_rectangle_t rectangles */ xcb_parts[4].iov_base = (char *) rectangles; xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_poly_fill_arc_sizeof (const void *_buffer /**< */, + uint32_t arcs_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_fill_arc_request_t); + xcb_tmp += xcb_block_len; + /* arcs */ + xcb_block_len += arcs_len * sizeof(xcb_arc_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_arc_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -8949,10 +10275,12 @@ xcb_poly_fill_arc_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_arc_t arcs */ xcb_parts[4].iov_base = (char *) arcs; xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -8997,14 +10325,45 @@ xcb_poly_fill_arc (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_arc_t arcs */ xcb_parts[4].iov_base = (char *) arcs; xcb_parts[4].iov_len = arcs_len * sizeof(xcb_arc_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_put_image_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_put_image_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += data_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9066,10 +10425,12 @@ xcb_put_image_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9135,14 +10496,45 @@ xcb_put_image (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_get_image_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_image_reply_t *_aux = (xcb_get_image_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_get_image_reply_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += (_aux->length * 4) * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9193,6 +10585,7 @@ xcb_get_image (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9247,6 +10640,7 @@ xcb_get_image_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9323,6 +10717,35 @@ xcb_get_image_reply (xcb_connection_t *c /**< */, return (xcb_get_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_poly_text_8_sizeof (const void *_buffer /**< */, + uint32_t items_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_text_8_request_t); + xcb_tmp += xcb_block_len; + /* items */ + xcb_block_len += items_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9369,10 +10792,12 @@ xcb_poly_text_8_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t items */ xcb_parts[4].iov_base = (char *) items; xcb_parts[4].iov_len = items_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9423,14 +10848,45 @@ xcb_poly_text_8 (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t items */ xcb_parts[4].iov_base = (char *) items; xcb_parts[4].iov_len = items_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_poly_text_16_sizeof (const void *_buffer /**< */, + uint32_t items_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_poly_text_16_request_t); + xcb_tmp += xcb_block_len; + /* items */ + xcb_block_len += items_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9477,10 +10933,12 @@ xcb_poly_text_16_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t items */ xcb_parts[4].iov_base = (char *) items; xcb_parts[4].iov_len = items_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9531,14 +10989,45 @@ xcb_poly_text_16 (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t items */ xcb_parts[4].iov_base = (char *) items; xcb_parts[4].iov_len = items_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_image_text_8_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_image_text_8_request_t *_aux = (xcb_image_text_8_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_image_text_8_request_t); + xcb_tmp += xcb_block_len; + /* string */ + xcb_block_len += _aux->string_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9585,10 +11074,12 @@ xcb_image_text_8_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = string_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9639,14 +11130,45 @@ xcb_image_text_8 (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = string_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_image_text_16_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_image_text_16_request_t *_aux = (xcb_image_text_16_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_image_text_16_request_t); + xcb_tmp += xcb_block_len; + /* string */ + xcb_block_len += _aux->string_len * sizeof(xcb_char2b_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_char2b_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -9693,10 +11215,12 @@ xcb_image_text_16_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_char2b_t string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9747,10 +11271,12 @@ xcb_image_text_16 (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_char2b_t string */ xcb_parts[4].iov_base = (char *) string; xcb_parts[4].iov_len = string_len * sizeof(xcb_char2b_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9796,6 +11322,7 @@ xcb_create_colormap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9841,6 +11368,7 @@ xcb_create_colormap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9878,6 +11406,7 @@ xcb_free_colormap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9915,6 +11444,7 @@ xcb_free_colormap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9955,6 +11485,7 @@ xcb_copy_colormap_and_free_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -9995,6 +11526,7 @@ xcb_copy_colormap_and_free (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10032,6 +11564,7 @@ xcb_install_colormap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10069,6 +11602,7 @@ xcb_install_colormap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10106,6 +11640,7 @@ xcb_uninstall_colormap_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10143,10 +11678,40 @@ xcb_uninstall_colormap (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_list_installed_colormaps_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_list_installed_colormaps_reply_t *_aux = (xcb_list_installed_colormaps_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_list_installed_colormaps_reply_t); + xcb_tmp += xcb_block_len; + /* cmaps */ + xcb_block_len += _aux->cmaps_len * sizeof(xcb_colormap_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_colormap_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10180,6 +11745,7 @@ xcb_list_installed_colormaps (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10217,6 +11783,7 @@ xcb_list_installed_colormaps_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10336,6 +11903,7 @@ xcb_alloc_color (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10383,6 +11951,7 @@ xcb_alloc_color_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10407,6 +11976,35 @@ xcb_alloc_color_reply (xcb_connection_t *c /**< */, return (xcb_alloc_color_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_alloc_named_color_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_alloc_named_color_request_t *_aux = (xcb_alloc_named_color_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_alloc_named_color_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10446,10 +12044,12 @@ xcb_alloc_named_color (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10493,10 +12093,12 @@ xcb_alloc_named_color_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10521,6 +12123,47 @@ xcb_alloc_named_color_reply (xcb_connection_t *c /**< */, return (xcb_alloc_named_color_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_alloc_color_cells_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_alloc_color_cells_reply_t *_aux = (xcb_alloc_color_cells_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_alloc_color_cells_reply_t); + xcb_tmp += xcb_block_len; + /* pixels */ + xcb_block_len += _aux->pixels_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* masks */ + xcb_block_len += _aux->masks_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10562,6 +12205,7 @@ xcb_alloc_color_cells (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10607,6 +12251,7 @@ xcb_alloc_color_cells_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10737,6 +12382,35 @@ xcb_alloc_color_cells_reply (xcb_connection_t *c /**< */, return (xcb_alloc_color_cells_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_alloc_color_planes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_alloc_color_planes_reply_t *_aux = (xcb_alloc_color_planes_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_alloc_color_planes_reply_t); + xcb_tmp += xcb_block_len; + /* pixels */ + xcb_block_len += _aux->pixels_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10784,6 +12458,7 @@ xcb_alloc_color_planes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10835,6 +12510,7 @@ xcb_alloc_color_planes_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10911,6 +12587,35 @@ xcb_alloc_color_planes_reply (xcb_connection_t *c /**< */, return (xcb_alloc_color_planes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_free_colors_sizeof (const void *_buffer /**< */, + uint32_t pixels_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_free_colors_request_t); + xcb_tmp += xcb_block_len; + /* pixels */ + xcb_block_len += pixels_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -10951,10 +12656,12 @@ xcb_free_colors_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t pixels */ xcb_parts[4].iov_base = (char *) pixels; xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -10999,10 +12706,12 @@ xcb_free_colors (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t pixels */ xcb_parts[4].iov_base = (char *) pixels; xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11045,6 +12754,35 @@ xcb_coloritem_end (xcb_coloritem_iterator_t i /**< */) return ret; } +int +xcb_store_colors_sizeof (const void *_buffer /**< */, + uint32_t items_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_store_colors_request_t); + xcb_tmp += xcb_block_len; + /* items */ + xcb_block_len += items_len * sizeof(xcb_coloritem_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_coloritem_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11082,10 +12820,12 @@ xcb_store_colors_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_coloritem_t items */ xcb_parts[4].iov_base = (char *) items; xcb_parts[4].iov_len = items_len * sizeof(xcb_coloritem_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11127,14 +12867,45 @@ xcb_store_colors (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_coloritem_t items */ xcb_parts[4].iov_base = (char *) items; xcb_parts[4].iov_len = items_len * sizeof(xcb_coloritem_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_store_named_color_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_store_named_color_request_t *_aux = (xcb_store_named_color_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_store_named_color_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11179,10 +12950,12 @@ xcb_store_named_color_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11231,10 +13004,12 @@ xcb_store_named_color (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11277,6 +13052,35 @@ xcb_rgb_end (xcb_rgb_iterator_t i /**< */) return ret; } +int +xcb_query_colors_sizeof (const void *_buffer /**< */, + uint32_t pixels_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_query_colors_request_t); + xcb_tmp += xcb_block_len; + /* pixels */ + xcb_block_len += pixels_len * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11314,10 +13118,12 @@ xcb_query_colors (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t pixels */ xcb_parts[4].iov_base = (char *) pixels; xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11359,10 +13165,12 @@ xcb_query_colors_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t pixels */ xcb_parts[4].iov_base = (char *) pixels; xcb_parts[4].iov_len = pixels_len * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11439,6 +13247,35 @@ xcb_query_colors_reply (xcb_connection_t *c /**< */, return (xcb_query_colors_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_lookup_color_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_lookup_color_request_t *_aux = (xcb_lookup_color_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_lookup_color_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -11478,10 +13315,12 @@ xcb_lookup_color (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11525,10 +13364,12 @@ xcb_lookup_color_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11616,6 +13457,7 @@ xcb_create_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11683,6 +13525,7 @@ xcb_create_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11750,6 +13593,7 @@ xcb_create_glyph_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11817,6 +13661,7 @@ xcb_create_glyph_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11854,6 +13699,7 @@ xcb_free_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11891,6 +13737,7 @@ xcb_free_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -11946,6 +13793,7 @@ xcb_recolor_cursor_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12001,6 +13849,7 @@ xcb_recolor_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12046,6 +13895,7 @@ xcb_query_best_size (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12091,6 +13941,7 @@ xcb_query_best_size_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12115,6 +13966,35 @@ xcb_query_best_size_reply (xcb_connection_t *c /**< */, return (xcb_query_best_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_query_extension_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_query_extension_request_t *_aux = (xcb_query_extension_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_query_extension_request_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12151,10 +14031,12 @@ xcb_query_extension (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12195,10 +14077,12 @@ xcb_query_extension_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char name */ xcb_parts[4].iov_base = (char *) name; xcb_parts[4].iov_len = name_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12223,6 +14107,40 @@ xcb_query_extension_reply (xcb_connection_t *c /**< */, return (xcb_query_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_list_extensions_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_list_extensions_reply_t *_aux = (xcb_list_extensions_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_list_extensions_reply_t); + xcb_tmp += xcb_block_len; + /* names */ + for(i=0; i<_aux->names_len; i++) { + xcb_tmp_len = xcb_str_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_str_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12253,6 +14171,7 @@ xcb_list_extensions (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12287,6 +14206,7 @@ xcb_list_extensions_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12347,6 +14267,35 @@ xcb_list_extensions_reply (xcb_connection_t *c /**< */, return (xcb_list_extensions_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_change_keyboard_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_change_keyboard_mapping_request_t *_aux = (xcb_change_keyboard_mapping_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_change_keyboard_mapping_request_t); + xcb_tmp += xcb_block_len; + /* keysyms */ + xcb_block_len += (_aux->keycode_count * _aux->keysyms_per_keycode) * sizeof(xcb_keysym_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keysym_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12388,10 +14337,12 @@ xcb_change_keyboard_mapping_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_keysym_t keysyms */ xcb_parts[4].iov_base = (char *) keysyms; xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12437,14 +14388,45 @@ xcb_change_keyboard_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_keysym_t keysyms */ xcb_parts[4].iov_base = (char *) keysyms; xcb_parts[4].iov_len = (keycode_count * keysyms_per_keycode) * sizeof(xcb_keysym_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_get_keyboard_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_keyboard_mapping_reply_t *_aux = (xcb_get_keyboard_mapping_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_get_keyboard_mapping_reply_t); + xcb_tmp += xcb_block_len; + /* keysyms */ + xcb_block_len += _aux->length * sizeof(xcb_keysym_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keysym_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12481,6 +14463,7 @@ xcb_get_keyboard_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12521,6 +14504,7 @@ xcb_get_keyboard_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12597,6 +14581,35 @@ xcb_get_keyboard_mapping_reply (xcb_connection_t *c /**< */, return (xcb_get_keyboard_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_change_keyboard_control_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_change_keyboard_control_request_t *_aux = (xcb_change_keyboard_control_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_change_keyboard_control_request_t); + xcb_tmp += xcb_block_len; + /* value_list */ + xcb_block_len += xcb_popcount(_aux->value_mask) * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -12632,10 +14645,12 @@ xcb_change_keyboard_control_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12675,10 +14690,12 @@ xcb_change_keyboard_control (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint32_t value_list */ xcb_parts[4].iov_base = (char *) value_list; xcb_parts[4].iov_len = xcb_popcount(value_mask) * sizeof(uint32_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12713,6 +14730,7 @@ xcb_get_keyboard_control (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12747,6 +14765,7 @@ xcb_get_keyboard_control_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12803,6 +14822,7 @@ xcb_bell_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12839,6 +14859,7 @@ xcb_bell (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12888,6 +14909,7 @@ xcb_change_pointer_control_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12937,6 +14959,7 @@ xcb_change_pointer_control (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -12971,6 +14994,7 @@ xcb_get_pointer_control (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13005,6 +15029,7 @@ xcb_get_pointer_control_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13071,6 +15096,7 @@ xcb_set_screen_saver_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13117,6 +15143,7 @@ xcb_set_screen_saver (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13151,6 +15178,7 @@ xcb_get_screen_saver (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13185,6 +15213,7 @@ xcb_get_screen_saver_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13209,6 +15238,35 @@ xcb_get_screen_saver_reply (xcb_connection_t *c /**< */, return (xcb_get_screen_saver_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_change_hosts_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_change_hosts_request_t *_aux = (xcb_change_hosts_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_change_hosts_request_t); + xcb_tmp += xcb_block_len; + /* address */ + xcb_block_len += _aux->address_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -13250,10 +15308,12 @@ xcb_change_hosts_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t address */ xcb_parts[4].iov_base = (char *) address; xcb_parts[4].iov_len = address_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13299,14 +15359,45 @@ xcb_change_hosts (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t address */ xcb_parts[4].iov_base = (char *) address; xcb_parts[4].iov_len = address_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_host_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_host_t *_aux = (xcb_host_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_host_t); + xcb_tmp += xcb_block_len; + /* address */ + xcb_block_len += _aux->address_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -13373,10 +15464,11 @@ void xcb_host_next (xcb_host_iterator_t *i /**< */) { xcb_host_t *R = i->data; - xcb_generic_iterator_t child = xcb_host_address_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_host_t *)(((char *)R) + xcb_host_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_host_t *) child.data; - i->index = child.index; } @@ -13401,6 +15493,40 @@ xcb_host_end (xcb_host_iterator_t i /**< */) return ret; } +int +xcb_list_hosts_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_list_hosts_reply_t *_aux = (xcb_list_hosts_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_list_hosts_reply_t); + xcb_tmp += xcb_block_len; + /* hosts */ + for(i=0; i<_aux->hosts_len; i++) { + xcb_tmp_len = xcb_host_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_host_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -13431,6 +15557,7 @@ xcb_list_hosts (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13465,6 +15592,7 @@ xcb_list_hosts_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13557,6 +15685,7 @@ xcb_set_access_control_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13593,6 +15722,7 @@ xcb_set_access_control (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13629,6 +15759,7 @@ xcb_set_close_down_mode_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13665,6 +15796,7 @@ xcb_set_close_down_mode (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13702,6 +15834,7 @@ xcb_kill_client_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13739,10 +15872,40 @@ xcb_kill_client (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_rotate_properties_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_rotate_properties_request_t *_aux = (xcb_rotate_properties_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_rotate_properties_request_t); + xcb_tmp += xcb_block_len; + /* atoms */ + xcb_block_len += _aux->atoms_len * sizeof(xcb_atom_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_atom_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -13784,10 +15947,12 @@ xcb_rotate_properties_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_atom_t atoms */ xcb_parts[4].iov_base = (char *) atoms; xcb_parts[4].iov_len = atoms_len * sizeof(xcb_atom_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13833,10 +15998,12 @@ xcb_rotate_properties (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_atom_t atoms */ xcb_parts[4].iov_base = (char *) atoms; xcb_parts[4].iov_len = atoms_len * sizeof(xcb_atom_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13873,6 +16040,7 @@ xcb_force_screen_saver_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13909,10 +16077,40 @@ xcb_force_screen_saver (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_set_pointer_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_set_pointer_mapping_request_t *_aux = (xcb_set_pointer_mapping_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_set_pointer_mapping_request_t); + xcb_tmp += xcb_block_len; + /* map */ + xcb_block_len += _aux->map_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -13947,10 +16145,12 @@ xcb_set_pointer_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t map */ xcb_parts[4].iov_base = (char *) map; xcb_parts[4].iov_len = map_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -13989,10 +16189,12 @@ xcb_set_pointer_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t map */ xcb_parts[4].iov_base = (char *) map; xcb_parts[4].iov_len = map_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14017,6 +16219,35 @@ xcb_set_pointer_mapping_reply (xcb_connection_t *c /**< */, return (xcb_set_pointer_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_get_pointer_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_pointer_mapping_reply_t *_aux = (xcb_get_pointer_mapping_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_get_pointer_mapping_reply_t); + xcb_tmp += xcb_block_len; + /* map */ + xcb_block_len += _aux->map_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -14047,6 +16278,7 @@ xcb_get_pointer_mapping (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14081,6 +16313,7 @@ xcb_get_pointer_mapping_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14157,6 +16390,35 @@ xcb_get_pointer_mapping_reply (xcb_connection_t *c /**< */, return (xcb_get_pointer_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_set_modifier_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_set_modifier_mapping_request_t *_aux = (xcb_set_modifier_mapping_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_set_modifier_mapping_request_t); + xcb_tmp += xcb_block_len; + /* keycodes */ + xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(xcb_keycode_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keycode_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -14191,10 +16453,12 @@ xcb_set_modifier_mapping (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_keycode_t keycodes */ xcb_parts[4].iov_base = (char *) keycodes; xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14233,10 +16497,12 @@ xcb_set_modifier_mapping_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* xcb_keycode_t keycodes */ xcb_parts[4].iov_base = (char *) keycodes; xcb_parts[4].iov_len = (keycodes_per_modifier * 8) * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14261,6 +16527,35 @@ xcb_set_modifier_mapping_reply (xcb_connection_t *c /**< */, return (xcb_set_modifier_mapping_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_get_modifier_mapping_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_get_modifier_mapping_reply_t *_aux = (xcb_get_modifier_mapping_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_get_modifier_mapping_reply_t); + xcb_tmp += xcb_block_len; + /* keycodes */ + xcb_block_len += (_aux->keycodes_per_modifier * 8) * sizeof(xcb_keycode_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_keycode_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -14291,6 +16586,7 @@ xcb_get_modifier_mapping (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14325,6 +16621,7 @@ xcb_get_modifier_mapping_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14431,6 +16728,7 @@ xcb_no_operation_checked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -14465,6 +16763,7 @@ xcb_no_operation (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xproto.h b/lib/libxcb/src/xproto.h index 189b050cc..ef503b716 100644 --- a/lib/libxcb/src/xproto.h +++ b/lib/libxcb/src/xproto.h @@ -5262,6 +5262,9 @@ xcb_visualtype_next (xcb_visualtype_iterator_t *i /**< */); xcb_generic_iterator_t xcb_visualtype_end (xcb_visualtype_iterator_t i /**< */); +int +xcb_depth_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -5344,6 +5347,9 @@ xcb_depth_next (xcb_depth_iterator_t *i /**< */); xcb_generic_iterator_t xcb_depth_end (xcb_depth_iterator_t i /**< */); +int +xcb_screen_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -5413,6 +5419,9 @@ xcb_screen_next (xcb_screen_iterator_t *i /**< */); xcb_generic_iterator_t xcb_screen_end (xcb_screen_iterator_t i /**< */); +int +xcb_setup_request_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -5534,6 +5543,9 @@ xcb_setup_request_next (xcb_setup_request_iterator_t *i /**< */); xcb_generic_iterator_t xcb_setup_request_end (xcb_setup_request_iterator_t i /**< */); +int +xcb_setup_failed_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -5616,6 +5628,9 @@ xcb_setup_failed_next (xcb_setup_failed_iterator_t *i /**< */); xcb_generic_iterator_t xcb_setup_failed_end (xcb_setup_failed_iterator_t i /**< */); +int +xcb_setup_authenticate_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -5698,6 +5713,9 @@ xcb_setup_authenticate_next (xcb_setup_authenticate_iterator_t *i /**< */); xcb_generic_iterator_t xcb_setup_authenticate_end (xcb_setup_authenticate_iterator_t i /**< */); +int +xcb_setup_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -5888,8 +5906,11 @@ xcb_client_message_data_next (xcb_client_message_data_iterator_t *i /**< */); xcb_generic_iterator_t xcb_client_message_data_end (xcb_client_message_data_iterator_t i /**< */); +int +xcb_create_window_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5937,7 +5958,7 @@ xcb_create_window_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -5981,8 +6002,11 @@ xcb_create_window (xcb_connection_t *c /**< */, uint32_t value_mask /**< */, const uint32_t *value_list /**< */); +int +xcb_change_window_attributes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6012,7 +6036,7 @@ xcb_change_window_attributes_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6039,7 +6063,7 @@ xcb_change_window_attributes (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6062,7 +6086,7 @@ xcb_get_window_attributes (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6119,7 +6143,7 @@ xcb_get_window_attributes_reply (xcb_connection_t *c /**< */ xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6145,7 +6169,7 @@ xcb_destroy_window_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6168,7 +6192,7 @@ xcb_destroy_window (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6194,7 +6218,7 @@ xcb_destroy_subwindows_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6217,7 +6241,7 @@ xcb_destroy_subwindows (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6245,7 +6269,7 @@ xcb_change_save_set_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6270,7 +6294,7 @@ xcb_change_save_set (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6302,7 +6326,7 @@ xcb_reparent_window_checked (xcb_connection_t *c /**< */, int16_t y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6331,7 +6355,7 @@ xcb_reparent_window (xcb_connection_t *c /**< */, int16_t y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6357,7 +6381,7 @@ xcb_map_window_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6380,7 +6404,7 @@ xcb_map_window (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6406,7 +6430,7 @@ xcb_map_subwindows_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6429,7 +6453,7 @@ xcb_map_subwindows (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6455,7 +6479,7 @@ xcb_unmap_window_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6478,7 +6502,7 @@ xcb_unmap_window (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6504,7 +6528,7 @@ xcb_unmap_subwindows_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6526,8 +6550,11 @@ xcb_void_cookie_t xcb_unmap_subwindows (xcb_connection_t *c /**< */, xcb_window_t window /**< */); +int +xcb_configure_window_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6557,7 +6584,7 @@ xcb_configure_window_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6584,7 +6611,7 @@ xcb_configure_window (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6612,7 +6639,7 @@ xcb_circulate_window_checked (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6637,7 +6664,7 @@ xcb_circulate_window (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6660,7 +6687,7 @@ xcb_get_geometry (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6716,8 +6743,11 @@ xcb_get_geometry_reply (xcb_connection_t *c /**< */, xcb_get_geometry_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_query_tree_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6740,7 +6770,7 @@ xcb_query_tree (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6835,8 +6865,11 @@ xcb_query_tree_reply (xcb_connection_t *c /**< */, xcb_query_tree_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_intern_atom_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6863,7 +6896,7 @@ xcb_intern_atom (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6923,8 +6956,11 @@ xcb_intern_atom_reply (xcb_connection_t *c /**< */, xcb_intern_atom_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_get_atom_name_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -6947,7 +6983,7 @@ xcb_get_atom_name (xcb_connection_t *c /**< */, xcb_atom_t atom /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7042,8 +7078,11 @@ xcb_get_atom_name_reply (xcb_connection_t *c /**< */, xcb_get_atom_name_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_change_property_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7081,7 +7120,7 @@ xcb_change_property_checked (xcb_connection_t *c /**< */, const void *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7116,7 +7155,7 @@ xcb_change_property (xcb_connection_t *c /**< */, const void *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7144,7 +7183,7 @@ xcb_delete_property_checked (xcb_connection_t *c /**< */, xcb_atom_t property /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7168,8 +7207,11 @@ xcb_delete_property (xcb_connection_t *c /**< */, xcb_window_t window /**< */, xcb_atom_t property /**< */); +int +xcb_get_property_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7202,7 +7244,7 @@ xcb_get_property (xcb_connection_t *c /**< */, uint32_t long_length /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7307,8 +7349,11 @@ xcb_get_property_reply (xcb_connection_t *c /**< */, xcb_get_property_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_list_properties_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7331,7 +7376,7 @@ xcb_list_properties (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7427,7 +7472,7 @@ xcb_list_properties_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7457,7 +7502,7 @@ xcb_set_selection_owner_checked (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7484,7 +7529,7 @@ xcb_set_selection_owner (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7507,7 +7552,7 @@ xcb_get_selection_owner (xcb_connection_t *c /**< */, xcb_atom_t selection /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7564,7 +7609,7 @@ xcb_get_selection_owner_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7598,7 +7643,7 @@ xcb_convert_selection_checked (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7629,7 +7674,7 @@ xcb_convert_selection (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7661,7 +7706,7 @@ xcb_send_event_checked (xcb_connection_t *c /**< */, const char *event /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7690,7 +7735,7 @@ xcb_send_event (xcb_connection_t *c /**< */, const char *event /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7727,7 +7772,7 @@ xcb_grab_pointer (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7798,7 +7843,7 @@ xcb_grab_pointer_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7824,7 +7869,7 @@ xcb_ungrab_pointer_checked (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7847,7 +7892,7 @@ xcb_ungrab_pointer (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7889,7 +7934,7 @@ xcb_grab_button_checked (xcb_connection_t *c /**< */, uint16_t modifiers /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7928,7 +7973,7 @@ xcb_grab_button (xcb_connection_t *c /**< */, uint16_t modifiers /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7958,7 +8003,7 @@ xcb_ungrab_button_checked (xcb_connection_t *c /**< */, uint16_t modifiers /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -7985,7 +8030,7 @@ xcb_ungrab_button (xcb_connection_t *c /**< */, uint16_t modifiers /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8015,7 +8060,7 @@ xcb_change_active_pointer_grab_checked (xcb_connection_t *c /**< */, uint16_t event_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8042,7 +8087,7 @@ xcb_change_active_pointer_grab (xcb_connection_t *c /**< */, uint16_t event_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8073,7 +8118,7 @@ xcb_grab_keyboard (xcb_connection_t *c /**< */, uint8_t keyboard_mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8138,7 +8183,7 @@ xcb_grab_keyboard_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8164,7 +8209,7 @@ xcb_ungrab_keyboard_checked (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8187,7 +8232,7 @@ xcb_ungrab_keyboard (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8223,7 +8268,7 @@ xcb_grab_key_checked (xcb_connection_t *c /**< */, uint8_t keyboard_mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8256,7 +8301,7 @@ xcb_grab_key (xcb_connection_t *c /**< */, uint8_t keyboard_mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8286,7 +8331,7 @@ xcb_ungrab_key_checked (xcb_connection_t *c /**< */, uint16_t modifiers /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8313,7 +8358,7 @@ xcb_ungrab_key (xcb_connection_t *c /**< */, uint16_t modifiers /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8341,7 +8386,7 @@ xcb_allow_events_checked (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8366,7 +8411,7 @@ xcb_allow_events (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8390,7 +8435,7 @@ xcb_void_cookie_t xcb_grab_server_checked (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8411,7 +8456,7 @@ xcb_void_cookie_t xcb_grab_server (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8435,7 +8480,7 @@ xcb_void_cookie_t xcb_ungrab_server_checked (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8456,7 +8501,7 @@ xcb_void_cookie_t xcb_ungrab_server (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8479,7 +8524,7 @@ xcb_query_pointer (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8578,8 +8623,11 @@ xcb_timecoord_next (xcb_timecoord_iterator_t *i /**< */); xcb_generic_iterator_t xcb_timecoord_end (xcb_timecoord_iterator_t i /**< */); +int +xcb_get_motion_events_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8606,7 +8654,7 @@ xcb_get_motion_events (xcb_connection_t *c /**< */, xcb_timestamp_t stop /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8706,7 +8754,7 @@ xcb_get_motion_events_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8735,7 +8783,7 @@ xcb_translate_coordinates (xcb_connection_t *c /**< */, int16_t src_y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8798,7 +8846,7 @@ xcb_translate_coordinates_reply (xcb_connection_t *c /**< */ xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8838,7 +8886,7 @@ xcb_warp_pointer_checked (xcb_connection_t *c /**< */, int16_t dst_y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8875,7 +8923,7 @@ xcb_warp_pointer (xcb_connection_t *c /**< */, int16_t dst_y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8905,7 +8953,7 @@ xcb_set_input_focus_checked (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8932,7 +8980,7 @@ xcb_set_input_focus (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -8953,7 +9001,7 @@ xcb_get_input_focus_cookie_t xcb_get_input_focus (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9008,7 +9056,7 @@ xcb_get_input_focus_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9029,7 +9077,7 @@ xcb_query_keymap_cookie_t xcb_query_keymap (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9083,8 +9131,11 @@ xcb_query_keymap_reply (xcb_connection_t *c /**< */, xcb_query_keymap_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_open_font_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9114,7 +9165,7 @@ xcb_open_font_checked (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9141,7 +9192,7 @@ xcb_open_font (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9167,7 +9218,7 @@ xcb_close_font_checked (xcb_connection_t *c /**< */, xcb_font_t font /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9275,8 +9326,11 @@ xcb_charinfo_next (xcb_charinfo_iterator_t *i /**< */); xcb_generic_iterator_t xcb_charinfo_end (xcb_charinfo_iterator_t i /**< */); +int +xcb_query_font_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9299,7 +9353,7 @@ xcb_query_font (xcb_connection_t *c /**< */, xcb_fontable_t font /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9433,8 +9487,12 @@ xcb_query_font_reply (xcb_connection_t *c /**< */, xcb_query_font_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_query_text_extents_sizeof (const void *_buffer /**< */, + uint32_t string_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9461,7 +9519,7 @@ xcb_query_text_extents (xcb_connection_t *c /**< */, const xcb_char2b_t *string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9521,6 +9579,9 @@ xcb_query_text_extents_reply (xcb_connection_t *c /**< */, xcb_query_text_extents_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_str_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -9603,8 +9664,11 @@ xcb_str_next (xcb_str_iterator_t *i /**< */); xcb_generic_iterator_t xcb_str_end (xcb_str_iterator_t i /**< */); +int +xcb_list_fonts_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9631,7 +9695,7 @@ xcb_list_fonts (xcb_connection_t *c /**< */, const char *pattern /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9717,8 +9781,11 @@ xcb_list_fonts_reply (xcb_connection_t *c /**< */, xcb_list_fonts_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_list_fonts_with_info_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9745,7 +9812,7 @@ xcb_list_fonts_with_info (xcb_connection_t *c /**< */, const char *pattern /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9883,8 +9950,11 @@ xcb_list_fonts_with_info_reply (xcb_connection_t *c /**< */, xcb_list_fonts_with_info_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_set_font_path_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9912,7 +9982,7 @@ xcb_set_font_path_checked (xcb_connection_t *c /**< */, const xcb_str_t *font /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9936,8 +10006,11 @@ xcb_set_font_path (xcb_connection_t *c /**< */, uint16_t font_qty /**< */, const xcb_str_t *font /**< */); +int +xcb_get_font_path_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -9958,7 +10031,7 @@ xcb_get_font_path_cookie_t xcb_get_font_path (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10039,7 +10112,7 @@ xcb_get_font_path_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10073,7 +10146,7 @@ xcb_create_pixmap_checked (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10104,7 +10177,7 @@ xcb_create_pixmap (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10130,7 +10203,7 @@ xcb_free_pixmap_checked (xcb_connection_t *c /**< */, xcb_pixmap_t pixmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10152,8 +10225,11 @@ xcb_void_cookie_t xcb_free_pixmap (xcb_connection_t *c /**< */, xcb_pixmap_t pixmap /**< */); +int +xcb_create_gc_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10185,7 +10261,7 @@ xcb_create_gc_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10213,8 +10289,11 @@ xcb_create_gc (xcb_connection_t *c /**< */, uint32_t value_mask /**< */, const uint32_t *value_list /**< */); +int +xcb_change_gc_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10244,7 +10323,7 @@ xcb_change_gc_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10271,7 +10350,7 @@ xcb_change_gc (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10301,7 +10380,7 @@ xcb_copy_gc_checked (xcb_connection_t *c /**< */, uint32_t value_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10327,8 +10406,11 @@ xcb_copy_gc (xcb_connection_t *c /**< */, xcb_gcontext_t dst_gc /**< */, uint32_t value_mask /**< */); +int +xcb_set_dashes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10360,7 +10442,7 @@ xcb_set_dashes_checked (xcb_connection_t *c /**< */, const uint8_t *dashes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10388,8 +10470,12 @@ xcb_set_dashes (xcb_connection_t *c /**< */, uint16_t dashes_len /**< */, const uint8_t *dashes /**< */); +int +xcb_set_clip_rectangles_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10425,7 +10511,7 @@ xcb_set_clip_rectangles_checked (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10458,7 +10544,7 @@ xcb_set_clip_rectangles (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10484,7 +10570,7 @@ xcb_free_gc_checked (xcb_connection_t *c /**< */, xcb_gcontext_t gc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10507,7 +10593,7 @@ xcb_free_gc (xcb_connection_t *c /**< */, xcb_gcontext_t gc /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10543,7 +10629,7 @@ xcb_clear_area_checked (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10576,7 +10662,7 @@ xcb_clear_area (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10618,7 +10704,7 @@ xcb_copy_area_checked (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10657,7 +10743,7 @@ xcb_copy_area (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10701,7 +10787,7 @@ xcb_copy_plane_checked (xcb_connection_t *c /**< */, uint32_t bit_plane /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10741,8 +10827,12 @@ xcb_copy_plane (xcb_connection_t *c /**< */, uint16_t height /**< */, uint32_t bit_plane /**< */); +int +xcb_poly_point_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10776,7 +10866,7 @@ xcb_poly_point_checked (xcb_connection_t *c /**< */, const xcb_point_t *points /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10806,8 +10896,12 @@ xcb_poly_point (xcb_connection_t *c /**< */, uint32_t points_len /**< */, const xcb_point_t *points /**< */); +int +xcb_poly_line_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10841,7 +10935,7 @@ xcb_poly_line_checked (xcb_connection_t *c /**< */, const xcb_point_t *points /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10914,8 +11008,12 @@ xcb_segment_next (xcb_segment_iterator_t *i /**< */); xcb_generic_iterator_t xcb_segment_end (xcb_segment_iterator_t i /**< */); +int +xcb_poly_segment_sizeof (const void *_buffer /**< */, + uint32_t segments_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10947,7 +11045,7 @@ xcb_poly_segment_checked (xcb_connection_t *c /**< */, const xcb_segment_t *segments /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -10975,8 +11073,12 @@ xcb_poly_segment (xcb_connection_t *c /**< */, uint32_t segments_len /**< */, const xcb_segment_t *segments /**< */); +int +xcb_poly_rectangle_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11008,7 +11110,7 @@ xcb_poly_rectangle_checked (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11036,8 +11138,12 @@ xcb_poly_rectangle (xcb_connection_t *c /**< */, uint32_t rectangles_len /**< */, const xcb_rectangle_t *rectangles /**< */); +int +xcb_poly_arc_sizeof (const void *_buffer /**< */, + uint32_t arcs_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11069,7 +11175,7 @@ xcb_poly_arc_checked (xcb_connection_t *c /**< */, const xcb_arc_t *arcs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11097,8 +11203,12 @@ xcb_poly_arc (xcb_connection_t *c /**< */, uint32_t arcs_len /**< */, const xcb_arc_t *arcs /**< */); +int +xcb_fill_poly_sizeof (const void *_buffer /**< */, + uint32_t points_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11134,7 +11244,7 @@ xcb_fill_poly_checked (xcb_connection_t *c /**< */, const xcb_point_t *points /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11166,8 +11276,12 @@ xcb_fill_poly (xcb_connection_t *c /**< */, uint32_t points_len /**< */, const xcb_point_t *points /**< */); +int +xcb_poly_fill_rectangle_sizeof (const void *_buffer /**< */, + uint32_t rectangles_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11199,7 +11313,7 @@ xcb_poly_fill_rectangle_checked (xcb_connection_t *c /**< */, const xcb_rectangle_t *rectangles /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11227,8 +11341,12 @@ xcb_poly_fill_rectangle (xcb_connection_t *c /**< */, uint32_t rectangles_len /**< */, const xcb_rectangle_t *rectangles /**< */); +int +xcb_poly_fill_arc_sizeof (const void *_buffer /**< */, + uint32_t arcs_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11260,7 +11378,7 @@ xcb_poly_fill_arc_checked (xcb_connection_t *c /**< */, const xcb_arc_t *arcs /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11288,8 +11406,12 @@ xcb_poly_fill_arc (xcb_connection_t *c /**< */, uint32_t arcs_len /**< */, const xcb_arc_t *arcs /**< */); +int +xcb_put_image_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11335,7 +11457,7 @@ xcb_put_image_checked (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11377,8 +11499,11 @@ xcb_put_image (xcb_connection_t *c /**< */, uint32_t data_len /**< */, const uint8_t *data /**< */); +int +xcb_get_image_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11413,7 +11538,7 @@ xcb_get_image (xcb_connection_t *c /**< */, uint32_t plane_mask /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11520,8 +11645,12 @@ xcb_get_image_reply (xcb_connection_t *c /**< */, xcb_get_image_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_poly_text_8_sizeof (const void *_buffer /**< */, + uint32_t items_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11557,7 +11686,7 @@ xcb_poly_text_8_checked (xcb_connection_t *c /**< */, const uint8_t *items /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11589,8 +11718,12 @@ xcb_poly_text_8 (xcb_connection_t *c /**< */, uint32_t items_len /**< */, const uint8_t *items /**< */); +int +xcb_poly_text_16_sizeof (const void *_buffer /**< */, + uint32_t items_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11626,7 +11759,7 @@ xcb_poly_text_16_checked (xcb_connection_t *c /**< */, const uint8_t *items /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11658,8 +11791,11 @@ xcb_poly_text_16 (xcb_connection_t *c /**< */, uint32_t items_len /**< */, const uint8_t *items /**< */); +int +xcb_image_text_8_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11695,7 +11831,7 @@ xcb_image_text_8_checked (xcb_connection_t *c /**< */, const char *string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11727,8 +11863,11 @@ xcb_image_text_8 (xcb_connection_t *c /**< */, int16_t y /**< */, const char *string /**< */); +int +xcb_image_text_16_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11764,7 +11903,7 @@ xcb_image_text_16_checked (xcb_connection_t *c /**< */, const xcb_char2b_t *string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11797,7 +11936,7 @@ xcb_image_text_16 (xcb_connection_t *c /**< */, const xcb_char2b_t *string /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11829,7 +11968,7 @@ xcb_create_colormap_checked (xcb_connection_t *c /**< */, xcb_visualid_t visual /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11858,7 +11997,7 @@ xcb_create_colormap (xcb_connection_t *c /**< */, xcb_visualid_t visual /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11884,7 +12023,7 @@ xcb_free_colormap_checked (xcb_connection_t *c /**< */, xcb_colormap_t cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11907,7 +12046,7 @@ xcb_free_colormap (xcb_connection_t *c /**< */, xcb_colormap_t cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11935,7 +12074,7 @@ xcb_copy_colormap_and_free_checked (xcb_connection_t *c /**< */, xcb_colormap_t src_cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11960,7 +12099,7 @@ xcb_copy_colormap_and_free (xcb_connection_t *c /**< */, xcb_colormap_t src_cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -11986,7 +12125,7 @@ xcb_install_colormap_checked (xcb_connection_t *c /**< */, xcb_colormap_t cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12009,7 +12148,7 @@ xcb_install_colormap (xcb_connection_t *c /**< */, xcb_colormap_t cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12035,7 +12174,7 @@ xcb_uninstall_colormap_checked (xcb_connection_t *c /**< */, xcb_colormap_t cmap /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12057,8 +12196,11 @@ xcb_void_cookie_t xcb_uninstall_colormap (xcb_connection_t *c /**< */, xcb_colormap_t cmap /**< */); +int +xcb_list_installed_colormaps_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12081,7 +12223,7 @@ xcb_list_installed_colormaps (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12177,7 +12319,7 @@ xcb_list_installed_colormaps_reply (xcb_connection_t *c / xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12206,7 +12348,7 @@ xcb_alloc_color (xcb_connection_t *c /**< */, uint16_t blue /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12268,8 +12410,11 @@ xcb_alloc_color_reply (xcb_connection_t *c /**< */, xcb_alloc_color_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_alloc_named_color_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12296,7 +12441,7 @@ xcb_alloc_named_color (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12356,8 +12501,11 @@ xcb_alloc_named_color_reply (xcb_connection_t *c /**< */, xcb_alloc_named_color_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_alloc_color_cells_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12386,7 +12534,7 @@ xcb_alloc_color_cells (xcb_connection_t *c /**< */, uint16_t planes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12526,8 +12674,11 @@ xcb_alloc_color_cells_reply (xcb_connection_t *c /**< */, xcb_alloc_color_cells_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_alloc_color_planes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12560,7 +12711,7 @@ xcb_alloc_color_planes (xcb_connection_t *c /**< */, uint16_t blues /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12665,8 +12816,12 @@ xcb_alloc_color_planes_reply (xcb_connection_t *c /**< */, xcb_alloc_color_planes_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_free_colors_sizeof (const void *_buffer /**< */, + uint32_t pixels_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12698,7 +12853,7 @@ xcb_free_colors_checked (xcb_connection_t *c /**< */, const uint32_t *pixels /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12769,8 +12924,12 @@ xcb_coloritem_next (xcb_coloritem_iterator_t *i /**< */); xcb_generic_iterator_t xcb_coloritem_end (xcb_coloritem_iterator_t i /**< */); +int +xcb_store_colors_sizeof (const void *_buffer /**< */, + uint32_t items_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12800,7 +12959,7 @@ xcb_store_colors_checked (xcb_connection_t *c /**< */, const xcb_coloritem_t *items /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12826,8 +12985,11 @@ xcb_store_colors (xcb_connection_t *c /**< */, uint32_t items_len /**< */, const xcb_coloritem_t *items /**< */); +int +xcb_store_named_color_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12861,7 +13023,7 @@ xcb_store_named_color_checked (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12934,8 +13096,12 @@ xcb_rgb_next (xcb_rgb_iterator_t *i /**< */); xcb_generic_iterator_t xcb_rgb_end (xcb_rgb_iterator_t i /**< */); +int +xcb_query_colors_sizeof (const void *_buffer /**< */, + uint32_t pixels_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -12962,7 +13128,7 @@ xcb_query_colors (xcb_connection_t *c /**< */, const uint32_t *pixels /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13061,8 +13227,11 @@ xcb_query_colors_reply (xcb_connection_t *c /**< */, xcb_query_colors_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_lookup_color_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13089,7 +13258,7 @@ xcb_lookup_color (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13150,7 +13319,7 @@ xcb_lookup_color_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13196,7 +13365,7 @@ xcb_create_cursor_checked (xcb_connection_t *c /**< */, uint16_t y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13239,7 +13408,7 @@ xcb_create_cursor (xcb_connection_t *c /**< */, uint16_t y /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13285,7 +13454,7 @@ xcb_create_glyph_cursor_checked (xcb_connection_t *c /**< */, uint16_t back_blue /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13328,7 +13497,7 @@ xcb_create_glyph_cursor (xcb_connection_t *c /**< */, uint16_t back_blue /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13354,7 +13523,7 @@ xcb_free_cursor_checked (xcb_connection_t *c /**< */, xcb_cursor_t cursor /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13377,7 +13546,7 @@ xcb_free_cursor (xcb_connection_t *c /**< */, xcb_cursor_t cursor /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13415,7 +13584,7 @@ xcb_recolor_cursor_checked (xcb_connection_t *c /**< */, uint16_t back_blue /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13450,7 +13619,7 @@ xcb_recolor_cursor (xcb_connection_t *c /**< */, uint16_t back_blue /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13479,7 +13648,7 @@ xcb_query_best_size (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13541,8 +13710,11 @@ xcb_query_best_size_reply (xcb_connection_t *c /**< */, xcb_query_best_size_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_query_extension_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13567,7 +13739,7 @@ xcb_query_extension (xcb_connection_t *c /**< */, const char *name /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13625,8 +13797,11 @@ xcb_query_extension_reply (xcb_connection_t *c /**< */, xcb_query_extension_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_list_extensions_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13647,7 +13822,7 @@ xcb_list_extensions_cookie_t xcb_list_extensions (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13727,8 +13902,11 @@ xcb_list_extensions_reply (xcb_connection_t *c /**< */, xcb_list_extensions_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_change_keyboard_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13760,7 +13938,7 @@ xcb_change_keyboard_mapping_checked (xcb_connection_t *c /**< */, const xcb_keysym_t *keysyms /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13788,8 +13966,11 @@ xcb_change_keyboard_mapping (xcb_connection_t *c /**< */, uint8_t keysyms_per_keycode /**< */, const xcb_keysym_t *keysyms /**< */); +int +xcb_get_keyboard_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13814,7 +13995,7 @@ xcb_get_keyboard_mapping (xcb_connection_t *c /**< */, uint8_t count /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13911,8 +14092,11 @@ xcb_get_keyboard_mapping_reply (xcb_connection_t *c /**< */, xcb_get_keyboard_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_change_keyboard_control_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13940,7 +14124,7 @@ xcb_change_keyboard_control_checked (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13965,7 +14149,7 @@ xcb_change_keyboard_control (xcb_connection_t *c /**< */, const uint32_t *value_list /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -13986,7 +14170,7 @@ xcb_get_keyboard_control_cookie_t xcb_get_keyboard_control (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14041,7 +14225,7 @@ xcb_get_keyboard_control_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14067,7 +14251,7 @@ xcb_bell_checked (xcb_connection_t *c /**< */, int8_t percent /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14090,7 +14274,7 @@ xcb_bell (xcb_connection_t *c /**< */, int8_t percent /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14124,7 +14308,7 @@ xcb_change_pointer_control_checked (xcb_connection_t *c /**< */, uint8_t do_threshold /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14155,7 +14339,7 @@ xcb_change_pointer_control (xcb_connection_t *c /**< */, uint8_t do_threshold /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14176,7 +14360,7 @@ xcb_get_pointer_control_cookie_t xcb_get_pointer_control (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14231,7 +14415,7 @@ xcb_get_pointer_control_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14263,7 +14447,7 @@ xcb_set_screen_saver_checked (xcb_connection_t *c /**< */, uint8_t allow_exposures /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14292,7 +14476,7 @@ xcb_set_screen_saver (xcb_connection_t *c /**< */, uint8_t allow_exposures /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14313,7 +14497,7 @@ xcb_get_screen_saver_cookie_t xcb_get_screen_saver (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14367,8 +14551,11 @@ xcb_get_screen_saver_reply (xcb_connection_t *c /**< */, xcb_get_screen_saver_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_change_hosts_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14400,7 +14587,7 @@ xcb_change_hosts_checked (xcb_connection_t *c /**< */, const uint8_t *address /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14428,6 +14615,9 @@ xcb_change_hosts (xcb_connection_t *c /**< */, uint16_t address_len /**< */, const uint8_t *address /**< */); +int +xcb_host_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -14510,8 +14700,11 @@ xcb_host_next (xcb_host_iterator_t *i /**< */); xcb_generic_iterator_t xcb_host_end (xcb_host_iterator_t i /**< */); +int +xcb_list_hosts_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14532,7 +14725,7 @@ xcb_list_hosts_cookie_t xcb_list_hosts (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14613,7 +14806,7 @@ xcb_list_hosts_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14639,7 +14832,7 @@ xcb_set_access_control_checked (xcb_connection_t *c /**< */, uint8_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14662,7 +14855,7 @@ xcb_set_access_control (xcb_connection_t *c /**< */, uint8_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14688,7 +14881,7 @@ xcb_set_close_down_mode_checked (xcb_connection_t *c /**< */, uint8_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14711,7 +14904,7 @@ xcb_set_close_down_mode (xcb_connection_t *c /**< */, uint8_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14737,7 +14930,7 @@ xcb_kill_client_checked (xcb_connection_t *c /**< */, uint32_t resource /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14759,8 +14952,11 @@ xcb_void_cookie_t xcb_kill_client (xcb_connection_t *c /**< */, uint32_t resource /**< */); +int +xcb_rotate_properties_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14792,7 +14988,7 @@ xcb_rotate_properties_checked (xcb_connection_t *c /**< */, const xcb_atom_t *atoms /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14821,7 +15017,7 @@ xcb_rotate_properties (xcb_connection_t *c /**< */, const xcb_atom_t *atoms /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14847,7 +15043,7 @@ xcb_force_screen_saver_checked (xcb_connection_t *c /**< */, uint8_t mode /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14869,8 +15065,11 @@ xcb_void_cookie_t xcb_force_screen_saver (xcb_connection_t *c /**< */, uint8_t mode /**< */); +int +xcb_set_pointer_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14895,7 +15094,7 @@ xcb_set_pointer_mapping (xcb_connection_t *c /**< */, const uint8_t *map /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14953,8 +15152,11 @@ xcb_set_pointer_mapping_reply (xcb_connection_t *c /**< */, xcb_set_pointer_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_get_pointer_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -14975,7 +15177,7 @@ xcb_get_pointer_mapping_cookie_t xcb_get_pointer_mapping (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -15068,8 +15270,11 @@ xcb_get_pointer_mapping_reply (xcb_connection_t *c /**< */, xcb_get_pointer_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_set_modifier_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -15094,7 +15299,7 @@ xcb_set_modifier_mapping (xcb_connection_t *c /**< */, const xcb_keycode_t *keycodes /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -15152,8 +15357,11 @@ xcb_set_modifier_mapping_reply (xcb_connection_t *c /**< */, xcb_set_modifier_mapping_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_get_modifier_mapping_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -15174,7 +15382,7 @@ xcb_get_modifier_mapping_cookie_t xcb_get_modifier_mapping (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -15268,7 +15476,7 @@ xcb_get_modifier_mapping_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -15292,7 +15500,7 @@ xcb_void_cookie_t xcb_no_operation_checked (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xselinux.c b/lib/libxcb/src/xselinux.c index 3aeb25d4b..bab2e2bd9 100644 --- a/lib/libxcb/src/xselinux.c +++ b/lib/libxcb/src/xselinux.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xselinux.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_selinux_id = { "SELinux", 0 }; @@ -46,6 +53,7 @@ xcb_selinux_query_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -85,6 +93,7 @@ xcb_selinux_query_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -109,6 +118,35 @@ xcb_selinux_query_version_reply (xcb_connection_t *c /**< */ return (xcb_selinux_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_set_device_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_set_device_create_context_request_t *_aux = (xcb_selinux_set_device_create_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_set_device_create_context_request_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -143,10 +181,12 @@ xcb_selinux_set_device_create_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -185,14 +225,45 @@ xcb_selinux_set_device_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_selinux_get_device_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_device_create_context_reply_t *_aux = (xcb_selinux_get_device_create_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_device_create_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -222,6 +293,7 @@ xcb_selinux_get_device_create_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -255,6 +327,7 @@ xcb_selinux_get_device_create_context_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -331,6 +404,35 @@ xcb_selinux_get_device_create_context_reply (xcb_connection_t return (xcb_selinux_get_device_create_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_set_device_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_set_device_context_request_t *_aux = (xcb_selinux_set_device_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_set_device_context_request_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -368,10 +470,12 @@ xcb_selinux_set_device_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -413,14 +517,45 @@ xcb_selinux_set_device_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_selinux_get_device_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_device_context_reply_t *_aux = (xcb_selinux_get_device_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_device_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -453,6 +588,7 @@ xcb_selinux_get_device_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -489,6 +625,7 @@ xcb_selinux_get_device_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -565,6 +702,35 @@ xcb_selinux_get_device_context_reply (xcb_connection_t * return (xcb_selinux_get_device_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_set_window_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_set_window_create_context_request_t *_aux = (xcb_selinux_set_window_create_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_set_window_create_context_request_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -599,10 +765,12 @@ xcb_selinux_set_window_create_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -641,14 +809,45 @@ xcb_selinux_set_window_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_selinux_get_window_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_window_create_context_reply_t *_aux = (xcb_selinux_get_window_create_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_window_create_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -678,6 +877,7 @@ xcb_selinux_get_window_create_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -711,6 +911,7 @@ xcb_selinux_get_window_create_context_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -787,6 +988,35 @@ xcb_selinux_get_window_create_context_reply (xcb_connection_t return (xcb_selinux_get_window_create_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_get_window_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_window_context_reply_t *_aux = (xcb_selinux_get_window_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_window_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -819,6 +1049,7 @@ xcb_selinux_get_window_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -855,6 +1086,7 @@ xcb_selinux_get_window_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -931,6 +1163,47 @@ xcb_selinux_get_window_context_reply (xcb_connection_t * return (xcb_selinux_get_window_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_list_item_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_list_item_t *_aux = (xcb_selinux_list_item_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_list_item_t); + xcb_tmp += xcb_block_len; + /* object_context */ + xcb_block_len += _aux->object_context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* data_context */ + xcb_block_len += _aux->data_context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1051,10 +1324,11 @@ void xcb_selinux_list_item_next (xcb_selinux_list_item_iterator_t *i /**< */) { xcb_selinux_list_item_t *R = i->data; - xcb_generic_iterator_t child = xcb_selinux_list_item_data_context_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_selinux_list_item_t *)(((char *)R) + xcb_selinux_list_item_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_selinux_list_item_t *) child.data; - i->index = child.index; } @@ -1079,6 +1353,35 @@ xcb_selinux_list_item_end (xcb_selinux_list_item_iterator_t i /**< */) return ret; } +int +xcb_selinux_set_property_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_set_property_create_context_request_t *_aux = (xcb_selinux_set_property_create_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_set_property_create_context_request_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1113,10 +1416,12 @@ xcb_selinux_set_property_create_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1155,14 +1460,45 @@ xcb_selinux_set_property_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_selinux_get_property_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_property_create_context_reply_t *_aux = (xcb_selinux_get_property_create_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_property_create_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1192,6 +1528,7 @@ xcb_selinux_get_property_create_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1225,6 +1562,7 @@ xcb_selinux_get_property_create_context_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1301,6 +1639,35 @@ xcb_selinux_get_property_create_context_reply (xcb_connection_t return (xcb_selinux_get_property_create_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_set_property_use_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_set_property_use_context_request_t *_aux = (xcb_selinux_set_property_use_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_set_property_use_context_request_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1335,10 +1702,12 @@ xcb_selinux_set_property_use_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1377,14 +1746,45 @@ xcb_selinux_set_property_use_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_selinux_get_property_use_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_property_use_context_reply_t *_aux = (xcb_selinux_get_property_use_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_property_use_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1414,6 +1814,7 @@ xcb_selinux_get_property_use_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1447,6 +1848,7 @@ xcb_selinux_get_property_use_context_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1523,6 +1925,35 @@ xcb_selinux_get_property_use_context_reply (xcb_connection_t return (xcb_selinux_get_property_use_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_get_property_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_property_context_reply_t *_aux = (xcb_selinux_get_property_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_property_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1558,6 +1989,7 @@ xcb_selinux_get_property_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1597,6 +2029,7 @@ xcb_selinux_get_property_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1673,6 +2106,35 @@ xcb_selinux_get_property_context_reply (xcb_connection_t return (xcb_selinux_get_property_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_get_property_data_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_property_data_context_reply_t *_aux = (xcb_selinux_get_property_data_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_property_data_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1708,6 +2170,7 @@ xcb_selinux_get_property_data_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1747,6 +2210,7 @@ xcb_selinux_get_property_data_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1823,6 +2287,40 @@ xcb_selinux_get_property_data_context_reply (xcb_connection_t return (xcb_selinux_get_property_data_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_list_properties_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_list_properties_reply_t *_aux = (xcb_selinux_list_properties_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_selinux_list_properties_reply_t); + xcb_tmp += xcb_block_len; + /* properties */ + for(i=0; i<_aux->properties_len; i++) { + xcb_tmp_len = xcb_selinux_list_item_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_selinux_list_item_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1855,6 +2353,7 @@ xcb_selinux_list_properties (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1891,6 +2390,7 @@ xcb_selinux_list_properties_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1951,6 +2451,35 @@ xcb_selinux_list_properties_reply (xcb_connection_t *c /** return (xcb_selinux_list_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_set_selection_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_set_selection_create_context_request_t *_aux = (xcb_selinux_set_selection_create_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_set_selection_create_context_request_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1985,10 +2514,12 @@ xcb_selinux_set_selection_create_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2027,14 +2558,45 @@ xcb_selinux_set_selection_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_selinux_get_selection_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_selection_create_context_reply_t *_aux = (xcb_selinux_get_selection_create_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_selection_create_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2064,6 +2626,7 @@ xcb_selinux_get_selection_create_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2097,6 +2660,7 @@ xcb_selinux_get_selection_create_context_unchecked (xcb_connection_t *c /**< */ xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2173,6 +2737,35 @@ xcb_selinux_get_selection_create_context_reply (xcb_connection_t return (xcb_selinux_get_selection_create_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_set_selection_use_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_set_selection_use_context_request_t *_aux = (xcb_selinux_set_selection_use_context_request_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_set_selection_use_context_request_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2207,10 +2800,12 @@ xcb_selinux_set_selection_use_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2249,14 +2844,45 @@ xcb_selinux_set_selection_use_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* char context */ xcb_parts[4].iov_base = (char *) context; xcb_parts[4].iov_len = context_len * sizeof(char); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_selinux_get_selection_use_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_selection_use_context_reply_t *_aux = (xcb_selinux_get_selection_use_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_selection_use_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2286,6 +2912,7 @@ xcb_selinux_get_selection_use_context (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2319,6 +2946,7 @@ xcb_selinux_get_selection_use_context_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2395,6 +3023,35 @@ xcb_selinux_get_selection_use_context_reply (xcb_connection_t return (xcb_selinux_get_selection_use_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_get_selection_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_selection_context_reply_t *_aux = (xcb_selinux_get_selection_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_selection_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2427,6 +3084,7 @@ xcb_selinux_get_selection_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2463,6 +3121,7 @@ xcb_selinux_get_selection_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2539,6 +3198,35 @@ xcb_selinux_get_selection_context_reply (xcb_connection_t return (xcb_selinux_get_selection_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_get_selection_data_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_selection_data_context_reply_t *_aux = (xcb_selinux_get_selection_data_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_selection_data_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2571,6 +3259,7 @@ xcb_selinux_get_selection_data_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2607,6 +3296,7 @@ xcb_selinux_get_selection_data_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2683,6 +3373,40 @@ xcb_selinux_get_selection_data_context_reply (xcb_connection_t return (xcb_selinux_get_selection_data_context_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_list_selections_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_list_selections_reply_t *_aux = (xcb_selinux_list_selections_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_selinux_list_selections_reply_t); + xcb_tmp += xcb_block_len; + /* selections */ + for(i=0; i<_aux->selections_len; i++) { + xcb_tmp_len = xcb_selinux_list_item_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_selinux_list_item_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2712,6 +3436,7 @@ xcb_selinux_list_selections (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2745,6 +3470,7 @@ xcb_selinux_list_selections_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2805,6 +3531,35 @@ xcb_selinux_list_selections_reply (xcb_connection_t *c /** return (xcb_selinux_list_selections_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_selinux_get_client_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_selinux_get_client_context_reply_t *_aux = (xcb_selinux_get_client_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_selinux_get_client_context_reply_t); + xcb_tmp += xcb_block_len; + /* context */ + xcb_block_len += _aux->context_len * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2837,6 +3592,7 @@ xcb_selinux_get_client_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2873,6 +3629,7 @@ xcb_selinux_get_client_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xselinux.h b/lib/libxcb/src/xselinux.h index b81a18f15..2f9380739 100644 --- a/lib/libxcb/src/xselinux.h +++ b/lib/libxcb/src/xselinux.h @@ -643,7 +643,7 @@ typedef struct xcb_selinux_get_client_context_reply_t { } xcb_selinux_get_client_context_reply_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -668,7 +668,7 @@ xcb_selinux_query_version (xcb_connection_t *c /**< */, uint8_t client_minor /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -726,8 +726,11 @@ xcb_selinux_query_version_reply (xcb_connection_t *c /**< */ xcb_selinux_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_set_device_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -755,7 +758,7 @@ xcb_selinux_set_device_create_context_checked (xcb_connection_t *c /**< */, const char *context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -779,8 +782,11 @@ xcb_selinux_set_device_create_context (xcb_connection_t *c /**< */, uint32_t context_len /**< */, const char *context /**< */); +int +xcb_selinux_get_device_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -801,7 +807,7 @@ xcb_selinux_get_device_create_context_cookie_t xcb_selinux_get_device_create_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -894,8 +900,11 @@ xcb_selinux_get_device_create_context_reply (xcb_connection_t xcb_selinux_get_device_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_set_device_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -925,7 +934,7 @@ xcb_selinux_set_device_context_checked (xcb_connection_t *c /**< */, const char *context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -951,8 +960,11 @@ xcb_selinux_set_device_context (xcb_connection_t *c /**< */, uint32_t context_len /**< */, const char *context /**< */); +int +xcb_selinux_get_device_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -975,7 +987,7 @@ xcb_selinux_get_device_context (xcb_connection_t *c /**< */, uint32_t device /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1070,8 +1082,11 @@ xcb_selinux_get_device_context_reply (xcb_connection_t * xcb_selinux_get_device_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_set_window_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1099,7 +1114,7 @@ xcb_selinux_set_window_create_context_checked (xcb_connection_t *c /**< */, const char *context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1123,8 +1138,11 @@ xcb_selinux_set_window_create_context (xcb_connection_t *c /**< */, uint32_t context_len /**< */, const char *context /**< */); +int +xcb_selinux_get_window_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1145,7 +1163,7 @@ xcb_selinux_get_window_create_context_cookie_t xcb_selinux_get_window_create_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1238,8 +1256,11 @@ xcb_selinux_get_window_create_context_reply (xcb_connection_t xcb_selinux_get_window_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_get_window_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1262,7 +1283,7 @@ xcb_selinux_get_window_context (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1357,6 +1378,9 @@ xcb_selinux_get_window_context_reply (xcb_connection_t * xcb_selinux_get_window_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_list_item_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1478,8 +1502,11 @@ xcb_selinux_list_item_next (xcb_selinux_list_item_iterator_t *i /**< */); xcb_generic_iterator_t xcb_selinux_list_item_end (xcb_selinux_list_item_iterator_t i /**< */); +int +xcb_selinux_set_property_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1507,7 +1534,7 @@ xcb_selinux_set_property_create_context_checked (xcb_connection_t *c /**< */, const char *context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1531,8 +1558,11 @@ xcb_selinux_set_property_create_context (xcb_connection_t *c /**< */, uint32_t context_len /**< */, const char *context /**< */); +int +xcb_selinux_get_property_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1553,7 +1583,7 @@ xcb_selinux_get_property_create_context_cookie_t xcb_selinux_get_property_create_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1646,8 +1676,11 @@ xcb_selinux_get_property_create_context_reply (xcb_connection_t xcb_selinux_get_property_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_set_property_use_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1675,7 +1708,7 @@ xcb_selinux_set_property_use_context_checked (xcb_connection_t *c /**< */, const char *context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1699,8 +1732,11 @@ xcb_selinux_set_property_use_context (xcb_connection_t *c /**< */, uint32_t context_len /**< */, const char *context /**< */); +int +xcb_selinux_get_property_use_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1721,7 +1757,7 @@ xcb_selinux_get_property_use_context_cookie_t xcb_selinux_get_property_use_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1814,8 +1850,11 @@ xcb_selinux_get_property_use_context_reply (xcb_connection_t xcb_selinux_get_property_use_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_get_property_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1840,7 +1879,7 @@ xcb_selinux_get_property_context (xcb_connection_t *c /**< */, xcb_atom_t property /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1937,8 +1976,11 @@ xcb_selinux_get_property_context_reply (xcb_connection_t xcb_selinux_get_property_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_get_property_data_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1963,7 +2005,7 @@ xcb_selinux_get_property_data_context (xcb_connection_t *c /**< */, xcb_atom_t property /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2060,8 +2102,11 @@ xcb_selinux_get_property_data_context_reply (xcb_connection_t xcb_selinux_get_property_data_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_list_properties_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2084,7 +2129,7 @@ xcb_selinux_list_properties (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2166,8 +2211,11 @@ xcb_selinux_list_properties_reply (xcb_connection_t *c /** xcb_selinux_list_properties_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_set_selection_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2195,7 +2243,7 @@ xcb_selinux_set_selection_create_context_checked (xcb_connection_t *c /**< */, const char *context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2219,8 +2267,11 @@ xcb_selinux_set_selection_create_context (xcb_connection_t *c /**< */, uint32_t context_len /**< */, const char *context /**< */); +int +xcb_selinux_get_selection_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2241,7 +2292,7 @@ xcb_selinux_get_selection_create_context_cookie_t xcb_selinux_get_selection_create_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2334,8 +2385,11 @@ xcb_selinux_get_selection_create_context_reply (xcb_connection_t xcb_selinux_get_selection_create_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_set_selection_use_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2363,7 +2417,7 @@ xcb_selinux_set_selection_use_context_checked (xcb_connection_t *c /**< */, const char *context /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2387,8 +2441,11 @@ xcb_selinux_set_selection_use_context (xcb_connection_t *c /**< */, uint32_t context_len /**< */, const char *context /**< */); +int +xcb_selinux_get_selection_use_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2409,7 +2466,7 @@ xcb_selinux_get_selection_use_context_cookie_t xcb_selinux_get_selection_use_context (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2502,8 +2559,11 @@ xcb_selinux_get_selection_use_context_reply (xcb_connection_t xcb_selinux_get_selection_use_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_get_selection_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2526,7 +2586,7 @@ xcb_selinux_get_selection_context (xcb_connection_t *c /**< */, xcb_atom_t selection /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2621,8 +2681,11 @@ xcb_selinux_get_selection_context_reply (xcb_connection_t xcb_selinux_get_selection_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_get_selection_data_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2645,7 +2708,7 @@ xcb_selinux_get_selection_data_context (xcb_connection_t *c /**< */, xcb_atom_t selection /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2740,8 +2803,11 @@ xcb_selinux_get_selection_data_context_reply (xcb_connection_t xcb_selinux_get_selection_data_context_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_list_selections_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2762,7 +2828,7 @@ xcb_selinux_list_selections_cookie_t xcb_selinux_list_selections (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2842,8 +2908,11 @@ xcb_selinux_list_selections_reply (xcb_connection_t *c /** xcb_selinux_list_selections_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_selinux_get_client_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2866,7 +2935,7 @@ xcb_selinux_get_client_context (xcb_connection_t *c /**< */, uint32_t resource /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xtest.c b/lib/libxcb/src/xtest.c index bbe476dbc..ba1abd9a4 100644 --- a/lib/libxcb/src/xtest.c +++ b/lib/libxcb/src/xtest.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xtest.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" xcb_extension_t xcb_test_id = { "XTEST", 0 }; @@ -47,6 +54,7 @@ xcb_test_get_version (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -87,6 +95,7 @@ xcb_test_get_version_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -146,6 +155,7 @@ xcb_test_compare_cursor (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -185,6 +195,7 @@ xcb_test_compare_cursor_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -262,6 +273,7 @@ xcb_test_fake_input_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -319,6 +331,7 @@ xcb_test_fake_input (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -356,6 +369,7 @@ xcb_test_grab_control_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -393,6 +407,7 @@ xcb_test_grab_control (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xtest.h b/lib/libxcb/src/xtest.h index 51df13ce0..ff6b33a5d 100644 --- a/lib/libxcb/src/xtest.h +++ b/lib/libxcb/src/xtest.h @@ -130,7 +130,7 @@ typedef struct xcb_test_grab_control_request_t { } xcb_test_grab_control_request_t; /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -155,7 +155,7 @@ xcb_test_get_version (xcb_connection_t *c /**< */, uint16_t minor_version /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -214,7 +214,7 @@ xcb_test_get_version_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -239,7 +239,7 @@ xcb_test_compare_cursor (xcb_connection_t *c /**< */, xcb_cursor_t cursor /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -298,7 +298,7 @@ xcb_test_compare_cursor_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -336,7 +336,7 @@ xcb_test_fake_input_checked (xcb_connection_t *c /**< */, uint8_t deviceid /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -371,7 +371,7 @@ xcb_test_fake_input (xcb_connection_t *c /**< */, uint8_t deviceid /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -397,7 +397,7 @@ xcb_test_grab_control_checked (xcb_connection_t *c /**< */, uint8_t impervious /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xv.c b/lib/libxcb/src/xv.c index 45688adbb..c73236cea 100644 --- a/lib/libxcb/src/xv.c +++ b/lib/libxcb/src/xv.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xv.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" #include "shm.h" @@ -164,6 +171,47 @@ xcb_xv_format_end (xcb_xv_format_iterator_t i /**< */) return ret; } +int +xcb_xv_adaptor_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_adaptor_info_t *_aux = (xcb_xv_adaptor_info_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xv_adaptor_info_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_size * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* formats */ + xcb_block_len += _aux->num_formats * sizeof(xcb_xv_format_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_xv_format_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -284,10 +332,11 @@ void xcb_xv_adaptor_info_next (xcb_xv_adaptor_info_iterator_t *i /**< */) { xcb_xv_adaptor_info_t *R = i->data; - xcb_generic_iterator_t child = xcb_xv_format_end(xcb_xv_adaptor_info_formats_iterator(R)); + xcb_generic_iterator_t child; + child.data = (xcb_xv_adaptor_info_t *)(((char *)R) + xcb_xv_adaptor_info_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_xv_adaptor_info_t *) child.data; - i->index = child.index; } @@ -312,6 +361,35 @@ xcb_xv_adaptor_info_end (xcb_xv_adaptor_info_iterator_t i /**< */) return ret; } +int +xcb_xv_encoding_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_encoding_info_t *_aux = (xcb_xv_encoding_info_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xv_encoding_info_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->name_size * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -378,10 +456,11 @@ void xcb_xv_encoding_info_next (xcb_xv_encoding_info_iterator_t *i /**< */) { xcb_xv_encoding_info_t *R = i->data; - xcb_generic_iterator_t child = xcb_xv_encoding_info_name_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_xv_encoding_info_t *)(((char *)R) + xcb_xv_encoding_info_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_xv_encoding_info_t *) child.data; - i->index = child.index; } @@ -406,6 +485,59 @@ xcb_xv_encoding_info_end (xcb_xv_encoding_info_iterator_t i /**< */) return ret; } +int +xcb_xv_image_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_image_t *_aux = (xcb_xv_image_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xv_image_t); + xcb_tmp += xcb_block_len; + /* pitches */ + xcb_block_len += _aux->num_planes * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* offsets */ + xcb_block_len += _aux->num_planes * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* data */ + xcb_block_len += _aux->data_size * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -580,10 +712,11 @@ void xcb_xv_image_next (xcb_xv_image_iterator_t *i /**< */) { xcb_xv_image_t *R = i->data; - xcb_generic_iterator_t child = xcb_xv_image_data_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_xv_image_t *)(((char *)R) + xcb_xv_image_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_xv_image_t *) child.data; - i->index = child.index; } @@ -608,6 +741,35 @@ xcb_xv_image_end (xcb_xv_image_iterator_t i /**< */) return ret; } +int +xcb_xv_attribute_info_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_attribute_info_t *_aux = (xcb_xv_attribute_info_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xv_attribute_info_t); + xcb_tmp += xcb_block_len; + /* name */ + xcb_block_len += _aux->size * sizeof(char); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(char); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -674,10 +836,11 @@ void xcb_xv_attribute_info_next (xcb_xv_attribute_info_iterator_t *i /**< */) { xcb_xv_attribute_info_t *R = i->data; - xcb_generic_iterator_t child = xcb_xv_attribute_info_name_end(R); + xcb_generic_iterator_t child; + child.data = (xcb_xv_attribute_info_t *)(((char *)R) + xcb_xv_attribute_info_sizeof(R)); + i->index = (char *) child.data - (char *) i->data; --i->rem; i->data = (xcb_xv_attribute_info_t *) child.data; - i->index = child.index; } @@ -769,6 +932,7 @@ xcb_xv_query_extension (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -802,6 +966,7 @@ xcb_xv_query_extension_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -826,6 +991,40 @@ xcb_xv_query_extension_reply (xcb_connection_t *c /**< */, return (xcb_xv_query_extension_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xv_query_adaptors_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_query_adaptors_reply_t *_aux = (xcb_xv_query_adaptors_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_xv_query_adaptors_reply_t); + xcb_tmp += xcb_block_len; + /* info */ + for(i=0; i<_aux->num_adaptors; i++) { + xcb_tmp_len = xcb_xv_adaptor_info_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_xv_adaptor_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -858,6 +1057,7 @@ xcb_xv_query_adaptors (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -894,6 +1094,7 @@ xcb_xv_query_adaptors_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -954,6 +1155,40 @@ xcb_xv_query_adaptors_reply (xcb_connection_t *c /**< */, return (xcb_xv_query_adaptors_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xv_query_encodings_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_query_encodings_reply_t *_aux = (xcb_xv_query_encodings_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_xv_query_encodings_reply_t); + xcb_tmp += xcb_block_len; + /* info */ + for(i=0; i<_aux->num_encodings; i++) { + xcb_tmp_len = xcb_xv_encoding_info_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_xv_encoding_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -986,6 +1221,7 @@ xcb_xv_query_encodings (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1022,6 +1258,7 @@ xcb_xv_query_encodings_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1117,6 +1354,7 @@ xcb_xv_grab_port (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1156,6 +1394,7 @@ xcb_xv_grab_port_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1215,6 +1454,7 @@ xcb_xv_ungrab_port_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1254,6 +1494,7 @@ xcb_xv_ungrab_port (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1320,6 +1561,7 @@ xcb_xv_put_video_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1386,6 +1628,7 @@ xcb_xv_put_video (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1452,6 +1695,7 @@ xcb_xv_put_still_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1518,6 +1762,7 @@ xcb_xv_put_still (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1584,6 +1829,7 @@ xcb_xv_get_video_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1650,6 +1896,7 @@ xcb_xv_get_video (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1716,6 +1963,7 @@ xcb_xv_get_still_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1782,6 +2030,7 @@ xcb_xv_get_still (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1821,6 +2070,7 @@ xcb_xv_stop_video_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1860,6 +2110,7 @@ xcb_xv_stop_video (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1900,6 +2151,7 @@ xcb_xv_select_video_notify_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1940,6 +2192,7 @@ xcb_xv_select_video_notify (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1980,6 +2233,7 @@ xcb_xv_select_port_notify_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2020,6 +2274,7 @@ xcb_xv_select_port_notify (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2072,6 +2327,7 @@ xcb_xv_query_best_size (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2124,6 +2380,7 @@ xcb_xv_query_best_size_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2186,6 +2443,7 @@ xcb_xv_set_port_attribute_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2228,6 +2486,7 @@ xcb_xv_set_port_attribute (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2267,6 +2526,7 @@ xcb_xv_get_port_attribute (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2306,6 +2566,7 @@ xcb_xv_get_port_attribute_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2330,6 +2591,40 @@ xcb_xv_get_port_attribute_reply (xcb_connection_t *c /**< */ return (xcb_xv_get_port_attribute_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xv_query_port_attributes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_query_port_attributes_reply_t *_aux = (xcb_xv_query_port_attributes_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + unsigned int i; + unsigned int xcb_tmp_len; + + xcb_block_len += sizeof(xcb_xv_query_port_attributes_reply_t); + xcb_tmp += xcb_block_len; + /* attributes */ + for(i=0; i<_aux->num_attributes; i++) { + xcb_tmp_len = xcb_xv_attribute_info_sizeof(xcb_tmp); + xcb_block_len += xcb_tmp_len; + xcb_tmp += xcb_tmp_len; + } + xcb_align_to = ALIGNOF(xcb_xv_attribute_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2362,6 +2657,7 @@ xcb_xv_query_port_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2398,6 +2694,7 @@ xcb_xv_query_port_attributes_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2458,6 +2755,35 @@ xcb_xv_query_port_attributes_reply (xcb_connection_t *c / return (xcb_xv_query_port_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xv_list_image_formats_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_list_image_formats_reply_t *_aux = (xcb_xv_list_image_formats_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xv_list_image_formats_reply_t); + xcb_tmp += xcb_block_len; + /* format */ + xcb_block_len += _aux->num_formats * sizeof(xcb_xv_image_format_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_xv_image_format_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2490,6 +2816,7 @@ xcb_xv_list_image_formats (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2526,6 +2853,7 @@ xcb_xv_list_image_formats_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2602,6 +2930,47 @@ xcb_xv_list_image_formats_reply (xcb_connection_t *c /**< */ return (xcb_xv_list_image_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xv_query_image_attributes_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xv_query_image_attributes_reply_t *_aux = (xcb_xv_query_image_attributes_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xv_query_image_attributes_reply_t); + xcb_tmp += xcb_block_len; + /* pitches */ + xcb_block_len += _aux->num_planes * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + /* offsets */ + xcb_block_len += _aux->num_planes * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2643,6 +3012,7 @@ xcb_xv_query_image_attributes (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2688,6 +3058,7 @@ xcb_xv_query_image_attributes_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2818,6 +3189,35 @@ xcb_xv_query_image_attributes_reply (xcb_connection_t *c return (xcb_xv_query_image_attributes_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xv_put_image_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */) +{ + char *xcb_tmp = (char *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xv_put_image_request_t); + xcb_tmp += xcb_block_len; + /* data */ + xcb_block_len += data_len * sizeof(uint8_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint8_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -2893,10 +3293,12 @@ xcb_xv_put_image_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -2976,10 +3378,12 @@ xcb_xv_put_image (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + /* uint8_t data */ xcb_parts[4].iov_base = (char *) data; xcb_parts[4].iov_len = data_len * sizeof(uint8_t); xcb_parts[5].iov_base = 0; xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3065,6 +3469,7 @@ xcb_xv_shm_put_image_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -3150,6 +3555,7 @@ xcb_xv_shm_put_image (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xv.h b/lib/libxcb/src/xv.h index 7009bbd25..18c0e554e 100644 --- a/lib/libxcb/src/xv.h +++ b/lib/libxcb/src/xv.h @@ -1009,6 +1009,9 @@ xcb_xv_format_next (xcb_xv_format_iterator_t *i /**< */); xcb_generic_iterator_t xcb_xv_format_end (xcb_xv_format_iterator_t i /**< */); +int +xcb_xv_adaptor_info_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1130,6 +1133,9 @@ xcb_xv_adaptor_info_next (xcb_xv_adaptor_info_iterator_t *i /**< */); xcb_generic_iterator_t xcb_xv_adaptor_info_end (xcb_xv_adaptor_info_iterator_t i /**< */); +int +xcb_xv_encoding_info_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1212,6 +1218,9 @@ xcb_xv_encoding_info_next (xcb_xv_encoding_info_iterator_t *i /**< */); xcb_generic_iterator_t xcb_xv_encoding_info_end (xcb_xv_encoding_info_iterator_t i /**< */); +int +xcb_xv_image_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1372,6 +1381,9 @@ xcb_xv_image_next (xcb_xv_image_iterator_t *i /**< */); xcb_generic_iterator_t xcb_xv_image_end (xcb_xv_image_iterator_t i /**< */); +int +xcb_xv_attribute_info_sizeof (const void *_buffer /**< */); + /***************************************************************************** ** @@ -1498,7 +1510,7 @@ xcb_generic_iterator_t xcb_xv_image_format_info_end (xcb_xv_image_format_info_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1519,7 +1531,7 @@ xcb_xv_query_extension_cookie_t xcb_xv_query_extension (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1573,8 +1585,11 @@ xcb_xv_query_extension_reply (xcb_connection_t *c /**< */, xcb_xv_query_extension_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xv_query_adaptors_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1597,7 +1612,7 @@ xcb_xv_query_adaptors (xcb_connection_t *c /**< */, xcb_window_t window /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1679,8 +1694,11 @@ xcb_xv_query_adaptors_reply (xcb_connection_t *c /**< */, xcb_xv_query_adaptors_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xv_query_encodings_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1703,7 +1721,7 @@ xcb_xv_query_encodings (xcb_connection_t *c /**< */, xcb_xv_port_t port /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1786,7 +1804,7 @@ xcb_xv_query_encodings_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1811,7 +1829,7 @@ xcb_xv_grab_port (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1870,7 +1888,7 @@ xcb_xv_grab_port_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1898,7 +1916,7 @@ xcb_xv_ungrab_port_checked (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1923,7 +1941,7 @@ xcb_xv_ungrab_port (xcb_connection_t *c /**< */, xcb_timestamp_t time /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1969,7 +1987,7 @@ xcb_xv_put_video_checked (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2012,7 +2030,7 @@ xcb_xv_put_video (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2058,7 +2076,7 @@ xcb_xv_put_still_checked (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2101,7 +2119,7 @@ xcb_xv_put_still (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2147,7 +2165,7 @@ xcb_xv_get_video_checked (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2190,7 +2208,7 @@ xcb_xv_get_video (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2236,7 +2254,7 @@ xcb_xv_get_still_checked (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2279,7 +2297,7 @@ xcb_xv_get_still (xcb_connection_t *c /**< */, uint16_t drw_h /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2307,7 +2325,7 @@ xcb_xv_stop_video_checked (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2332,7 +2350,7 @@ xcb_xv_stop_video (xcb_connection_t *c /**< */, xcb_drawable_t drawable /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2360,7 +2378,7 @@ xcb_xv_select_video_notify_checked (xcb_connection_t *c /**< */, uint8_t onoff /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2385,7 +2403,7 @@ xcb_xv_select_video_notify (xcb_connection_t *c /**< */, uint8_t onoff /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2413,7 +2431,7 @@ xcb_xv_select_port_notify_checked (xcb_connection_t *c /**< */, uint8_t onoff /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2438,7 +2456,7 @@ xcb_xv_select_port_notify (xcb_connection_t *c /**< */, uint8_t onoff /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2471,7 +2489,7 @@ xcb_xv_query_best_size (xcb_connection_t *c /**< */, uint8_t motion /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2538,7 +2556,7 @@ xcb_xv_query_best_size_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2568,7 +2586,7 @@ xcb_xv_set_port_attribute_checked (xcb_connection_t *c /**< */, int32_t value /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2595,7 +2613,7 @@ xcb_xv_set_port_attribute (xcb_connection_t *c /**< */, int32_t value /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2620,7 +2638,7 @@ xcb_xv_get_port_attribute (xcb_connection_t *c /**< */, xcb_atom_t attribute /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2678,8 +2696,11 @@ xcb_xv_get_port_attribute_reply (xcb_connection_t *c /**< */ xcb_xv_get_port_attribute_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xv_query_port_attributes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2702,7 +2723,7 @@ xcb_xv_query_port_attributes (xcb_connection_t *c /**< */, xcb_xv_port_t port /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2784,8 +2805,11 @@ xcb_xv_query_port_attributes_reply (xcb_connection_t *c / xcb_xv_query_port_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xv_list_image_formats_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2808,7 +2832,7 @@ xcb_xv_list_image_formats (xcb_connection_t *c /**< */, xcb_xv_port_t port /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2903,8 +2927,11 @@ xcb_xv_list_image_formats_reply (xcb_connection_t *c /**< */ xcb_xv_list_image_formats_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xv_query_image_attributes_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -2933,7 +2960,7 @@ xcb_xv_query_image_attributes (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3073,8 +3100,12 @@ xcb_xv_query_image_attributes_reply (xcb_connection_t *c xcb_xv_query_image_attributes_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xv_put_image_sizeof (const void *_buffer /**< */, + uint32_t data_len /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3130,7 +3161,7 @@ xcb_xv_put_image_checked (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3183,7 +3214,7 @@ xcb_xv_put_image (xcb_connection_t *c /**< */, const uint8_t *data /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -3241,7 +3272,7 @@ xcb_xv_shm_put_image_checked (xcb_connection_t *c /**< */, uint8_t send_event /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * diff --git a/lib/libxcb/src/xvmc.c b/lib/libxcb/src/xvmc.c index 92faf6c80..87f012c2d 100644 --- a/lib/libxcb/src/xvmc.c +++ b/lib/libxcb/src/xvmc.c @@ -3,10 +3,17 @@ * Edit at your peril. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#include <stdlib.h> #include <string.h> #include <assert.h> +#include <stddef.h> /* for offsetof() */ #include "xcbext.h" #include "xvmc.h" + +#define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member) #include "xproto.h" #include "shm.h" #include "xv.h" @@ -194,6 +201,7 @@ xcb_xvmc_query_version (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -227,6 +235,7 @@ xcb_xvmc_query_version_unchecked (xcb_connection_t *c /**< */) xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -251,6 +260,35 @@ xcb_xvmc_query_version_reply (xcb_connection_t *c /**< */, return (xcb_xvmc_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xvmc_list_surface_types_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xvmc_list_surface_types_reply_t *_aux = (xcb_xvmc_list_surface_types_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xvmc_list_surface_types_reply_t); + xcb_tmp += xcb_block_len; + /* surfaces */ + xcb_block_len += _aux->num * sizeof(xcb_xvmc_surface_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_xvmc_surface_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -283,6 +321,7 @@ xcb_xvmc_list_surface_types (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -319,6 +358,7 @@ xcb_xvmc_list_surface_types_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -395,6 +435,35 @@ xcb_xvmc_list_surface_types_reply (xcb_connection_t *c /** return (xcb_xvmc_list_surface_types_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); } +int +xcb_xvmc_create_context_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xvmc_create_context_reply_t *_aux = (xcb_xvmc_create_context_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xvmc_create_context_reply_t); + xcb_tmp += xcb_block_len; + /* priv_data */ + xcb_block_len += _aux->length * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -442,6 +511,7 @@ xcb_xvmc_create_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -493,6 +563,7 @@ xcb_xvmc_create_context_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -601,6 +672,7 @@ xcb_xvmc_destroy_context_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -637,10 +709,40 @@ xcb_xvmc_destroy_context (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xvmc_create_surface_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xvmc_create_surface_reply_t *_aux = (xcb_xvmc_create_surface_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xvmc_create_surface_reply_t); + xcb_tmp += xcb_block_len; + /* priv_data */ + xcb_block_len += _aux->length * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -676,6 +778,7 @@ xcb_xvmc_create_surface (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -715,6 +818,7 @@ xcb_xvmc_create_surface_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -823,6 +927,7 @@ xcb_xvmc_destroy_surface_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -859,10 +964,40 @@ xcb_xvmc_destroy_surface (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xvmc_create_subpicture_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xvmc_create_subpicture_reply_t *_aux = (xcb_xvmc_create_subpicture_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xvmc_create_subpicture_reply_t); + xcb_tmp += xcb_block_len; + /* priv_data */ + xcb_block_len += _aux->length * sizeof(uint32_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(uint32_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -907,6 +1042,7 @@ xcb_xvmc_create_subpicture (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -955,6 +1091,7 @@ xcb_xvmc_create_subpicture_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1063,6 +1200,7 @@ xcb_xvmc_destroy_subpicture_checked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1099,10 +1237,40 @@ xcb_xvmc_destroy_subpicture (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } +int +xcb_xvmc_list_subpicture_types_sizeof (const void *_buffer /**< */) +{ + char *xcb_tmp = (char *)_buffer; + const xcb_xvmc_list_subpicture_types_reply_t *_aux = (xcb_xvmc_list_subpicture_types_reply_t *)_buffer; + unsigned int xcb_buffer_len = 0; + unsigned int xcb_block_len = 0; + unsigned int xcb_pad = 0; + unsigned int xcb_align_to; + + + xcb_block_len += sizeof(xcb_xvmc_list_subpicture_types_reply_t); + xcb_tmp += xcb_block_len; + /* types */ + xcb_block_len += _aux->num * sizeof(xcb_xv_image_format_info_t); + xcb_tmp += xcb_block_len; + xcb_align_to = ALIGNOF(xcb_xv_image_format_info_t); + /* insert padding */ + xcb_pad = -xcb_block_len & (xcb_align_to - 1); + xcb_buffer_len += xcb_block_len + xcb_pad; + if (0 != xcb_pad) { + xcb_tmp += xcb_pad; + xcb_pad = 0; + } + xcb_block_len = 0; + + return xcb_buffer_len; +} + /***************************************************************************** ** @@ -1138,6 +1306,7 @@ xcb_xvmc_list_subpicture_types (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); return xcb_ret; } @@ -1177,6 +1346,7 @@ xcb_xvmc_list_subpicture_types_unchecked (xcb_connection_t *c /**< */, xcb_parts[2].iov_len = sizeof(xcb_out); xcb_parts[3].iov_base = 0; xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); return xcb_ret; } diff --git a/lib/libxcb/src/xvmc.h b/lib/libxcb/src/xvmc.h index c7b010779..1f2bfbf82 100644 --- a/lib/libxcb/src/xvmc.h +++ b/lib/libxcb/src/xvmc.h @@ -502,7 +502,7 @@ xcb_generic_iterator_t xcb_xvmc_surface_info_end (xcb_xvmc_surface_info_iterator_t i /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -523,7 +523,7 @@ xcb_xvmc_query_version_cookie_t xcb_xvmc_query_version (xcb_connection_t *c /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -577,8 +577,11 @@ xcb_xvmc_query_version_reply (xcb_connection_t *c /**< */, xcb_xvmc_query_version_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xvmc_list_surface_types_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -601,7 +604,7 @@ xcb_xvmc_list_surface_types (xcb_connection_t *c /**< */, xcb_xv_port_t port_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -696,8 +699,11 @@ xcb_xvmc_list_surface_types_reply (xcb_connection_t *c /** xcb_xvmc_list_surface_types_cookie_t cookie /**< */, xcb_generic_error_t **e /**< */); +int +xcb_xvmc_create_context_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -730,7 +736,7 @@ xcb_xvmc_create_context (xcb_connection_t *c /**< */, uint32_t flags /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -836,7 +842,7 @@ xcb_xvmc_create_context_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -862,7 +868,7 @@ xcb_xvmc_destroy_context_checked (xcb_connection_t *c /**< */, xcb_xvmc_context_t context_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -884,8 +890,11 @@ xcb_void_cookie_t xcb_xvmc_destroy_context (xcb_connection_t *c /**< */, xcb_xvmc_context_t context_id /**< */); +int +xcb_xvmc_create_surface_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -910,7 +919,7 @@ xcb_xvmc_create_surface (xcb_connection_t *c /**< */, xcb_xvmc_context_t context_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1008,7 +1017,7 @@ xcb_xvmc_create_surface_reply (xcb_connection_t *c /**< */, xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1034,7 +1043,7 @@ xcb_xvmc_destroy_surface_checked (xcb_connection_t *c /**< */, xcb_xvmc_surface_t surface_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1056,8 +1065,11 @@ xcb_void_cookie_t xcb_xvmc_destroy_surface (xcb_connection_t *c /**< */, xcb_xvmc_surface_t surface_id /**< */); +int +xcb_xvmc_create_subpicture_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1088,7 +1100,7 @@ xcb_xvmc_create_subpicture (xcb_connection_t *c /**< */, uint16_t height /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1192,7 +1204,7 @@ xcb_xvmc_create_subpicture_reply (xcb_connection_t *c /**< xcb_generic_error_t **e /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1218,7 +1230,7 @@ xcb_xvmc_destroy_subpicture_checked (xcb_connection_t *c /**< */, xcb_xvmc_subpicture_t subpicture_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1240,8 +1252,11 @@ xcb_void_cookie_t xcb_xvmc_destroy_subpicture (xcb_connection_t *c /**< */, xcb_xvmc_subpicture_t subpicture_id /**< */); +int +xcb_xvmc_list_subpicture_types_sizeof (const void *_buffer /**< */); + /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * @@ -1266,7 +1281,7 @@ xcb_xvmc_list_subpicture_types (xcb_connection_t *c /**< */, xcb_xvmc_surface_t surface_id /**< */); /** - * Delivers a request to the X server + * * @param c The connection * @return A cookie * |