From 21bd66e1ea06e466754ab06ee2c5f8b737bb4bd7 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Mon, 29 Oct 2012 12:59:09 +0100 Subject: Add configure option to minimize xcb runtime dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some of the xcb- libraries we depend upon are not (yet) common across distributions. This is problematic for binaries that should be working on different distributions. The patch mitigates this by: Adding the files from libxcb-proto (version 0.1.6), compiled with libxcb-1.5 xcb-util (version 0.3.9) xcb-util-image (version 0.3.9) xcb-util-keysyms (version 0.3.9) xcb-util-renderutil (version 0.3.8) xcb-util-wm (version 0.3.9) from xcb.freedesktop.org/dist to src/3rdparty/xcb. Adding a configure option '-qt-xcb' to use the sources instead of linking to the respective runtime libraries. Task-number: QTBUG-27803 Change-Id: I6ea87daa382871b2b9072a601511523fa0b9f44b Reviewed-by: Samuel Rødal --- src/3rdparty/xcb/README | 13 + src/3rdparty/xcb/include/xcb/randr.h | 5020 +++++++++++++++++++++++++ src/3rdparty/xcb/include/xcb/render.h | 4412 ++++++++++++++++++++++ src/3rdparty/xcb/include/xcb/shape.h | 1096 ++++++ src/3rdparty/xcb/include/xcb/shm.h | 738 ++++ src/3rdparty/xcb/include/xcb/sync.h | 1707 +++++++++ src/3rdparty/xcb/include/xcb/xcb_atom.h | 18 + src/3rdparty/xcb/include/xcb/xcb_aux.h | 214 ++ src/3rdparty/xcb/include/xcb/xcb_bitops.h | 212 ++ src/3rdparty/xcb/include/xcb/xcb_event.h | 90 + src/3rdparty/xcb/include/xcb/xcb_icccm.h | 1049 ++++++ src/3rdparty/xcb/include/xcb/xcb_image.h | 630 ++++ src/3rdparty/xcb/include/xcb/xcb_keysyms.h | 71 + src/3rdparty/xcb/include/xcb/xcb_pixel.h | 171 + src/3rdparty/xcb/include/xcb/xcb_renderutil.h | 142 + src/3rdparty/xcb/include/xcb/xcb_util.h | 8 + src/3rdparty/xcb/include/xcb/xfixes.h | 2790 ++++++++++++++ src/3rdparty/xcb/libxcb/randr.c | 4827 ++++++++++++++++++++++++ src/3rdparty/xcb/libxcb/render.c | 4353 +++++++++++++++++++++ src/3rdparty/xcb/libxcb/shape.c | 1017 +++++ src/3rdparty/xcb/libxcb/shm.c | 705 ++++ src/3rdparty/xcb/libxcb/sync.c | 1511 ++++++++ src/3rdparty/xcb/libxcb/xfixes.c | 2953 +++++++++++++++ src/3rdparty/xcb/sysinclude/render.h | 1 + src/3rdparty/xcb/sysinclude/xcb.h | 1 + src/3rdparty/xcb/sysinclude/xcbext.h | 1 + src/3rdparty/xcb/sysinclude/xproto.h | 1 + src/3rdparty/xcb/xcb-util-image/xcb_image.c | 1011 +++++ src/3rdparty/xcb/xcb-util-keysyms/keysyms.c | 498 +++ src/3rdparty/xcb/xcb-util-renderutil/util.c | 251 ++ src/3rdparty/xcb/xcb-util-wm/icccm.c | 845 +++++ src/3rdparty/xcb/xcb-util/atoms.c | 76 + src/3rdparty/xcb/xcb-util/event.c | 257 ++ src/3rdparty/xcb/xcb-util/xcb_aux.c | 374 ++ 34 files changed, 37063 insertions(+) create mode 100644 src/3rdparty/xcb/README create mode 100644 src/3rdparty/xcb/include/xcb/randr.h create mode 100644 src/3rdparty/xcb/include/xcb/render.h create mode 100644 src/3rdparty/xcb/include/xcb/shape.h create mode 100644 src/3rdparty/xcb/include/xcb/shm.h create mode 100644 src/3rdparty/xcb/include/xcb/sync.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_atom.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_aux.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_bitops.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_event.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_icccm.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_image.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_keysyms.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_pixel.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_renderutil.h create mode 100644 src/3rdparty/xcb/include/xcb/xcb_util.h create mode 100644 src/3rdparty/xcb/include/xcb/xfixes.h create mode 100644 src/3rdparty/xcb/libxcb/randr.c create mode 100644 src/3rdparty/xcb/libxcb/render.c create mode 100644 src/3rdparty/xcb/libxcb/shape.c create mode 100644 src/3rdparty/xcb/libxcb/shm.c create mode 100644 src/3rdparty/xcb/libxcb/sync.c create mode 100644 src/3rdparty/xcb/libxcb/xfixes.c create mode 100644 src/3rdparty/xcb/sysinclude/render.h create mode 100644 src/3rdparty/xcb/sysinclude/xcb.h create mode 100644 src/3rdparty/xcb/sysinclude/xcbext.h create mode 100644 src/3rdparty/xcb/sysinclude/xproto.h create mode 100644 src/3rdparty/xcb/xcb-util-image/xcb_image.c create mode 100644 src/3rdparty/xcb/xcb-util-keysyms/keysyms.c create mode 100644 src/3rdparty/xcb/xcb-util-renderutil/util.c create mode 100644 src/3rdparty/xcb/xcb-util-wm/icccm.c create mode 100644 src/3rdparty/xcb/xcb-util/atoms.c create mode 100644 src/3rdparty/xcb/xcb-util/event.c create mode 100644 src/3rdparty/xcb/xcb-util/xcb_aux.c (limited to 'src/3rdparty/xcb') diff --git a/src/3rdparty/xcb/README b/src/3rdparty/xcb/README new file mode 100644 index 0000000000..0a66dafd03 --- /dev/null +++ b/src/3rdparty/xcb/README @@ -0,0 +1,13 @@ +Contains the header and sources files from selected xcb libraries: + + libxcb-1.5 together with xcb-proto-1.6 (sync, xfixes, randr sources) + libxcb-util-image-0.3.9 + libxcb-util-keysyms-0.3.9 + libxcb-util-renderutil-0.3.8 + libxcb-util-wm-0.3.9 + +The 'include' directory was obtained by compiling and installing all of the modules. +They have been tested to run also with libxcb 1.5 (the oldest version we support). + +Use the -qt-xcb configure option to use the files instead of system xcb libraries. +See src/plugins/platforms/xcb/README for details. diff --git a/src/3rdparty/xcb/include/xcb/randr.h b/src/3rdparty/xcb/include/xcb/randr.h new file mode 100644 index 0000000000..1035c4043c --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/randr.h @@ -0,0 +1,5020 @@ +/* + * This file generated automatically from randr.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_RandR_API XCB RandR API + * @brief RandR XCB Protocol Implementation. + * @{ + **/ + +#ifndef __RANDR_H +#define __RANDR_H + +#include "xcb.h" +#include "xproto.h" +#include "render.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_RANDR_MAJOR_VERSION 1 +#define XCB_RANDR_MINOR_VERSION 3 + +extern xcb_extension_t xcb_randr_id; + +typedef uint32_t xcb_randr_mode_t; + +/** + * @brief xcb_randr_mode_iterator_t + **/ +typedef struct xcb_randr_mode_iterator_t { + xcb_randr_mode_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_mode_iterator_t; + +typedef uint32_t xcb_randr_crtc_t; + +/** + * @brief xcb_randr_crtc_iterator_t + **/ +typedef struct xcb_randr_crtc_iterator_t { + xcb_randr_crtc_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_crtc_iterator_t; + +typedef uint32_t xcb_randr_output_t; + +/** + * @brief xcb_randr_output_iterator_t + **/ +typedef struct xcb_randr_output_iterator_t { + xcb_randr_output_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_output_iterator_t; + +/** Opcode for xcb_randr_bad_output. */ +#define XCB_RANDR_BAD_OUTPUT 0 + +/** + * @brief xcb_randr_bad_output_error_t + **/ +typedef struct xcb_randr_bad_output_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_randr_bad_output_error_t; + +/** Opcode for xcb_randr_bad_crtc. */ +#define XCB_RANDR_BAD_CRTC 1 + +/** + * @brief xcb_randr_bad_crtc_error_t + **/ +typedef struct xcb_randr_bad_crtc_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_randr_bad_crtc_error_t; + +/** Opcode for xcb_randr_bad_mode. */ +#define XCB_RANDR_BAD_MODE 2 + +/** + * @brief xcb_randr_bad_mode_error_t + **/ +typedef struct xcb_randr_bad_mode_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_randr_bad_mode_error_t; + +typedef enum xcb_randr_rotation_t { + XCB_RANDR_ROTATION_ROTATE_0 = 1, + XCB_RANDR_ROTATION_ROTATE_90 = 2, + XCB_RANDR_ROTATION_ROTATE_180 = 4, + XCB_RANDR_ROTATION_ROTATE_270 = 8, + XCB_RANDR_ROTATION_REFLECT_X = 16, + XCB_RANDR_ROTATION_REFLECT_Y = 32 +} xcb_randr_rotation_t; + +/** + * @brief xcb_randr_screen_size_t + **/ +typedef struct xcb_randr_screen_size_t { + uint16_t width; /**< */ + uint16_t height; /**< */ + uint16_t mwidth; /**< */ + uint16_t mheight; /**< */ +} xcb_randr_screen_size_t; + +/** + * @brief xcb_randr_screen_size_iterator_t + **/ +typedef struct xcb_randr_screen_size_iterator_t { + xcb_randr_screen_size_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_screen_size_iterator_t; + +/** + * @brief xcb_randr_refresh_rates_t + **/ +typedef struct xcb_randr_refresh_rates_t { + uint16_t nRates; /**< */ +} xcb_randr_refresh_rates_t; + +/** + * @brief xcb_randr_refresh_rates_iterator_t + **/ +typedef struct xcb_randr_refresh_rates_iterator_t { + xcb_randr_refresh_rates_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_refresh_rates_iterator_t; + +/** + * @brief xcb_randr_query_version_cookie_t + **/ +typedef struct xcb_randr_query_version_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_query_version_cookie_t; + +/** Opcode for xcb_randr_query_version. */ +#define XCB_RANDR_QUERY_VERSION 0 + +/** + * @brief xcb_randr_query_version_request_t + **/ +typedef struct xcb_randr_query_version_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint32_t major_version; /**< */ + uint32_t minor_version; /**< */ +} xcb_randr_query_version_request_t; + +/** + * @brief xcb_randr_query_version_reply_t + **/ +typedef struct xcb_randr_query_version_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t major_version; /**< */ + uint32_t minor_version; /**< */ + uint8_t pad1[16]; /**< */ +} xcb_randr_query_version_reply_t; + +typedef enum xcb_randr_set_config_t { + XCB_RANDR_SET_CONFIG_SUCCESS = 0, + XCB_RANDR_SET_CONFIG_INVALID_CONFIG_TIME = 1, + XCB_RANDR_SET_CONFIG_INVALID_TIME = 2, + XCB_RANDR_SET_CONFIG_FAILED = 3 +} xcb_randr_set_config_t; + +/** + * @brief xcb_randr_set_screen_config_cookie_t + **/ +typedef struct xcb_randr_set_screen_config_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_set_screen_config_cookie_t; + +/** Opcode for xcb_randr_set_screen_config. */ +#define XCB_RANDR_SET_SCREEN_CONFIG 2 + +/** + * @brief xcb_randr_set_screen_config_request_t + **/ +typedef struct xcb_randr_set_screen_config_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + uint16_t sizeID; /**< */ + uint16_t rotation; /**< */ + uint16_t rate; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_set_screen_config_request_t; + +/** + * @brief xcb_randr_set_screen_config_reply_t + **/ +typedef struct xcb_randr_set_screen_config_reply_t { + uint8_t response_type; /**< */ + uint8_t status; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t new_timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + xcb_window_t root; /**< */ + uint16_t subpixel_order; /**< */ + uint8_t pad0[10]; /**< */ +} xcb_randr_set_screen_config_reply_t; + +typedef enum xcb_randr_notify_mask_t { + XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE = 1, + XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE = 2, + XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE = 4, + XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY = 8 +} xcb_randr_notify_mask_t; + +/** Opcode for xcb_randr_select_input. */ +#define XCB_RANDR_SELECT_INPUT 4 + +/** + * @brief xcb_randr_select_input_request_t + **/ +typedef struct xcb_randr_select_input_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + uint16_t enable; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_select_input_request_t; + +/** + * @brief xcb_randr_get_screen_info_cookie_t + **/ +typedef struct xcb_randr_get_screen_info_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_screen_info_cookie_t; + +/** Opcode for xcb_randr_get_screen_info. */ +#define XCB_RANDR_GET_SCREEN_INFO 5 + +/** + * @brief xcb_randr_get_screen_info_request_t + **/ +typedef struct xcb_randr_get_screen_info_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ +} xcb_randr_get_screen_info_request_t; + +/** + * @brief xcb_randr_get_screen_info_reply_t + **/ +typedef struct xcb_randr_get_screen_info_reply_t { + uint8_t response_type; /**< */ + uint8_t rotations; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_window_t root; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + uint16_t nSizes; /**< */ + uint16_t sizeID; /**< */ + uint16_t rotation; /**< */ + uint16_t rate; /**< */ + uint16_t nInfo; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_get_screen_info_reply_t; + +/** + * @brief xcb_randr_get_screen_size_range_cookie_t + **/ +typedef struct xcb_randr_get_screen_size_range_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_screen_size_range_cookie_t; + +/** Opcode for xcb_randr_get_screen_size_range. */ +#define XCB_RANDR_GET_SCREEN_SIZE_RANGE 6 + +/** + * @brief xcb_randr_get_screen_size_range_request_t + **/ +typedef struct xcb_randr_get_screen_size_range_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ +} xcb_randr_get_screen_size_range_request_t; + +/** + * @brief xcb_randr_get_screen_size_range_reply_t + **/ +typedef struct xcb_randr_get_screen_size_range_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint16_t min_width; /**< */ + uint16_t min_height; /**< */ + uint16_t max_width; /**< */ + uint16_t max_height; /**< */ + uint8_t pad1[16]; /**< */ +} xcb_randr_get_screen_size_range_reply_t; + +/** Opcode for xcb_randr_set_screen_size. */ +#define XCB_RANDR_SET_SCREEN_SIZE 7 + +/** + * @brief xcb_randr_set_screen_size_request_t + **/ +typedef struct xcb_randr_set_screen_size_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint32_t mm_width; /**< */ + uint32_t mm_height; /**< */ +} xcb_randr_set_screen_size_request_t; + +typedef enum xcb_randr_mode_flag_t { + XCB_RANDR_MODE_FLAG_HSYNC_POSITIVE = 1, + XCB_RANDR_MODE_FLAG_HSYNC_NEGATIVE = 2, + XCB_RANDR_MODE_FLAG_VSYNC_POSITIVE = 4, + XCB_RANDR_MODE_FLAG_VSYNC_NEGATIVE = 8, + XCB_RANDR_MODE_FLAG_INTERLACE = 16, + XCB_RANDR_MODE_FLAG_DOUBLE_SCAN = 32, + XCB_RANDR_MODE_FLAG_CSYNC = 64, + XCB_RANDR_MODE_FLAG_CSYNC_POSITIVE = 128, + XCB_RANDR_MODE_FLAG_CSYNC_NEGATIVE = 256, + XCB_RANDR_MODE_FLAG_HSKEW_PRESENT = 512, + XCB_RANDR_MODE_FLAG_BCAST = 1024, + XCB_RANDR_MODE_FLAG_PIXEL_MULTIPLEX = 2048, + XCB_RANDR_MODE_FLAG_DOUBLE_CLOCK = 4096, + XCB_RANDR_MODE_FLAG_HALVE_CLOCK = 8192 +} xcb_randr_mode_flag_t; + +/** + * @brief xcb_randr_mode_info_t + **/ +typedef struct xcb_randr_mode_info_t { + uint32_t id; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint32_t dot_clock; /**< */ + uint16_t hsync_start; /**< */ + uint16_t hsync_end; /**< */ + uint16_t htotal; /**< */ + uint16_t hskew; /**< */ + uint16_t vsync_start; /**< */ + uint16_t vsync_end; /**< */ + uint16_t vtotal; /**< */ + uint16_t name_len; /**< */ + uint32_t mode_flags; /**< */ +} xcb_randr_mode_info_t; + +/** + * @brief xcb_randr_mode_info_iterator_t + **/ +typedef struct xcb_randr_mode_info_iterator_t { + xcb_randr_mode_info_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_mode_info_iterator_t; + +/** + * @brief xcb_randr_get_screen_resources_cookie_t + **/ +typedef struct xcb_randr_get_screen_resources_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_screen_resources_cookie_t; + +/** Opcode for xcb_randr_get_screen_resources. */ +#define XCB_RANDR_GET_SCREEN_RESOURCES 8 + +/** + * @brief xcb_randr_get_screen_resources_request_t + **/ +typedef struct xcb_randr_get_screen_resources_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ +} xcb_randr_get_screen_resources_request_t; + +/** + * @brief xcb_randr_get_screen_resources_reply_t + **/ +typedef struct xcb_randr_get_screen_resources_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + uint16_t num_crtcs; /**< */ + uint16_t num_outputs; /**< */ + uint16_t num_modes; /**< */ + uint16_t names_len; /**< */ + uint8_t pad1[8]; /**< */ +} xcb_randr_get_screen_resources_reply_t; + +typedef enum xcb_randr_connection_t { + XCB_RANDR_CONNECTION_CONNECTED, + XCB_RANDR_CONNECTION_DISCONNECTED, + XCB_RANDR_CONNECTION_UNKNOWN +} xcb_randr_connection_t; + +/** + * @brief xcb_randr_get_output_info_cookie_t + **/ +typedef struct xcb_randr_get_output_info_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_output_info_cookie_t; + +/** Opcode for xcb_randr_get_output_info. */ +#define XCB_RANDR_GET_OUTPUT_INFO 9 + +/** + * @brief xcb_randr_get_output_info_request_t + **/ +typedef struct xcb_randr_get_output_info_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_timestamp_t config_timestamp; /**< */ +} xcb_randr_get_output_info_request_t; + +/** + * @brief xcb_randr_get_output_info_reply_t + **/ +typedef struct xcb_randr_get_output_info_reply_t { + uint8_t response_type; /**< */ + uint8_t status; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_randr_crtc_t crtc; /**< */ + uint32_t mm_width; /**< */ + uint32_t mm_height; /**< */ + uint8_t connection; /**< */ + uint8_t subpixel_order; /**< */ + uint16_t num_crtcs; /**< */ + uint16_t num_modes; /**< */ + uint16_t num_preferred; /**< */ + uint16_t num_clones; /**< */ + uint16_t name_len; /**< */ +} xcb_randr_get_output_info_reply_t; + +/** + * @brief xcb_randr_list_output_properties_cookie_t + **/ +typedef struct xcb_randr_list_output_properties_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_list_output_properties_cookie_t; + +/** Opcode for xcb_randr_list_output_properties. */ +#define XCB_RANDR_LIST_OUTPUT_PROPERTIES 10 + +/** + * @brief xcb_randr_list_output_properties_request_t + **/ +typedef struct xcb_randr_list_output_properties_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ +} xcb_randr_list_output_properties_request_t; + +/** + * @brief xcb_randr_list_output_properties_reply_t + **/ +typedef struct xcb_randr_list_output_properties_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint16_t num_atoms; /**< */ + uint8_t pad1[22]; /**< */ +} xcb_randr_list_output_properties_reply_t; + +/** + * @brief xcb_randr_query_output_property_cookie_t + **/ +typedef struct xcb_randr_query_output_property_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_query_output_property_cookie_t; + +/** Opcode for xcb_randr_query_output_property. */ +#define XCB_RANDR_QUERY_OUTPUT_PROPERTY 11 + +/** + * @brief xcb_randr_query_output_property_request_t + **/ +typedef struct xcb_randr_query_output_property_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_atom_t property; /**< */ +} xcb_randr_query_output_property_request_t; + +/** + * @brief xcb_randr_query_output_property_reply_t + **/ +typedef struct xcb_randr_query_output_property_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint8_t pending; /**< */ + uint8_t range; /**< */ + uint8_t immutable; /**< */ + uint8_t pad1[21]; /**< */ +} xcb_randr_query_output_property_reply_t; + +/** Opcode for xcb_randr_configure_output_property. */ +#define XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY 12 + +/** + * @brief xcb_randr_configure_output_property_request_t + **/ +typedef struct xcb_randr_configure_output_property_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_atom_t property; /**< */ + uint8_t pending; /**< */ + uint8_t range; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_configure_output_property_request_t; + +/** Opcode for xcb_randr_change_output_property. */ +#define XCB_RANDR_CHANGE_OUTPUT_PROPERTY 13 + +/** + * @brief xcb_randr_change_output_property_request_t + **/ +typedef struct xcb_randr_change_output_property_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_atom_t property; /**< */ + xcb_atom_t type; /**< */ + uint8_t format; /**< */ + uint8_t mode; /**< */ + uint8_t pad0[2]; /**< */ + uint32_t num_units; /**< */ +} xcb_randr_change_output_property_request_t; + +/** Opcode for xcb_randr_delete_output_property. */ +#define XCB_RANDR_DELETE_OUTPUT_PROPERTY 14 + +/** + * @brief xcb_randr_delete_output_property_request_t + **/ +typedef struct xcb_randr_delete_output_property_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_atom_t property; /**< */ +} xcb_randr_delete_output_property_request_t; + +/** + * @brief xcb_randr_get_output_property_cookie_t + **/ +typedef struct xcb_randr_get_output_property_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_output_property_cookie_t; + +/** Opcode for xcb_randr_get_output_property. */ +#define XCB_RANDR_GET_OUTPUT_PROPERTY 15 + +/** + * @brief xcb_randr_get_output_property_request_t + **/ +typedef struct xcb_randr_get_output_property_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_atom_t property; /**< */ + xcb_atom_t type; /**< */ + uint32_t long_offset; /**< */ + uint32_t long_length; /**< */ + uint8_t _delete; /**< */ + uint8_t pending; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_get_output_property_request_t; + +/** + * @brief xcb_randr_get_output_property_reply_t + **/ +typedef struct xcb_randr_get_output_property_reply_t { + uint8_t response_type; /**< */ + uint8_t format; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_atom_t type; /**< */ + uint32_t bytes_after; /**< */ + uint32_t num_items; /**< */ + uint8_t pad0[12]; /**< */ +} xcb_randr_get_output_property_reply_t; + +/** + * @brief xcb_randr_create_mode_cookie_t + **/ +typedef struct xcb_randr_create_mode_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_create_mode_cookie_t; + +/** Opcode for xcb_randr_create_mode. */ +#define XCB_RANDR_CREATE_MODE 16 + +/** + * @brief xcb_randr_create_mode_request_t + **/ +typedef struct xcb_randr_create_mode_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + xcb_randr_mode_info_t mode_info; /**< */ +} xcb_randr_create_mode_request_t; + +/** + * @brief xcb_randr_create_mode_reply_t + **/ +typedef struct xcb_randr_create_mode_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_randr_mode_t mode; /**< */ + uint8_t pad1[20]; /**< */ +} xcb_randr_create_mode_reply_t; + +/** Opcode for xcb_randr_destroy_mode. */ +#define XCB_RANDR_DESTROY_MODE 17 + +/** + * @brief xcb_randr_destroy_mode_request_t + **/ +typedef struct xcb_randr_destroy_mode_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_mode_t mode; /**< */ +} xcb_randr_destroy_mode_request_t; + +/** Opcode for xcb_randr_add_output_mode. */ +#define XCB_RANDR_ADD_OUTPUT_MODE 18 + +/** + * @brief xcb_randr_add_output_mode_request_t + **/ +typedef struct xcb_randr_add_output_mode_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_randr_mode_t mode; /**< */ +} xcb_randr_add_output_mode_request_t; + +/** Opcode for xcb_randr_delete_output_mode. */ +#define XCB_RANDR_DELETE_OUTPUT_MODE 19 + +/** + * @brief xcb_randr_delete_output_mode_request_t + **/ +typedef struct xcb_randr_delete_output_mode_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_output_t output; /**< */ + xcb_randr_mode_t mode; /**< */ +} xcb_randr_delete_output_mode_request_t; + +/** + * @brief xcb_randr_get_crtc_info_cookie_t + **/ +typedef struct xcb_randr_get_crtc_info_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_crtc_info_cookie_t; + +/** Opcode for xcb_randr_get_crtc_info. */ +#define XCB_RANDR_GET_CRTC_INFO 20 + +/** + * @brief xcb_randr_get_crtc_info_request_t + **/ +typedef struct xcb_randr_get_crtc_info_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ + xcb_timestamp_t config_timestamp; /**< */ +} xcb_randr_get_crtc_info_request_t; + +/** + * @brief xcb_randr_get_crtc_info_reply_t + **/ +typedef struct xcb_randr_get_crtc_info_reply_t { + uint8_t response_type; /**< */ + uint8_t status; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t timestamp; /**< */ + int16_t x; /**< */ + int16_t y; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + xcb_randr_mode_t mode; /**< */ + uint16_t rotation; /**< */ + uint16_t rotations; /**< */ + uint16_t num_outputs; /**< */ + uint16_t num_possible_outputs; /**< */ +} xcb_randr_get_crtc_info_reply_t; + +/** + * @brief xcb_randr_set_crtc_config_cookie_t + **/ +typedef struct xcb_randr_set_crtc_config_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_set_crtc_config_cookie_t; + +/** Opcode for xcb_randr_set_crtc_config. */ +#define XCB_RANDR_SET_CRTC_CONFIG 21 + +/** + * @brief xcb_randr_set_crtc_config_request_t + **/ +typedef struct xcb_randr_set_crtc_config_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + int16_t x; /**< */ + int16_t y; /**< */ + xcb_randr_mode_t mode; /**< */ + uint16_t rotation; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_set_crtc_config_request_t; + +/** + * @brief xcb_randr_set_crtc_config_reply_t + **/ +typedef struct xcb_randr_set_crtc_config_reply_t { + uint8_t response_type; /**< */ + uint8_t status; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t timestamp; /**< */ + uint8_t pad0[20]; /**< */ +} xcb_randr_set_crtc_config_reply_t; + +/** + * @brief xcb_randr_get_crtc_gamma_size_cookie_t + **/ +typedef struct xcb_randr_get_crtc_gamma_size_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_crtc_gamma_size_cookie_t; + +/** Opcode for xcb_randr_get_crtc_gamma_size. */ +#define XCB_RANDR_GET_CRTC_GAMMA_SIZE 22 + +/** + * @brief xcb_randr_get_crtc_gamma_size_request_t + **/ +typedef struct xcb_randr_get_crtc_gamma_size_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ +} xcb_randr_get_crtc_gamma_size_request_t; + +/** + * @brief xcb_randr_get_crtc_gamma_size_reply_t + **/ +typedef struct xcb_randr_get_crtc_gamma_size_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint16_t size; /**< */ + uint8_t pad1[22]; /**< */ +} xcb_randr_get_crtc_gamma_size_reply_t; + +/** + * @brief xcb_randr_get_crtc_gamma_cookie_t + **/ +typedef struct xcb_randr_get_crtc_gamma_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_crtc_gamma_cookie_t; + +/** Opcode for xcb_randr_get_crtc_gamma. */ +#define XCB_RANDR_GET_CRTC_GAMMA 23 + +/** + * @brief xcb_randr_get_crtc_gamma_request_t + **/ +typedef struct xcb_randr_get_crtc_gamma_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ +} xcb_randr_get_crtc_gamma_request_t; + +/** + * @brief xcb_randr_get_crtc_gamma_reply_t + **/ +typedef struct xcb_randr_get_crtc_gamma_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint16_t size; /**< */ + uint8_t pad1[22]; /**< */ +} xcb_randr_get_crtc_gamma_reply_t; + +/** Opcode for xcb_randr_set_crtc_gamma. */ +#define XCB_RANDR_SET_CRTC_GAMMA 24 + +/** + * @brief xcb_randr_set_crtc_gamma_request_t + **/ +typedef struct xcb_randr_set_crtc_gamma_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ + uint16_t size; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_set_crtc_gamma_request_t; + +/** + * @brief xcb_randr_get_screen_resources_current_cookie_t + **/ +typedef struct xcb_randr_get_screen_resources_current_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_screen_resources_current_cookie_t; + +/** Opcode for xcb_randr_get_screen_resources_current. */ +#define XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT 25 + +/** + * @brief xcb_randr_get_screen_resources_current_request_t + **/ +typedef struct xcb_randr_get_screen_resources_current_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ +} xcb_randr_get_screen_resources_current_request_t; + +/** + * @brief xcb_randr_get_screen_resources_current_reply_t + **/ +typedef struct xcb_randr_get_screen_resources_current_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + uint16_t num_crtcs; /**< */ + uint16_t num_outputs; /**< */ + uint16_t num_modes; /**< */ + uint16_t names_len; /**< */ + uint8_t pad1[8]; /**< */ +} xcb_randr_get_screen_resources_current_reply_t; + +/** Opcode for xcb_randr_set_crtc_transform. */ +#define XCB_RANDR_SET_CRTC_TRANSFORM 26 + +/** + * @brief xcb_randr_set_crtc_transform_request_t + **/ +typedef struct xcb_randr_set_crtc_transform_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ + xcb_render_transform_t transform; /**< */ + uint16_t filter_len; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_randr_set_crtc_transform_request_t; + +/** + * @brief xcb_randr_get_crtc_transform_cookie_t + **/ +typedef struct xcb_randr_get_crtc_transform_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_crtc_transform_cookie_t; + +/** Opcode for xcb_randr_get_crtc_transform. */ +#define XCB_RANDR_GET_CRTC_TRANSFORM 27 + +/** + * @brief xcb_randr_get_crtc_transform_request_t + **/ +typedef struct xcb_randr_get_crtc_transform_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ +} xcb_randr_get_crtc_transform_request_t; + +/** + * @brief xcb_randr_get_crtc_transform_reply_t + **/ +typedef struct xcb_randr_get_crtc_transform_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_render_transform_t pending_transform; /**< */ + uint8_t has_transforms; /**< */ + uint8_t pad1[3]; /**< */ + xcb_render_transform_t current_transform; /**< */ + uint8_t pad2[4]; /**< */ + uint16_t pending_len; /**< */ + uint16_t pending_nparams; /**< */ + uint16_t current_len; /**< */ + uint16_t current_nparams; /**< */ +} xcb_randr_get_crtc_transform_reply_t; + +/** + * @brief xcb_randr_get_panning_cookie_t + **/ +typedef struct xcb_randr_get_panning_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_panning_cookie_t; + +/** Opcode for xcb_randr_get_panning. */ +#define XCB_RANDR_GET_PANNING 28 + +/** + * @brief xcb_randr_get_panning_request_t + **/ +typedef struct xcb_randr_get_panning_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ +} xcb_randr_get_panning_request_t; + +/** + * @brief xcb_randr_get_panning_reply_t + **/ +typedef struct xcb_randr_get_panning_reply_t { + uint8_t response_type; /**< */ + uint8_t status; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t timestamp; /**< */ + uint16_t left; /**< */ + uint16_t top; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint16_t track_left; /**< */ + uint16_t track_top; /**< */ + uint16_t track_width; /**< */ + uint16_t track_height; /**< */ + int16_t border_left; /**< */ + int16_t border_top; /**< */ + int16_t border_right; /**< */ + int16_t border_bottom; /**< */ +} xcb_randr_get_panning_reply_t; + +/** + * @brief xcb_randr_set_panning_cookie_t + **/ +typedef struct xcb_randr_set_panning_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_set_panning_cookie_t; + +/** Opcode for xcb_randr_set_panning. */ +#define XCB_RANDR_SET_PANNING 29 + +/** + * @brief xcb_randr_set_panning_request_t + **/ +typedef struct xcb_randr_set_panning_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_randr_crtc_t crtc; /**< */ + xcb_timestamp_t timestamp; /**< */ + uint16_t left; /**< */ + uint16_t top; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint16_t track_left; /**< */ + uint16_t track_top; /**< */ + uint16_t track_width; /**< */ + uint16_t track_height; /**< */ + int16_t border_left; /**< */ + int16_t border_top; /**< */ + int16_t border_right; /**< */ + int16_t border_bottom; /**< */ +} xcb_randr_set_panning_request_t; + +/** + * @brief xcb_randr_set_panning_reply_t + **/ +typedef struct xcb_randr_set_panning_reply_t { + uint8_t response_type; /**< */ + uint8_t status; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_timestamp_t timestamp; /**< */ +} xcb_randr_set_panning_reply_t; + +/** Opcode for xcb_randr_set_output_primary. */ +#define XCB_RANDR_SET_OUTPUT_PRIMARY 30 + +/** + * @brief xcb_randr_set_output_primary_request_t + **/ +typedef struct xcb_randr_set_output_primary_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + xcb_randr_output_t output; /**< */ +} xcb_randr_set_output_primary_request_t; + +/** + * @brief xcb_randr_get_output_primary_cookie_t + **/ +typedef struct xcb_randr_get_output_primary_cookie_t { + unsigned int sequence; /**< */ +} xcb_randr_get_output_primary_cookie_t; + +/** Opcode for xcb_randr_get_output_primary. */ +#define XCB_RANDR_GET_OUTPUT_PRIMARY 31 + +/** + * @brief xcb_randr_get_output_primary_request_t + **/ +typedef struct xcb_randr_get_output_primary_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ +} xcb_randr_get_output_primary_request_t; + +/** + * @brief xcb_randr_get_output_primary_reply_t + **/ +typedef struct xcb_randr_get_output_primary_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_randr_output_t output; /**< */ +} xcb_randr_get_output_primary_reply_t; + +/** Opcode for xcb_randr_screen_change_notify. */ +#define XCB_RANDR_SCREEN_CHANGE_NOTIFY 0 + +/** + * @brief xcb_randr_screen_change_notify_event_t + **/ +typedef struct xcb_randr_screen_change_notify_event_t { + uint8_t response_type; /**< */ + uint8_t rotation; /**< */ + uint16_t sequence; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + xcb_window_t root; /**< */ + xcb_window_t request_window; /**< */ + uint16_t sizeID; /**< */ + uint16_t subpixel_order; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint16_t mwidth; /**< */ + uint16_t mheight; /**< */ +} xcb_randr_screen_change_notify_event_t; + +typedef enum xcb_randr_notify_t { + XCB_RANDR_NOTIFY_CRTC_CHANGE = 0, + XCB_RANDR_NOTIFY_OUTPUT_CHANGE = 1, + XCB_RANDR_NOTIFY_OUTPUT_PROPERTY = 2 +} xcb_randr_notify_t; + +/** + * @brief xcb_randr_crtc_change_t + **/ +typedef struct xcb_randr_crtc_change_t { + xcb_timestamp_t timestamp; /**< */ + xcb_window_t window; /**< */ + xcb_randr_crtc_t crtc; /**< */ + xcb_randr_mode_t mode; /**< */ + uint16_t rotation; /**< */ + uint8_t pad0[2]; /**< */ + int16_t x; /**< */ + int16_t y; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ +} xcb_randr_crtc_change_t; + +/** + * @brief xcb_randr_crtc_change_iterator_t + **/ +typedef struct xcb_randr_crtc_change_iterator_t { + xcb_randr_crtc_change_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_crtc_change_iterator_t; + +/** + * @brief xcb_randr_output_change_t + **/ +typedef struct xcb_randr_output_change_t { + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t config_timestamp; /**< */ + xcb_window_t window; /**< */ + xcb_randr_output_t output; /**< */ + xcb_randr_crtc_t crtc; /**< */ + xcb_randr_mode_t mode; /**< */ + uint16_t rotation; /**< */ + uint8_t connection; /**< */ + uint8_t subpixel_order; /**< */ +} xcb_randr_output_change_t; + +/** + * @brief xcb_randr_output_change_iterator_t + **/ +typedef struct xcb_randr_output_change_iterator_t { + xcb_randr_output_change_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_output_change_iterator_t; + +/** + * @brief xcb_randr_output_property_t + **/ +typedef struct xcb_randr_output_property_t { + xcb_window_t window; /**< */ + xcb_randr_output_t output; /**< */ + xcb_atom_t atom; /**< */ + xcb_timestamp_t timestamp; /**< */ + uint8_t status; /**< */ + uint8_t pad0[11]; /**< */ +} xcb_randr_output_property_t; + +/** + * @brief xcb_randr_output_property_iterator_t + **/ +typedef struct xcb_randr_output_property_iterator_t { + xcb_randr_output_property_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_output_property_iterator_t; + +/** + * @brief xcb_randr_notify_data_t + **/ +typedef union xcb_randr_notify_data_t { + xcb_randr_crtc_change_t cc; /**< */ + xcb_randr_output_change_t oc; /**< */ + xcb_randr_output_property_t op; /**< */ +} xcb_randr_notify_data_t; + +/** + * @brief xcb_randr_notify_data_iterator_t + **/ +typedef struct xcb_randr_notify_data_iterator_t { + xcb_randr_notify_data_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_randr_notify_data_iterator_t; + +/** Opcode for xcb_randr_notify. */ +#define XCB_RANDR_NOTIFY 1 + +/** + * @brief xcb_randr_notify_event_t + **/ +typedef struct xcb_randr_notify_event_t { + uint8_t response_type; /**< */ + uint8_t subCode; /**< */ + uint16_t sequence; /**< */ + xcb_randr_notify_data_t u; /**< */ +} xcb_randr_notify_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_mode_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_mode_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_mode_next + ** + ** @param xcb_randr_mode_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_mode_next (xcb_randr_mode_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_mode_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_mode_end + ** + ** @param xcb_randr_mode_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_mode_end (xcb_randr_mode_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_crtc_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_crtc_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_crtc_next + ** + ** @param xcb_randr_crtc_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_crtc_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_crtc_end + ** + ** @param xcb_randr_crtc_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_output_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_output_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_output_next + ** + ** @param xcb_randr_output_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_output_next (xcb_randr_output_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_output_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_output_end + ** + ** @param xcb_randr_output_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_output_end (xcb_randr_output_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_screen_size_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_screen_size_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_screen_size_next + ** + ** @param xcb_randr_screen_size_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_screen_size_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_screen_size_end + ** + ** @param xcb_randr_screen_size_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i /**< */); + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_refresh_rates_rates + ** + ** @param const xcb_randr_refresh_rates_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_refresh_rates_rates_length + ** + ** @param const xcb_randr_refresh_rates_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_refresh_rates_rates_end + ** + ** @param const xcb_randr_refresh_rates_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_refresh_rates_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_refresh_rates_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_refresh_rates_next + ** + ** @param xcb_randr_refresh_rates_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_refresh_rates_next (xcb_randr_refresh_rates_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_refresh_rates_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_refresh_rates_end + ** + ** @param xcb_randr_refresh_rates_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_query_version_cookie_t xcb_randr_query_version + ** + ** @param xcb_connection_t *c + ** @param uint32_t major_version + ** @param uint32_t minor_version + ** @returns xcb_randr_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_version_cookie_t +xcb_randr_query_version (xcb_connection_t *c /**< */, + uint32_t major_version /**< */, + uint32_t minor_version /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_query_version_cookie_t xcb_randr_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t major_version + ** @param uint32_t minor_version + ** @returns xcb_randr_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_version_cookie_t +xcb_randr_query_version_unchecked (xcb_connection_t *c /**< */, + uint32_t major_version /**< */, + uint32_t minor_version /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_query_version_reply_t * xcb_randr_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_randr_query_version_reply_t * +xcb_randr_query_version_reply (xcb_connection_t *c /**< */, + xcb_randr_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param uint16_t sizeID + ** @param uint16_t rotation + ** @param uint16_t rate + ** @returns xcb_randr_set_screen_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_screen_config_cookie_t +xcb_randr_set_screen_config (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + uint16_t sizeID /**< */, + uint16_t rotation /**< */, + uint16_t rate /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param uint16_t sizeID + ** @param uint16_t rotation + ** @param uint16_t rate + ** @returns xcb_randr_set_screen_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_screen_config_cookie_t +xcb_randr_set_screen_config_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + uint16_t sizeID /**< */, + uint16_t rotation /**< */, + uint16_t rate /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_set_screen_config_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_set_screen_config_reply_t * xcb_randr_set_screen_config_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_set_screen_config_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_set_screen_config_reply_t * + ** + *****************************************************************************/ + +xcb_randr_set_screen_config_reply_t * +xcb_randr_set_screen_config_reply (xcb_connection_t *c /**< */, + xcb_randr_set_screen_config_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_select_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_select_input_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t enable /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_select_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_select_input (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t enable /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_info_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_info_cookie_t +xcb_randr_get_screen_info_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_screen_size_t * xcb_randr_get_screen_info_sizes + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns xcb_randr_screen_size_t * + ** + *****************************************************************************/ + +xcb_randr_screen_size_t * +xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_info_sizes_length + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_screen_size_iterator_t xcb_randr_get_screen_info_sizes_iterator + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns xcb_randr_screen_size_iterator_t + ** + *****************************************************************************/ + +xcb_randr_screen_size_iterator_t +xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_info_rates_length + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_refresh_rates_iterator_t xcb_randr_get_screen_info_rates_iterator + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns xcb_randr_refresh_rates_iterator_t + ** + *****************************************************************************/ + +xcb_randr_refresh_rates_iterator_t +xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_info_reply_t * xcb_randr_get_screen_info_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_info_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_info_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_info_reply_t * +xcb_randr_get_screen_info_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_info_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_size_range_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_size_range_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_size_range_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_size_range_cookie_t +xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_size_range_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_size_range_reply_t * xcb_randr_get_screen_size_range_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_size_range_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_size_range_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_size_range_reply_t * +xcb_randr_get_screen_size_range_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_size_range_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_screen_size_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t mm_width + ** @param uint32_t mm_height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t mm_width /**< */, + uint32_t mm_height /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_screen_size + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t mm_width + ** @param uint32_t mm_height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_screen_size (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t mm_width /**< */, + uint32_t mm_height /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_mode_info_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_mode_info_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_mode_info_next + ** + ** @param xcb_randr_mode_info_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_mode_info_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_mode_info_end + ** + ** @param xcb_randr_mode_info_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_cookie_t +xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_crtcs + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_crtc_t * + ** + *****************************************************************************/ + +xcb_randr_crtc_t * +xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_crtcs_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_screen_resources_outputs + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_outputs_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_modes + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_mode_info_t * + ** + *****************************************************************************/ + +xcb_randr_mode_info_t * +xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_modes_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_modes_iterator + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_mode_info_iterator_t + ** + *****************************************************************************/ + +xcb_randr_mode_info_iterator_t +xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_screen_resources_names + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_names_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_resources_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_reply_t * xcb_randr_get_screen_resources_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_resources_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_resources_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_reply_t * +xcb_randr_get_screen_resources_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_resources_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_output_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_info_cookie_t +xcb_randr_get_output_info (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_timestamp_t config_timestamp /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_output_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_info_cookie_t +xcb_randr_get_output_info_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_timestamp_t config_timestamp /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_crtc_t * xcb_randr_get_output_info_crtcs + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_randr_crtc_t * + ** + *****************************************************************************/ + +xcb_randr_crtc_t * +xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_crtcs_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_crtcs_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_mode_t * xcb_randr_get_output_info_modes + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_randr_mode_t * + ** + *****************************************************************************/ + +xcb_randr_mode_t * +xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_modes_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_modes_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_output_info_clones + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_clones_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_clones_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_output_info_name + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_name_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_name_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_output_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_info_reply_t * xcb_randr_get_output_info_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_output_info_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_output_info_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_output_info_reply_t * +xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */, + xcb_randr_get_output_info_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @returns xcb_randr_list_output_properties_cookie_t + ** + *****************************************************************************/ + +xcb_randr_list_output_properties_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @returns xcb_randr_list_output_properties_cookie_t + ** + *****************************************************************************/ + +xcb_randr_list_output_properties_cookie_t +xcb_randr_list_output_properties_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */); + + +/***************************************************************************** + ** + ** xcb_atom_t * xcb_randr_list_output_properties_atoms + ** + ** @param const xcb_randr_list_output_properties_reply_t *R + ** @returns xcb_atom_t * + ** + *****************************************************************************/ + +xcb_atom_t * +xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_list_output_properties_atoms_length + ** + ** @param const xcb_randr_list_output_properties_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_list_output_properties_atoms_end + ** + ** @param const xcb_randr_list_output_properties_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_properties_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_list_output_properties_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_list_output_properties_reply_t * xcb_randr_list_output_properties_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_list_output_properties_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_list_output_properties_reply_t * + ** + *****************************************************************************/ + +xcb_randr_list_output_properties_reply_t * +xcb_randr_list_output_properties_reply (xcb_connection_t *c /**< */, + xcb_randr_list_output_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_randr_query_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_output_property_cookie_t +xcb_randr_query_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_randr_query_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_output_property_cookie_t +xcb_randr_query_output_property_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */); + + +/***************************************************************************** + ** + ** int32_t * xcb_randr_query_output_property_valid_values + ** + ** @param const xcb_randr_query_output_property_reply_t *R + ** @returns int32_t * + ** + *****************************************************************************/ + +int32_t * +xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_query_output_property_valid_values_length + ** + ** @param const xcb_randr_query_output_property_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end + ** + ** @param const xcb_randr_query_output_property_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_query_output_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_query_output_property_reply_t * xcb_randr_query_output_property_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_query_output_property_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_query_output_property_reply_t * + ** + *****************************************************************************/ + +xcb_randr_query_output_property_reply_t * +xcb_randr_query_output_property_reply (xcb_connection_t *c /**< */, + xcb_randr_query_output_property_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_configure_output_property_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param uint8_t pending + ** @param uint8_t range + ** @param uint32_t values_len + ** @param const int32_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + uint8_t pending /**< */, + uint8_t range /**< */, + uint32_t values_len /**< */, + const int32_t *values /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_configure_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param uint8_t pending + ** @param uint8_t range + ** @param uint32_t values_len + ** @param const int32_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_configure_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + uint8_t pending /**< */, + uint8_t range /**< */, + uint32_t values_len /**< */, + const int32_t *values /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_change_output_property_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint8_t format + ** @param uint8_t mode + ** @param uint32_t num_units + ** @param const void *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint8_t format /**< */, + uint8_t mode /**< */, + uint32_t num_units /**< */, + const void *data /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_change_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint8_t format + ** @param uint8_t mode + ** @param uint32_t num_units + ** @param const void *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_change_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint8_t format /**< */, + uint8_t mode /**< */, + uint32_t num_units /**< */, + const void *data /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_property_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint32_t long_offset + ** @param uint32_t long_length + ** @param uint8_t _delete + ** @param uint8_t pending + ** @returns xcb_randr_get_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_property_cookie_t +xcb_randr_get_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint32_t long_offset /**< */, + uint32_t long_length /**< */, + uint8_t _delete /**< */, + uint8_t pending /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint32_t long_offset + ** @param uint32_t long_length + ** @param uint8_t _delete + ** @param uint8_t pending + ** @returns xcb_randr_get_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_property_cookie_t +xcb_randr_get_output_property_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint32_t long_offset /**< */, + uint32_t long_length /**< */, + uint8_t _delete /**< */, + uint8_t pending /**< */); + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_output_property_data + ** + ** @param const xcb_randr_get_output_property_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_property_data_length + ** + ** @param const xcb_randr_get_output_property_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_property_data_end + ** + ** @param const xcb_randr_get_output_property_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_output_property_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_property_reply_t * xcb_randr_get_output_property_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_output_property_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_output_property_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_output_property_reply_t * +xcb_randr_get_output_property_reply (xcb_connection_t *c /**< */, + xcb_randr_get_output_property_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_mode_info_t mode_info + ** @param uint32_t name_len + ** @param const char *name + ** @returns xcb_randr_create_mode_cookie_t + ** + *****************************************************************************/ + +xcb_randr_create_mode_cookie_t +xcb_randr_create_mode (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_mode_info_t mode_info /**< */, + uint32_t name_len /**< */, + const char *name /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_mode_info_t mode_info + ** @param uint32_t name_len + ** @param const char *name + ** @returns xcb_randr_create_mode_cookie_t + ** + *****************************************************************************/ + +xcb_randr_create_mode_cookie_t +xcb_randr_create_mode_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_mode_info_t mode_info /**< */, + uint32_t name_len /**< */, + const char *name /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_create_mode_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_create_mode_reply_t * xcb_randr_create_mode_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_create_mode_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_create_mode_reply_t * + ** + *****************************************************************************/ + +xcb_randr_create_mode_reply_t * +xcb_randr_create_mode_reply (xcb_connection_t *c /**< */, + xcb_randr_create_mode_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_destroy_mode_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_destroy_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_add_output_mode_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_add_output_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_add_output_mode (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_mode_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_mode (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_crtc_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_info_cookie_t +xcb_randr_get_crtc_info (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t config_timestamp /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_crtc_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_info_cookie_t +xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t config_timestamp /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_crtc_info_outputs + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_info_outputs_length + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_crtc_info_possible + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_info_possible_length + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_info_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_info_reply_t * xcb_randr_get_crtc_info_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_info_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_info_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_info_reply_t * +xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */, + xcb_randr_get_crtc_info_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param int16_t x + ** @param int16_t y + ** @param xcb_randr_mode_t mode + ** @param uint16_t rotation + ** @param uint32_t outputs_len + ** @param const xcb_randr_output_t *outputs + ** @returns xcb_randr_set_crtc_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_crtc_config_cookie_t +xcb_randr_set_crtc_config (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + int16_t x /**< */, + int16_t y /**< */, + xcb_randr_mode_t mode /**< */, + uint16_t rotation /**< */, + uint32_t outputs_len /**< */, + const xcb_randr_output_t *outputs /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param int16_t x + ** @param int16_t y + ** @param xcb_randr_mode_t mode + ** @param uint16_t rotation + ** @param uint32_t outputs_len + ** @param const xcb_randr_output_t *outputs + ** @returns xcb_randr_set_crtc_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_crtc_config_cookie_t +xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + int16_t x /**< */, + int16_t y /**< */, + xcb_randr_mode_t mode /**< */, + uint16_t rotation /**< */, + uint32_t outputs_len /**< */, + const xcb_randr_output_t *outputs /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_set_crtc_config_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_set_crtc_config_reply_t * xcb_randr_set_crtc_config_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_set_crtc_config_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_set_crtc_config_reply_t * + ** + *****************************************************************************/ + +xcb_randr_set_crtc_config_reply_t * +xcb_randr_set_crtc_config_reply (xcb_connection_t *c /**< */, + xcb_randr_set_crtc_config_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_size_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_size_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_size_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_size_cookie_t +xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_gamma_size_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_size_reply_t * xcb_randr_get_crtc_gamma_size_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_gamma_size_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_gamma_size_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_size_reply_t * +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 /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_cookie_t +xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */); + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_get_crtc_gamma_red + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_gamma_red_length + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_red_end + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_get_crtc_gamma_green + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_gamma_green_length + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_green_end + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_get_crtc_gamma_blue + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_gamma_blue_length + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_blue_end + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_gamma_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_reply_t * xcb_randr_get_crtc_gamma_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_gamma_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_gamma_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_reply_t * +xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */, + xcb_randr_get_crtc_gamma_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_gamma_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param uint16_t size + ** @param const uint16_t *red + ** @param const uint16_t *green + ** @param const uint16_t *blue + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + uint16_t size /**< */, + const uint16_t *red /**< */, + const uint16_t *green /**< */, + const uint16_t *blue /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_gamma + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param uint16_t size + ** @param const uint16_t *red + ** @param const uint16_t *green + ** @param const uint16_t *blue + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + uint16_t size /**< */, + const uint16_t *red /**< */, + const uint16_t *green /**< */, + const uint16_t *blue /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_current_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_current_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_current_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_current_cookie_t +xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_current_crtcs + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_crtc_t * + ** + *****************************************************************************/ + +xcb_randr_crtc_t * +xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_crtcs_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_crtcs_end + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_screen_resources_current_outputs + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_outputs_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_outputs_end + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_current_modes + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_mode_info_t * + ** + *****************************************************************************/ + +xcb_randr_mode_info_t * +xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_modes_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_current_modes_iterator + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_mode_info_iterator_t + ** + *****************************************************************************/ + +xcb_randr_mode_info_iterator_t +xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_screen_resources_current_names + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_names_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_names_end + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_screen_resources_current_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_current_reply_t * xcb_randr_get_screen_resources_current_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_resources_current_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_resources_current_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_current_reply_t * +xcb_randr_get_screen_resources_current_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_resources_current_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_transform_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_render_transform_t transform + ** @param uint16_t filter_len + ** @param const char *filter_name + ** @param uint32_t filter_params_len + ** @param const xcb_render_fixed_t *filter_params + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_render_transform_t transform /**< */, + uint16_t filter_len /**< */, + const char *filter_name /**< */, + uint32_t filter_params_len /**< */, + const xcb_render_fixed_t *filter_params /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_transform + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_render_transform_t transform + ** @param uint16_t filter_len + ** @param const char *filter_name + ** @param uint32_t filter_params_len + ** @param const xcb_render_fixed_t *filter_params + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_render_transform_t transform /**< */, + uint16_t filter_len /**< */, + const char *filter_name /**< */, + uint32_t filter_params_len /**< */, + const xcb_render_fixed_t *filter_params /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_transform_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_transform_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_transform_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_transform_cookie_t +xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */); + + +/***************************************************************************** + ** + ** char * xcb_randr_get_crtc_transform_pending_filter_name + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_pending_filter_name_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_filter_name_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_pending_params + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_render_fixed_t * + ** + *****************************************************************************/ + +xcb_render_fixed_t * +xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_pending_params_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_params_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** char * xcb_randr_get_crtc_transform_current_filter_name + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_current_filter_name_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_filter_name_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_current_params + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_render_fixed_t * + ** + *****************************************************************************/ + +xcb_render_fixed_t * +xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_current_params_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_params_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_crtc_transform_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_transform_reply_t * xcb_randr_get_crtc_transform_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_transform_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_transform_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_transform_reply_t * +xcb_randr_get_crtc_transform_reply (xcb_connection_t *c /**< */, + xcb_randr_get_crtc_transform_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_panning_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_panning_cookie_t +xcb_randr_get_panning_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_panning_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_panning_reply_t * xcb_randr_get_panning_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_panning_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_panning_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_panning_reply_t * +xcb_randr_get_panning_reply (xcb_connection_t *c /**< */, + xcb_randr_get_panning_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param uint16_t left + ** @param uint16_t top + ** @param uint16_t width + ** @param uint16_t height + ** @param uint16_t track_left + ** @param uint16_t track_top + ** @param uint16_t track_width + ** @param uint16_t track_height + ** @param int16_t border_left + ** @param int16_t border_top + ** @param int16_t border_right + ** @param int16_t border_bottom + ** @returns xcb_randr_set_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_panning_cookie_t +xcb_randr_set_panning (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + uint16_t left /**< */, + uint16_t top /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint16_t track_left /**< */, + uint16_t track_top /**< */, + uint16_t track_width /**< */, + uint16_t track_height /**< */, + int16_t border_left /**< */, + int16_t border_top /**< */, + int16_t border_right /**< */, + int16_t border_bottom /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param uint16_t left + ** @param uint16_t top + ** @param uint16_t width + ** @param uint16_t height + ** @param uint16_t track_left + ** @param uint16_t track_top + ** @param uint16_t track_width + ** @param uint16_t track_height + ** @param int16_t border_left + ** @param int16_t border_top + ** @param int16_t border_right + ** @param int16_t border_bottom + ** @returns xcb_randr_set_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_panning_cookie_t +xcb_randr_set_panning_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + uint16_t left /**< */, + uint16_t top /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint16_t track_left /**< */, + uint16_t track_top /**< */, + uint16_t track_width /**< */, + uint16_t track_height /**< */, + int16_t border_left /**< */, + int16_t border_top /**< */, + int16_t border_right /**< */, + int16_t border_bottom /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_set_panning_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_set_panning_reply_t * xcb_randr_set_panning_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_set_panning_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_set_panning_reply_t * + ** + *****************************************************************************/ + +xcb_randr_set_panning_reply_t * +xcb_randr_set_panning_reply (xcb_connection_t *c /**< */, + xcb_randr_set_panning_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_output_primary_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_output_t output + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_output_t output /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_output_primary + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_output_t output + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_output_primary (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_output_t output /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_output_primary_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_primary_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_output_primary_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_primary_cookie_t +xcb_randr_get_output_primary_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_randr_get_output_primary_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_randr_get_output_primary_reply_t * xcb_randr_get_output_primary_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_output_primary_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_output_primary_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_output_primary_reply_t * +xcb_randr_get_output_primary_reply (xcb_connection_t *c /**< */, + xcb_randr_get_output_primary_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_crtc_change_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_crtc_change_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_crtc_change_next + ** + ** @param xcb_randr_crtc_change_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_crtc_change_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_crtc_change_end + ** + ** @param xcb_randr_crtc_change_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_output_change_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_output_change_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_output_change_next + ** + ** @param xcb_randr_output_change_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_output_change_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_output_change_end + ** + ** @param xcb_randr_output_change_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_output_property_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_output_property_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_output_property_next + ** + ** @param xcb_randr_output_property_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_output_property_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_output_property_end + ** + ** @param xcb_randr_output_property_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_randr_notify_data_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_randr_notify_data_t) + */ + +/***************************************************************************** + ** + ** void xcb_randr_notify_data_next + ** + ** @param xcb_randr_notify_data_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_randr_notify_data_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_notify_data_end + ** + ** @param xcb_randr_notify_data_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i /**< */); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/src/3rdparty/xcb/include/xcb/render.h b/src/3rdparty/xcb/include/xcb/render.h new file mode 100644 index 0000000000..0f96ca1fbc --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/render.h @@ -0,0 +1,4412 @@ +/* + * This file generated automatically from render.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Render_API XCB Render API + * @brief Render XCB Protocol Implementation. + * @{ + **/ + +#ifndef __RENDER_H +#define __RENDER_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_RENDER_MAJOR_VERSION 0 +#define XCB_RENDER_MINOR_VERSION 10 + +extern xcb_extension_t xcb_render_id; + +typedef enum xcb_render_pict_type_t { + XCB_RENDER_PICT_TYPE_INDEXED, + XCB_RENDER_PICT_TYPE_DIRECT +} xcb_render_pict_type_t; + +typedef enum xcb_render_picture_enum_t { + XCB_RENDER_PICTURE_NONE +} xcb_render_picture_enum_t; + +typedef enum xcb_render_pict_op_t { + XCB_RENDER_PICT_OP_CLEAR, + XCB_RENDER_PICT_OP_SRC, + XCB_RENDER_PICT_OP_DST, + XCB_RENDER_PICT_OP_OVER, + XCB_RENDER_PICT_OP_OVER_REVERSE, + XCB_RENDER_PICT_OP_IN, + XCB_RENDER_PICT_OP_IN_REVERSE, + XCB_RENDER_PICT_OP_OUT, + XCB_RENDER_PICT_OP_OUT_REVERSE, + XCB_RENDER_PICT_OP_ATOP, + XCB_RENDER_PICT_OP_ATOP_REVERSE, + XCB_RENDER_PICT_OP_XOR, + XCB_RENDER_PICT_OP_ADD, + XCB_RENDER_PICT_OP_SATURATE, + XCB_RENDER_PICT_OP_DISJOINT_CLEAR = 16, + XCB_RENDER_PICT_OP_DISJOINT_SRC, + XCB_RENDER_PICT_OP_DISJOINT_DST, + XCB_RENDER_PICT_OP_DISJOINT_OVER, + XCB_RENDER_PICT_OP_DISJOINT_OVER_REVERSE, + XCB_RENDER_PICT_OP_DISJOINT_IN, + XCB_RENDER_PICT_OP_DISJOINT_IN_REVERSE, + XCB_RENDER_PICT_OP_DISJOINT_OUT, + XCB_RENDER_PICT_OP_DISJOINT_OUT_REVERSE, + XCB_RENDER_PICT_OP_DISJOINT_ATOP, + XCB_RENDER_PICT_OP_DISJOINT_ATOP_REVERSE, + XCB_RENDER_PICT_OP_DISJOINT_XOR, + XCB_RENDER_PICT_OP_CONJOINT_CLEAR = 32, + XCB_RENDER_PICT_OP_CONJOINT_SRC, + XCB_RENDER_PICT_OP_CONJOINT_DST, + XCB_RENDER_PICT_OP_CONJOINT_OVER, + XCB_RENDER_PICT_OP_CONJOINT_OVER_REVERSE, + XCB_RENDER_PICT_OP_CONJOINT_IN, + XCB_RENDER_PICT_OP_CONJOINT_IN_REVERSE, + XCB_RENDER_PICT_OP_CONJOINT_OUT, + XCB_RENDER_PICT_OP_CONJOINT_OUT_REVERSE, + XCB_RENDER_PICT_OP_CONJOINT_ATOP, + XCB_RENDER_PICT_OP_CONJOINT_ATOP_REVERSE, + XCB_RENDER_PICT_OP_CONJOINT_XOR +} xcb_render_pict_op_t; + +typedef enum xcb_render_poly_edge_t { + XCB_RENDER_POLY_EDGE_SHARP, + XCB_RENDER_POLY_EDGE_SMOOTH +} xcb_render_poly_edge_t; + +typedef enum xcb_render_poly_mode_t { + XCB_RENDER_POLY_MODE_PRECISE, + XCB_RENDER_POLY_MODE_IMPRECISE +} xcb_render_poly_mode_t; + +typedef enum xcb_render_cp_t { + XCB_RENDER_CP_REPEAT = 1, + XCB_RENDER_CP_ALPHA_MAP = 2, + XCB_RENDER_CP_ALPHA_X_ORIGIN = 4, + XCB_RENDER_CP_ALPHA_Y_ORIGIN = 8, + XCB_RENDER_CP_CLIP_X_ORIGIN = 16, + XCB_RENDER_CP_CLIP_Y_ORIGIN = 32, + XCB_RENDER_CP_CLIP_MASK = 64, + XCB_RENDER_CP_GRAPHICS_EXPOSURE = 128, + XCB_RENDER_CP_SUBWINDOW_MODE = 256, + XCB_RENDER_CP_POLY_EDGE = 512, + XCB_RENDER_CP_POLY_MODE = 1024, + XCB_RENDER_CP_DITHER = 2048, + XCB_RENDER_CP_COMPONENT_ALPHA = 4096 +} xcb_render_cp_t; + +typedef enum xcb_render_sub_pixel_t { + XCB_RENDER_SUB_PIXEL_UNKNOWN, + XCB_RENDER_SUB_PIXEL_HORIZONTAL_RGB, + XCB_RENDER_SUB_PIXEL_HORIZONTAL_BGR, + XCB_RENDER_SUB_PIXEL_VERTICAL_RGB, + XCB_RENDER_SUB_PIXEL_VERTICAL_BGR, + XCB_RENDER_SUB_PIXEL_NONE +} xcb_render_sub_pixel_t; + +typedef enum xcb_render_repeat_t { + XCB_RENDER_REPEAT_NONE, + XCB_RENDER_REPEAT_NORMAL, + XCB_RENDER_REPEAT_PAD, + XCB_RENDER_REPEAT_REFLECT +} xcb_render_repeat_t; + +typedef uint32_t xcb_render_glyph_t; + +/** + * @brief xcb_render_glyph_iterator_t + **/ +typedef struct xcb_render_glyph_iterator_t { + xcb_render_glyph_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_glyph_iterator_t; + +typedef uint32_t xcb_render_glyphset_t; + +/** + * @brief xcb_render_glyphset_iterator_t + **/ +typedef struct xcb_render_glyphset_iterator_t { + xcb_render_glyphset_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_glyphset_iterator_t; + +typedef uint32_t xcb_render_picture_t; + +/** + * @brief xcb_render_picture_iterator_t + **/ +typedef struct xcb_render_picture_iterator_t { + xcb_render_picture_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_picture_iterator_t; + +typedef uint32_t xcb_render_pictformat_t; + +/** + * @brief xcb_render_pictformat_iterator_t + **/ +typedef struct xcb_render_pictformat_iterator_t { + xcb_render_pictformat_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_pictformat_iterator_t; + +typedef int32_t xcb_render_fixed_t; + +/** + * @brief xcb_render_fixed_iterator_t + **/ +typedef struct xcb_render_fixed_iterator_t { + xcb_render_fixed_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_fixed_iterator_t; + +/** Opcode for xcb_render_pict_format. */ +#define XCB_RENDER_PICT_FORMAT 0 + +/** + * @brief xcb_render_pict_format_error_t + **/ +typedef struct xcb_render_pict_format_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_render_pict_format_error_t; + +/** Opcode for xcb_render_picture. */ +#define XCB_RENDER_PICTURE 1 + +/** + * @brief xcb_render_picture_error_t + **/ +typedef struct xcb_render_picture_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_render_picture_error_t; + +/** Opcode for xcb_render_pict_op. */ +#define XCB_RENDER_PICT_OP 2 + +/** + * @brief xcb_render_pict_op_error_t + **/ +typedef struct xcb_render_pict_op_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_render_pict_op_error_t; + +/** Opcode for xcb_render_glyph_set. */ +#define XCB_RENDER_GLYPH_SET 3 + +/** + * @brief xcb_render_glyph_set_error_t + **/ +typedef struct xcb_render_glyph_set_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_render_glyph_set_error_t; + +/** Opcode for xcb_render_glyph. */ +#define XCB_RENDER_GLYPH 4 + +/** + * @brief xcb_render_glyph_error_t + **/ +typedef struct xcb_render_glyph_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_render_glyph_error_t; + +/** + * @brief xcb_render_directformat_t + **/ +typedef struct xcb_render_directformat_t { + uint16_t red_shift; /**< */ + uint16_t red_mask; /**< */ + uint16_t green_shift; /**< */ + uint16_t green_mask; /**< */ + uint16_t blue_shift; /**< */ + uint16_t blue_mask; /**< */ + uint16_t alpha_shift; /**< */ + uint16_t alpha_mask; /**< */ +} xcb_render_directformat_t; + +/** + * @brief xcb_render_directformat_iterator_t + **/ +typedef struct xcb_render_directformat_iterator_t { + xcb_render_directformat_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_directformat_iterator_t; + +/** + * @brief xcb_render_pictforminfo_t + **/ +typedef struct xcb_render_pictforminfo_t { + xcb_render_pictformat_t id; /**< */ + uint8_t type; /**< */ + uint8_t depth; /**< */ + uint8_t pad0[2]; /**< */ + xcb_render_directformat_t direct; /**< */ + xcb_colormap_t colormap; /**< */ +} xcb_render_pictforminfo_t; + +/** + * @brief xcb_render_pictforminfo_iterator_t + **/ +typedef struct xcb_render_pictforminfo_iterator_t { + xcb_render_pictforminfo_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_pictforminfo_iterator_t; + +/** + * @brief xcb_render_pictvisual_t + **/ +typedef struct xcb_render_pictvisual_t { + xcb_visualid_t visual; /**< */ + xcb_render_pictformat_t format; /**< */ +} xcb_render_pictvisual_t; + +/** + * @brief xcb_render_pictvisual_iterator_t + **/ +typedef struct xcb_render_pictvisual_iterator_t { + xcb_render_pictvisual_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_pictvisual_iterator_t; + +/** + * @brief xcb_render_pictdepth_t + **/ +typedef struct xcb_render_pictdepth_t { + uint8_t depth; /**< */ + uint8_t pad0; /**< */ + uint16_t num_visuals; /**< */ + uint8_t pad1[4]; /**< */ +} xcb_render_pictdepth_t; + +/** + * @brief xcb_render_pictdepth_iterator_t + **/ +typedef struct xcb_render_pictdepth_iterator_t { + xcb_render_pictdepth_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_pictdepth_iterator_t; + +/** + * @brief xcb_render_pictscreen_t + **/ +typedef struct xcb_render_pictscreen_t { + uint32_t num_depths; /**< */ + xcb_render_pictformat_t fallback; /**< */ +} xcb_render_pictscreen_t; + +/** + * @brief xcb_render_pictscreen_iterator_t + **/ +typedef struct xcb_render_pictscreen_iterator_t { + xcb_render_pictscreen_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_pictscreen_iterator_t; + +/** + * @brief xcb_render_indexvalue_t + **/ +typedef struct xcb_render_indexvalue_t { + uint32_t pixel; /**< */ + uint16_t red; /**< */ + uint16_t green; /**< */ + uint16_t blue; /**< */ + uint16_t alpha; /**< */ +} xcb_render_indexvalue_t; + +/** + * @brief xcb_render_indexvalue_iterator_t + **/ +typedef struct xcb_render_indexvalue_iterator_t { + xcb_render_indexvalue_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_indexvalue_iterator_t; + +/** + * @brief xcb_render_color_t + **/ +typedef struct xcb_render_color_t { + uint16_t red; /**< */ + uint16_t green; /**< */ + uint16_t blue; /**< */ + uint16_t alpha; /**< */ +} xcb_render_color_t; + +/** + * @brief xcb_render_color_iterator_t + **/ +typedef struct xcb_render_color_iterator_t { + xcb_render_color_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_color_iterator_t; + +/** + * @brief xcb_render_pointfix_t + **/ +typedef struct xcb_render_pointfix_t { + xcb_render_fixed_t x; /**< */ + xcb_render_fixed_t y; /**< */ +} xcb_render_pointfix_t; + +/** + * @brief xcb_render_pointfix_iterator_t + **/ +typedef struct xcb_render_pointfix_iterator_t { + xcb_render_pointfix_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_pointfix_iterator_t; + +/** + * @brief xcb_render_linefix_t + **/ +typedef struct xcb_render_linefix_t { + xcb_render_pointfix_t p1; /**< */ + xcb_render_pointfix_t p2; /**< */ +} xcb_render_linefix_t; + +/** + * @brief xcb_render_linefix_iterator_t + **/ +typedef struct xcb_render_linefix_iterator_t { + xcb_render_linefix_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_linefix_iterator_t; + +/** + * @brief xcb_render_triangle_t + **/ +typedef struct xcb_render_triangle_t { + xcb_render_pointfix_t p1; /**< */ + xcb_render_pointfix_t p2; /**< */ + xcb_render_pointfix_t p3; /**< */ +} xcb_render_triangle_t; + +/** + * @brief xcb_render_triangle_iterator_t + **/ +typedef struct xcb_render_triangle_iterator_t { + xcb_render_triangle_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_triangle_iterator_t; + +/** + * @brief xcb_render_trapezoid_t + **/ +typedef struct xcb_render_trapezoid_t { + xcb_render_fixed_t top; /**< */ + xcb_render_fixed_t bottom; /**< */ + xcb_render_linefix_t left; /**< */ + xcb_render_linefix_t right; /**< */ +} xcb_render_trapezoid_t; + +/** + * @brief xcb_render_trapezoid_iterator_t + **/ +typedef struct xcb_render_trapezoid_iterator_t { + xcb_render_trapezoid_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_trapezoid_iterator_t; + +/** + * @brief xcb_render_glyphinfo_t + **/ +typedef struct xcb_render_glyphinfo_t { + uint16_t width; /**< */ + uint16_t height; /**< */ + int16_t x; /**< */ + int16_t y; /**< */ + int16_t x_off; /**< */ + int16_t y_off; /**< */ +} xcb_render_glyphinfo_t; + +/** + * @brief xcb_render_glyphinfo_iterator_t + **/ +typedef struct xcb_render_glyphinfo_iterator_t { + xcb_render_glyphinfo_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_glyphinfo_iterator_t; + +/** + * @brief xcb_render_query_version_cookie_t + **/ +typedef struct xcb_render_query_version_cookie_t { + unsigned int sequence; /**< */ +} xcb_render_query_version_cookie_t; + +/** Opcode for xcb_render_query_version. */ +#define XCB_RENDER_QUERY_VERSION 0 + +/** + * @brief xcb_render_query_version_request_t + **/ +typedef struct xcb_render_query_version_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint32_t client_major_version; /**< */ + uint32_t client_minor_version; /**< */ +} xcb_render_query_version_request_t; + +/** + * @brief xcb_render_query_version_reply_t + **/ +typedef struct xcb_render_query_version_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t major_version; /**< */ + uint32_t minor_version; /**< */ + uint8_t pad1[16]; /**< */ +} xcb_render_query_version_reply_t; + +/** + * @brief xcb_render_query_pict_formats_cookie_t + **/ +typedef struct xcb_render_query_pict_formats_cookie_t { + unsigned int sequence; /**< */ +} xcb_render_query_pict_formats_cookie_t; + +/** Opcode for xcb_render_query_pict_formats. */ +#define XCB_RENDER_QUERY_PICT_FORMATS 1 + +/** + * @brief xcb_render_query_pict_formats_request_t + **/ +typedef struct xcb_render_query_pict_formats_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ +} xcb_render_query_pict_formats_request_t; + +/** + * @brief xcb_render_query_pict_formats_reply_t + **/ +typedef struct xcb_render_query_pict_formats_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t num_formats; /**< */ + uint32_t num_screens; /**< */ + uint32_t num_depths; /**< */ + uint32_t num_visuals; /**< */ + uint32_t num_subpixel; /**< */ + uint8_t pad1[4]; /**< */ +} xcb_render_query_pict_formats_reply_t; + +/** + * @brief xcb_render_query_pict_index_values_cookie_t + **/ +typedef struct xcb_render_query_pict_index_values_cookie_t { + unsigned int sequence; /**< */ +} xcb_render_query_pict_index_values_cookie_t; + +/** Opcode for xcb_render_query_pict_index_values. */ +#define XCB_RENDER_QUERY_PICT_INDEX_VALUES 2 + +/** + * @brief xcb_render_query_pict_index_values_request_t + **/ +typedef struct xcb_render_query_pict_index_values_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_pictformat_t format; /**< */ +} xcb_render_query_pict_index_values_request_t; + +/** + * @brief xcb_render_query_pict_index_values_reply_t + **/ +typedef struct xcb_render_query_pict_index_values_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t num_values; /**< */ + uint8_t pad1[20]; /**< */ +} xcb_render_query_pict_index_values_reply_t; + +/** Opcode for xcb_render_create_picture. */ +#define XCB_RENDER_CREATE_PICTURE 4 + +/** + * @brief xcb_render_create_picture_request_t + **/ +typedef struct xcb_render_create_picture_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t pid; /**< */ + xcb_drawable_t drawable; /**< */ + xcb_render_pictformat_t format; /**< */ + uint32_t value_mask; /**< */ +} xcb_render_create_picture_request_t; + +/** Opcode for xcb_render_change_picture. */ +#define XCB_RENDER_CHANGE_PICTURE 5 + +/** + * @brief xcb_render_change_picture_request_t + **/ +typedef struct xcb_render_change_picture_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + uint32_t value_mask; /**< */ +} xcb_render_change_picture_request_t; + +/** Opcode for xcb_render_set_picture_clip_rectangles. */ +#define XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES 6 + +/** + * @brief xcb_render_set_picture_clip_rectangles_request_t + **/ +typedef struct xcb_render_set_picture_clip_rectangles_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + int16_t clip_x_origin; /**< */ + int16_t clip_y_origin; /**< */ +} xcb_render_set_picture_clip_rectangles_request_t; + +/** Opcode for xcb_render_free_picture. */ +#define XCB_RENDER_FREE_PICTURE 7 + +/** + * @brief xcb_render_free_picture_request_t + **/ +typedef struct xcb_render_free_picture_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ +} xcb_render_free_picture_request_t; + +/** Opcode for xcb_render_composite. */ +#define XCB_RENDER_COMPOSITE 8 + +/** + * @brief xcb_render_composite_request_t + **/ +typedef struct xcb_render_composite_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t mask; /**< */ + xcb_render_picture_t dst; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ + int16_t mask_x; /**< */ + int16_t mask_y; /**< */ + int16_t dst_x; /**< */ + int16_t dst_y; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ +} xcb_render_composite_request_t; + +/** Opcode for xcb_render_trapezoids. */ +#define XCB_RENDER_TRAPEZOIDS 10 + +/** + * @brief xcb_render_trapezoids_request_t + **/ +typedef struct xcb_render_trapezoids_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_pictformat_t mask_format; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ +} xcb_render_trapezoids_request_t; + +/** Opcode for xcb_render_triangles. */ +#define XCB_RENDER_TRIANGLES 11 + +/** + * @brief xcb_render_triangles_request_t + **/ +typedef struct xcb_render_triangles_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_pictformat_t mask_format; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ +} xcb_render_triangles_request_t; + +/** Opcode for xcb_render_tri_strip. */ +#define XCB_RENDER_TRI_STRIP 12 + +/** + * @brief xcb_render_tri_strip_request_t + **/ +typedef struct xcb_render_tri_strip_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_pictformat_t mask_format; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ +} xcb_render_tri_strip_request_t; + +/** Opcode for xcb_render_tri_fan. */ +#define XCB_RENDER_TRI_FAN 13 + +/** + * @brief xcb_render_tri_fan_request_t + **/ +typedef struct xcb_render_tri_fan_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_pictformat_t mask_format; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ +} xcb_render_tri_fan_request_t; + +/** Opcode for xcb_render_create_glyph_set. */ +#define XCB_RENDER_CREATE_GLYPH_SET 17 + +/** + * @brief xcb_render_create_glyph_set_request_t + **/ +typedef struct xcb_render_create_glyph_set_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_glyphset_t gsid; /**< */ + xcb_render_pictformat_t format; /**< */ +} xcb_render_create_glyph_set_request_t; + +/** Opcode for xcb_render_reference_glyph_set. */ +#define XCB_RENDER_REFERENCE_GLYPH_SET 18 + +/** + * @brief xcb_render_reference_glyph_set_request_t + **/ +typedef struct xcb_render_reference_glyph_set_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_glyphset_t gsid; /**< */ + xcb_render_glyphset_t existing; /**< */ +} xcb_render_reference_glyph_set_request_t; + +/** Opcode for xcb_render_free_glyph_set. */ +#define XCB_RENDER_FREE_GLYPH_SET 19 + +/** + * @brief xcb_render_free_glyph_set_request_t + **/ +typedef struct xcb_render_free_glyph_set_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_glyphset_t glyphset; /**< */ +} xcb_render_free_glyph_set_request_t; + +/** Opcode for xcb_render_add_glyphs. */ +#define XCB_RENDER_ADD_GLYPHS 20 + +/** + * @brief xcb_render_add_glyphs_request_t + **/ +typedef struct xcb_render_add_glyphs_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_glyphset_t glyphset; /**< */ + uint32_t glyphs_len; /**< */ +} xcb_render_add_glyphs_request_t; + +/** Opcode for xcb_render_free_glyphs. */ +#define XCB_RENDER_FREE_GLYPHS 22 + +/** + * @brief xcb_render_free_glyphs_request_t + **/ +typedef struct xcb_render_free_glyphs_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_glyphset_t glyphset; /**< */ +} xcb_render_free_glyphs_request_t; + +/** Opcode for xcb_render_composite_glyphs_8. */ +#define XCB_RENDER_COMPOSITE_GLYPHS_8 23 + +/** + * @brief xcb_render_composite_glyphs_8_request_t + **/ +typedef struct xcb_render_composite_glyphs_8_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_pictformat_t mask_format; /**< */ + xcb_render_glyphset_t glyphset; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ +} xcb_render_composite_glyphs_8_request_t; + +/** Opcode for xcb_render_composite_glyphs_16. */ +#define XCB_RENDER_COMPOSITE_GLYPHS_16 24 + +/** + * @brief xcb_render_composite_glyphs_16_request_t + **/ +typedef struct xcb_render_composite_glyphs_16_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_pictformat_t mask_format; /**< */ + xcb_render_glyphset_t glyphset; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ +} xcb_render_composite_glyphs_16_request_t; + +/** Opcode for xcb_render_composite_glyphs_32. */ +#define XCB_RENDER_COMPOSITE_GLYPHS_32 25 + +/** + * @brief xcb_render_composite_glyphs_32_request_t + **/ +typedef struct xcb_render_composite_glyphs_32_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t src; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_pictformat_t mask_format; /**< */ + xcb_render_glyphset_t glyphset; /**< */ + int16_t src_x; /**< */ + int16_t src_y; /**< */ +} xcb_render_composite_glyphs_32_request_t; + +/** Opcode for xcb_render_fill_rectangles. */ +#define XCB_RENDER_FILL_RECTANGLES 26 + +/** + * @brief xcb_render_fill_rectangles_request_t + **/ +typedef struct xcb_render_fill_rectangles_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t op; /**< */ + uint8_t pad0[3]; /**< */ + xcb_render_picture_t dst; /**< */ + xcb_render_color_t color; /**< */ +} xcb_render_fill_rectangles_request_t; + +/** Opcode for xcb_render_create_cursor. */ +#define XCB_RENDER_CREATE_CURSOR 27 + +/** + * @brief xcb_render_create_cursor_request_t + **/ +typedef struct xcb_render_create_cursor_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_cursor_t cid; /**< */ + xcb_render_picture_t source; /**< */ + uint16_t x; /**< */ + uint16_t y; /**< */ +} xcb_render_create_cursor_request_t; + +/** + * @brief xcb_render_transform_t + **/ +typedef struct xcb_render_transform_t { + xcb_render_fixed_t matrix11; /**< */ + xcb_render_fixed_t matrix12; /**< */ + xcb_render_fixed_t matrix13; /**< */ + xcb_render_fixed_t matrix21; /**< */ + xcb_render_fixed_t matrix22; /**< */ + xcb_render_fixed_t matrix23; /**< */ + xcb_render_fixed_t matrix31; /**< */ + xcb_render_fixed_t matrix32; /**< */ + xcb_render_fixed_t matrix33; /**< */ +} xcb_render_transform_t; + +/** + * @brief xcb_render_transform_iterator_t + **/ +typedef struct xcb_render_transform_iterator_t { + xcb_render_transform_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_transform_iterator_t; + +/** Opcode for xcb_render_set_picture_transform. */ +#define XCB_RENDER_SET_PICTURE_TRANSFORM 28 + +/** + * @brief xcb_render_set_picture_transform_request_t + **/ +typedef struct xcb_render_set_picture_transform_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + xcb_render_transform_t transform; /**< */ +} xcb_render_set_picture_transform_request_t; + +/** + * @brief xcb_render_query_filters_cookie_t + **/ +typedef struct xcb_render_query_filters_cookie_t { + unsigned int sequence; /**< */ +} xcb_render_query_filters_cookie_t; + +/** Opcode for xcb_render_query_filters. */ +#define XCB_RENDER_QUERY_FILTERS 29 + +/** + * @brief xcb_render_query_filters_request_t + **/ +typedef struct xcb_render_query_filters_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_drawable_t drawable; /**< */ +} xcb_render_query_filters_request_t; + +/** + * @brief xcb_render_query_filters_reply_t + **/ +typedef struct xcb_render_query_filters_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t num_aliases; /**< */ + uint32_t num_filters; /**< */ + uint8_t pad1[16]; /**< */ +} xcb_render_query_filters_reply_t; + +/** Opcode for xcb_render_set_picture_filter. */ +#define XCB_RENDER_SET_PICTURE_FILTER 30 + +/** + * @brief xcb_render_set_picture_filter_request_t + **/ +typedef struct xcb_render_set_picture_filter_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + uint16_t filter_len; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_render_set_picture_filter_request_t; + +/** + * @brief xcb_render_animcursorelt_t + **/ +typedef struct xcb_render_animcursorelt_t { + xcb_cursor_t cursor; /**< */ + uint32_t delay; /**< */ +} xcb_render_animcursorelt_t; + +/** + * @brief xcb_render_animcursorelt_iterator_t + **/ +typedef struct xcb_render_animcursorelt_iterator_t { + xcb_render_animcursorelt_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_animcursorelt_iterator_t; + +/** Opcode for xcb_render_create_anim_cursor. */ +#define XCB_RENDER_CREATE_ANIM_CURSOR 31 + +/** + * @brief xcb_render_create_anim_cursor_request_t + **/ +typedef struct xcb_render_create_anim_cursor_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_cursor_t cid; /**< */ +} xcb_render_create_anim_cursor_request_t; + +/** + * @brief xcb_render_spanfix_t + **/ +typedef struct xcb_render_spanfix_t { + xcb_render_fixed_t l; /**< */ + xcb_render_fixed_t r; /**< */ + xcb_render_fixed_t y; /**< */ +} xcb_render_spanfix_t; + +/** + * @brief xcb_render_spanfix_iterator_t + **/ +typedef struct xcb_render_spanfix_iterator_t { + xcb_render_spanfix_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_spanfix_iterator_t; + +/** + * @brief xcb_render_trap_t + **/ +typedef struct xcb_render_trap_t { + xcb_render_spanfix_t top; /**< */ + xcb_render_spanfix_t bot; /**< */ +} xcb_render_trap_t; + +/** + * @brief xcb_render_trap_iterator_t + **/ +typedef struct xcb_render_trap_iterator_t { + xcb_render_trap_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_render_trap_iterator_t; + +/** Opcode for xcb_render_add_traps. */ +#define XCB_RENDER_ADD_TRAPS 32 + +/** + * @brief xcb_render_add_traps_request_t + **/ +typedef struct xcb_render_add_traps_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + int16_t x_off; /**< */ + int16_t y_off; /**< */ +} xcb_render_add_traps_request_t; + +/** Opcode for xcb_render_create_solid_fill. */ +#define XCB_RENDER_CREATE_SOLID_FILL 33 + +/** + * @brief xcb_render_create_solid_fill_request_t + **/ +typedef struct xcb_render_create_solid_fill_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + xcb_render_color_t color; /**< */ +} xcb_render_create_solid_fill_request_t; + +/** Opcode for xcb_render_create_linear_gradient. */ +#define XCB_RENDER_CREATE_LINEAR_GRADIENT 34 + +/** + * @brief xcb_render_create_linear_gradient_request_t + **/ +typedef struct xcb_render_create_linear_gradient_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + xcb_render_pointfix_t p1; /**< */ + xcb_render_pointfix_t p2; /**< */ + uint32_t num_stops; /**< */ +} xcb_render_create_linear_gradient_request_t; + +/** Opcode for xcb_render_create_radial_gradient. */ +#define XCB_RENDER_CREATE_RADIAL_GRADIENT 35 + +/** + * @brief xcb_render_create_radial_gradient_request_t + **/ +typedef struct xcb_render_create_radial_gradient_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + xcb_render_pointfix_t inner; /**< */ + xcb_render_pointfix_t outer; /**< */ + xcb_render_fixed_t inner_radius; /**< */ + xcb_render_fixed_t outer_radius; /**< */ + uint32_t num_stops; /**< */ +} xcb_render_create_radial_gradient_request_t; + +/** Opcode for xcb_render_create_conical_gradient. */ +#define XCB_RENDER_CREATE_CONICAL_GRADIENT 36 + +/** + * @brief xcb_render_create_conical_gradient_request_t + **/ +typedef struct xcb_render_create_conical_gradient_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + xcb_render_pointfix_t center; /**< */ + xcb_render_fixed_t angle; /**< */ + uint32_t num_stops; /**< */ +} xcb_render_create_conical_gradient_request_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_glyph_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_glyph_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_glyph_next + ** + ** @param xcb_render_glyph_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_glyph_next (xcb_render_glyph_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_glyph_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_glyph_end + ** + ** @param xcb_render_glyph_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_glyph_end (xcb_render_glyph_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_glyphset_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_glyphset_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_glyphset_next + ** + ** @param xcb_render_glyphset_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_glyphset_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_glyphset_end + ** + ** @param xcb_render_glyphset_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_picture_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_picture_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_picture_next + ** + ** @param xcb_render_picture_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_picture_next (xcb_render_picture_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_picture_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_picture_end + ** + ** @param xcb_render_picture_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_picture_end (xcb_render_picture_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictformat_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictformat_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_pictformat_next + ** + ** @param xcb_render_pictformat_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictformat_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictformat_end + ** + ** @param xcb_render_pictformat_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_fixed_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_fixed_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_fixed_next + ** + ** @param xcb_render_fixed_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_fixed_next (xcb_render_fixed_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_fixed_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_fixed_end + ** + ** @param xcb_render_fixed_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_fixed_end (xcb_render_fixed_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_directformat_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_directformat_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_directformat_next + ** + ** @param xcb_render_directformat_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_directformat_next (xcb_render_directformat_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_directformat_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_directformat_end + ** + ** @param xcb_render_directformat_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_directformat_end (xcb_render_directformat_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictforminfo_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictforminfo_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_pictforminfo_next + ** + ** @param xcb_render_pictforminfo_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictforminfo_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictforminfo_end + ** + ** @param xcb_render_pictforminfo_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictvisual_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictvisual_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_pictvisual_next + ** + ** @param xcb_render_pictvisual_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictvisual_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictvisual_end + ** + ** @param xcb_render_pictvisual_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */); + + +/***************************************************************************** + ** + ** xcb_render_pictvisual_t * xcb_render_pictdepth_visuals + ** + ** @param const xcb_render_pictdepth_t *R + ** @returns xcb_render_pictvisual_t * + ** + *****************************************************************************/ + +xcb_render_pictvisual_t * +xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_pictdepth_visuals_length + ** + ** @param const xcb_render_pictdepth_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_render_pictvisual_iterator_t xcb_render_pictdepth_visuals_iterator + ** + ** @param const xcb_render_pictdepth_t *R + ** @returns xcb_render_pictvisual_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictvisual_iterator_t +xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictdepth_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictdepth_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_pictdepth_next + ** + ** @param xcb_render_pictdepth_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictdepth_next (xcb_render_pictdepth_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictdepth_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictdepth_end + ** + ** @param xcb_render_pictdepth_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_pictscreen_depths_length + ** + ** @param const xcb_render_pictscreen_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_render_pictdepth_iterator_t xcb_render_pictscreen_depths_iterator + ** + ** @param const xcb_render_pictscreen_t *R + ** @returns xcb_render_pictdepth_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictdepth_iterator_t +xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pictscreen_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pictscreen_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_pictscreen_next + ** + ** @param xcb_render_pictscreen_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictscreen_next (xcb_render_pictscreen_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pictscreen_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictscreen_end + ** + ** @param xcb_render_pictscreen_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_indexvalue_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_indexvalue_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_indexvalue_next + ** + ** @param xcb_render_indexvalue_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_indexvalue_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_indexvalue_end + ** + ** @param xcb_render_indexvalue_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_color_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_color_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_color_next + ** + ** @param xcb_render_color_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_color_next (xcb_render_color_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_color_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_color_end + ** + ** @param xcb_render_color_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_color_end (xcb_render_color_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_pointfix_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_pointfix_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_pointfix_next + ** + ** @param xcb_render_pointfix_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_pointfix_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pointfix_end + ** + ** @param xcb_render_pointfix_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_linefix_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_linefix_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_linefix_next + ** + ** @param xcb_render_linefix_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_linefix_next (xcb_render_linefix_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_linefix_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_linefix_end + ** + ** @param xcb_render_linefix_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_linefix_end (xcb_render_linefix_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_triangle_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_triangle_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_triangle_next + ** + ** @param xcb_render_triangle_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_triangle_next (xcb_render_triangle_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_triangle_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_triangle_end + ** + ** @param xcb_render_triangle_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_triangle_end (xcb_render_triangle_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_trapezoid_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_trapezoid_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_trapezoid_next + ** + ** @param xcb_render_trapezoid_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_trapezoid_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_trapezoid_end + ** + ** @param xcb_render_trapezoid_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_glyphinfo_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_glyphinfo_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_glyphinfo_next + ** + ** @param xcb_render_glyphinfo_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_glyphinfo_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_glyphinfo_end + ** + ** @param xcb_render_glyphinfo_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_render_query_version_cookie_t xcb_render_query_version + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_render_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_version_cookie_t +xcb_render_query_version (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_render_query_version_cookie_t xcb_render_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_render_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_version_cookie_t +xcb_render_query_version_unchecked (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_render_query_version_reply_t * xcb_render_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_version_reply_t * +xcb_render_query_version_reply (xcb_connection_t *c /**< */, + xcb_render_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats + ** + ** @param xcb_connection_t *c + ** @returns xcb_render_query_pict_formats_cookie_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_render_query_pict_formats_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_pict_formats_cookie_t +xcb_render_query_pict_formats_unchecked (xcb_connection_t *c /**< */); + + +/***************************************************************************** + ** + ** xcb_render_pictforminfo_t * xcb_render_query_pict_formats_formats + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_render_pictforminfo_t * + ** + *****************************************************************************/ + +xcb_render_pictforminfo_t * +xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_formats_formats_length + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_render_pictforminfo_iterator_t xcb_render_query_pict_formats_formats_iterator + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_render_pictforminfo_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictforminfo_iterator_t +xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_formats_screens_length + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_render_pictscreen_iterator_t xcb_render_query_pict_formats_screens_iterator + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_render_pictscreen_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictscreen_iterator_t +xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** uint32_t * xcb_render_query_pict_formats_subpixels + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns uint32_t * + ** + *****************************************************************************/ + +uint32_t * +xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_formats_subpixels_length + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_query_pict_formats_subpixels_end + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_pict_formats_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_render_query_pict_formats_reply_t * xcb_render_query_pict_formats_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_pict_formats_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_pict_formats_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_pict_formats_reply_t * +xcb_render_query_pict_formats_reply (xcb_connection_t *c /**< */, + xcb_render_query_pict_formats_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values + ** + ** @param xcb_connection_t *c + ** @param xcb_render_pictformat_t format + ** @returns xcb_render_query_pict_index_values_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_pict_index_values_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_pictformat_t format + ** @returns xcb_render_query_pict_index_values_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_pict_index_values_cookie_t +xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c /**< */, + xcb_render_pictformat_t format /**< */); + + +/***************************************************************************** + ** + ** xcb_render_indexvalue_t * xcb_render_query_pict_index_values_values + ** + ** @param const xcb_render_query_pict_index_values_reply_t *R + ** @returns xcb_render_indexvalue_t * + ** + *****************************************************************************/ + +xcb_render_indexvalue_t * +xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_index_values_values_length + ** + ** @param const xcb_render_query_pict_index_values_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_render_indexvalue_iterator_t xcb_render_query_pict_index_values_values_iterator + ** + ** @param const xcb_render_query_pict_index_values_reply_t *R + ** @returns xcb_render_indexvalue_iterator_t + ** + *****************************************************************************/ + +xcb_render_indexvalue_iterator_t +xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_pict_index_values_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_render_query_pict_index_values_reply_t * xcb_render_query_pict_index_values_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_pict_index_values_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_pict_index_values_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_pict_index_values_reply_t * +xcb_render_query_pict_index_values_reply (xcb_connection_t *c /**< */, + xcb_render_query_pict_index_values_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t pid + ** @param xcb_drawable_t drawable + ** @param xcb_render_pictformat_t format + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_picture_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t pid /**< */, + xcb_drawable_t drawable /**< */, + xcb_render_pictformat_t format /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t pid + ** @param xcb_drawable_t drawable + ** @param xcb_render_pictformat_t format + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_picture (xcb_connection_t *c /**< */, + xcb_render_picture_t pid /**< */, + xcb_drawable_t drawable /**< */, + xcb_render_pictformat_t format /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_change_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_change_picture_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_change_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_change_picture (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t clip_x_origin + ** @param int16_t clip_y_origin + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t clip_x_origin /**< */, + int16_t clip_y_origin /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t clip_x_origin + ** @param int16_t clip_y_origin + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t clip_x_origin /**< */, + int16_t clip_y_origin /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t mask + ** @param xcb_render_picture_t dst + ** @param int16_t src_x + ** @param int16_t src_y + ** @param int16_t mask_x + ** @param int16_t mask_y + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint16_t width + ** @param uint16_t height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t mask /**< */, + xcb_render_picture_t dst /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + int16_t mask_x /**< */, + int16_t mask_y /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint16_t width /**< */, + uint16_t height /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t mask + ** @param xcb_render_picture_t dst + ** @param int16_t src_x + ** @param int16_t src_y + ** @param int16_t mask_x + ** @param int16_t mask_y + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint16_t width + ** @param uint16_t height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t mask /**< */, + xcb_render_picture_t dst /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + int16_t mask_x /**< */, + int16_t mask_y /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint16_t width /**< */, + uint16_t height /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_trapezoids_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t traps_len + ** @param const xcb_render_trapezoid_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_trapezoids_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t traps_len /**< */, + const xcb_render_trapezoid_t *traps /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_trapezoids + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t traps_len + ** @param const xcb_render_trapezoid_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_trapezoids (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t traps_len /**< */, + const xcb_render_trapezoid_t *traps /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_triangles_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t triangles_len + ** @param const xcb_render_triangle_t *triangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_triangles_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t triangles_len /**< */, + const xcb_render_triangle_t *triangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_triangles + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t triangles_len + ** @param const xcb_render_triangle_t *triangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_triangles (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t triangles_len /**< */, + const xcb_render_triangle_t *triangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_strip_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_strip_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_strip + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_strip (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_fan_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_fan_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_fan + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_fan (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_glyph_set_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_pictformat_t format + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_pictformat_t format /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_glyph_set + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_pictformat_t format + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_glyph_set (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_pictformat_t format /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_reference_glyph_set_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_glyphset_t existing + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_glyphset_t existing /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_reference_glyph_set + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_glyphset_t existing + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_reference_glyph_set (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_glyphset_t existing /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyph_set_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyph_set + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_glyph_set (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_glyphs_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const uint32_t *glyphids + ** @param const xcb_render_glyphinfo_t *glyphs + ** @param uint32_t data_len + ** @param const uint8_t *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const uint32_t *glyphids /**< */, + const xcb_render_glyphinfo_t *glyphs /**< */, + uint32_t data_len /**< */, + const uint8_t *data /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_glyphs + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const uint32_t *glyphids + ** @param const xcb_render_glyphinfo_t *glyphs + ** @param uint32_t data_len + ** @param const uint8_t *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_glyphs (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const uint32_t *glyphids /**< */, + const xcb_render_glyphinfo_t *glyphs /**< */, + uint32_t data_len /**< */, + const uint8_t *data /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyphs_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const xcb_render_glyph_t *glyphs + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const xcb_render_glyph_t *glyphs /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyphs + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const xcb_render_glyph_t *glyphs + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_glyphs (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const xcb_render_glyph_t *glyphs /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_8_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_8 + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_16_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_16 + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_32_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_32 + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_fill_rectangles_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t dst + ** @param xcb_render_color_t color + ** @param uint32_t rects_len + ** @param const xcb_rectangle_t *rects + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_color_t color /**< */, + uint32_t rects_len /**< */, + const xcb_rectangle_t *rects /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_fill_rectangles + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t dst + ** @param xcb_render_color_t color + ** @param uint32_t rects_len + ** @param const xcb_rectangle_t *rects + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_fill_rectangles (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_color_t color /**< */, + uint32_t rects_len /**< */, + const xcb_rectangle_t *rects /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param xcb_render_picture_t source + ** @param uint16_t x + ** @param uint16_t y + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_cursor_checked (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + xcb_render_picture_t source /**< */, + uint16_t x /**< */, + uint16_t y /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param xcb_render_picture_t source + ** @param uint16_t x + ** @param uint16_t y + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_cursor (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + xcb_render_picture_t source /**< */, + uint16_t x /**< */, + uint16_t y /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_transform_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_transform_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_transform_next + ** + ** @param xcb_render_transform_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_transform_next (xcb_render_transform_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_transform_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_transform_end + ** + ** @param xcb_render_transform_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_transform_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_transform_t transform + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_transform_t transform /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_transform + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_transform_t transform + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_transform (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_transform_t transform /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_render_query_filters_cookie_t xcb_render_query_filters + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @returns xcb_render_query_filters_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_filters_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_render_query_filters_cookie_t xcb_render_query_filters_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @returns xcb_render_query_filters_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_filters_cookie_t +xcb_render_query_filters_unchecked (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */); + + +/***************************************************************************** + ** + ** uint16_t * xcb_render_query_filters_aliases + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_query_filters_aliases_length + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_query_filters_aliases_end + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_render_query_filters_filters_length + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_str_iterator_t xcb_render_query_filters_filters_iterator + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns xcb_str_iterator_t + ** + *****************************************************************************/ + +xcb_str_iterator_t +xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_render_query_filters_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_render_query_filters_reply_t * xcb_render_query_filters_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_filters_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_filters_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_filters_reply_t * +xcb_render_query_filters_reply (xcb_connection_t *c /**< */, + xcb_render_query_filters_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_filter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint16_t filter_len + ** @param const char *filter + ** @param uint32_t values_len + ** @param const xcb_render_fixed_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint16_t filter_len /**< */, + const char *filter /**< */, + uint32_t values_len /**< */, + const xcb_render_fixed_t *values /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_filter + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint16_t filter_len + ** @param const char *filter + ** @param uint32_t values_len + ** @param const xcb_render_fixed_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_filter (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint16_t filter_len /**< */, + const char *filter /**< */, + uint32_t values_len /**< */, + const xcb_render_fixed_t *values /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_animcursorelt_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_animcursorelt_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_animcursorelt_next + ** + ** @param xcb_render_animcursorelt_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_animcursorelt_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_animcursorelt_end + ** + ** @param xcb_render_animcursorelt_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_anim_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param uint32_t cursors_len + ** @param const xcb_render_animcursorelt_t *cursors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + uint32_t cursors_len /**< */, + const xcb_render_animcursorelt_t *cursors /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_anim_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param uint32_t cursors_len + ** @param const xcb_render_animcursorelt_t *cursors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_anim_cursor (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + uint32_t cursors_len /**< */, + const xcb_render_animcursorelt_t *cursors /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_spanfix_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_spanfix_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_spanfix_next + ** + ** @param xcb_render_spanfix_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_spanfix_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_spanfix_end + ** + ** @param xcb_render_spanfix_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_render_trap_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_render_trap_t) + */ + +/***************************************************************************** + ** + ** void xcb_render_trap_next + ** + ** @param xcb_render_trap_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_render_trap_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_trap_end + ** + ** @param xcb_render_trap_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_traps_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t x_off + ** @param int16_t y_off + ** @param uint32_t traps_len + ** @param const xcb_render_trap_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_traps_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t x_off /**< */, + int16_t y_off /**< */, + uint32_t traps_len /**< */, + const xcb_render_trap_t *traps /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_traps + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t x_off + ** @param int16_t y_off + ** @param uint32_t traps_len + ** @param const xcb_render_trap_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_traps (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t x_off /**< */, + int16_t y_off /**< */, + uint32_t traps_len /**< */, + const xcb_render_trap_t *traps /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_solid_fill_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_color_t color + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_color_t color /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_solid_fill + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_color_t color + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_solid_fill (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_color_t color /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_linear_gradient_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t p1 + ** @param xcb_render_pointfix_t p2 + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t p1 /**< */, + xcb_render_pointfix_t p2 /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_linear_gradient + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t p1 + ** @param xcb_render_pointfix_t p2 + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_linear_gradient (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t p1 /**< */, + xcb_render_pointfix_t p2 /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_radial_gradient_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t inner + ** @param xcb_render_pointfix_t outer + ** @param xcb_render_fixed_t inner_radius + ** @param xcb_render_fixed_t outer_radius + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t inner /**< */, + xcb_render_pointfix_t outer /**< */, + xcb_render_fixed_t inner_radius /**< */, + xcb_render_fixed_t outer_radius /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_radial_gradient + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t inner + ** @param xcb_render_pointfix_t outer + ** @param xcb_render_fixed_t inner_radius + ** @param xcb_render_fixed_t outer_radius + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_radial_gradient (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t inner /**< */, + xcb_render_pointfix_t outer /**< */, + xcb_render_fixed_t inner_radius /**< */, + xcb_render_fixed_t outer_radius /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_conical_gradient_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t center + ** @param xcb_render_fixed_t angle + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t center /**< */, + xcb_render_fixed_t angle /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_conical_gradient + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t center + ** @param xcb_render_fixed_t angle + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_conical_gradient (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t center /**< */, + xcb_render_fixed_t angle /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/src/3rdparty/xcb/include/xcb/shape.h b/src/3rdparty/xcb/include/xcb/shape.h new file mode 100644 index 0000000000..107d2ff748 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/shape.h @@ -0,0 +1,1096 @@ +/* + * This file generated automatically from shape.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Shape_API XCB Shape API + * @brief Shape XCB Protocol Implementation. + * @{ + **/ + +#ifndef __SHAPE_H +#define __SHAPE_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SHAPE_MAJOR_VERSION 1 +#define XCB_SHAPE_MINOR_VERSION 1 + +extern xcb_extension_t xcb_shape_id; + +typedef uint8_t xcb_shape_op_t; + +/** + * @brief xcb_shape_op_iterator_t + **/ +typedef struct xcb_shape_op_iterator_t { + xcb_shape_op_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_shape_op_iterator_t; + +typedef uint8_t xcb_shape_kind_t; + +/** + * @brief xcb_shape_kind_iterator_t + **/ +typedef struct xcb_shape_kind_iterator_t { + xcb_shape_kind_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_shape_kind_iterator_t; + +typedef enum xcb_shape_so_t { + XCB_SHAPE_SO_SET, + XCB_SHAPE_SO_UNION, + XCB_SHAPE_SO_INTERSECT, + XCB_SHAPE_SO_SUBTRACT, + XCB_SHAPE_SO_INVERT +} xcb_shape_so_t; + +typedef enum xcb_shape_sk_t { + XCB_SHAPE_SK_BOUNDING, + XCB_SHAPE_SK_CLIP, + XCB_SHAPE_SK_INPUT +} xcb_shape_sk_t; + +/** Opcode for xcb_shape_notify. */ +#define XCB_SHAPE_NOTIFY 0 + +/** + * @brief xcb_shape_notify_event_t + **/ +typedef struct xcb_shape_notify_event_t { + uint8_t response_type; /**< */ + xcb_shape_kind_t shape_kind; /**< */ + uint16_t sequence; /**< */ + xcb_window_t affected_window; /**< */ + int16_t extents_x; /**< */ + int16_t extents_y; /**< */ + uint16_t extents_width; /**< */ + uint16_t extents_height; /**< */ + xcb_timestamp_t server_time; /**< */ + uint8_t shaped; /**< */ + uint8_t pad0[11]; /**< */ +} xcb_shape_notify_event_t; + +/** + * @brief xcb_shape_query_version_cookie_t + **/ +typedef struct xcb_shape_query_version_cookie_t { + unsigned int sequence; /**< */ +} xcb_shape_query_version_cookie_t; + +/** Opcode for xcb_shape_query_version. */ +#define XCB_SHAPE_QUERY_VERSION 0 + +/** + * @brief xcb_shape_query_version_request_t + **/ +typedef struct xcb_shape_query_version_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ +} xcb_shape_query_version_request_t; + +/** + * @brief xcb_shape_query_version_reply_t + **/ +typedef struct xcb_shape_query_version_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint16_t major_version; /**< */ + uint16_t minor_version; /**< */ +} xcb_shape_query_version_reply_t; + +/** Opcode for xcb_shape_rectangles. */ +#define XCB_SHAPE_RECTANGLES 1 + +/** + * @brief xcb_shape_rectangles_request_t + **/ +typedef struct xcb_shape_rectangles_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_shape_op_t operation; /**< */ + xcb_shape_kind_t destination_kind; /**< */ + uint8_t ordering; /**< */ + uint8_t pad0; /**< */ + xcb_window_t destination_window; /**< */ + int16_t x_offset; /**< */ + int16_t y_offset; /**< */ +} xcb_shape_rectangles_request_t; + +/** Opcode for xcb_shape_mask. */ +#define XCB_SHAPE_MASK 2 + +/** + * @brief xcb_shape_mask_request_t + **/ +typedef struct xcb_shape_mask_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_shape_op_t operation; /**< */ + xcb_shape_kind_t destination_kind; /**< */ + uint8_t pad0[2]; /**< */ + xcb_window_t destination_window; /**< */ + int16_t x_offset; /**< */ + int16_t y_offset; /**< */ + xcb_pixmap_t source_bitmap; /**< */ +} xcb_shape_mask_request_t; + +/** Opcode for xcb_shape_combine. */ +#define XCB_SHAPE_COMBINE 3 + +/** + * @brief xcb_shape_combine_request_t + **/ +typedef struct xcb_shape_combine_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_shape_op_t operation; /**< */ + xcb_shape_kind_t destination_kind; /**< */ + xcb_shape_kind_t source_kind; /**< */ + uint8_t pad0; /**< */ + xcb_window_t destination_window; /**< */ + int16_t x_offset; /**< */ + int16_t y_offset; /**< */ + xcb_window_t source_window; /**< */ +} xcb_shape_combine_request_t; + +/** Opcode for xcb_shape_offset. */ +#define XCB_SHAPE_OFFSET 4 + +/** + * @brief xcb_shape_offset_request_t + **/ +typedef struct xcb_shape_offset_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_shape_kind_t destination_kind; /**< */ + uint8_t pad0[3]; /**< */ + xcb_window_t destination_window; /**< */ + int16_t x_offset; /**< */ + int16_t y_offset; /**< */ +} xcb_shape_offset_request_t; + +/** + * @brief xcb_shape_query_extents_cookie_t + **/ +typedef struct xcb_shape_query_extents_cookie_t { + unsigned int sequence; /**< */ +} xcb_shape_query_extents_cookie_t; + +/** Opcode for xcb_shape_query_extents. */ +#define XCB_SHAPE_QUERY_EXTENTS 5 + +/** + * @brief xcb_shape_query_extents_request_t + **/ +typedef struct xcb_shape_query_extents_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t destination_window; /**< */ +} xcb_shape_query_extents_request_t; + +/** + * @brief xcb_shape_query_extents_reply_t + **/ +typedef struct xcb_shape_query_extents_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint8_t bounding_shaped; /**< */ + uint8_t clip_shaped; /**< */ + uint8_t pad1[2]; /**< */ + int16_t bounding_shape_extents_x; /**< */ + int16_t bounding_shape_extents_y; /**< */ + uint16_t bounding_shape_extents_width; /**< */ + uint16_t bounding_shape_extents_height; /**< */ + int16_t clip_shape_extents_x; /**< */ + int16_t clip_shape_extents_y; /**< */ + uint16_t clip_shape_extents_width; /**< */ + uint16_t clip_shape_extents_height; /**< */ +} xcb_shape_query_extents_reply_t; + +/** Opcode for xcb_shape_select_input. */ +#define XCB_SHAPE_SELECT_INPUT 6 + +/** + * @brief xcb_shape_select_input_request_t + **/ +typedef struct xcb_shape_select_input_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t destination_window; /**< */ + uint8_t enable; /**< */ + uint8_t pad0[3]; /**< */ +} xcb_shape_select_input_request_t; + +/** + * @brief xcb_shape_input_selected_cookie_t + **/ +typedef struct xcb_shape_input_selected_cookie_t { + unsigned int sequence; /**< */ +} xcb_shape_input_selected_cookie_t; + +/** Opcode for xcb_shape_input_selected. */ +#define XCB_SHAPE_INPUT_SELECTED 7 + +/** + * @brief xcb_shape_input_selected_request_t + **/ +typedef struct xcb_shape_input_selected_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t destination_window; /**< */ +} xcb_shape_input_selected_request_t; + +/** + * @brief xcb_shape_input_selected_reply_t + **/ +typedef struct xcb_shape_input_selected_reply_t { + uint8_t response_type; /**< */ + uint8_t enabled; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ +} xcb_shape_input_selected_reply_t; + +/** + * @brief xcb_shape_get_rectangles_cookie_t + **/ +typedef struct xcb_shape_get_rectangles_cookie_t { + unsigned int sequence; /**< */ +} xcb_shape_get_rectangles_cookie_t; + +/** Opcode for xcb_shape_get_rectangles. */ +#define XCB_SHAPE_GET_RECTANGLES 8 + +/** + * @brief xcb_shape_get_rectangles_request_t + **/ +typedef struct xcb_shape_get_rectangles_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + xcb_shape_kind_t source_kind; /**< */ + uint8_t pad0[3]; /**< */ +} xcb_shape_get_rectangles_request_t; + +/** + * @brief xcb_shape_get_rectangles_reply_t + **/ +typedef struct xcb_shape_get_rectangles_reply_t { + uint8_t response_type; /**< */ + uint8_t ordering; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t rectangles_len; /**< */ + uint8_t pad0[20]; /**< */ +} xcb_shape_get_rectangles_reply_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_shape_op_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_shape_op_t) + */ + +/***************************************************************************** + ** + ** void xcb_shape_op_next + ** + ** @param xcb_shape_op_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_shape_op_next (xcb_shape_op_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_shape_op_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_shape_op_end + ** + ** @param xcb_shape_op_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_shape_op_end (xcb_shape_op_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_shape_kind_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_shape_kind_t) + */ + +/***************************************************************************** + ** + ** void xcb_shape_kind_next + ** + ** @param xcb_shape_kind_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_shape_kind_next (xcb_shape_kind_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_shape_kind_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_shape_kind_end + ** + ** @param xcb_shape_kind_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_shape_query_version_cookie_t xcb_shape_query_version + ** + ** @param xcb_connection_t *c + ** @returns xcb_shape_query_version_cookie_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_shape_query_version_cookie_t xcb_shape_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_shape_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_shape_query_version_cookie_t +xcb_shape_query_version_unchecked (xcb_connection_t *c /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_shape_query_version_reply_t * xcb_shape_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_shape_query_version_reply_t * +xcb_shape_query_version_reply (xcb_connection_t *c /**< */, + xcb_shape_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_rectangles_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param uint8_t ordering + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_rectangles_checked (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + uint8_t ordering /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_rectangles + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param uint8_t ordering + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_rectangles (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + uint8_t ordering /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_mask_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_pixmap_t source_bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_mask_checked (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_pixmap_t source_bitmap /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_mask + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_pixmap_t source_bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_mask (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_pixmap_t source_bitmap /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_combine_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_shape_kind_t source_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_window_t source_window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_combine_checked (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_shape_kind_t source_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_window_t source_window /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_combine + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_shape_kind_t source_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_window_t source_window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_combine (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_shape_kind_t source_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_window_t source_window /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_offset_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_offset_checked (xcb_connection_t *c /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_offset + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_offset (xcb_connection_t *c /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_query_extents_cookie_t + ** + *****************************************************************************/ + +xcb_shape_query_extents_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_query_extents_cookie_t + ** + *****************************************************************************/ + +xcb_shape_query_extents_cookie_t +xcb_shape_query_extents_unchecked (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_query_extents_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_shape_query_extents_reply_t * xcb_shape_query_extents_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_query_extents_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_query_extents_reply_t * + ** + *****************************************************************************/ + +xcb_shape_query_extents_reply_t * +xcb_shape_query_extents_reply (xcb_connection_t *c /**< */, + xcb_shape_query_extents_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_select_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @param uint8_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_select_input_checked (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */, + uint8_t enable /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_select_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @param uint8_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_select_input (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */, + uint8_t enable /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_input_selected_cookie_t + ** + *****************************************************************************/ + +xcb_shape_input_selected_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_input_selected_cookie_t + ** + *****************************************************************************/ + +xcb_shape_input_selected_cookie_t +xcb_shape_input_selected_unchecked (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_input_selected_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_shape_input_selected_reply_t * xcb_shape_input_selected_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_input_selected_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_input_selected_reply_t * + ** + *****************************************************************************/ + +xcb_shape_input_selected_reply_t * +xcb_shape_input_selected_reply (xcb_connection_t *c /**< */, + xcb_shape_input_selected_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_shape_kind_t source_kind + ** @returns xcb_shape_get_rectangles_cookie_t + ** + *****************************************************************************/ + +xcb_shape_get_rectangles_cookie_t +xcb_shape_get_rectangles (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t source_kind /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_shape_kind_t source_kind + ** @returns xcb_shape_get_rectangles_cookie_t + ** + *****************************************************************************/ + +xcb_shape_get_rectangles_cookie_t +xcb_shape_get_rectangles_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t source_kind /**< */); + + +/***************************************************************************** + ** + ** xcb_rectangle_t * xcb_shape_get_rectangles_rectangles + ** + ** @param const xcb_shape_get_rectangles_reply_t *R + ** @returns xcb_rectangle_t * + ** + *****************************************************************************/ + +xcb_rectangle_t * +xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_shape_get_rectangles_rectangles_length + ** + ** @param const xcb_shape_get_rectangles_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator + ** + ** @param const xcb_shape_get_rectangles_reply_t *R + ** @returns xcb_rectangle_iterator_t + ** + *****************************************************************************/ + +xcb_rectangle_iterator_t +xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shape_get_rectangles_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_get_rectangles_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_get_rectangles_reply_t * + ** + *****************************************************************************/ + +xcb_shape_get_rectangles_reply_t * +xcb_shape_get_rectangles_reply (xcb_connection_t *c /**< */, + xcb_shape_get_rectangles_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/src/3rdparty/xcb/include/xcb/shm.h b/src/3rdparty/xcb/include/xcb/shm.h new file mode 100644 index 0000000000..bcb60d81f1 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/shm.h @@ -0,0 +1,738 @@ +/* + * This file generated automatically from shm.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Shm_API XCB Shm API + * @brief Shm XCB Protocol Implementation. + * @{ + **/ + +#ifndef __SHM_H +#define __SHM_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SHM_MAJOR_VERSION 1 +#define XCB_SHM_MINOR_VERSION 1 + +extern xcb_extension_t xcb_shm_id; + +typedef uint32_t xcb_shm_seg_t; + +/** + * @brief xcb_shm_seg_iterator_t + **/ +typedef struct xcb_shm_seg_iterator_t { + xcb_shm_seg_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_shm_seg_iterator_t; + +/** Opcode for xcb_shm_completion. */ +#define XCB_SHM_COMPLETION 0 + +/** + * @brief xcb_shm_completion_event_t + **/ +typedef struct xcb_shm_completion_event_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + xcb_drawable_t drawable; /**< */ + uint16_t minor_event; /**< */ + uint8_t major_event; /**< */ + uint8_t pad1; /**< */ + xcb_shm_seg_t shmseg; /**< */ + uint32_t offset; /**< */ +} xcb_shm_completion_event_t; + +/** Opcode for xcb_shm_bad_seg. */ +#define XCB_SHM_BAD_SEG 0 + +typedef xcb_value_error_t xcb_shm_bad_seg_error_t; + +/** + * @brief xcb_shm_query_version_cookie_t + **/ +typedef struct xcb_shm_query_version_cookie_t { + unsigned int sequence; /**< */ +} xcb_shm_query_version_cookie_t; + +/** Opcode for xcb_shm_query_version. */ +#define XCB_SHM_QUERY_VERSION 0 + +/** + * @brief xcb_shm_query_version_request_t + **/ +typedef struct xcb_shm_query_version_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ +} xcb_shm_query_version_request_t; + +/** + * @brief xcb_shm_query_version_reply_t + **/ +typedef struct xcb_shm_query_version_reply_t { + uint8_t response_type; /**< */ + uint8_t shared_pixmaps; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint16_t major_version; /**< */ + uint16_t minor_version; /**< */ + uint16_t uid; /**< */ + uint16_t gid; /**< */ + uint8_t pixmap_format; /**< */ + uint8_t pad0[15]; /**< */ +} xcb_shm_query_version_reply_t; + +/** Opcode for xcb_shm_attach. */ +#define XCB_SHM_ATTACH 1 + +/** + * @brief xcb_shm_attach_request_t + **/ +typedef struct xcb_shm_attach_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_shm_seg_t shmseg; /**< */ + uint32_t shmid; /**< */ + uint8_t read_only; /**< */ + uint8_t pad0[3]; /**< */ +} xcb_shm_attach_request_t; + +/** Opcode for xcb_shm_detach. */ +#define XCB_SHM_DETACH 2 + +/** + * @brief xcb_shm_detach_request_t + **/ +typedef struct xcb_shm_detach_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_shm_seg_t shmseg; /**< */ +} xcb_shm_detach_request_t; + +/** Opcode for xcb_shm_put_image. */ +#define XCB_SHM_PUT_IMAGE 3 + +/** + * @brief xcb_shm_put_image_request_t + **/ +typedef struct xcb_shm_put_image_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_drawable_t drawable; /**< */ + xcb_gcontext_t gc; /**< */ + uint16_t total_width; /**< */ + uint16_t total_height; /**< */ + uint16_t src_x; /**< */ + uint16_t src_y; /**< */ + uint16_t src_width; /**< */ + uint16_t src_height; /**< */ + int16_t dst_x; /**< */ + int16_t dst_y; /**< */ + uint8_t depth; /**< */ + uint8_t format; /**< */ + uint8_t send_event; /**< */ + uint8_t pad0; /**< */ + xcb_shm_seg_t shmseg; /**< */ + uint32_t offset; /**< */ +} xcb_shm_put_image_request_t; + +/** + * @brief xcb_shm_get_image_cookie_t + **/ +typedef struct xcb_shm_get_image_cookie_t { + unsigned int sequence; /**< */ +} xcb_shm_get_image_cookie_t; + +/** Opcode for xcb_shm_get_image. */ +#define XCB_SHM_GET_IMAGE 4 + +/** + * @brief xcb_shm_get_image_request_t + **/ +typedef struct xcb_shm_get_image_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_drawable_t drawable; /**< */ + int16_t x; /**< */ + int16_t y; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint32_t plane_mask; /**< */ + uint8_t format; /**< */ + uint8_t pad0[3]; /**< */ + xcb_shm_seg_t shmseg; /**< */ + uint32_t offset; /**< */ +} xcb_shm_get_image_request_t; + +/** + * @brief xcb_shm_get_image_reply_t + **/ +typedef struct xcb_shm_get_image_reply_t { + uint8_t response_type; /**< */ + uint8_t depth; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_visualid_t visual; /**< */ + uint32_t size; /**< */ +} xcb_shm_get_image_reply_t; + +/** Opcode for xcb_shm_create_pixmap. */ +#define XCB_SHM_CREATE_PIXMAP 5 + +/** + * @brief xcb_shm_create_pixmap_request_t + **/ +typedef struct xcb_shm_create_pixmap_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_pixmap_t pid; /**< */ + xcb_drawable_t drawable; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint8_t depth; /**< */ + uint8_t pad0[3]; /**< */ + xcb_shm_seg_t shmseg; /**< */ + uint32_t offset; /**< */ +} xcb_shm_create_pixmap_request_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_shm_seg_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_shm_seg_t) + */ + +/***************************************************************************** + ** + ** void xcb_shm_seg_next + ** + ** @param xcb_shm_seg_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_shm_seg_next (xcb_shm_seg_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_shm_seg_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_shm_seg_end + ** + ** @param xcb_shm_seg_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_shm_query_version_cookie_t xcb_shm_query_version + ** + ** @param xcb_connection_t *c + ** @returns xcb_shm_query_version_cookie_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_shm_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_shm_query_version_cookie_t +xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shm_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_shm_query_version_reply_t * xcb_shm_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shm_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_shm_query_version_reply_t * +xcb_shm_query_version_reply (xcb_connection_t *c /**< */, + xcb_shm_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_attach_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t shmid + ** @param uint8_t read_only + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_attach_checked (xcb_connection_t *c /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t shmid /**< */, + uint8_t read_only /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_attach + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t shmid + ** @param uint8_t read_only + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_attach (xcb_connection_t *c /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t shmid /**< */, + uint8_t read_only /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_detach_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_detach + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_put_image_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param xcb_gcontext_t gc + ** @param uint16_t total_width + ** @param uint16_t total_height + ** @param uint16_t src_x + ** @param uint16_t src_y + ** @param uint16_t src_width + ** @param uint16_t src_height + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint8_t depth + ** @param uint8_t format + ** @param uint8_t send_event + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_put_image_checked (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + xcb_gcontext_t gc /**< */, + uint16_t total_width /**< */, + uint16_t total_height /**< */, + uint16_t src_x /**< */, + uint16_t src_y /**< */, + uint16_t src_width /**< */, + uint16_t src_height /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint8_t depth /**< */, + uint8_t format /**< */, + uint8_t send_event /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_put_image + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param xcb_gcontext_t gc + ** @param uint16_t total_width + ** @param uint16_t total_height + ** @param uint16_t src_x + ** @param uint16_t src_y + ** @param uint16_t src_width + ** @param uint16_t src_height + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint8_t depth + ** @param uint8_t format + ** @param uint8_t send_event + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_put_image (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + xcb_gcontext_t gc /**< */, + uint16_t total_width /**< */, + uint16_t total_height /**< */, + uint16_t src_x /**< */, + uint16_t src_y /**< */, + uint16_t src_width /**< */, + uint16_t src_height /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint8_t depth /**< */, + uint8_t format /**< */, + uint8_t send_event /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_shm_get_image_cookie_t xcb_shm_get_image + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param int16_t x + ** @param int16_t y + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t plane_mask + ** @param uint8_t format + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_shm_get_image_cookie_t + ** + *****************************************************************************/ + +xcb_shm_get_image_cookie_t +xcb_shm_get_image (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + int16_t x /**< */, + int16_t y /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t plane_mask /**< */, + uint8_t format /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_shm_get_image_cookie_t xcb_shm_get_image_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param int16_t x + ** @param int16_t y + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t plane_mask + ** @param uint8_t format + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_shm_get_image_cookie_t + ** + *****************************************************************************/ + +xcb_shm_get_image_cookie_t +xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + int16_t x /**< */, + int16_t y /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t plane_mask /**< */, + uint8_t format /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_shm_get_image_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_shm_get_image_reply_t * xcb_shm_get_image_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_get_image_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shm_get_image_reply_t * + ** + *****************************************************************************/ + +xcb_shm_get_image_reply_t * +xcb_shm_get_image_reply (xcb_connection_t *c /**< */, + xcb_shm_get_image_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_create_pixmap_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_pixmap_t pid + ** @param xcb_drawable_t drawable + ** @param uint16_t width + ** @param uint16_t height + ** @param uint8_t depth + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */, + xcb_pixmap_t pid /**< */, + xcb_drawable_t drawable /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint8_t depth /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_create_pixmap + ** + ** @param xcb_connection_t *c + ** @param xcb_pixmap_t pid + ** @param xcb_drawable_t drawable + ** @param uint16_t width + ** @param uint16_t height + ** @param uint8_t depth + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_create_pixmap (xcb_connection_t *c /**< */, + xcb_pixmap_t pid /**< */, + xcb_drawable_t drawable /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint8_t depth /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/src/3rdparty/xcb/include/xcb/sync.h b/src/3rdparty/xcb/include/xcb/sync.h new file mode 100644 index 0000000000..50665c2865 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/sync.h @@ -0,0 +1,1707 @@ +/* + * This file generated automatically from sync.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_Sync_API XCB Sync API + * @brief Sync XCB Protocol Implementation. + * @{ + **/ + +#ifndef __SYNC_H +#define __SYNC_H + +#include "xcb.h" +#include "xproto.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_SYNC_MAJOR_VERSION 3 +#define XCB_SYNC_MINOR_VERSION 0 + +extern xcb_extension_t xcb_sync_id; + +typedef uint32_t xcb_sync_alarm_t; + +/** + * @brief xcb_sync_alarm_iterator_t + **/ +typedef struct xcb_sync_alarm_iterator_t { + xcb_sync_alarm_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_sync_alarm_iterator_t; + +typedef enum xcb_sync_alarmstate_t { + XCB_SYNC_ALARMSTATE_ACTIVE, + XCB_SYNC_ALARMSTATE_INACTIVE, + XCB_SYNC_ALARMSTATE_DESTROYED +} xcb_sync_alarmstate_t; + +typedef uint32_t xcb_sync_counter_t; + +/** + * @brief xcb_sync_counter_iterator_t + **/ +typedef struct xcb_sync_counter_iterator_t { + xcb_sync_counter_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_sync_counter_iterator_t; + +typedef enum xcb_sync_testtype_t { + XCB_SYNC_TESTTYPE_POSITIVE_TRANSITION, + XCB_SYNC_TESTTYPE_NEGATIVE_TRANSITION, + XCB_SYNC_TESTTYPE_POSITIVE_COMPARISON, + XCB_SYNC_TESTTYPE_NEGATIVE_COMPARISON +} xcb_sync_testtype_t; + +typedef enum xcb_sync_valuetype_t { + XCB_SYNC_VALUETYPE_ABSOLUTE, + XCB_SYNC_VALUETYPE_RELATIVE +} xcb_sync_valuetype_t; + +typedef enum xcb_sync_ca_t { + XCB_SYNC_CA_COUNTER = 1, + XCB_SYNC_CA_VALUE_TYPE = 2, + XCB_SYNC_CA_VALUE = 4, + XCB_SYNC_CA_TEST_TYPE = 8, + XCB_SYNC_CA_DELTA = 16, + XCB_SYNC_CA_EVENTS = 32 +} xcb_sync_ca_t; + +/** + * @brief xcb_sync_int64_t + **/ +typedef struct xcb_sync_int64_t { + int32_t hi; /**< */ + uint32_t lo; /**< */ +} xcb_sync_int64_t; + +/** + * @brief xcb_sync_int64_iterator_t + **/ +typedef struct xcb_sync_int64_iterator_t { + xcb_sync_int64_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_sync_int64_iterator_t; + +/** + * @brief xcb_sync_systemcounter_t + **/ +typedef struct xcb_sync_systemcounter_t { + xcb_sync_counter_t counter; /**< */ + xcb_sync_int64_t resolution; /**< */ + uint16_t name_len; /**< */ +} xcb_sync_systemcounter_t; + +/** + * @brief xcb_sync_systemcounter_iterator_t + **/ +typedef struct xcb_sync_systemcounter_iterator_t { + xcb_sync_systemcounter_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_sync_systemcounter_iterator_t; + +/** + * @brief xcb_sync_trigger_t + **/ +typedef struct xcb_sync_trigger_t { + xcb_sync_counter_t counter; /**< */ + uint32_t wait_type; /**< */ + xcb_sync_int64_t wait_value; /**< */ + uint32_t test_type; /**< */ +} xcb_sync_trigger_t; + +/** + * @brief xcb_sync_trigger_iterator_t + **/ +typedef struct xcb_sync_trigger_iterator_t { + xcb_sync_trigger_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_sync_trigger_iterator_t; + +/** + * @brief xcb_sync_waitcondition_t + **/ +typedef struct xcb_sync_waitcondition_t { + xcb_sync_trigger_t trigger; /**< */ + xcb_sync_int64_t event_threshold; /**< */ +} xcb_sync_waitcondition_t; + +/** + * @brief xcb_sync_waitcondition_iterator_t + **/ +typedef struct xcb_sync_waitcondition_iterator_t { + xcb_sync_waitcondition_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_sync_waitcondition_iterator_t; + +/** Opcode for xcb_sync_counter. */ +#define XCB_SYNC_COUNTER 0 + +/** + * @brief xcb_sync_counter_error_t + **/ +typedef struct xcb_sync_counter_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ + uint32_t bad_counter; /**< */ + uint16_t minor_opcode; /**< */ + uint8_t major_opcode; /**< */ +} xcb_sync_counter_error_t; + +/** Opcode for xcb_sync_alarm. */ +#define XCB_SYNC_ALARM 1 + +/** + * @brief xcb_sync_alarm_error_t + **/ +typedef struct xcb_sync_alarm_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ + uint32_t bad_alarm; /**< */ + uint16_t minor_opcode; /**< */ + uint8_t major_opcode; /**< */ +} xcb_sync_alarm_error_t; + +/** + * @brief xcb_sync_initialize_cookie_t + **/ +typedef struct xcb_sync_initialize_cookie_t { + unsigned int sequence; /**< */ +} xcb_sync_initialize_cookie_t; + +/** Opcode for xcb_sync_initialize. */ +#define XCB_SYNC_INITIALIZE 0 + +/** + * @brief xcb_sync_initialize_request_t + **/ +typedef struct xcb_sync_initialize_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t desired_major_version; /**< */ + uint8_t desired_minor_version; /**< */ +} xcb_sync_initialize_request_t; + +/** + * @brief xcb_sync_initialize_reply_t + **/ +typedef struct xcb_sync_initialize_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint8_t major_version; /**< */ + uint8_t minor_version; /**< */ + uint8_t pad1[22]; /**< */ +} xcb_sync_initialize_reply_t; + +/** + * @brief xcb_sync_list_system_counters_cookie_t + **/ +typedef struct xcb_sync_list_system_counters_cookie_t { + unsigned int sequence; /**< */ +} xcb_sync_list_system_counters_cookie_t; + +/** Opcode for xcb_sync_list_system_counters. */ +#define XCB_SYNC_LIST_SYSTEM_COUNTERS 1 + +/** + * @brief xcb_sync_list_system_counters_request_t + **/ +typedef struct xcb_sync_list_system_counters_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ +} xcb_sync_list_system_counters_request_t; + +/** + * @brief xcb_sync_list_system_counters_reply_t + **/ +typedef struct xcb_sync_list_system_counters_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t counters_len; /**< */ + uint8_t pad1[20]; /**< */ +} xcb_sync_list_system_counters_reply_t; + +/** Opcode for xcb_sync_create_counter. */ +#define XCB_SYNC_CREATE_COUNTER 2 + +/** + * @brief xcb_sync_create_counter_request_t + **/ +typedef struct xcb_sync_create_counter_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_counter_t id; /**< */ + xcb_sync_int64_t initial_value; /**< */ +} xcb_sync_create_counter_request_t; + +/** Opcode for xcb_sync_destroy_counter. */ +#define XCB_SYNC_DESTROY_COUNTER 6 + +/** + * @brief xcb_sync_destroy_counter_request_t + **/ +typedef struct xcb_sync_destroy_counter_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_counter_t counter; /**< */ +} xcb_sync_destroy_counter_request_t; + +/** + * @brief xcb_sync_query_counter_cookie_t + **/ +typedef struct xcb_sync_query_counter_cookie_t { + unsigned int sequence; /**< */ +} xcb_sync_query_counter_cookie_t; + +/** Opcode for xcb_sync_query_counter. */ +#define XCB_SYNC_QUERY_COUNTER 5 + +/** + * @brief xcb_sync_query_counter_request_t + **/ +typedef struct xcb_sync_query_counter_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_counter_t counter; /**< */ +} xcb_sync_query_counter_request_t; + +/** + * @brief xcb_sync_query_counter_reply_t + **/ +typedef struct xcb_sync_query_counter_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_sync_int64_t counter_value; /**< */ +} xcb_sync_query_counter_reply_t; + +/** Opcode for xcb_sync_await. */ +#define XCB_SYNC_AWAIT 7 + +/** + * @brief xcb_sync_await_request_t + **/ +typedef struct xcb_sync_await_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ +} xcb_sync_await_request_t; + +/** Opcode for xcb_sync_change_counter. */ +#define XCB_SYNC_CHANGE_COUNTER 4 + +/** + * @brief xcb_sync_change_counter_request_t + **/ +typedef struct xcb_sync_change_counter_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_counter_t counter; /**< */ + xcb_sync_int64_t amount; /**< */ +} xcb_sync_change_counter_request_t; + +/** Opcode for xcb_sync_set_counter. */ +#define XCB_SYNC_SET_COUNTER 3 + +/** + * @brief xcb_sync_set_counter_request_t + **/ +typedef struct xcb_sync_set_counter_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_counter_t counter; /**< */ + xcb_sync_int64_t value; /**< */ +} xcb_sync_set_counter_request_t; + +/** Opcode for xcb_sync_create_alarm. */ +#define XCB_SYNC_CREATE_ALARM 8 + +/** + * @brief xcb_sync_create_alarm_request_t + **/ +typedef struct xcb_sync_create_alarm_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_alarm_t id; /**< */ + uint32_t value_mask; /**< */ +} xcb_sync_create_alarm_request_t; + +/** Opcode for xcb_sync_change_alarm. */ +#define XCB_SYNC_CHANGE_ALARM 9 + +/** + * @brief xcb_sync_change_alarm_request_t + **/ +typedef struct xcb_sync_change_alarm_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_alarm_t id; /**< */ + uint32_t value_mask; /**< */ +} xcb_sync_change_alarm_request_t; + +/** Opcode for xcb_sync_destroy_alarm. */ +#define XCB_SYNC_DESTROY_ALARM 11 + +/** + * @brief xcb_sync_destroy_alarm_request_t + **/ +typedef struct xcb_sync_destroy_alarm_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_alarm_t alarm; /**< */ +} xcb_sync_destroy_alarm_request_t; + +/** + * @brief xcb_sync_query_alarm_cookie_t + **/ +typedef struct xcb_sync_query_alarm_cookie_t { + unsigned int sequence; /**< */ +} xcb_sync_query_alarm_cookie_t; + +/** Opcode for xcb_sync_query_alarm. */ +#define XCB_SYNC_QUERY_ALARM 10 + +/** + * @brief xcb_sync_query_alarm_request_t + **/ +typedef struct xcb_sync_query_alarm_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_sync_alarm_t alarm; /**< */ +} xcb_sync_query_alarm_request_t; + +/** + * @brief xcb_sync_query_alarm_reply_t + **/ +typedef struct xcb_sync_query_alarm_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_sync_trigger_t trigger; /**< */ + xcb_sync_int64_t delta; /**< */ + uint8_t events; /**< */ + uint8_t state; /**< */ + uint8_t pad1[2]; /**< */ +} xcb_sync_query_alarm_reply_t; + +/** Opcode for xcb_sync_set_priority. */ +#define XCB_SYNC_SET_PRIORITY 12 + +/** + * @brief xcb_sync_set_priority_request_t + **/ +typedef struct xcb_sync_set_priority_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint32_t id; /**< */ + int32_t priority; /**< */ +} xcb_sync_set_priority_request_t; + +/** + * @brief xcb_sync_get_priority_cookie_t + **/ +typedef struct xcb_sync_get_priority_cookie_t { + unsigned int sequence; /**< */ +} xcb_sync_get_priority_cookie_t; + +/** Opcode for xcb_sync_get_priority. */ +#define XCB_SYNC_GET_PRIORITY 13 + +/** + * @brief xcb_sync_get_priority_request_t + **/ +typedef struct xcb_sync_get_priority_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint32_t id; /**< */ +} xcb_sync_get_priority_request_t; + +/** + * @brief xcb_sync_get_priority_reply_t + **/ +typedef struct xcb_sync_get_priority_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + int32_t priority; /**< */ +} xcb_sync_get_priority_reply_t; + +/** Opcode for xcb_sync_counter_notify. */ +#define XCB_SYNC_COUNTER_NOTIFY 0 + +/** + * @brief xcb_sync_counter_notify_event_t + **/ +typedef struct xcb_sync_counter_notify_event_t { + uint8_t response_type; /**< */ + uint8_t kind; /**< */ + uint16_t sequence; /**< */ + xcb_sync_counter_t counter; /**< */ + xcb_sync_int64_t wait_value; /**< */ + xcb_sync_int64_t counter_value; /**< */ + xcb_timestamp_t timestamp; /**< */ + uint16_t count; /**< */ + uint8_t destroyed; /**< */ + uint8_t pad0; /**< */ +} xcb_sync_counter_notify_event_t; + +/** Opcode for xcb_sync_alarm_notify. */ +#define XCB_SYNC_ALARM_NOTIFY 1 + +/** + * @brief xcb_sync_alarm_notify_event_t + **/ +typedef struct xcb_sync_alarm_notify_event_t { + uint8_t response_type; /**< */ + uint8_t kind; /**< */ + uint16_t sequence; /**< */ + xcb_sync_alarm_t alarm; /**< */ + xcb_sync_int64_t counter_value; /**< */ + xcb_sync_int64_t alarm_value; /**< */ + xcb_timestamp_t timestamp; /**< */ + uint8_t state; /**< */ + uint8_t pad0[3]; /**< */ +} xcb_sync_alarm_notify_event_t; + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_alarm_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_alarm_t) + */ + +/***************************************************************************** + ** + ** void xcb_sync_alarm_next + ** + ** @param xcb_sync_alarm_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_alarm_next (xcb_sync_alarm_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_alarm_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_alarm_end + ** + ** @param xcb_sync_alarm_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_alarm_end (xcb_sync_alarm_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_counter_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_counter_t) + */ + +/***************************************************************************** + ** + ** void xcb_sync_counter_next + ** + ** @param xcb_sync_counter_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_counter_next (xcb_sync_counter_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_counter_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_counter_end + ** + ** @param xcb_sync_counter_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_counter_end (xcb_sync_counter_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_int64_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_int64_t) + */ + +/***************************************************************************** + ** + ** void xcb_sync_int64_next + ** + ** @param xcb_sync_int64_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_int64_next (xcb_sync_int64_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_int64_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_int64_end + ** + ** @param xcb_sync_int64_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_int64_end (xcb_sync_int64_iterator_t i /**< */); + + +/***************************************************************************** + ** + ** char * xcb_sync_systemcounter_name + ** + ** @param const xcb_sync_systemcounter_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_sync_systemcounter_name_length + ** + ** @param const xcb_sync_systemcounter_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_systemcounter_name_end + ** + ** @param const xcb_sync_systemcounter_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_t *R /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_systemcounter_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_systemcounter_t) + */ + +/***************************************************************************** + ** + ** void xcb_sync_systemcounter_next + ** + ** @param xcb_sync_systemcounter_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_systemcounter_next (xcb_sync_systemcounter_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_systemcounter_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_systemcounter_end + ** + ** @param xcb_sync_systemcounter_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_trigger_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_trigger_t) + */ + +/***************************************************************************** + ** + ** void xcb_sync_trigger_next + ** + ** @param xcb_sync_trigger_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_trigger_next (xcb_sync_trigger_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_trigger_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_trigger_end + ** + ** @param xcb_sync_trigger_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_trigger_end (xcb_sync_trigger_iterator_t i /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_sync_waitcondition_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_sync_waitcondition_t) + */ + +/***************************************************************************** + ** + ** void xcb_sync_waitcondition_next + ** + ** @param xcb_sync_waitcondition_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_sync_waitcondition_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_waitcondition_end + ** + ** @param xcb_sync_waitcondition_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_sync_initialize_cookie_t xcb_sync_initialize + ** + ** @param xcb_connection_t *c + ** @param uint8_t desired_major_version + ** @param uint8_t desired_minor_version + ** @returns xcb_sync_initialize_cookie_t + ** + *****************************************************************************/ + +xcb_sync_initialize_cookie_t +xcb_sync_initialize (xcb_connection_t *c /**< */, + uint8_t desired_major_version /**< */, + uint8_t desired_minor_version /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_sync_initialize_cookie_t xcb_sync_initialize_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint8_t desired_major_version + ** @param uint8_t desired_minor_version + ** @returns xcb_sync_initialize_cookie_t + ** + *****************************************************************************/ + +xcb_sync_initialize_cookie_t +xcb_sync_initialize_unchecked (xcb_connection_t *c /**< */, + uint8_t desired_major_version /**< */, + uint8_t desired_minor_version /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_initialize_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_sync_initialize_reply_t * xcb_sync_initialize_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_initialize_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_initialize_reply_t * + ** + *****************************************************************************/ + +xcb_sync_initialize_reply_t * +xcb_sync_initialize_reply (xcb_connection_t *c /**< */, + xcb_sync_initialize_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters + ** + ** @param xcb_connection_t *c + ** @returns xcb_sync_list_system_counters_cookie_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_sync_list_system_counters_cookie_t + ** + *****************************************************************************/ + +xcb_sync_list_system_counters_cookie_t +xcb_sync_list_system_counters_unchecked (xcb_connection_t *c /**< */); + + +/***************************************************************************** + ** + ** int xcb_sync_list_system_counters_counters_length + ** + ** @param const xcb_sync_list_system_counters_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_sync_systemcounter_iterator_t xcb_sync_list_system_counters_counters_iterator + ** + ** @param const xcb_sync_list_system_counters_reply_t *R + ** @returns xcb_sync_systemcounter_iterator_t + ** + *****************************************************************************/ + +xcb_sync_systemcounter_iterator_t +xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_list_system_counters_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_sync_list_system_counters_reply_t * xcb_sync_list_system_counters_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_list_system_counters_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_list_system_counters_reply_t * + ** + *****************************************************************************/ + +xcb_sync_list_system_counters_reply_t * +xcb_sync_list_system_counters_reply (xcb_connection_t *c /**< */, + xcb_sync_list_system_counters_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t id + ** @param xcb_sync_int64_t initial_value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_counter_checked (xcb_connection_t *c /**< */, + xcb_sync_counter_t id /**< */, + xcb_sync_int64_t initial_value /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t id + ** @param xcb_sync_int64_t initial_value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t id /**< */, + xcb_sync_int64_t initial_value /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_sync_query_counter_cookie_t xcb_sync_query_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_sync_query_counter_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_counter_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_sync_query_counter_cookie_t xcb_sync_query_counter_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_sync_query_counter_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_counter_cookie_t +xcb_sync_query_counter_unchecked (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_query_counter_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_sync_query_counter_reply_t * xcb_sync_query_counter_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_query_counter_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_query_counter_reply_t * + ** + *****************************************************************************/ + +xcb_sync_query_counter_reply_t * +xcb_sync_query_counter_reply (xcb_connection_t *c /**< */, + xcb_sync_query_counter_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_await_checked + ** + ** @param xcb_connection_t *c + ** @param uint32_t wait_list_len + ** @param const xcb_sync_waitcondition_t *wait_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_await_checked (xcb_connection_t *c /**< */, + uint32_t wait_list_len /**< */, + const xcb_sync_waitcondition_t *wait_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_await + ** + ** @param xcb_connection_t *c + ** @param uint32_t wait_list_len + ** @param const xcb_sync_waitcondition_t *wait_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_await (xcb_connection_t *c /**< */, + uint32_t wait_list_len /**< */, + const xcb_sync_waitcondition_t *wait_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t amount + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_counter_checked (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t amount /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t amount + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t amount /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_counter_checked (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t value /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t value /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_alarm_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_alarm_checked (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_alarm (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_alarm_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_alarm_checked (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_alarm (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_alarm_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_sync_query_alarm_cookie_t xcb_sync_query_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_sync_query_alarm_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_alarm_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_sync_query_alarm_cookie_t xcb_sync_query_alarm_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_sync_query_alarm_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_alarm_cookie_t +xcb_sync_query_alarm_unchecked (xcb_connection_t *c /**< */, + xcb_sync_alarm_t alarm /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_query_alarm_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_sync_query_alarm_reply_t * xcb_sync_query_alarm_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_query_alarm_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_query_alarm_reply_t * + ** + *****************************************************************************/ + +xcb_sync_query_alarm_reply_t * +xcb_sync_query_alarm_reply (xcb_connection_t *c /**< */, + xcb_sync_query_alarm_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_priority_checked + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @param int32_t priority + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_priority_checked (xcb_connection_t *c /**< */, + uint32_t id /**< */, + int32_t priority /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_priority + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @param int32_t priority + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_priority (xcb_connection_t *c /**< */, + uint32_t id /**< */, + int32_t priority /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_sync_get_priority_cookie_t xcb_sync_get_priority + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @returns xcb_sync_get_priority_cookie_t + ** + *****************************************************************************/ + +xcb_sync_get_priority_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_sync_get_priority_cookie_t xcb_sync_get_priority_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @returns xcb_sync_get_priority_cookie_t + ** + *****************************************************************************/ + +xcb_sync_get_priority_cookie_t +xcb_sync_get_priority_unchecked (xcb_connection_t *c /**< */, + uint32_t id /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_sync_get_priority_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_sync_get_priority_reply_t * xcb_sync_get_priority_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_get_priority_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_get_priority_reply_t * + ** + *****************************************************************************/ + +xcb_sync_get_priority_reply_t * +xcb_sync_get_priority_reply (xcb_connection_t *c /**< */, + xcb_sync_get_priority_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_atom.h b/src/3rdparty/xcb/include/xcb/xcb_atom.h new file mode 100644 index 0000000000..d5c4d6baa7 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_atom.h @@ -0,0 +1,18 @@ +#ifndef __XCB_ATOM_H__ +#define __XCB_ATOM_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +char *xcb_atom_name_by_screen(const char *base, uint8_t screen); +char *xcb_atom_name_by_resource(const char *base, uint32_t resource); +char *xcb_atom_name_unique(const char *base, uint32_t id); + +#ifdef __cplusplus +} +#endif + +#endif /* __XCB_ATOM_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_aux.h b/src/3rdparty/xcb/include/xcb/xcb_aux.h new file mode 100644 index 0000000000..d49d4383e9 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_aux.h @@ -0,0 +1,214 @@ +#ifndef __XCB_AUX_H__ +#define __XCB_AUX_H__ + + +#ifdef __cplusplus +extern "C" { +#endif + + +uint8_t xcb_aux_get_depth (xcb_connection_t *c, + xcb_screen_t *screen); + +uint8_t xcb_aux_get_depth_of_visual (xcb_screen_t *screen, + xcb_visualid_t id); + +xcb_screen_t *xcb_aux_get_screen (xcb_connection_t *c, + int screen); + +xcb_visualtype_t *xcb_aux_get_visualtype (xcb_connection_t *c, + int screen, + xcb_visualid_t vid); + +xcb_visualtype_t * +xcb_aux_find_visual_by_id (xcb_screen_t *screen, + xcb_visualid_t id); + +xcb_visualtype_t * +xcb_aux_find_visual_by_attrs (xcb_screen_t *screen, + int8_t class_, + int8_t depth); + +void xcb_aux_sync (xcb_connection_t *c); + +/* internal helper macro for XCB_AUX_ADD_PARAM +It gives the offset of the field 'param' in the structure pointed to by +'paramsp' in multiples of an uint32_t's size. */ +#define XCB_AUX_INTERNAL_OFFSETOF(paramsp, param) \ + ((uint32_t const*)(&((paramsp)->param))-(uint32_t const*)(paramsp)) + +/* add an optional parameter to an xcb_params_* structure +parameters: + maskp: pointer to bitmask whos bits mark used parameters + paramsp: pointer to structure with parameters + param: parameter to set + value: value to set the parameter to +*/ +#define XCB_AUX_ADD_PARAM(maskp, paramsp, param, value) \ + ((*(maskp)|=1<param=(value))) + +typedef struct { + uint32_t back_pixmap; + uint32_t back_pixel; + uint32_t border_pixmap; + uint32_t border_pixel; + uint32_t bit_gravity; + uint32_t win_gravity; + uint32_t backing_store; + uint32_t backing_planes; + uint32_t backing_pixel; + uint32_t override_redirect; + uint32_t save_under; + uint32_t event_mask; + uint32_t dont_propagate; + uint32_t colormap; + uint32_t cursor; +} xcb_params_cw_t; + +xcb_void_cookie_t +xcb_aux_create_window (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t class_, + xcb_visualid_t visual, + uint32_t mask, + const xcb_params_cw_t *params); + +xcb_void_cookie_t +xcb_aux_create_window_checked (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t class_, + xcb_visualid_t visual, + uint32_t mask, + const xcb_params_cw_t *params); + +xcb_void_cookie_t +xcb_aux_change_window_attributes (xcb_connection_t *c, + xcb_window_t window, + uint32_t mask, + const xcb_params_cw_t *params); + +xcb_void_cookie_t +xcb_aux_change_window_attributes_checked (xcb_connection_t *c, + xcb_window_t window, + uint32_t mask, + const xcb_params_cw_t *params); + +typedef struct { + int32_t x; + int32_t y; + uint32_t width; + uint32_t height; + uint32_t border_width; + uint32_t sibling; + uint32_t stack_mode; +} xcb_params_configure_window_t; + +xcb_void_cookie_t +xcb_aux_configure_window (xcb_connection_t *c, + xcb_window_t window, + uint16_t mask, + const xcb_params_configure_window_t *params); + +typedef struct { + uint32_t function; + uint32_t plane_mask; + uint32_t foreground; + uint32_t background; + uint32_t line_width; + uint32_t line_style; + uint32_t cap_style; + uint32_t join_style; + uint32_t fill_style; + uint32_t fill_rule; + uint32_t tile; + uint32_t stipple; + uint32_t tile_stipple_origin_x; + uint32_t tile_stipple_origin_y; + uint32_t font; + uint32_t subwindow_mode; + uint32_t graphics_exposures; + uint32_t clip_originX; + uint32_t clip_originY; + uint32_t mask; + uint32_t dash_offset; + uint32_t dash_list; + uint32_t arc_mode; +} xcb_params_gc_t; + +xcb_void_cookie_t +xcb_aux_create_gc (xcb_connection_t *c, + xcb_gcontext_t cid, + xcb_drawable_t drawable, + uint32_t mask, + const xcb_params_gc_t *params); + +xcb_void_cookie_t +xcb_aux_create_gc_checked (xcb_connection_t *c, + xcb_gcontext_t gid, + xcb_drawable_t drawable, + uint32_t mask, + const xcb_params_gc_t *params); +xcb_void_cookie_t +xcb_aux_change_gc (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t mask, + const xcb_params_gc_t *params); + +xcb_void_cookie_t +xcb_aux_change_gc_checked (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t mask, + const xcb_params_gc_t *params); +typedef struct { + uint32_t key_click_percent; + uint32_t bell_percent; + uint32_t bell_pitch; + uint32_t bell_duration; + uint32_t led; + uint32_t led_mode; + uint32_t key; + uint32_t auto_repeat_mode; +} xcb_params_keyboard_t; + +xcb_void_cookie_t +xcb_aux_change_keyboard_control (xcb_connection_t *c, + uint32_t mask, + const xcb_params_keyboard_t *params); + +int +xcb_aux_parse_color(char *color_name, + uint16_t *red, uint16_t *green, uint16_t *blue); + +xcb_void_cookie_t +xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy, + xcb_gcontext_t gc, + uint16_t linewidth, + int32_t linestyle, + int32_t capstyle, + int32_t joinstyle); + +xcb_void_cookie_t +xcb_aux_clear_window(xcb_connection_t * dpy, + xcb_window_t w); + +#ifdef __cplusplus +} +#endif + + +#endif /* __XCB_AUX_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_bitops.h b/src/3rdparty/xcb/include/xcb/xcb_bitops.h new file mode 100644 index 0000000000..a6872a1f30 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_bitops.h @@ -0,0 +1,212 @@ +#ifndef __XCB_BITOPS_H__ +#define __XCB_BITOPS_H__ + +/* Copyright (C) 2007 Bart Massey + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or their + * institutions shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the authors. + */ + +#include +#include +#include + +/** + * @defgroup xcb__bitops XCB Bit Operations + * + * Inline functions for common bit ops used in XCB and elsewhere. + * + * @{ + */ + + +/** + * Create a low-order bitmask. + * @param n Mask size. + * @return Mask. + * + * Create a bitmask with the lower @p n bits set and the + * rest of the word clear. + * @ingroup xcb__bitops + */ +_X_INLINE static uint32_t +xcb_mask(uint32_t n) +{ + return n == 32 ? ~0 : (1 << n) - 1; +} + + +/** + * Population count. + * @param n Integer representing a bitset. + * @return Number of 1 bits in the bitset. + * + * This is a reasonably fast algorithm for counting the bits + * in a 32-bit word. Currently a classic binary + * divide-and-conquer popcount: popcount_2() from + * http://en.wikipedia.org/wiki/Hamming_weight. + * @ingroup xcb__bitops + */ + + +/* 15 ops, 3 long immediates, 14 stages, 9 alu ops, 9 alu stages */ +_X_INLINE static uint32_t +xcb_popcount(uint32_t x) +{ + uint32_t m1 = 0x55555555; + uint32_t m2 = 0x33333333; + uint32_t m4 = 0x0f0f0f0f; + x -= (x >> 1) & m1; + x = (x & m2) + ((x >> 2) & m2); + x = (x + (x >> 4)) & m4; + x += x >> 8; + return (x + (x >> 16)) & 0x3f; +} + + +/** + * Round up to the next power-of-two unit size. + * @param base Number to be rounded up. + * @param pad Multiple to be rounded to; must be a power of two. + * @return Rounded-up number. + * + * Rounds @p base up to a multiple of @p pad, where @p pad + * is a power of two. The more general case is handled by + * xcb_roundup(). + * @ingroup xcb__bitops + */ +_X_INLINE static uint32_t +xcb_roundup_2 (uint32_t base, uint32_t pad) +{ + return (base + pad - 1) & -pad; +} + +/** + * Round down to the next power-of-two unit size. + * @param base Number to be rounded down. + * @param pad Multiple to be rounded to; must be a power of two. + * @return Rounded-down number. + * + * Rounds @p base down to a multiple of @p pad, where @p pad + * is a power of two. The more general case is handled by + * xcb_rounddown(). + * @ingroup xcb__bitops + */ +_X_INLINE static uint32_t +xcb_rounddown_2 (uint32_t base, uint32_t pad) +{ + return base & -pad; +} + +/** + * Round up to the next unit size. + * @param base Number to be rounded up. + * @param pad Multiple to be rounded to. + * @return Rounded-up number. + * + * This is a general routine for rounding @p base up + * to a multiple of @p pad. If you know that @p pad + * is a power of two, you should probably call xcb_roundup_2() + * instead. + * @ingroup xcb__bitops + */ +_X_INLINE static uint32_t +xcb_roundup (uint32_t base, uint32_t pad) +{ + uint32_t b = base + pad - 1; + /* faster if pad is a power of two */ + if (((pad - 1) & pad) == 0) + return b & -pad; + return b - b % pad; +} + + +/** + * Round down to the next unit size. + * @param base Number to be rounded down. + * @param pad Multiple to be rounded to. + * @return Rounded-down number. + * + * This is a general routine for rounding @p base down + * to a multiple of @p pad. If you know that @p pad + * is a power of two, you should probably call xcb_rounddown_2() + * instead. + * @ingroup xcb__bitops + */ +_X_INLINE static uint32_t +xcb_rounddown (uint32_t base, uint32_t pad) +{ + /* faster if pad is a power of two */ + if (((pad - 1) & pad) == 0) + return base & -pad; + return base - base % pad; +} + + +/** + * Reverse bits of word. + * @param x Target word. + * @param n Number of low-order bits to reverse. + * @return Word with low @p n bits reversed, all others 0. + * + * Reverses the bottom @p n bits of @p x. + * @ingroup xcb__bitops + */ +_X_INLINE static uint32_t +xcb_bit_reverse(uint32_t x, uint8_t n) { + uint32_t m1 = 0x00ff00ff; + uint32_t m2 = 0x0f0f0f0f; + uint32_t m3 = 0x33333333; + uint32_t m4 = 0x55555555; + x = ((x << 16) | (x >> 16)); + x = ((x & m1) << 8) | ((x >> 8) & m1); + x = ((x & m2) << 4) | ((x >> 4) & m2); + x = ((x & m3) << 2) | ((x >> 2) & m3); + x = ((x & m4) << 1) | ((x >> 1) & m4); + x >>= 32 - n; + return x; +} + + +/** + * Host byte order. + * @return The byte order of the host. + * + * Tests the host's byte order and returns either + * XCB_IMAGE_ORDER_MSB_FIRST or XCB_IMAGE_ORDER_LSB_FIRST + * as appropriate. + * @ingroup xcb__bitops + */ +_X_INLINE static xcb_image_order_t +xcb_host_byte_order(void) { + uint32_t endian_test = 0x01020304; + + switch (*(char *)&endian_test) { + case 0x01: + return XCB_IMAGE_ORDER_MSB_FIRST; + case 0x04: + return XCB_IMAGE_ORDER_LSB_FIRST; + } + assert(0); +} + +#endif /* __XCB_BITOPS_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_event.h b/src/3rdparty/xcb/include/xcb/xcb_event.h new file mode 100644 index 0000000000..ee911fce51 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_event.h @@ -0,0 +1,90 @@ +/* + * Copyright (C) 2008-2009 Julien Danjou + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or + * their institutions shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from the authors. + */ + +/** + * @defgroup xcb__event_t XCB Event Functions + * + * These functions ease the handling of X events received. + * + * @{ + */ + +#ifndef __XCB_EVENT_H__ +#define __XCB_EVENT_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Bit mask to find event type regardless of event source. + * + * Each event in the X11 protocol contains an 8-bit type code. + * The most-significant bit in this code is set if the event was + * generated from a SendEvent request. This mask can be used to + * determine the type of event regardless of how the event was + * generated. See the X11R6 protocol specification for details. + */ +#define XCB_EVENT_RESPONSE_TYPE_MASK (0x7f) +#define XCB_EVENT_RESPONSE_TYPE(e) (e->response_type & XCB_EVENT_RESPONSE_TYPE_MASK) +#define XCB_EVENT_SENT(e) (e->response_type & ~XCB_EVENT_RESPONSE_TYPE_MASK) + +/** + * @brief Convert an event response type to a label. + * @param type The event type. + * @return A string with the event name, or NULL if unknown. + */ +const char * xcb_event_get_label(uint8_t type); + +/** + * @brief Convert an event error type to a label. + * @param type The error type. + * @return A string with the event name, or NULL if unknown or if the event is + * not an error. + */ +const char * xcb_event_get_error_label(uint8_t type); + +/** + * @brief Convert an event request type to a label. + * @param type The request type. + * @return A string with the event name, or NULL if unknown or if the event is + * not an error. + */ +const char * xcb_event_get_request_label(uint8_t type); + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#endif /* __XCB_EVENT_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_icccm.h b/src/3rdparty/xcb/include/xcb/xcb_icccm.h new file mode 100644 index 0000000000..449a5c88ca --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_icccm.h @@ -0,0 +1,1049 @@ +#ifndef __XCB_ICCCM_H__ +#define __XCB_ICCCM_H__ + +/* + * Copyright (C) 2008 Arnaud Fontaine + * Copyright (C) 2007-2008 Vincent Torri + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or + * their institutions shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from the authors. + */ + +/** + * @defgroup xcb__icccm_t XCB ICCCM Functions + * + * These functions allow easy handling of the protocol described in the + * Inter-Client Communication Conventions Manual. + * + * @{ + */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief TextProperty reply structure. + */ +typedef struct { +/** Store reply to avoid memory allocation, should normally not be + used directly */ +xcb_get_property_reply_t *_reply; +/** Encoding used */ +xcb_atom_t encoding; +/** Length of the name field above */ +uint32_t name_len; +/** Property value */ +char *name; +/** Format, may be 8, 16 or 32 */ +uint8_t format; +} xcb_icccm_get_text_property_reply_t; + +/** + * @brief Deliver a GetProperty request to the X server. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param property Property atom to get. + * @return The request cookie. + * + * Allow to get a window property, in most case you might want to use + * above functions to get an ICCCM property for a given window. + */ +xcb_get_property_cookie_t xcb_icccm_get_text_property(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +/** + * @see xcb_icccm_get_text_property() + */ +xcb_get_property_cookie_t xcb_icccm_get_text_property_unchecked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +/** + * @brief Fill given structure with the property value of a window. + * @param c The connection to the X server. + * @param cookie TextProperty request cookie. + * @param prop TextProperty reply which is to be filled. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * If the function return 0 (failure), the content of prop is unmodified and + * therefore the structure must not be wiped. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_text_property_unchecked() is used. Otherwise, it stores + * the error if any. prop structure members should be freed by + * xcb_icccm_get_text_property_reply_wipe(). + */ +uint8_t xcb_icccm_get_text_property_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e); + +/** + * @brief Wipe prop structure members previously allocated by + * xcb_icccm_get_text_property_reply(). + * @param prop prop structure whose members is going to be freed. + */ +void xcb_icccm_get_text_property_reply_wipe(xcb_icccm_get_text_property_reply_t *prop); + +/* WM_NAME */ + +/** + * @brief Deliver a SetProperty request to set WM_NAME property value. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type. + * @param format Encoding format. + * @param name_len Length of name value to set. + * @param name Name value to set. + */ +xcb_void_cookie_t xcb_icccm_set_wm_name_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t encoding, + uint8_t format, + uint32_t name_len, + const char *name); + +/** + * @see xcb_icccm_set_wm_name_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_name(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t encoding, uint8_t format, + uint32_t name_len, const char *name); + +/** + * @brief Deliver a GetProperty request to the X server for WM_NAME. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_name(xcb_connection_t *c, + xcb_window_t window); + +/** + * @see xcb_icccm_get_wm_name() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_name_unchecked(xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Fill given structure with the WM_NAME property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param prop WM_NAME property value. + * @param e Error if any. + * @see xcb_icccm_get_text_property_reply() + * @return Return 1 on success, 0 otherwise. + */ +uint8_t xcb_icccm_get_wm_name_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e); + +/* WM_ICON_NAME */ + +/** + * @brief Deliver a SetProperty request to set WM_ICON_NAME property value. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type. + * @param format Encoding format. + * @param name_len Length of name value to set. + * @param name Name value to set. + */ +xcb_void_cookie_t xcb_icccm_set_wm_icon_name_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t encoding, + uint8_t format, + uint32_t name_len, + const char *name); + +/** + * @see xcb_icccm_set_wm_icon_name_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_icon_name(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t encoding, + uint8_t format, + uint32_t name_len, + const char *name); + +/** + * @brief Send request to get WM_ICON_NAME property of a window. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_icon_name(xcb_connection_t *c, + xcb_window_t window); + +/** + * @see xcb_icccm_get_wm_icon_name() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_icon_name_unchecked(xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Fill given structure with the WM_ICON_NAME property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param prop WM_ICON_NAME property value. + * @param e Error if any. + * @see xcb_icccm_get_text_property_reply() + * @return Return 1 on success, 0 otherwise. + */ +uint8_t xcb_icccm_get_wm_icon_name_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e); + +/* WM_COLORMAP_WINDOWS */ + +/** + * @brief Deliver a ChangeProperty request to set WM_COLORMAP_WINDOWS property value. + * @param c The connection to the X server. + * @param wm_colormap_windows The WM_COLORMAP_WINDOWS atom + * @param window Window X identifier. + * @param list_len Windows list len. + * @param list Windows list. + * @return The request cookie. + */ +xcb_void_cookie_t xcb_icccm_set_wm_colormap_windows_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom, + uint32_t list_len, + const xcb_window_t *list); + +/** + * @see xcb_icccm_set_wm_colormap_windows_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_colormap_windows(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom, + uint32_t list_len, + const xcb_window_t *list); + +/** + * @brief WM_COLORMAP_WINDOWS structure. + */ +typedef struct { +/** Length of the windows list */ +uint32_t windows_len; +/** Windows list */ +xcb_window_t *windows; +/** Store reply to avoid memory allocation, should normally not be + used directly */ +xcb_get_property_reply_t *_reply; +} xcb_icccm_get_wm_colormap_windows_reply_t; + +/** + * @brief Send request to get WM_COLORMAP_WINDOWS property of a given window. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_colormap_windows(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom); + +/** + * @see xcb_icccm_get_wm_colormap_windows() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_colormap_windows_unchecked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom); + +/** + * @brief Fill the given structure with the WM_COLORMAP_WINDOWS property of a window. + * @param reply The reply of the GetProperty request. + * @param colormap_windows WM_COLORMAP property value. + * @return Return 1 on success, 0 otherwise. + * + * protocols structure members should be freed by + * xcb_icccm_get_wm_protocols_reply_wipe(). + */ +uint8_t xcb_icccm_get_wm_colormap_windows_from_reply(xcb_get_property_reply_t *reply, + xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows); +/** + * @brief Fill the given structure with the WM_COLORMAP_WINDOWS property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param protocols WM_COLORMAP_WINDOWS property value. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_wm_colormap_windows_unchecked() is used. Otherwise, it + * stores the error if any. protocols structure members should be + * freed by xcb_icccm_get_wm_colormap_windows_reply_wipe(). + */ +uint8_t xcb_icccm_get_wm_colormap_windows_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_wm_colormap_windows_reply_t *windows, + xcb_generic_error_t **e); + +/** + * @brief Wipe protocols structure members previously allocated by + * xcb_icccm_get_wm_colormap_windows_reply(). + * @param windows windows structure whose members is going to be freed. + */ +void xcb_icccm_get_wm_colormap_windows_reply_wipe(xcb_icccm_get_wm_colormap_windows_reply_t *windows); + +/* WM_CLIENT_MACHINE */ + +/** + * @brief Deliver a SetProperty request to set WM_CLIENT_MACHINE property value. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type. + * @param format Encoding format. + * @param name_len Length of name value to set. + * @param name Name value to set. + */ +xcb_void_cookie_t xcb_icccm_set_wm_client_machine_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t encoding, + uint8_t format, + uint32_t name_len, + const char *name); + +/** + * @see xcb_icccm_set_wm_client_machine_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_client_machine(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t encoding, + uint8_t format, + uint32_t name_len, + const char *name); + +/** + * @brief Send request to get WM_CLIENT_MACHINE property of a window. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_client_machine(xcb_connection_t *c, + xcb_window_t window); + +/** + * @see xcb_icccm_get_wm_client_machine() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_client_machine_unchecked(xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Fill given structure with the WM_CLIENT_MACHINE property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param prop WM_CLIENT_MACHINE property value. + * @param e Error if any. + * @see xcb_icccm_get_text_property_reply() + * @return Return 1 on success, 0 otherwise. + */ +uint8_t xcb_icccm_get_wm_client_machine_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e); + +/* WM_CLASS */ + +/** + * @brief WM_CLASS hint structure + */ + +/** + * @brief Deliver a SetProperty request to set WM_CLASS property value. + * + * WM_CLASS string is a concatenation of the instance and class name + * strings respectively (including null character). + * + * @param c The connection to the X server. + * @param window Window X identifier. + * @param class_len Length of WM_CLASS string. + * @param class_name WM_CLASS string. + * @return The request cookie. + */ +xcb_void_cookie_t xcb_icccm_set_wm_class_checked(xcb_connection_t *c, + xcb_window_t window, + uint32_t class_len, + const char *class_name); + +/** + * @see xcb_icccm_set_wm_class_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_class(xcb_connection_t *c, + xcb_window_t window, + uint32_t class_len, + const char *class_name); + +typedef struct { +/** Instance name */ +char *instance_name; +/** Class of application */ +char *class_name; +/** Store reply to avoid memory allocation, should normally not be + used directly */ +xcb_get_property_reply_t *_reply; +} xcb_icccm_get_wm_class_reply_t; + +/** + * @brief Deliver a GetProperty request to the X server for WM_CLASS. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_class(xcb_connection_t *c, + xcb_window_t window); + +/** + * @see xcb_icccm_get_wm_class() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_class_unchecked(xcb_connection_t *c, + xcb_window_t window); + + +/** + * @brief Fill give structure with the WM_CLASS property of a window. + * @param prop The property structure to fill. + * @param reply The property request reply. + * @return Return 1 on success, 0 otherwise. + */ +uint8_t +xcb_icccm_get_wm_class_from_reply(xcb_icccm_get_wm_class_reply_t *prop, + xcb_get_property_reply_t *reply); + +/** + * @brief Fill given structure with the WM_CLASS property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param prop WM_CLASS property value. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_wm_class_unchecked() is used. Otherwise, it stores the + * error if any. prop structure members should be freed by + * xcb_icccm_get_wm_class_reply_wipe(). + */ +uint8_t xcb_icccm_get_wm_class_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_wm_class_reply_t *prop, + xcb_generic_error_t **e); + +/** + * @brief Wipe prop structure members previously allocated by + * xcb_icccm_get_wm_class_reply(). + * @param prop prop structure whose members is going to be freed. + */ +void xcb_icccm_get_wm_class_reply_wipe(xcb_icccm_get_wm_class_reply_t *prop); + +/* WM_TRANSIENT_FOR */ + +/** + * @brief Deliver a SetProperty request to set WM_TRANSIENT_FOR property value. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param transient_for_window The WM_TRANSIENT_FOR window X identifier. + * @return The request cookie. + */ +xcb_void_cookie_t xcb_icccm_set_wm_transient_for_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_window_t transient_for_window); + +/** + * @see xcb_icccm_set_wm_transient_for + */ +xcb_void_cookie_t xcb_icccm_set_wm_transient_for(xcb_connection_t *c, + xcb_window_t window, + xcb_window_t transient_for_window); + +/** + * @brief Send request to get WM_TRANSIENT_FOR property of a window. + * @param c The connection to the X server + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_transient_for(xcb_connection_t *c, + xcb_window_t window); + +/** + * @see xcb_icccm_get_wm_transient_for_unchecked() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_transient_for_unchecked(xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Fill given window pointer with the WM_TRANSIENT_FOR property of a window. + * @param prop WM_TRANSIENT_FOR property value. + * @param reply The get property request reply. + * @return Return 1 on success, 0 otherwise. + */ +uint8_t +xcb_icccm_get_wm_transient_for_from_reply(xcb_window_t *prop, + xcb_get_property_reply_t *reply); +/** + * @brief Fill given structure with the WM_TRANSIENT_FOR property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param prop WM_TRANSIENT_FOR property value. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_wm_transient_for_unchecked() is used. Otherwise, it stores + * the error if any. + */ +uint8_t xcb_icccm_get_wm_transient_for_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_window_t *prop, + xcb_generic_error_t **e); + +/* WM_SIZE_HINTS */ + +typedef enum { +XCB_ICCCM_SIZE_HINT_US_POSITION = 1 << 0, + XCB_ICCCM_SIZE_HINT_US_SIZE = 1 << 1, + XCB_ICCCM_SIZE_HINT_P_POSITION = 1 << 2, + XCB_ICCCM_SIZE_HINT_P_SIZE = 1 << 3, + XCB_ICCCM_SIZE_HINT_P_MIN_SIZE = 1 << 4, + XCB_ICCCM_SIZE_HINT_P_MAX_SIZE = 1 << 5, + XCB_ICCCM_SIZE_HINT_P_RESIZE_INC = 1 << 6, + XCB_ICCCM_SIZE_HINT_P_ASPECT = 1 << 7, + XCB_ICCCM_SIZE_HINT_BASE_SIZE = 1 << 8, + XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY = 1 << 9 + } xcb_icccm_size_hints_flags_t; + +/** + * @brief Size hints structure. + */ +typedef struct { +/** User specified flags */ +uint32_t flags; +/** User-specified position */ +int32_t x, y; +/** User-specified size */ +int32_t width, height; +/** Program-specified minimum size */ +int32_t min_width, min_height; +/** Program-specified maximum size */ +int32_t max_width, max_height; +/** Program-specified resize increments */ +int32_t width_inc, height_inc; +/** Program-specified minimum aspect ratios */ +int32_t min_aspect_num, min_aspect_den; +/** Program-specified maximum aspect ratios */ +int32_t max_aspect_num, max_aspect_den; +/** Program-specified base size */ +int32_t base_width, base_height; +/** Program-specified window gravity */ +uint32_t win_gravity; +} xcb_size_hints_t; + +/** Number of elements in this structure */ +#define XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS 18 + +/** + * @brief Set size hints to a given position. + * @param hints SIZE_HINTS structure. + * @param user_specified Is the size user-specified? + * @param x The X position. + * @param y The Y position. + */ +void xcb_icccm_size_hints_set_position(xcb_size_hints_t *hints, int user_specified, + int32_t x, int32_t y); + +/** + * @brief Set size hints to a given size. + * @param hints SIZE_HINTS structure. + * @param user_specified is the size user-specified? + * @param width The width. + * @param height The height. + */ +void xcb_icccm_size_hints_set_size(xcb_size_hints_t *hints, int user_specified, + int32_t width, int32_t height); + +/** + * @brief Set size hints to a given minimum size. + * @param hints SIZE_HINTS structure. + * @param width The minimum width. + * @param height The minimum height. + */ +void xcb_icccm_size_hints_set_min_size(xcb_size_hints_t *hints, int32_t min_width, + int32_t min_height); + +/** + * @brief Set size hints to a given maximum size. + * @param hints SIZE_HINTS structure. + * @param width The maximum width. + * @param height The maximum height. + */ +void xcb_icccm_size_hints_set_max_size(xcb_size_hints_t *hints, int32_t max_width, + int32_t max_height); + +/** + * @brief Set size hints to a given resize increments. + * @param hints SIZE_HINTS structure. + * @param width The resize increments width. + * @param height The resize increments height. + */ +void xcb_icccm_size_hints_set_resize_inc(xcb_size_hints_t *hints, int32_t width_inc, + int32_t height_inc); + +/** + * @brief Set size hints to a given aspect ratios. + * @param hints SIZE_HINTS structure. + * @param min_aspect_num The minimum aspect ratios for the width. + * @param min_aspect_den The minimum aspect ratios for the height. + * @param max_aspect_num The maximum aspect ratios for the width. + * @param max_aspect_den The maximum aspect ratios for the height. + */ +void xcb_icccm_size_hints_set_aspect(xcb_size_hints_t *hints, int32_t min_aspect_num, + int32_t min_aspect_den, int32_t max_aspect_num, + int32_t max_aspect_den); + +/** + * @brief Set size hints to a given base size. + * @param hints SIZE_HINTS structure. + * @param base_width Base width. + * @param base_height Base height. + */ +void xcb_icccm_size_hints_set_base_size(xcb_size_hints_t *hints, int32_t base_width, + int32_t base_height); + +/** + * @brief Set size hints to a given window gravity. + * @param hints SIZE_HINTS structure. + * @param win_gravity Window gravity value. + */ +void xcb_icccm_size_hints_set_win_gravity(xcb_size_hints_t *hints, + xcb_gravity_t win_gravity); + +/** + * @brief Deliver a ChangeProperty request to set a value to a given property. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param property Property to set value for. + * @param hints Hints value to set. + */ +xcb_void_cookie_t xcb_icccm_set_wm_size_hints_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property, + xcb_size_hints_t *hints); + +/** + * @see xcb_icccm_set_wm_size_hints_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_size_hints(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property, + xcb_size_hints_t *hints); + +/** + * @brief Send request to get size hints structure for the named property. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param property Specify the property name. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_size_hints(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +/** + * @see xcb_icccm_get_wm_size_hints() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_size_hints_unchecked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property); + +/** + * @brief Fill given structure with the size hints of the named property. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param hints Size hints structure. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_wm_size_hints_unchecked() is used. Otherwise, it stores + * the error if any. The returned pointer should be freed. + */ +uint8_t xcb_icccm_get_wm_size_hints_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_size_hints_t *hints, + xcb_generic_error_t **e); + +/* WM_NORMAL_HINTS */ + +/** + * @brief Deliver a ChangeProperty request to set WM_NORMAL_HINTS property value. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param hints Hints value to set. + */ +xcb_void_cookie_t xcb_icccm_set_wm_normal_hints_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_size_hints_t *hints); + +/** + * @see xcb_icccm_set_wm_normal_hints_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_normal_hints(xcb_connection_t *c, + xcb_window_t window, + xcb_size_hints_t *hints); + +/** + * @brief Send request to get WM_NORMAL_HINTS property of a window. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_normal_hints(xcb_connection_t *c, + xcb_window_t window); + +/** + * @see xcb_icccm_get_wm_normal_hints() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_normal_hints_unchecked(xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Fill given structure with the WM_NORMAL_HINTS property of a window. + * @param hints WM_NORMAL_HINTS property value. + * @param reply The get property request reply. + * @return Return 1 on success, 0 otherwise. + */ +uint8_t +xcb_icccm_get_wm_size_hints_from_reply(xcb_size_hints_t *hints, + xcb_get_property_reply_t *reply); + +/** + * @brief Fill given structure with the WM_NORMAL_HINTS property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param hints WM_NORMAL_HINTS property value. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_wm_normal_hints_unchecked() is used. Otherwise, it stores + * the error if any. The returned pointer should be freed. + */ +uint8_t xcb_icccm_get_wm_normal_hints_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_size_hints_t *hints, + xcb_generic_error_t **e); + +/* WM_HINTS */ + +/** + * @brief WM hints structure (may be extended in the future). + */ +typedef struct { +/** Marks which fields in this structure are defined */ +int32_t flags; +/** Does this application rely on the window manager to get keyboard + input? */ + uint32_t input; + /** See below */ + int32_t initial_state; + /** Pixmap to be used as icon */ + xcb_pixmap_t icon_pixmap; + /** Window to be used as icon */ + xcb_window_t icon_window; + /** Initial position of icon */ + int32_t icon_x, icon_y; + /** Icon mask bitmap */ + xcb_pixmap_t icon_mask; + /* Identifier of related window group */ + xcb_window_t window_group; +} xcb_icccm_wm_hints_t; + +/** Number of elements in this structure */ +#define XCB_ICCCM_NUM_WM_HINTS_ELEMENTS 9 + +/** + * @brief WM_HINTS window states. + */ +typedef enum { + XCB_ICCCM_WM_STATE_WITHDRAWN = 0, + XCB_ICCCM_WM_STATE_NORMAL = 1, + XCB_ICCCM_WM_STATE_ICONIC = 3 +} xcb_icccm_wm_state_t; + +typedef enum { + XCB_ICCCM_WM_HINT_INPUT = (1L << 0), + XCB_ICCCM_WM_HINT_STATE = (1L << 1), + XCB_ICCCM_WM_HINT_ICON_PIXMAP = (1L << 2), + XCB_ICCCM_WM_HINT_ICON_WINDOW = (1L << 3), + XCB_ICCCM_WM_HINT_ICON_POSITION = (1L << 4), + XCB_ICCCM_WM_HINT_ICON_MASK = (1L << 5), + XCB_ICCCM_WM_HINT_WINDOW_GROUP = (1L << 6), + XCB_ICCCM_WM_HINT_X_URGENCY = (1L << 8) +} xcb_icccm_wm_t; + +#define XCB_ICCCM_WM_ALL_HINTS (XCB_ICCCM_WM_HINT_INPUT | XCB_ICCCM_WM_HINT_STATE | \ + XCB_ICCCM_WM_HINT_ICON_PIXMAP | XCB_ICCCM_WM_HINT_ICON_WINDOW | \ + XCB_ICCCM_WM_HINT_ICON_POSITION | XCB_ICCCM_WM_HINT_ICON_MASK | \ + XCB_ICCCM_WM_HINT_WINDOW_GROUP) + +/** + * @brief Get urgency hint. + * @param hints WM_HINTS structure. + * @return Urgency hint value. + */ +uint32_t xcb_icccm_wm_hints_get_urgency(xcb_icccm_wm_hints_t *hints); + +/** + * @brief Set input focus. + * @param hints WM_HINTS structure. + * @param input Input focus. + */ +void xcb_icccm_wm_hints_set_input(xcb_icccm_wm_hints_t *hints, uint8_t input); + +/** + * @brief Set hints state to 'iconic'. + * @param hints WM_HINTS structure. + */ +void xcb_icccm_wm_hints_set_iconic(xcb_icccm_wm_hints_t *hints); + +/** + * @brief Set hints state to 'normal'. + * @param hints WM_HINTS structure. + */ +void xcb_icccm_wm_hints_set_normal(xcb_icccm_wm_hints_t *hints); + +/** + * @brief Set hints state to 'withdrawn'. + * @param hints WM_HINTS structure. + */ +void xcb_icccm_wm_hints_set_withdrawn(xcb_icccm_wm_hints_t *hints); + +/** + * @brief Set hints state to none. + * @param hints WM_HINTS structure. + */ +void xcb_icccm_wm_hints_set_none(xcb_icccm_wm_hints_t *hints); + +/** + * @brief Set pixmap to be used as icon. + * @param hints WM_HINTS structure. + * @param icon_pixmap Pixmap. + */ +void xcb_icccm_wm_hints_set_icon_pixmap(xcb_icccm_wm_hints_t *hints, + xcb_pixmap_t icon_pixmap); + +/** + * @brief Set icon mask bitmap. + * @param hints WM_HINTS structure. + * @param icon_mask Pixmap. + */ +void xcb_icccm_wm_hints_set_icon_mask(xcb_icccm_wm_hints_t *hints, xcb_pixmap_t icon_mask); + +/** + * @brief Set window identifier to be used as icon. + * @param hints WM_HINTS structure. + * @param icon_window Window X identifier. + */ +void xcb_icccm_wm_hints_set_icon_window(xcb_icccm_wm_hints_t *hints, + xcb_window_t icon_window); + +/** + * @brief Set identifier of related window group. + * @param hints WM_HINTS structure. + * @param window_group Window X identifier. + */ +void xcb_icccm_wm_hints_set_window_group(xcb_icccm_wm_hints_t *hints, + xcb_window_t window_group); + +/** + * @brief Set urgency hints flag. + * @param hints WM_HINTS structure. + */ +void xcb_icccm_wm_hints_set_urgency(xcb_icccm_wm_hints_t *hints); + +/** + * @brief Deliver a SetProperty request to set WM_HINTS property value. + * @param c The connection to the X server. + * @param window Window X identifier. + * @param hints Hints value to set. + */ +xcb_void_cookie_t xcb_icccm_set_wm_hints_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_icccm_wm_hints_t *hints); + +/** + * @see xcb_icccm_set_wm_hints_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_hints(xcb_connection_t *c, + xcb_window_t window, + xcb_icccm_wm_hints_t *hints); + +/** + * @brief Send request to get WM_HINTS property of a window. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_hints(xcb_connection_t *c, + xcb_window_t window); + +/** + * @see xcb_icccm_get_wm_hints() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_hints_unchecked(xcb_connection_t *c, + xcb_window_t window); + +/** + * @brief Fill given structure with the WM_HINTS property of a window. + * @param hints WM_HINTS property value. + * @param reply The get property request reply. + * @return Return 1 on success, 0 otherwise. + */ +uint8_t +xcb_icccm_get_wm_hints_from_reply(xcb_icccm_wm_hints_t *hints, + xcb_get_property_reply_t *reply); + +/** + * @brief Fill given structure with the WM_HINTS property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param hints WM_HINTS property value. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_wm_hints_unchecked() is used. Otherwise, it stores the + * error if any. The returned pointer should be freed. + */ +uint8_t xcb_icccm_get_wm_hints_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_wm_hints_t *hints, + xcb_generic_error_t **e); + +/* WM_PROTOCOLS */ + +/** + * @brief Deliver a SetProperty request to set WM_PROTOCOLS property value. + * @param c The connection to the X server. + * @param wm_protocols The WM_PROTOCOLS atom. + * @param window Window X identifier. + * @param list_len Atom list len. + * @param list Atom list. + */ +xcb_void_cookie_t xcb_icccm_set_wm_protocols_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_protocols, + uint32_t list_len, + xcb_atom_t *list); + +/** + * @see xcb_icccm_set_wm_protocols_checked() + */ +xcb_void_cookie_t xcb_icccm_set_wm_protocols(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_protocols, + uint32_t list_len, + xcb_atom_t *list); + +/** + * @brief WM_PROTOCOLS structure. + */ +typedef struct { + /** Length of the atoms list */ + uint32_t atoms_len; + /** Atoms list */ + xcb_atom_t *atoms; + /** Store reply to avoid memory allocation, should normally not be + used directly */ + xcb_get_property_reply_t *_reply; +} xcb_icccm_get_wm_protocols_reply_t; + +/** + * @brief Send request to get WM_PROTOCOLS property of a given window. + * @param c The connection to the X server. + * @param window Window X identifier. + * @return The request cookie. + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_protocols(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_protocol_atom); + +/** + * @see xcb_icccm_get_wm_protocols() + */ +xcb_get_property_cookie_t xcb_icccm_get_wm_protocols_unchecked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_protocol_atom); + +/** + * @brief Fill the given structure with the WM_PROTOCOLS property of a window. + * @param reply The reply of the GetProperty request. + * @param protocols WM_PROTOCOLS property value. + * @return Return 1 on success, 0 otherwise. + * + * protocols structure members should be freed by + * xcb_icccm_get_wm_protocols_reply_wipe(). + */ +uint8_t xcb_icccm_get_wm_protocols_from_reply(xcb_get_property_reply_t *reply, + xcb_icccm_get_wm_protocols_reply_t *protocols); +/** + * @brief Fill the given structure with the WM_PROTOCOLS property of a window. + * @param c The connection to the X server. + * @param cookie Request cookie. + * @param protocols WM_PROTOCOLS property value. + * @param e Error if any. + * @return Return 1 on success, 0 otherwise. + * + * The parameter e supplied to this function must be NULL if + * xcb_icccm_get_wm_protocols_unchecked() is used. Otherwise, it stores the + * error if any. protocols structure members should be freed by + * xcb_icccm_get_wm_protocols_reply_wipe(). + */ +uint8_t xcb_icccm_get_wm_protocols_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_wm_protocols_reply_t *protocols, + xcb_generic_error_t **e); + +/** + * @brief Wipe protocols structure members previously allocated by + * xcb_icccm_get_wm_protocols_reply(). + * @param protocols protocols structure whose members is going to be freed. + */ +void xcb_icccm_get_wm_protocols_reply_wipe(xcb_icccm_get_wm_protocols_reply_t *protocols); + +#ifdef __cplusplus +} +#endif + +/** + * @} + */ + +#endif /* __XCB_ICCCM_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_image.h b/src/3rdparty/xcb/include/xcb/xcb_image.h new file mode 100644 index 0000000000..f41187d394 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_image.h @@ -0,0 +1,630 @@ +#ifndef __XCB_IMAGE_H__ +#define __XCB_IMAGE_H__ + +/* Copyright (C) 2007 Bart Massey + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or their + * institutions shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the authors. + */ + +#include +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @defgroup xcb__image_t XCB Image Functions + * + * These are functions used to create and manipulate X images. + * + * The X image format we use is specific to this software, + * which is probably a bug; it represents an intermediate + * position between the wire format used by the X GetImage + * and PutImage requests and standard formats like PBM. An + * image consists of a header of type @ref xcb_image_t + * describing the properties of the image, together with a + * pointer to the image data itself. + * + * X wire images come in three formats. An xy-bitmap is a + * bit-packed format that will be expanded to a two-color + * pixmap using a GC when sent over the wire by PutImage. + * An xy-pixmap is one or more bit-planes, each in the same + * format as xy-bitmap. A z-pixmap is a more conventional + * pixmap representation, with each pixel packed into a + * word. Pixmaps are sent and received over the wire only + * to/from drawables of their depth. + * + * Each X server defines, for each depth and format, + * properties of images in that format that are sent and + * received on the wire. We refer to this as a "native" + * image for a given X server. It is not uncommon to want + * to work with non-native images on the client side, or to + * convert between the native images of different servers. + * + * This library provides several things. Facilities for + * creating and destroying images are, of course, provided. + * Wrappers for xcb_get_image() and xcb_put_image() are + * provided; these utilize the image header to simplify the + * interface. Routines for getting and putting image pixels + * are provided: both a generic form that works with + * arbitrary images, and fastpath forms for some common + * cases. Conversion routines are provided for X images; + * these routines have been fairly well optimized for the + * common cases, and should run fast even on older hardware. + * A routine analogous to Xlib's XCreate*FromBitmapData() is + * provided for creating X images from xbm-format data; this + * routine is in this library only because it is a trivial + * use case for the library. + * + * @{ + */ + + +typedef struct xcb_image_t xcb_image_t; + +/** + * @struct xcb_image_t + * A structure that describes an xcb_image_t. + */ +struct xcb_image_t +{ + uint16_t width; /**< Width in pixels, excluding pads etc. */ + uint16_t height; /**< Height in pixels. */ + xcb_image_format_t format; /**< Format. */ + uint8_t scanline_pad; /**< Right pad in bits. Valid pads + * are 8, 16, 32. + */ + uint8_t depth; /**< Depth in bits. Valid depths + * are 1, 4, 8, 16, 24 for z format, + * 1 for xy-bitmap-format, anything + * for xy-pixmap-format. + */ + uint8_t bpp; /**< Storage per pixel in bits. + * Must be >= depth. Valid bpp + * are 1, 4, 8, 16, 24, 32 for z + * format, 1 for xy-bitmap format, + * anything for xy-pixmap-format. + */ + uint8_t unit; /**< Scanline unit in bits for + * xy formats and for bpp == 1, + * in which case valid scanline + * units are 8, 16, 32. Otherwise, + * will be max(8, bpp). Must be >= bpp. + */ + uint32_t plane_mask; /**< When format is + * xy-pixmap and depth > + * 1, this says which + * planes are "valid" in + * some vague sense. + * Currently used only + * by xcb_image_get/put_pixel(), + * and set only by + * xcb_image_get(). + */ + xcb_image_order_t byte_order; /**< Component byte order + * for z-pixmap, byte + * order of scanline unit + * for xy-bitmap and + * xy-pixmap. Nybble + * order for z-pixmap + * when bpp == 4. + */ + xcb_image_order_t bit_order; /**< Bit order of + * scanline unit for + * xy-bitmap and + * xy-pixmap. + */ + uint32_t stride; /**< Bytes per image row. + * Computable from other + * data, but cached for + * convenience/performance. + */ + uint32_t size; /**< Size of image data in bytes. + * Computable from other + * data, but cached for + * convenience/performance. + */ + void * base; /**< Malloced block of storage that + * will be freed by + * @ref xcb_image_destroy() if non-null. + */ + uint8_t * data; /**< The actual image. */ +}; + +typedef struct xcb_shm_segment_info_t xcb_shm_segment_info_t; + +/** + * @struct xcb_shm_segment_info_t + * A structure that stores the informations needed by the MIT Shm + * Extension. + */ +struct xcb_shm_segment_info_t +{ + xcb_shm_seg_t shmseg; + uint32_t shmid; + uint8_t *shmaddr; +}; + + +/** + * Update the cached data of an image. + * @param image The image. + * + * An image's size and stride, among other things, are + * cached in its structure. This function recomputes those + * cached values for the given image. + * @ingroup xcb__image_t + */ +void +xcb_image_annotate (xcb_image_t *image); + +/** + * Create a new image. + * @param width The width of the image, in pixels. + * @param height The height of the image, in pixels. + * @param format The format of the image. + * @param xpad The scanline pad of the image. + * @param depth The depth of the image. + * @param bpp The depth of the image storage. + * @param unit The unit of image representation, in bits. + * @param byte_order The byte order of the image. + * @param bit_order The bit order of the image. + * @param base The base address of malloced image data. + * @param bytes The size in bytes of the storage pointed to by base. + * If base == 0 and bytes == ~0 and data == 0 on + * entry, no storage will be auto-allocated. + * @param data The image data. If data is null and bytes != ~0, then + * an attempt will be made to fill in data; from + * base if it is non-null (and bytes is large enough), else + * by mallocing sufficient storage and filling in base. + * @return The new image. + * + * This function allocates the memory needed for an @ref xcb_image_t structure + * with the given properties. See the description of xcb_image_t for details. + * This function initializes and returns a pointer to the + * xcb_image_t structure. It may try to allocate or reserve data for the + * structure, depending on how @p base, @p bytes and @p data are set. + * + * The image must be destroyed with xcb_image_destroy(). + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_create (uint16_t width, + uint16_t height, + xcb_image_format_t format, + uint8_t xpad, + uint8_t depth, + uint8_t bpp, + uint8_t unit, + xcb_image_order_t byte_order, + xcb_image_order_t bit_order, + void * base, + uint32_t bytes, + uint8_t * data); + + +/** + * Create a new image in connection-native format. + * @param c The connection. + * @param width The width of the image, in pixels. + * @param height The height of the image, in pixels. + * @param format The format of the image. + * @param depth The depth of the image. + * @param base The base address of malloced image data. + * @param bytes The size in bytes of the storage pointed to by base. + * If base == 0 and bytes == ~0 and data == 0 on + * entry, no storage will be auto-allocated. + * @param data The image data. If data is null and bytes != ~0, then + * an attempt will be made to fill in data; from + * base if it is non-null (and bytes is large enough), else + * by mallocing sufficient storage and filling in base. + * @return The new image. + * + * This function calls @ref xcb_image_create() with the given + * properties, and with the remaining properties chosen + * according to the "native format" with the given + * properties on the current connection. + * + * It is usual to use this rather + * than calling xcb_image_create() directly. + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_create_native (xcb_connection_t * c, + uint16_t width, + uint16_t height, + xcb_image_format_t format, + uint8_t depth, + void * base, + uint32_t bytes, + uint8_t * data); + + +/** + * Destroy an image. + * @param image The image to be destroyed. + * + * This function frees the memory associated with the @p image + * parameter. If its base pointer is non-null, it frees + * that also. + * @ingroup xcb__image_t + */ +void +xcb_image_destroy (xcb_image_t *image); + + +/** + * Get an image from the X server. + * @param conn The connection to the X server. + * @param draw The drawable to get the image from. + * @param x The x coordinate in pixels, relative to the origin of the + * drawable and defining the upper-left corner of the rectangle. + * @param y The y coordinate in pixels, relative to the origin of the + * drawable and defining the upper-left corner of the rectangle. + * @param width The width of the subimage in pixels. + * @param height The height of the subimage in pixels. + * @param plane_mask The plane mask. See the protocol document for details. + * @param format The format of the image. + * @return The subimage of @p draw defined by @p x, @p y, @p w, @p h. + * + + * This function returns a new image taken from the + * given drawable @p draw. + * The image will be in connection native format. If the @p format + * is xy-bitmap and the @p plane_mask masks bit planes out, those + * bit planes will be made part of the returned image anyway, + * by zero-filling them; this will require a fresh memory allocation + * and some copying. Otherwise, the resulting image will use the + * xcb_get_image_reply() record as its backing store. + * + * If a problem occurs, the function returns null. + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_get (xcb_connection_t * conn, + xcb_drawable_t draw, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint32_t plane_mask, + xcb_image_format_t format); + + +/** + * Put an image onto the X server. + * @param conn The connection to the X server. + * @param draw The draw you get the image from. + * @param gc The graphic context. + * @param image The image you want to combine with the rectangle. + * @param x The x coordinate, which is relative to the origin of the + * drawable and defines the x coordinate of the upper-left corner of the + * rectangle. + * @param y The y coordinate, which is relative to the origin of the + * drawable and defines the x coordinate of the upper-left corner of + * the rectangle. + * @param left_pad Notionally shift an xy-bitmap or xy-pixmap image + * to the right some small amount, for some reason. XXX Not clear + * this is currently supported correctly. + * @return The cookie returned by xcb_put_image(). + * + * This function combines an image with a rectangle of the + * specified drawable @p draw. The image must be in native + * format for the connection. The image is drawn at the + * specified location in the drawable. For the xy-bitmap + * format, the foreground pixel in @p gc defines the source + * for the one bits in the image, and the background pixel + * defines the source for the zero bits. For xy-pixmap and + * z-pixmap formats, the depth of the image must match the + * depth of the drawable; the gc is ignored. + * + * @ingroup xcb__image_t + */ +xcb_void_cookie_t +xcb_image_put (xcb_connection_t * conn, + xcb_drawable_t draw, + xcb_gcontext_t gc, + xcb_image_t * image, + int16_t x, + int16_t y, + uint8_t left_pad); + + +/** + * Check image for or convert image to native format. + * @param c The connection to the X server. + * @param image The image. + * @param convert If 0, just check the image for native format. + * Otherwise, actually convert it. + * @return Null if the image is not in native format and can or will not + * be converted. Otherwise, the native format image. + * + * Each X display has its own "native format" for images of a given + * format and depth. This function either checks whether the given + * @p image is in native format for the given connection @p c, or + * actually tries to convert the image to native format, depending + * on whether @p convert is true or false. + * + * When @p convert is true, and the image is not in native format + * but can be converted, it will be, and a pointer to the new image + * will be returned. The image passed in will be unharmed in this + * case; it is the caller's responsibility to check that the returned + * pointer is different and to dispose of the old image if desired. + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_native (xcb_connection_t * c, + xcb_image_t * image, + int convert); + + +/** + * Put a pixel to an image. + * @param image The image. + * @param x The x coordinate of the pixel. + * @param y The y coordinate of the pixel. + * @param pixel The new pixel value. + * + * This function overwrites the pixel in the given @p image with the + * specified @p pixel value (in client format). The image must contain the @p x + * and @p y coordinates, as no clipping is done. This function honors + * the plane-mask for xy-pixmap images. + * @ingroup xcb__image_t + */ +void +xcb_image_put_pixel (xcb_image_t *image, + uint32_t x, + uint32_t y, + uint32_t pixel); + +/** + * Get a pixel from an image. + * @param image The image. + * @param x The x coordinate of the pixel. + * @param y The y coordinate of the pixel. + * @return The pixel value. + * + * This function retrieves a pixel from the given @p image. + * The image must contain the @p x + * and @p y coordinates, as no clipping is done. This function honors + * the plane-mask for xy-pixmap images. + * @ingroup xcb__image_t + */ +uint32_t +xcb_image_get_pixel (xcb_image_t *image, + uint32_t x, + uint32_t y); + + +/** + * Convert an image to a new format. + * @param src Source image. + * @param dst Destination image. + * @return The @p dst image, or null on error. + * + * This function tries to convert the image data of the @p + * src image to the format implied by the @p dst image, + * overwriting the current destination image data. + * The source and destination must have the same + * width, height, and depth. When the source and destination + * are already the same format, a simple copy is done. Otherwise, + * when the destination has the same bits-per-pixel/scanline-unit + * as the source, an optimized copy routine (thanks to Keith Packard) + * is used for the conversion. Otherwise, the copy is done the + * slow, slow way with @ref xcb_image_get_pixel() and + * @ref xcb_image_put_pixel() calls. + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_convert (xcb_image_t * src, + xcb_image_t * dst); + + +/** + * Extract a subimage of an image. + * @param image Source image. + * @param x X coordinate of subimage. + * @param y Y coordinate of subimage. + * @param width Width of subimage. + * @param height Height of subimage. + * @param base Base of memory allocation. + * @param bytes Size of base allocation. + * @param data Memory allocation. + * @return The subimage, or null on error. + * + * Given an image, this function extracts the subimage at the + * given coordinates. The requested subimage must be entirely + * contained in the source @p image. The resulting image will have the same + * general image parameters as the source image. The @p base, @p bytes, + * and @p data arguments are passed to @ref xcb_create_image() unaltered + * to create the destination image---see its documentation for details. + * + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_subimage(xcb_image_t * image, + uint32_t x, + uint32_t y, + uint32_t width, + uint32_t height, + void * base, + uint32_t bytes, + uint8_t * data); + + +/* + * Shm stuff + */ + +/** + * Put the data of an xcb_image_t onto a drawable using the MIT Shm + * Extension. + * @param conn The connection to the X server. + * @param draw The draw you get the image from. + * @param gc The graphic context. + * @param image The image you want to combine with the rectangle. + * @param shminfo A @ref xcb_shm_segment_info_t structure. + * @param src_x The offset in x from the left edge of the image + * defined by the xcb_image_t structure. + * @param src_y The offset in y from the left edge of the image + * defined by the xcb_image_t structure. + * @param dest_x The x coordinate, which is relative to the origin of the + * drawable and defines the x coordinate of the upper-left corner of the + * rectangle. + * @param dest_y The y coordinate, which is relative to the origin of the + * drawable and defines the x coordinate of the upper-left corner of + * the rectangle. + * @param src_width The width of the subimage, in pixels. + * @param src_height The height of the subimage, in pixels. + * @param send_event Indicates whether or not a completion event + * should occur when the image write is complete. + * @return 1 is no problems occurs. + * + * This function combines an image in memory with a shape of the + * specified drawable. The section of the image defined by the @p x, @p y, + * @p width, and @p height arguments is drawn on the specified part of + * the drawable. If XYBitmap format is used, the depth must be + * one, or a``BadMatch'' error results. The foreground pixel in the + * Graphic Context @p gc defines the source for the one bits in the + * image, and the background pixel defines the source for the zero + * bits. For XYPixmap and ZPixmap, the depth must match the depth of + * the drawable, or a ``BadMatch'' error results. + * + * If a problem occurs, the function returns @c 0. Otherwise, it + * returns @c 1. + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_shm_put (xcb_connection_t * conn, + xcb_drawable_t draw, + xcb_gcontext_t gc, + xcb_image_t * image, + xcb_shm_segment_info_t shminfo, + int16_t src_x, + int16_t src_y, + int16_t dest_x, + int16_t dest_y, + uint16_t src_width, + uint16_t src_height, + uint8_t send_event); + + +/** + * Read image data into a shared memory xcb_image_t. + * @param conn The connection to the X server. + * @param draw The draw you get the image from. + * @param image The image you want to combine with the rectangle. + * @param shminfo A @ref xcb_shm_segment_info_t structure. + * @param x The x coordinate, which are relative to the origin of the + * drawable and define the upper-left corner of the rectangle. + * @param y The y coordinate, which are relative to the origin of the + * drawable and define the upper-left corner of the rectangle. + * @param plane_mask The plane mask. + * @return The subimage of @p draw defined by @p x, @p y, @p w, @p h. + * + * This function reads image data into a shared memory xcb_image_t where + * @p conn is the connection to the X server, @p draw is the source + * drawable, @p image is the destination xcb_image_t, @p x and @p y are offsets + * within the drawable, and @p plane_mask defines which planes are to be + * read. + * + * If a problem occurs, the function returns @c 0. It returns 1 + * otherwise. + * @ingroup xcb__image_t + */ +int xcb_image_shm_get (xcb_connection_t * conn, + xcb_drawable_t draw, + xcb_image_t * image, + xcb_shm_segment_info_t shminfo, + int16_t x, + int16_t y, + uint32_t plane_mask); + + +/** + * Create an image from user-supplied bitmap data. + * @param data Image data in packed bitmap format. + * @param width Width in bits of image data. + * @param height Height in bits of image data. + * @return The image constructed from the image data, or 0 on error. + * + * This function creates an image from the user-supplied + * bitmap @p data. The bitmap data is assumed to be in + * xbm format (i.e., 8-bit scanline unit, LSB-first, 8-bit pad). + * @ingroup xcb__image_t + */ +xcb_image_t * +xcb_image_create_from_bitmap_data (uint8_t * data, + uint32_t width, + uint32_t height); + +/** + * Create a pixmap from user-supplied bitmap data. + * @param display The connection to the X server. + * @param d The parent drawable for the pixmap. + * @param data Image data in packed bitmap format. + * @param width Width in bits of image data. + * @param height Height in bits of image data. + * @param depth Depth of the desired pixmap. + * @param fg Pixel for one-bits of pixmaps with depth larger than one. + * @param bg Pixel for zero-bits of pixmaps with depth larger than one. + * @param gcp If this pointer is non-null, the GC created to + * fill in the pixmap is stored here; it will have its foreground + * and background set to the supplied value. Otherwise, the GC + * will be freed. + * @return The pixmap constructed from the image data, or 0 on error. + * + * This function creates a pixmap from the user-supplied + * bitmap @p data. The bitmap data is assumed to be in + * xbm format (i.e., 8-bit scanline unit, LSB-first, 8-bit pad). + * If @p depth is greater than 1, the + * bitmap will be expanded to a pixmap using the given + * foreground and background pixels @p fg and @p bg. + * @ingroup xcb__image_t + */ +xcb_pixmap_t +xcb_create_pixmap_from_bitmap_data (xcb_connection_t * display, + xcb_drawable_t d, + uint8_t * data, + uint32_t width, + uint32_t height, + uint32_t depth, + uint32_t fg, + uint32_t bg, + xcb_gcontext_t * gcp); + + +/** + * @} + */ + + +#ifdef __cplusplus +} +#endif + + +#endif /* __XCB_IMAGE_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_keysyms.h b/src/3rdparty/xcb/include/xcb/xcb_keysyms.h new file mode 100644 index 0000000000..9d34a50ad1 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_keysyms.h @@ -0,0 +1,71 @@ +#ifndef __XCB_KEYSYMS_H__ +#define __XCB_KEYSYMS_H__ + +#include + + +#ifdef __cplusplus +extern "C" { +#endif + + +typedef struct _XCBKeySymbols xcb_key_symbols_t; + +xcb_key_symbols_t *xcb_key_symbols_alloc (xcb_connection_t *c); + +void xcb_key_symbols_free (xcb_key_symbols_t *syms); + +xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms, + xcb_keycode_t keycode, + int col); + +/** + * @brief Get the keycodes attached to a keysyms. + * There can be several value, so what is returned is an array of keycode + * terminated by XCB_NO_SYMBOL. You are responsible to free it. + * Be aware that this function can be slow. It will convert all + * combinations of all available keycodes to keysyms to find the ones that + * match. + * @param syms Key symbols. + * @param keysym The keysym to look for. + * @return A XCB_NO_SYMBOL terminated array of keycode, or NULL if nothing is found. + */ +xcb_keycode_t * xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms, + xcb_keysym_t keysym); + +xcb_keysym_t xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms, + xcb_key_press_event_t *event, + int col); + +xcb_keysym_t xcb_key_release_lookup_keysym (xcb_key_symbols_t *syms, + xcb_key_release_event_t *event, + int col); + +int xcb_refresh_keyboard_mapping (xcb_key_symbols_t *syms, + xcb_mapping_notify_event_t *event); + +/* TODO: need XLookupString equivalent */ + +/* Tests for classes of symbols */ + +int xcb_is_keypad_key (xcb_keysym_t keysym); + +int xcb_is_private_keypad_key (xcb_keysym_t keysym); + +int xcb_is_cursor_key (xcb_keysym_t keysym); + +int xcb_is_pf_key (xcb_keysym_t keysym); + +int xcb_is_function_key (xcb_keysym_t keysym); + +int xcb_is_misc_function_key (xcb_keysym_t keysym); + +int xcb_is_modifier_key (xcb_keysym_t keysym); + + +#ifdef __cplusplus +} +#endif + + +#endif /* __XCB_KEYSYMS_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_pixel.h b/src/3rdparty/xcb/include/xcb/xcb_pixel.h new file mode 100644 index 0000000000..fcb22b4826 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_pixel.h @@ -0,0 +1,171 @@ +#ifndef __XCB_PIXEL_H__ +#define __XCB_PIXEL_H__ + +/* Copyright (C) 2007 Bart Massey + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or their + * institutions shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the authors. + */ + +#include +#include +#ifndef BUILD +#include +#include +#endif + +/** + * XCB Image fast pixel ops. + * + * Fast inline versions of xcb_image_get_pixel() and + * xcb_image_put_pixel() for various common cases. + * The naming convention is xcb_image_put_pixel_FUB() + * where F is the format and is either XY for bitmaps + * or Z for pixmaps, U is the bitmap unit size or pixmap + * bits-per-pixel, and B is the endianness (if needed) + * and is either M for most-significant-first or L for + * least-significant-first. Note that no checking + * is done on the arguments to these routines---caller beware. + * Also note that the pixel type is chosen to be appropriate + * to the unit; bitmaps use int and pixmaps use the appropriate + * size of unsigned. + * @ingroup xcb__image_t + */ + +_X_INLINE static void +xcb_image_put_pixel_XY32M (xcb_image_t *image, + uint32_t x, + uint32_t y, + int pixel) +{ + uint32_t unit = (x >> 3) & ~xcb_mask(2); + uint32_t byte = xcb_mask(2) - ((x >> 3) & xcb_mask(2)); + uint32_t bit = xcb_mask(3) - (x & xcb_mask(3)); + uint8_t m = 1 << bit; + uint8_t p = pixel << bit; + uint8_t * bp = image->data + (y * image->stride) + (unit | byte); + *bp = (*bp & ~m) | p; +} + +_X_INLINE static void +xcb_image_put_pixel_XY32L (xcb_image_t *image, + uint32_t x, + uint32_t y, + int pixel) +{ + uint32_t bit = x & xcb_mask(3); + uint8_t m = 1 << bit; + uint8_t p = pixel << bit; + uint8_t * bp = image->data + (y * image->stride) + (x >> 3); + *bp = (*bp & ~m) | p; +} + +_X_INLINE static int +xcb_image_get_pixel_XY32M (xcb_image_t *image, + uint32_t x, + uint32_t y) +{ + uint32_t unit = (x >> 3) & ~xcb_mask(2); + uint32_t byte = xcb_mask(2) - ((x >> 3) & xcb_mask(2)); + uint32_t bit = xcb_mask(3) - (x & xcb_mask(3)); + uint8_t * bp = image->data + (y * image->stride) + (unit | byte); + return (*bp >> bit) & 1; +} + +_X_INLINE static int +xcb_image_get_pixel_XY32L (xcb_image_t *image, + uint32_t x, + uint32_t y) +{ + uint32_t bit = x & xcb_mask(3); + uint8_t * bp = image->data + (y * image->stride) + (x >> 3); + return (*bp >> bit) & 1; +} + +_X_INLINE static void +xcb_image_put_pixel_Z8 (xcb_image_t *image, + uint32_t x, + uint32_t y, + uint8_t pixel) +{ + image->data[x + y * image->stride] = pixel; +} + +_X_INLINE static uint8_t +xcb_image_get_pixel_Z8 (xcb_image_t *image, + uint32_t x, + uint32_t y) +{ + return image->data[x + y * image->stride]; +} + +_X_INLINE static void +xcb_image_put_pixel_Z32M (xcb_image_t *image, + uint32_t x, + uint32_t y, + uint32_t pixel) +{ + uint8_t * row = image->data + (y * image->stride); + row[x << 2] = pixel >> 24; + row[(x << 2) + 1] = pixel >> 16; + row[(x << 2) + 2] = pixel >> 8; + row[(x << 2) + 3] = pixel; +} + +_X_INLINE static void +xcb_image_put_pixel_Z32L (xcb_image_t *image, + uint32_t x, + uint32_t y, + uint32_t pixel) +{ + uint8_t * row = image->data + (y * image->stride); + row[x << 2] = pixel; + row[(x << 2) + 1] = pixel >> 8; + row[(x << 2) + 2] = pixel >> 16; + row[(x << 2) + 3] = pixel >> 24; +} + +_X_INLINE static uint32_t +xcb_image_get_pixel_Z32M (xcb_image_t *image, + uint32_t x, + uint32_t y) +{ + uint8_t * row = image->data + (y * image->stride); + uint32_t pixel = row[x << 2] << 24; + pixel |= row[(x << 2) + 1] << 16; + pixel |= row[(x << 2) + 2] << 8; + return pixel | row[(x << 2) + 3]; +} + +_X_INLINE static uint32_t +xcb_image_get_pixel_Z32L (xcb_image_t *image, + uint32_t x, + uint32_t y) +{ + uint8_t * row = image->data + (y * image->stride); + uint32_t pixel = row[x << 2]; + pixel |= row[(x << 2) + 1] << 8; + pixel |= row[(x << 2) + 2] << 16; + return pixel | row[(x << 2) + 3] << 24; +} + +#endif /* __XCB_PIXEL_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_renderutil.h b/src/3rdparty/xcb/include/xcb/xcb_renderutil.h new file mode 100644 index 0000000000..6eb5923236 --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_renderutil.h @@ -0,0 +1,142 @@ +/* Copyright © 2006 Jamey Sharp. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or their + * institutions shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the authors. + */ + +#ifndef XCB_RENDERUTIL +#define XCB_RENDERUTIL +#include + +typedef enum xcb_pict_format_t { + XCB_PICT_FORMAT_ID = (1 << 0), + XCB_PICT_FORMAT_TYPE = (1 << 1), + XCB_PICT_FORMAT_DEPTH = (1 << 2), + XCB_PICT_FORMAT_RED = (1 << 3), + XCB_PICT_FORMAT_RED_MASK = (1 << 4), + XCB_PICT_FORMAT_GREEN = (1 << 5), + XCB_PICT_FORMAT_GREEN_MASK = (1 << 6), + XCB_PICT_FORMAT_BLUE = (1 << 7), + XCB_PICT_FORMAT_BLUE_MASK = (1 << 8), + XCB_PICT_FORMAT_ALPHA = (1 << 9), + XCB_PICT_FORMAT_ALPHA_MASK = (1 << 10), + XCB_PICT_FORMAT_COLORMAP = (1 << 11) +} xcb_pict_format_t; + +typedef enum xcb_pict_standard_t { + XCB_PICT_STANDARD_ARGB_32, + XCB_PICT_STANDARD_RGB_24, + XCB_PICT_STANDARD_A_8, + XCB_PICT_STANDARD_A_4, + XCB_PICT_STANDARD_A_1 +} xcb_pict_standard_t; + + +xcb_render_pictvisual_t * +xcb_render_util_find_visual_format (const xcb_render_query_pict_formats_reply_t *formats, + const xcb_visualid_t visual); + +xcb_render_pictforminfo_t * +xcb_render_util_find_format (const xcb_render_query_pict_formats_reply_t *formats, + unsigned long mask, + const xcb_render_pictforminfo_t *template, + int count); + +xcb_render_pictforminfo_t * +xcb_render_util_find_standard_format (const xcb_render_query_pict_formats_reply_t *formats, + xcb_pict_standard_t format); + +const xcb_render_query_version_reply_t * +xcb_render_util_query_version (xcb_connection_t *c); + +const xcb_render_query_pict_formats_reply_t * +xcb_render_util_query_formats (xcb_connection_t *c); + +int +xcb_render_util_disconnect (xcb_connection_t *c); + +/* wrappers for xcb_render_composite_glyphs_8/16/32 */ + +typedef struct xcb_render_util_composite_text_stream_t xcb_render_util_composite_text_stream_t; + +xcb_render_util_composite_text_stream_t * +xcb_render_util_composite_text_stream ( + xcb_render_glyphset_t initial_glyphset, + uint32_t total_glyphs, + uint32_t total_glyphset_changes ); + +void +xcb_render_util_glyphs_8 ( + xcb_render_util_composite_text_stream_t *stream, + int16_t dx, + int16_t dy, + uint32_t count, + const uint8_t *glyphs ); + +void +xcb_render_util_glyphs_16 ( + xcb_render_util_composite_text_stream_t *stream, + int16_t dx, + int16_t dy, + uint32_t count, + const uint16_t *glyphs ); + +void +xcb_render_util_glyphs_32 ( + xcb_render_util_composite_text_stream_t *stream, + int16_t dx, + int16_t dy, + uint32_t count, + const uint32_t *glyphs ); + +void +xcb_render_util_change_glyphset ( + xcb_render_util_composite_text_stream_t *stream, + xcb_render_glyphset_t glyphset ); + +xcb_void_cookie_t +xcb_render_util_composite_text ( + xcb_connection_t *xc, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + xcb_render_util_composite_text_stream_t *stream ); + +xcb_void_cookie_t +xcb_render_util_composite_text_checked ( + xcb_connection_t *xc, + uint8_t op, + xcb_render_picture_t src, + xcb_render_picture_t dst, + xcb_render_pictformat_t mask_format, + int16_t src_x, + int16_t src_y, + xcb_render_util_composite_text_stream_t *stream ); + +void +xcb_render_util_composite_text_free ( + xcb_render_util_composite_text_stream_t *stream ); + +#endif /* XCB_RENDERUTIL */ diff --git a/src/3rdparty/xcb/include/xcb/xcb_util.h b/src/3rdparty/xcb/include/xcb/xcb_util.h new file mode 100644 index 0000000000..0f06f1b06e --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xcb_util.h @@ -0,0 +1,8 @@ +#ifndef __XCB_UTIL_H__ +#define __XCB_UTIL_H__ + +#include +#include +#include + +#endif /* __XCB_UTIL_H__ */ diff --git a/src/3rdparty/xcb/include/xcb/xfixes.h b/src/3rdparty/xcb/include/xcb/xfixes.h new file mode 100644 index 0000000000..4d7eb0900a --- /dev/null +++ b/src/3rdparty/xcb/include/xcb/xfixes.h @@ -0,0 +1,2790 @@ +/* + * This file generated automatically from xfixes.xml by c_client.py. + * Edit at your peril. + */ + +/** + * @defgroup XCB_XFixes_API XCB XFixes API + * @brief XFixes XCB Protocol Implementation. + * @{ + **/ + +#ifndef __XFIXES_H +#define __XFIXES_H + +#include "xcb.h" +#include "xproto.h" +#include "render.h" +#include "shape.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#define XCB_XFIXES_MAJOR_VERSION 4 +#define XCB_XFIXES_MINOR_VERSION 0 + +extern xcb_extension_t xcb_xfixes_id; + +/** + * @brief xcb_xfixes_query_version_cookie_t + **/ +typedef struct xcb_xfixes_query_version_cookie_t { + unsigned int sequence; /**< */ +} xcb_xfixes_query_version_cookie_t; + +/** Opcode for xcb_xfixes_query_version. */ +#define XCB_XFIXES_QUERY_VERSION 0 + +/** + * @brief xcb_xfixes_query_version_request_t + **/ +typedef struct xcb_xfixes_query_version_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint32_t client_major_version; /**< */ + uint32_t client_minor_version; /**< */ +} xcb_xfixes_query_version_request_t; + +/** + * @brief xcb_xfixes_query_version_reply_t + **/ +typedef struct xcb_xfixes_query_version_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + uint32_t major_version; /**< */ + uint32_t minor_version; /**< */ + uint8_t pad1[16]; /**< */ +} xcb_xfixes_query_version_reply_t; + +typedef enum xcb_xfixes_save_set_mode_t { + XCB_XFIXES_SAVE_SET_MODE_INSERT, + XCB_XFIXES_SAVE_SET_MODE_DELETE +} xcb_xfixes_save_set_mode_t; + +typedef enum xcb_xfixes_save_set_target_t { + XCB_XFIXES_SAVE_SET_TARGET_NEAREST, + XCB_XFIXES_SAVE_SET_TARGET_ROOT +} xcb_xfixes_save_set_target_t; + +typedef enum xcb_xfixes_save_set_mapping_t { + XCB_XFIXES_SAVE_SET_MAPPING_MAP, + XCB_XFIXES_SAVE_SET_MAPPING_UNMAP +} xcb_xfixes_save_set_mapping_t; + +/** Opcode for xcb_xfixes_change_save_set. */ +#define XCB_XFIXES_CHANGE_SAVE_SET 1 + +/** + * @brief xcb_xfixes_change_save_set_request_t + **/ +typedef struct xcb_xfixes_change_save_set_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + uint8_t mode; /**< */ + uint8_t target; /**< */ + uint8_t map; /**< */ + uint8_t pad0; /**< */ + xcb_window_t window; /**< */ +} xcb_xfixes_change_save_set_request_t; + +typedef enum xcb_xfixes_selection_event_t { + XCB_XFIXES_SELECTION_EVENT_SET_SELECTION_OWNER, + XCB_XFIXES_SELECTION_EVENT_SELECTION_WINDOW_DESTROY, + XCB_XFIXES_SELECTION_EVENT_SELECTION_CLIENT_CLOSE +} xcb_xfixes_selection_event_t; + +typedef enum xcb_xfixes_selection_event_mask_t { + XCB_XFIXES_SELECTION_EVENT_MASK_SET_SELECTION_OWNER = 1, + XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_WINDOW_DESTROY = 2, + XCB_XFIXES_SELECTION_EVENT_MASK_SELECTION_CLIENT_CLOSE = 4 +} xcb_xfixes_selection_event_mask_t; + +/** Opcode for xcb_xfixes_selection_notify. */ +#define XCB_XFIXES_SELECTION_NOTIFY 0 + +/** + * @brief xcb_xfixes_selection_notify_event_t + **/ +typedef struct xcb_xfixes_selection_notify_event_t { + uint8_t response_type; /**< */ + uint8_t subtype; /**< */ + uint16_t sequence; /**< */ + xcb_window_t window; /**< */ + xcb_window_t owner; /**< */ + xcb_atom_t selection; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_timestamp_t selection_timestamp; /**< */ + uint8_t pad0[8]; /**< */ +} xcb_xfixes_selection_notify_event_t; + +/** Opcode for xcb_xfixes_select_selection_input. */ +#define XCB_XFIXES_SELECT_SELECTION_INPUT 2 + +/** + * @brief xcb_xfixes_select_selection_input_request_t + **/ +typedef struct xcb_xfixes_select_selection_input_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + xcb_atom_t selection; /**< */ + uint32_t event_mask; /**< */ +} xcb_xfixes_select_selection_input_request_t; + +typedef enum xcb_xfixes_cursor_notify_t { + XCB_XFIXES_CURSOR_NOTIFY_DISPLAY_CURSOR +} xcb_xfixes_cursor_notify_t; + +typedef enum xcb_xfixes_cursor_notify_mask_t { + XCB_XFIXES_CURSOR_NOTIFY_MASK_DISPLAY_CURSOR = 1 +} xcb_xfixes_cursor_notify_mask_t; + +/** Opcode for xcb_xfixes_cursor_notify. */ +#define XCB_XFIXES_CURSOR_NOTIFY 1 + +/** + * @brief xcb_xfixes_cursor_notify_event_t + **/ +typedef struct xcb_xfixes_cursor_notify_event_t { + uint8_t response_type; /**< */ + uint8_t subtype; /**< */ + uint16_t sequence; /**< */ + xcb_window_t window; /**< */ + uint32_t cursor_serial; /**< */ + xcb_timestamp_t timestamp; /**< */ + xcb_atom_t name; /**< */ + uint8_t pad0[12]; /**< */ +} xcb_xfixes_cursor_notify_event_t; + +/** Opcode for xcb_xfixes_select_cursor_input. */ +#define XCB_XFIXES_SELECT_CURSOR_INPUT 3 + +/** + * @brief xcb_xfixes_select_cursor_input_request_t + **/ +typedef struct xcb_xfixes_select_cursor_input_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ + uint32_t event_mask; /**< */ +} xcb_xfixes_select_cursor_input_request_t; + +/** + * @brief xcb_xfixes_get_cursor_image_cookie_t + **/ +typedef struct xcb_xfixes_get_cursor_image_cookie_t { + unsigned int sequence; /**< */ +} xcb_xfixes_get_cursor_image_cookie_t; + +/** Opcode for xcb_xfixes_get_cursor_image. */ +#define XCB_XFIXES_GET_CURSOR_IMAGE 4 + +/** + * @brief xcb_xfixes_get_cursor_image_request_t + **/ +typedef struct xcb_xfixes_get_cursor_image_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ +} xcb_xfixes_get_cursor_image_request_t; + +/** + * @brief xcb_xfixes_get_cursor_image_reply_t + **/ +typedef struct xcb_xfixes_get_cursor_image_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + int16_t x; /**< */ + int16_t y; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint16_t xhot; /**< */ + uint16_t yhot; /**< */ + uint32_t cursor_serial; /**< */ + uint8_t pad1[8]; /**< */ +} xcb_xfixes_get_cursor_image_reply_t; + +typedef uint32_t xcb_xfixes_region_t; + +/** + * @brief xcb_xfixes_region_iterator_t + **/ +typedef struct xcb_xfixes_region_iterator_t { + xcb_xfixes_region_t *data; /**< */ + int rem; /**< */ + int index; /**< */ +} xcb_xfixes_region_iterator_t; + +/** Opcode for xcb_xfixes_bad_region. */ +#define XCB_XFIXES_BAD_REGION 0 + +/** + * @brief xcb_xfixes_bad_region_error_t + **/ +typedef struct xcb_xfixes_bad_region_error_t { + uint8_t response_type; /**< */ + uint8_t error_code; /**< */ + uint16_t sequence; /**< */ +} xcb_xfixes_bad_region_error_t; + +typedef enum xcb_xfixes_region_enum_t { + XCB_XFIXES_REGION_NONE +} xcb_xfixes_region_enum_t; + +/** Opcode for xcb_xfixes_create_region. */ +#define XCB_XFIXES_CREATE_REGION 5 + +/** + * @brief xcb_xfixes_create_region_request_t + **/ +typedef struct xcb_xfixes_create_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ +} xcb_xfixes_create_region_request_t; + +/** Opcode for xcb_xfixes_create_region_from_bitmap. */ +#define XCB_XFIXES_CREATE_REGION_FROM_BITMAP 6 + +/** + * @brief xcb_xfixes_create_region_from_bitmap_request_t + **/ +typedef struct xcb_xfixes_create_region_from_bitmap_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ + xcb_pixmap_t bitmap; /**< */ +} xcb_xfixes_create_region_from_bitmap_request_t; + +/** Opcode for xcb_xfixes_create_region_from_window. */ +#define XCB_XFIXES_CREATE_REGION_FROM_WINDOW 7 + +/** + * @brief xcb_xfixes_create_region_from_window_request_t + **/ +typedef struct xcb_xfixes_create_region_from_window_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ + xcb_window_t window; /**< */ + xcb_shape_kind_t kind; /**< */ + uint8_t pad0[3]; /**< */ +} xcb_xfixes_create_region_from_window_request_t; + +/** Opcode for xcb_xfixes_create_region_from_gc. */ +#define XCB_XFIXES_CREATE_REGION_FROM_GC 8 + +/** + * @brief xcb_xfixes_create_region_from_gc_request_t + **/ +typedef struct xcb_xfixes_create_region_from_gc_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ + xcb_gcontext_t gc; /**< */ +} xcb_xfixes_create_region_from_gc_request_t; + +/** Opcode for xcb_xfixes_create_region_from_picture. */ +#define XCB_XFIXES_CREATE_REGION_FROM_PICTURE 9 + +/** + * @brief xcb_xfixes_create_region_from_picture_request_t + **/ +typedef struct xcb_xfixes_create_region_from_picture_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ + xcb_render_picture_t picture; /**< */ +} xcb_xfixes_create_region_from_picture_request_t; + +/** Opcode for xcb_xfixes_destroy_region. */ +#define XCB_XFIXES_DESTROY_REGION 10 + +/** + * @brief xcb_xfixes_destroy_region_request_t + **/ +typedef struct xcb_xfixes_destroy_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ +} xcb_xfixes_destroy_region_request_t; + +/** Opcode for xcb_xfixes_set_region. */ +#define XCB_XFIXES_SET_REGION 11 + +/** + * @brief xcb_xfixes_set_region_request_t + **/ +typedef struct xcb_xfixes_set_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ +} xcb_xfixes_set_region_request_t; + +/** Opcode for xcb_xfixes_copy_region. */ +#define XCB_XFIXES_COPY_REGION 12 + +/** + * @brief xcb_xfixes_copy_region_request_t + **/ +typedef struct xcb_xfixes_copy_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t source; /**< */ + xcb_xfixes_region_t destination; /**< */ +} xcb_xfixes_copy_region_request_t; + +/** Opcode for xcb_xfixes_union_region. */ +#define XCB_XFIXES_UNION_REGION 13 + +/** + * @brief xcb_xfixes_union_region_request_t + **/ +typedef struct xcb_xfixes_union_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t source1; /**< */ + xcb_xfixes_region_t source2; /**< */ + xcb_xfixes_region_t destination; /**< */ +} xcb_xfixes_union_region_request_t; + +/** Opcode for xcb_xfixes_intersect_region. */ +#define XCB_XFIXES_INTERSECT_REGION 14 + +/** + * @brief xcb_xfixes_intersect_region_request_t + **/ +typedef struct xcb_xfixes_intersect_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t source1; /**< */ + xcb_xfixes_region_t source2; /**< */ + xcb_xfixes_region_t destination; /**< */ +} xcb_xfixes_intersect_region_request_t; + +/** Opcode for xcb_xfixes_subtract_region. */ +#define XCB_XFIXES_SUBTRACT_REGION 15 + +/** + * @brief xcb_xfixes_subtract_region_request_t + **/ +typedef struct xcb_xfixes_subtract_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t source1; /**< */ + xcb_xfixes_region_t source2; /**< */ + xcb_xfixes_region_t destination; /**< */ +} xcb_xfixes_subtract_region_request_t; + +/** Opcode for xcb_xfixes_invert_region. */ +#define XCB_XFIXES_INVERT_REGION 16 + +/** + * @brief xcb_xfixes_invert_region_request_t + **/ +typedef struct xcb_xfixes_invert_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t source; /**< */ + xcb_rectangle_t bounds; /**< */ + xcb_xfixes_region_t destination; /**< */ +} xcb_xfixes_invert_region_request_t; + +/** Opcode for xcb_xfixes_translate_region. */ +#define XCB_XFIXES_TRANSLATE_REGION 17 + +/** + * @brief xcb_xfixes_translate_region_request_t + **/ +typedef struct xcb_xfixes_translate_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ + int16_t dx; /**< */ + int16_t dy; /**< */ +} xcb_xfixes_translate_region_request_t; + +/** Opcode for xcb_xfixes_region_extents. */ +#define XCB_XFIXES_REGION_EXTENTS 18 + +/** + * @brief xcb_xfixes_region_extents_request_t + **/ +typedef struct xcb_xfixes_region_extents_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t source; /**< */ + xcb_xfixes_region_t destination; /**< */ +} xcb_xfixes_region_extents_request_t; + +/** + * @brief xcb_xfixes_fetch_region_cookie_t + **/ +typedef struct xcb_xfixes_fetch_region_cookie_t { + unsigned int sequence; /**< */ +} xcb_xfixes_fetch_region_cookie_t; + +/** Opcode for xcb_xfixes_fetch_region. */ +#define XCB_XFIXES_FETCH_REGION 19 + +/** + * @brief xcb_xfixes_fetch_region_request_t + **/ +typedef struct xcb_xfixes_fetch_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t region; /**< */ +} xcb_xfixes_fetch_region_request_t; + +/** + * @brief xcb_xfixes_fetch_region_reply_t + **/ +typedef struct xcb_xfixes_fetch_region_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_rectangle_t extents; /**< */ + uint8_t pad1[16]; /**< */ +} xcb_xfixes_fetch_region_reply_t; + +/** Opcode for xcb_xfixes_set_gc_clip_region. */ +#define XCB_XFIXES_SET_GC_CLIP_REGION 20 + +/** + * @brief xcb_xfixes_set_gc_clip_region_request_t + **/ +typedef struct xcb_xfixes_set_gc_clip_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_gcontext_t gc; /**< */ + xcb_xfixes_region_t region; /**< */ + int16_t x_origin; /**< */ + int16_t y_origin; /**< */ +} xcb_xfixes_set_gc_clip_region_request_t; + +/** Opcode for xcb_xfixes_set_window_shape_region. */ +#define XCB_XFIXES_SET_WINDOW_SHAPE_REGION 21 + +/** + * @brief xcb_xfixes_set_window_shape_region_request_t + **/ +typedef struct xcb_xfixes_set_window_shape_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t dest; /**< */ + xcb_shape_kind_t dest_kind; /**< */ + uint8_t pad0[3]; /**< */ + int16_t x_offset; /**< */ + int16_t y_offset; /**< */ + xcb_xfixes_region_t region; /**< */ +} xcb_xfixes_set_window_shape_region_request_t; + +/** Opcode for xcb_xfixes_set_picture_clip_region. */ +#define XCB_XFIXES_SET_PICTURE_CLIP_REGION 22 + +/** + * @brief xcb_xfixes_set_picture_clip_region_request_t + **/ +typedef struct xcb_xfixes_set_picture_clip_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_render_picture_t picture; /**< */ + xcb_xfixes_region_t region; /**< */ + int16_t x_origin; /**< */ + int16_t y_origin; /**< */ +} xcb_xfixes_set_picture_clip_region_request_t; + +/** Opcode for xcb_xfixes_set_cursor_name. */ +#define XCB_XFIXES_SET_CURSOR_NAME 23 + +/** + * @brief xcb_xfixes_set_cursor_name_request_t + **/ +typedef struct xcb_xfixes_set_cursor_name_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_cursor_t cursor; /**< */ + uint16_t nbytes; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_xfixes_set_cursor_name_request_t; + +/** + * @brief xcb_xfixes_get_cursor_name_cookie_t + **/ +typedef struct xcb_xfixes_get_cursor_name_cookie_t { + unsigned int sequence; /**< */ +} xcb_xfixes_get_cursor_name_cookie_t; + +/** Opcode for xcb_xfixes_get_cursor_name. */ +#define XCB_XFIXES_GET_CURSOR_NAME 24 + +/** + * @brief xcb_xfixes_get_cursor_name_request_t + **/ +typedef struct xcb_xfixes_get_cursor_name_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_cursor_t cursor; /**< */ +} xcb_xfixes_get_cursor_name_request_t; + +/** + * @brief xcb_xfixes_get_cursor_name_reply_t + **/ +typedef struct xcb_xfixes_get_cursor_name_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + xcb_atom_t atom; /**< */ + uint16_t nbytes; /**< */ + uint8_t pad1[18]; /**< */ +} xcb_xfixes_get_cursor_name_reply_t; + +/** + * @brief xcb_xfixes_get_cursor_image_and_name_cookie_t + **/ +typedef struct xcb_xfixes_get_cursor_image_and_name_cookie_t { + unsigned int sequence; /**< */ +} xcb_xfixes_get_cursor_image_and_name_cookie_t; + +/** Opcode for xcb_xfixes_get_cursor_image_and_name. */ +#define XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME 25 + +/** + * @brief xcb_xfixes_get_cursor_image_and_name_request_t + **/ +typedef struct xcb_xfixes_get_cursor_image_and_name_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ +} xcb_xfixes_get_cursor_image_and_name_request_t; + +/** + * @brief xcb_xfixes_get_cursor_image_and_name_reply_t + **/ +typedef struct xcb_xfixes_get_cursor_image_and_name_reply_t { + uint8_t response_type; /**< */ + uint8_t pad0; /**< */ + uint16_t sequence; /**< */ + uint32_t length; /**< */ + int16_t x; /**< */ + int16_t y; /**< */ + uint16_t width; /**< */ + uint16_t height; /**< */ + uint16_t xhot; /**< */ + uint16_t yhot; /**< */ + uint32_t cursor_serial; /**< */ + xcb_atom_t cursor_atom; /**< */ + uint16_t nbytes; /**< */ + uint8_t pad1[2]; /**< */ +} xcb_xfixes_get_cursor_image_and_name_reply_t; + +/** Opcode for xcb_xfixes_change_cursor. */ +#define XCB_XFIXES_CHANGE_CURSOR 26 + +/** + * @brief xcb_xfixes_change_cursor_request_t + **/ +typedef struct xcb_xfixes_change_cursor_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_cursor_t source; /**< */ + xcb_cursor_t destination; /**< */ +} xcb_xfixes_change_cursor_request_t; + +/** Opcode for xcb_xfixes_change_cursor_by_name. */ +#define XCB_XFIXES_CHANGE_CURSOR_BY_NAME 27 + +/** + * @brief xcb_xfixes_change_cursor_by_name_request_t + **/ +typedef struct xcb_xfixes_change_cursor_by_name_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_cursor_t src; /**< */ + uint16_t nbytes; /**< */ + uint8_t pad0[2]; /**< */ +} xcb_xfixes_change_cursor_by_name_request_t; + +/** Opcode for xcb_xfixes_expand_region. */ +#define XCB_XFIXES_EXPAND_REGION 28 + +/** + * @brief xcb_xfixes_expand_region_request_t + **/ +typedef struct xcb_xfixes_expand_region_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_xfixes_region_t source; /**< */ + xcb_xfixes_region_t destination; /**< */ + uint16_t left; /**< */ + uint16_t right; /**< */ + uint16_t top; /**< */ + uint16_t bottom; /**< */ +} xcb_xfixes_expand_region_request_t; + +/** Opcode for xcb_xfixes_hide_cursor. */ +#define XCB_XFIXES_HIDE_CURSOR 29 + +/** + * @brief xcb_xfixes_hide_cursor_request_t + **/ +typedef struct xcb_xfixes_hide_cursor_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ +} xcb_xfixes_hide_cursor_request_t; + +/** Opcode for xcb_xfixes_show_cursor. */ +#define XCB_XFIXES_SHOW_CURSOR 30 + +/** + * @brief xcb_xfixes_show_cursor_request_t + **/ +typedef struct xcb_xfixes_show_cursor_request_t { + uint8_t major_opcode; /**< */ + uint8_t minor_opcode; /**< */ + uint16_t length; /**< */ + xcb_window_t window; /**< */ +} xcb_xfixes_show_cursor_request_t; + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_xfixes_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_query_version_cookie_t +xcb_xfixes_query_version (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_xfixes_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_query_version_cookie_t +xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_query_version_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_xfixes_query_version_reply_t * xcb_xfixes_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_query_version_reply_t * +xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */, + xcb_xfixes_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_save_set_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t mode + ** @param uint8_t target + ** @param uint8_t map + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */, + uint8_t mode /**< */, + uint8_t target /**< */, + uint8_t map /**< */, + xcb_window_t window /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_save_set + ** + ** @param xcb_connection_t *c + ** @param uint8_t mode + ** @param uint8_t target + ** @param uint8_t map + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_save_set (xcb_connection_t *c /**< */, + uint8_t mode /**< */, + uint8_t target /**< */, + uint8_t map /**< */, + xcb_window_t window /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_selection_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_atom_t selection + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_atom_t selection /**< */, + uint32_t event_mask /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_selection_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_atom_t selection + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_atom_t selection /**< */, + uint32_t event_mask /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_cursor_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint32_t event_mask /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_cursor_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint32_t event_mask /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_cookie_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_cookie_t +xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */); + + +/***************************************************************************** + ** + ** uint32_t * xcb_xfixes_get_cursor_image_cursor_image + ** + ** @param const xcb_xfixes_get_cursor_image_reply_t *R + ** @returns uint32_t * + ** + *****************************************************************************/ + +uint32_t * +xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_image_cursor_image_length + ** + ** @param const xcb_xfixes_get_cursor_image_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_cursor_image_end + ** + ** @param const xcb_xfixes_get_cursor_image_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_get_cursor_image_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_reply_t * xcb_xfixes_get_cursor_image_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_get_cursor_image_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_get_cursor_image_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_reply_t * +xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */, + xcb_xfixes_get_cursor_image_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Get the next element of the iterator + * @param i Pointer to a xcb_xfixes_region_iterator_t + * + * Get the next element in the iterator. The member rem is + * decreased by one. The member data points to the next + * element. The member index is increased by sizeof(xcb_xfixes_region_t) + */ + +/***************************************************************************** + ** + ** void xcb_xfixes_region_next + ** + ** @param xcb_xfixes_region_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */); + +/** + * Return the iterator pointing to the last element + * @param i An xcb_xfixes_region_iterator_t + * @return The iterator pointing to the last element + * + * Set the current element in the iterator to the last element. + * The member rem is set to 0. The member data points to the + * last element. + */ + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_region_end + ** + ** @param xcb_xfixes_region_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_pixmap_t bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_pixmap_t bitmap /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_pixmap_t bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_pixmap_t bitmap /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_window_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_window_t window + ** @param xcb_shape_kind_t kind + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t kind /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_window + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_window_t window + ** @param xcb_shape_kind_t kind + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t kind /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_gc_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_gcontext_t gc + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_gcontext_t gc /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_gc + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_gcontext_t gc + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_gcontext_t gc /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_render_picture_t picture /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_render_picture_t picture /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_destroy_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_destroy_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_destroy_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_copy_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_copy_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_copy_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_union_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_union_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_union_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_intersect_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_intersect_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_intersect_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_subtract_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_subtract_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_subtract_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_invert_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_rectangle_t bounds + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_rectangle_t bounds /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_invert_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_rectangle_t bounds + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_invert_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_rectangle_t bounds /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_translate_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param int16_t dx + ** @param int16_t dy + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + int16_t dx /**< */, + int16_t dy /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_translate_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param int16_t dx + ** @param int16_t dy + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_translate_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + int16_t dx /**< */, + int16_t dy /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_region_extents_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_region_extents + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_region_extents (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_xfixes_fetch_region_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_fetch_region_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_xfixes_fetch_region_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_fetch_region_cookie_t +xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */); + + +/***************************************************************************** + ** + ** xcb_rectangle_t * xcb_xfixes_fetch_region_rectangles + ** + ** @param const xcb_xfixes_fetch_region_reply_t *R + ** @returns xcb_rectangle_t * + ** + *****************************************************************************/ + +xcb_rectangle_t * +xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_xfixes_fetch_region_rectangles_length + ** + ** @param const xcb_xfixes_fetch_region_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_rectangle_iterator_t xcb_xfixes_fetch_region_rectangles_iterator + ** + ** @param const xcb_xfixes_fetch_region_reply_t *R + ** @returns xcb_rectangle_iterator_t + ** + *****************************************************************************/ + +xcb_rectangle_iterator_t +xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_fetch_region_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_xfixes_fetch_region_reply_t * xcb_xfixes_fetch_region_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_fetch_region_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_fetch_region_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_fetch_region_reply_t * +xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */, + xcb_xfixes_fetch_region_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_gcontext_t gc + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */, + xcb_gcontext_t gc /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region + ** + ** @param xcb_connection_t *c + ** @param xcb_gcontext_t gc + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */, + xcb_gcontext_t gc /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_window_shape_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t dest + ** @param xcb_shape_kind_t dest_kind + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */, + xcb_window_t dest /**< */, + xcb_shape_kind_t dest_kind /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_xfixes_region_t region /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_window_shape_region + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t dest + ** @param xcb_shape_kind_t dest_kind + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */, + xcb_window_t dest /**< */, + xcb_shape_kind_t dest_kind /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_xfixes_region_t region /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_picture_clip_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_picture_clip_region + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_cursor_name_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */, + xcb_cursor_t cursor /**< */, + uint16_t nbytes /**< */, + const char *name /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_cursor_name + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */, + xcb_cursor_t cursor /**< */, + uint16_t nbytes /**< */, + const char *name /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @returns xcb_xfixes_get_cursor_name_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_name_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @returns xcb_xfixes_get_cursor_name_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_name_cookie_t +xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */, + xcb_cursor_t cursor /**< */); + + +/***************************************************************************** + ** + ** char * xcb_xfixes_get_cursor_name_name + ** + ** @param const xcb_xfixes_get_cursor_name_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_name_name_length + ** + ** @param const xcb_xfixes_get_cursor_name_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_name_name_end + ** + ** @param const xcb_xfixes_get_cursor_name_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_get_cursor_name_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_name_reply_t * xcb_xfixes_get_cursor_name_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_get_cursor_name_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_get_cursor_name_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_name_reply_t * +xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< */, + xcb_xfixes_get_cursor_name_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t + ** + *****************************************************************************/ + +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will cause + * a reply to be generated. Any returned error will be + * placed in the event queue. + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_and_name_cookie_t +xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */); + + +/***************************************************************************** + ** + ** char * xcb_xfixes_get_cursor_image_and_name_name + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_image_and_name_name_length + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_name_end + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** uint32_t * xcb_xfixes_get_cursor_image_and_name_cursor_image + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns uint32_t * + ** + *****************************************************************************/ + +uint32_t * +xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_image_and_name_cursor_image_length + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */); + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_cursor_image_end + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */); + +/** + * Return the reply + * @param c The connection + * @param cookie The cookie + * @param e The xcb_generic_error_t supplied + * + * Returns the reply of the request asked by + * + * The parameter @p e supplied to this function must be NULL if + * xcb_xfixes_get_cursor_image_and_name_unchecked(). is used. + * Otherwise, it stores the error if any. + * + * The returned value must be freed by the caller using free(). + */ + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_and_name_reply_t * xcb_xfixes_get_cursor_image_and_name_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_get_cursor_image_and_name_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_get_cursor_image_and_name_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_and_name_reply_t * +xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */, + xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t source + ** @param xcb_cursor_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */, + xcb_cursor_t source /**< */, + xcb_cursor_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t source + ** @param xcb_cursor_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor (xcb_connection_t *c /**< */, + xcb_cursor_t source /**< */, + xcb_cursor_t destination /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t src + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */, + xcb_cursor_t src /**< */, + uint16_t nbytes /**< */, + const char *name /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t src + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */, + xcb_cursor_t src /**< */, + uint16_t nbytes /**< */, + const char *name /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_expand_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @param uint16_t left + ** @param uint16_t right + ** @param uint16_t top + ** @param uint16_t bottom + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */, + uint16_t left /**< */, + uint16_t right /**< */, + uint16_t top /**< */, + uint16_t bottom /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_expand_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @param uint16_t left + ** @param uint16_t right + ** @param uint16_t top + ** @param uint16_t bottom + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_expand_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */, + uint16_t left /**< */, + uint16_t right /**< */, + uint16_t top /**< */, + uint16_t bottom /**< */); + +/** + * Delivers a request to the X server + * @param c The connection + * @return A cookie + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_hide_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_hide_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + * This form can be used only if the request will not cause + * a reply to be generated. Any returned error will be + * saved for handling by xcb_request_check(). + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_show_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +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 + * + * Delivers a request to the X server. + * + */ + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_show_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_show_cursor (xcb_connection_t *c /**< */, + xcb_window_t window /**< */); + + +#ifdef __cplusplus +} +#endif + +#endif + +/** + * @} + */ diff --git a/src/3rdparty/xcb/libxcb/randr.c b/src/3rdparty/xcb/libxcb/randr.c new file mode 100644 index 0000000000..1956ee033e --- /dev/null +++ b/src/3rdparty/xcb/libxcb/randr.c @@ -0,0 +1,4827 @@ +/* + * This file generated automatically from randr.xml by c_client.py. + * Edit at your peril. + */ + +#include +#include +#include "xcbext.h" +#include "randr.h" +#include "xproto.h" +#include "render.h" + +xcb_extension_t xcb_randr_id = { "RANDR", 0 }; + + +/***************************************************************************** + ** + ** void xcb_randr_mode_next + ** + ** @param xcb_randr_mode_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_mode_next (xcb_randr_mode_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_mode_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_mode_end + ** + ** @param xcb_randr_mode_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_mode_end (xcb_randr_mode_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_randr_crtc_next + ** + ** @param xcb_randr_crtc_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_crtc_next (xcb_randr_crtc_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_crtc_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_crtc_end + ** + ** @param xcb_randr_crtc_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_crtc_end (xcb_randr_crtc_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_randr_output_next + ** + ** @param xcb_randr_output_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_output_next (xcb_randr_output_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_output_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_output_end + ** + ** @param xcb_randr_output_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_output_end (xcb_randr_output_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_randr_screen_size_next + ** + ** @param xcb_randr_screen_size_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_screen_size_next (xcb_randr_screen_size_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_screen_size_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_screen_size_end + ** + ** @param xcb_randr_screen_size_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_screen_size_end (xcb_randr_screen_size_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_refresh_rates_rates + ** + ** @param const xcb_randr_refresh_rates_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_refresh_rates_rates (const xcb_randr_refresh_rates_t *R /**< */) +{ + return (uint16_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_refresh_rates_rates_length + ** + ** @param const xcb_randr_refresh_rates_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_refresh_rates_rates_length (const xcb_randr_refresh_rates_t *R /**< */) +{ + return R->nRates; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_refresh_rates_rates_end + ** + ** @param const xcb_randr_refresh_rates_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_refresh_rates_rates_end (const xcb_randr_refresh_rates_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((uint16_t *) (R + 1)) + (R->nRates); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** void xcb_randr_refresh_rates_next + ** + ** @param xcb_randr_refresh_rates_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +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); + --i->rem; + i->data = (xcb_randr_refresh_rates_t *) child.data; + i->index = child.index; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_refresh_rates_end + ** + ** @param xcb_randr_refresh_rates_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_refresh_rates_end (xcb_randr_refresh_rates_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + while(i.rem > 0) + xcb_randr_refresh_rates_next(&i); + ret.data = i.data; + ret.rem = i.rem; + ret.index = i.index; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_query_version_cookie_t xcb_randr_query_version + ** + ** @param xcb_connection_t *c + ** @param uint32_t major_version + ** @param uint32_t minor_version + ** @returns xcb_randr_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_version_cookie_t +xcb_randr_query_version (xcb_connection_t *c /**< */, + uint32_t major_version /**< */, + uint32_t minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_query_version_cookie_t xcb_ret; + xcb_randr_query_version_request_t xcb_out; + + xcb_out.major_version = major_version; + xcb_out.minor_version = minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_query_version_cookie_t xcb_randr_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t major_version + ** @param uint32_t minor_version + ** @returns xcb_randr_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_version_cookie_t +xcb_randr_query_version_unchecked (xcb_connection_t *c /**< */, + uint32_t major_version /**< */, + uint32_t minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_query_version_cookie_t xcb_ret; + xcb_randr_query_version_request_t xcb_out; + + xcb_out.major_version = major_version; + xcb_out.minor_version = minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_query_version_reply_t * xcb_randr_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_randr_query_version_reply_t * +xcb_randr_query_version_reply (xcb_connection_t *c /**< */, + xcb_randr_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param uint16_t sizeID + ** @param uint16_t rotation + ** @param uint16_t rate + ** @returns xcb_randr_set_screen_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_screen_config_cookie_t +xcb_randr_set_screen_config (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + uint16_t sizeID /**< */, + uint16_t rotation /**< */, + uint16_t rate /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_set_screen_config_cookie_t xcb_ret; + xcb_randr_set_screen_config_request_t xcb_out; + + xcb_out.window = window; + xcb_out.timestamp = timestamp; + xcb_out.config_timestamp = config_timestamp; + xcb_out.sizeID = sizeID; + xcb_out.rotation = rotation; + xcb_out.rate = rate; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_set_screen_config_cookie_t xcb_randr_set_screen_config_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param uint16_t sizeID + ** @param uint16_t rotation + ** @param uint16_t rate + ** @returns xcb_randr_set_screen_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_screen_config_cookie_t +xcb_randr_set_screen_config_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + uint16_t sizeID /**< */, + uint16_t rotation /**< */, + uint16_t rate /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_SCREEN_CONFIG, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_set_screen_config_cookie_t xcb_ret; + xcb_randr_set_screen_config_request_t xcb_out; + + xcb_out.window = window; + xcb_out.timestamp = timestamp; + xcb_out.config_timestamp = config_timestamp; + xcb_out.sizeID = sizeID; + xcb_out.rotation = rotation; + xcb_out.rate = rate; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_set_screen_config_reply_t * xcb_randr_set_screen_config_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_set_screen_config_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_set_screen_config_reply_t * + ** + *****************************************************************************/ + +xcb_randr_set_screen_config_reply_t * +xcb_randr_set_screen_config_reply (xcb_connection_t *c /**< */, + xcb_randr_set_screen_config_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_set_screen_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_select_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_select_input_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t enable /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SELECT_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_select_input_request_t xcb_out; + + xcb_out.window = window; + xcb_out.enable = enable; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_select_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_select_input (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t enable /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SELECT_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_select_input_request_t xcb_out; + + xcb_out.window = window; + xcb_out.enable = enable; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_info_cookie_t +xcb_randr_get_screen_info (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_INFO, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_info_cookie_t xcb_ret; + xcb_randr_get_screen_info_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_info_cookie_t xcb_randr_get_screen_info_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_info_cookie_t +xcb_randr_get_screen_info_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_INFO, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_info_cookie_t xcb_ret; + xcb_randr_get_screen_info_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_screen_size_t * xcb_randr_get_screen_info_sizes + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns xcb_randr_screen_size_t * + ** + *****************************************************************************/ + +xcb_randr_screen_size_t * +xcb_randr_get_screen_info_sizes (const xcb_randr_get_screen_info_reply_t *R /**< */) +{ + return (xcb_randr_screen_size_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_info_sizes_length + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_info_sizes_length (const xcb_randr_get_screen_info_reply_t *R /**< */) +{ + return R->nSizes; +} + + +/***************************************************************************** + ** + ** xcb_randr_screen_size_iterator_t xcb_randr_get_screen_info_sizes_iterator + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns xcb_randr_screen_size_iterator_t + ** + *****************************************************************************/ + +xcb_randr_screen_size_iterator_t +xcb_randr_get_screen_info_sizes_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */) +{ + xcb_randr_screen_size_iterator_t i; + i.data = (xcb_randr_screen_size_t *) (R + 1); + i.rem = R->nSizes; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_info_rates_length + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_info_rates_length (const xcb_randr_get_screen_info_reply_t *R /**< */) +{ + return (R->nInfo - R->nSizes); +} + + +/***************************************************************************** + ** + ** xcb_randr_refresh_rates_iterator_t xcb_randr_get_screen_info_rates_iterator + ** + ** @param const xcb_randr_get_screen_info_reply_t *R + ** @returns xcb_randr_refresh_rates_iterator_t + ** + *****************************************************************************/ + +xcb_randr_refresh_rates_iterator_t +xcb_randr_get_screen_info_rates_iterator (const xcb_randr_get_screen_info_reply_t *R /**< */) +{ + xcb_randr_refresh_rates_iterator_t i; + xcb_generic_iterator_t prev = xcb_randr_screen_size_end(xcb_randr_get_screen_info_sizes_iterator(R)); + i.data = (xcb_randr_refresh_rates_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_refresh_rates_t, prev.index)); + i.rem = (R->nInfo - R->nSizes); + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_info_reply_t * xcb_randr_get_screen_info_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_info_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_info_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_info_reply_t * +xcb_randr_get_screen_info_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_info_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_screen_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_size_range_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_size_range_cookie_t +xcb_randr_get_screen_size_range (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_size_range_cookie_t xcb_ret; + xcb_randr_get_screen_size_range_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_size_range_cookie_t xcb_randr_get_screen_size_range_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_size_range_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_size_range_cookie_t +xcb_randr_get_screen_size_range_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_SIZE_RANGE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_size_range_cookie_t xcb_ret; + xcb_randr_get_screen_size_range_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_size_range_reply_t * xcb_randr_get_screen_size_range_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_size_range_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_size_range_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_size_range_reply_t * +xcb_randr_get_screen_size_range_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_size_range_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_screen_size_range_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_screen_size_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t mm_width + ** @param uint32_t mm_height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_screen_size_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t mm_width /**< */, + uint32_t mm_height /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_SCREEN_SIZE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_screen_size_request_t xcb_out; + + xcb_out.window = window; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.mm_width = mm_width; + xcb_out.mm_height = mm_height; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_screen_size + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t mm_width + ** @param uint32_t mm_height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_screen_size (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t mm_width /**< */, + uint32_t mm_height /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_SCREEN_SIZE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_screen_size_request_t xcb_out; + + xcb_out.window = window; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.mm_width = mm_width; + xcb_out.mm_height = mm_height; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** void xcb_randr_mode_info_next + ** + ** @param xcb_randr_mode_info_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_mode_info_next (xcb_randr_mode_info_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_mode_info_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_mode_info_end + ** + ** @param xcb_randr_mode_info_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_mode_info_end (xcb_randr_mode_info_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_cookie_t +xcb_randr_get_screen_resources (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_resources_cookie_t xcb_ret; + xcb_randr_get_screen_resources_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_cookie_t xcb_randr_get_screen_resources_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_cookie_t +xcb_randr_get_screen_resources_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_resources_cookie_t xcb_ret; + xcb_randr_get_screen_resources_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_crtcs + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_crtc_t * + ** + *****************************************************************************/ + +xcb_randr_crtc_t * +xcb_randr_get_screen_resources_crtcs (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + return (xcb_randr_crtc_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_crtcs_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_crtcs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + return R->num_crtcs; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_crtcs_end + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_crtcs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_screen_resources_outputs + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_screen_resources_outputs (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_crtcs_end(R); + return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_outputs_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_outputs_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + return R->num_outputs; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_outputs_end + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_outputs_end (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_screen_resources_crtcs_end(R); + i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_modes + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_mode_info_t * + ** + *****************************************************************************/ + +xcb_randr_mode_info_t * +xcb_randr_get_screen_resources_modes (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R); + return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_modes_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_modes_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + return R->num_modes; +} + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_modes_iterator + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_randr_mode_info_iterator_t + ** + *****************************************************************************/ + +xcb_randr_mode_info_iterator_t +xcb_randr_get_screen_resources_modes_iterator (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + xcb_randr_mode_info_iterator_t i; + xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_outputs_end(R); + i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index)); + i.rem = R->num_modes; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_screen_resources_names + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_screen_resources_names (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R)); + return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_names_length + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_names_length (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + return R->names_len; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_names_end + ** + ** @param const xcb_randr_get_screen_resources_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_names_end (const xcb_randr_get_screen_resources_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_modes_iterator(R)); + i.data = ((uint8_t *) child.data) + (R->names_len); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_reply_t * xcb_randr_get_screen_resources_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_resources_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_resources_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_reply_t * +xcb_randr_get_screen_resources_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_resources_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_screen_resources_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_output_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_info_cookie_t +xcb_randr_get_output_info (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_timestamp_t config_timestamp /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_OUTPUT_INFO, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_output_info_cookie_t xcb_ret; + xcb_randr_get_output_info_request_t xcb_out; + + xcb_out.output = output; + xcb_out.config_timestamp = config_timestamp; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_info_cookie_t xcb_randr_get_output_info_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_output_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_info_cookie_t +xcb_randr_get_output_info_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_timestamp_t config_timestamp /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_OUTPUT_INFO, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_output_info_cookie_t xcb_ret; + xcb_randr_get_output_info_request_t xcb_out; + + xcb_out.output = output; + xcb_out.config_timestamp = config_timestamp; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_crtc_t * xcb_randr_get_output_info_crtcs + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_randr_crtc_t * + ** + *****************************************************************************/ + +xcb_randr_crtc_t * +xcb_randr_get_output_info_crtcs (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + return (xcb_randr_crtc_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_crtcs_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_crtcs_length (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + return R->num_crtcs; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_crtcs_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_crtcs_end (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_mode_t * xcb_randr_get_output_info_modes + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_randr_mode_t * + ** + *****************************************************************************/ + +xcb_randr_mode_t * +xcb_randr_get_output_info_modes (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_output_info_crtcs_end(R); + return (xcb_randr_mode_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_modes_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_modes_length (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + return R->num_modes; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_modes_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_modes_end (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_output_info_crtcs_end(R); + i.data = ((xcb_randr_mode_t *) child.data) + (R->num_modes); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_output_info_clones + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_output_info_clones (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_output_info_modes_end(R); + return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_clones_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_clones_length (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + return R->num_clones; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_clones_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_clones_end (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_output_info_modes_end(R); + i.data = ((xcb_randr_output_t *) child.data) + (R->num_clones); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_output_info_name + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_output_info_name (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_output_info_clones_end(R); + return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_info_name_length + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_info_name_length (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + return R->name_len; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_info_name_end + ** + ** @param const xcb_randr_get_output_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_info_name_end (const xcb_randr_get_output_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_output_info_clones_end(R); + i.data = ((uint8_t *) child.data) + (R->name_len); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_info_reply_t * xcb_randr_get_output_info_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_output_info_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_output_info_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_output_info_reply_t * +xcb_randr_get_output_info_reply (xcb_connection_t *c /**< */, + xcb_randr_get_output_info_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_output_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @returns xcb_randr_list_output_properties_cookie_t + ** + *****************************************************************************/ + +xcb_randr_list_output_properties_cookie_t +xcb_randr_list_output_properties (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_list_output_properties_cookie_t xcb_ret; + xcb_randr_list_output_properties_request_t xcb_out; + + xcb_out.output = output; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_list_output_properties_cookie_t xcb_randr_list_output_properties_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @returns xcb_randr_list_output_properties_cookie_t + ** + *****************************************************************************/ + +xcb_randr_list_output_properties_cookie_t +xcb_randr_list_output_properties_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_LIST_OUTPUT_PROPERTIES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_list_output_properties_cookie_t xcb_ret; + xcb_randr_list_output_properties_request_t xcb_out; + + xcb_out.output = output; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_atom_t * xcb_randr_list_output_properties_atoms + ** + ** @param const xcb_randr_list_output_properties_reply_t *R + ** @returns xcb_atom_t * + ** + *****************************************************************************/ + +xcb_atom_t * +xcb_randr_list_output_properties_atoms (const xcb_randr_list_output_properties_reply_t *R /**< */) +{ + return (xcb_atom_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_list_output_properties_atoms_length + ** + ** @param const xcb_randr_list_output_properties_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_list_output_properties_atoms_length (const xcb_randr_list_output_properties_reply_t *R /**< */) +{ + return R->num_atoms; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_list_output_properties_atoms_end + ** + ** @param const xcb_randr_list_output_properties_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_list_output_properties_atoms_end (const xcb_randr_list_output_properties_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((xcb_atom_t *) (R + 1)) + (R->num_atoms); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_list_output_properties_reply_t * xcb_randr_list_output_properties_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_list_output_properties_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_list_output_properties_reply_t * + ** + *****************************************************************************/ + +xcb_randr_list_output_properties_reply_t * +xcb_randr_list_output_properties_reply (xcb_connection_t *c /**< */, + xcb_randr_list_output_properties_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_list_output_properties_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_randr_query_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_output_property_cookie_t +xcb_randr_query_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_query_output_property_cookie_t xcb_ret; + xcb_randr_query_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_query_output_property_cookie_t xcb_randr_query_output_property_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_randr_query_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_query_output_property_cookie_t +xcb_randr_query_output_property_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_QUERY_OUTPUT_PROPERTY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_query_output_property_cookie_t xcb_ret; + xcb_randr_query_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** int32_t * xcb_randr_query_output_property_valid_values + ** + ** @param const xcb_randr_query_output_property_reply_t *R + ** @returns int32_t * + ** + *****************************************************************************/ + +int32_t * +xcb_randr_query_output_property_valid_values (const xcb_randr_query_output_property_reply_t *R /**< */) +{ + return (int32_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_query_output_property_valid_values_length + ** + ** @param const xcb_randr_query_output_property_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_query_output_property_valid_values_length (const xcb_randr_query_output_property_reply_t *R /**< */) +{ + return R->length; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_query_output_property_valid_values_end + ** + ** @param const xcb_randr_query_output_property_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_query_output_property_valid_values_end (const xcb_randr_query_output_property_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((int32_t *) (R + 1)) + (R->length); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_query_output_property_reply_t * xcb_randr_query_output_property_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_query_output_property_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_query_output_property_reply_t * + ** + *****************************************************************************/ + +xcb_randr_query_output_property_reply_t * +xcb_randr_query_output_property_reply (xcb_connection_t *c /**< */, + xcb_randr_query_output_property_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_query_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_configure_output_property_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param uint8_t pending + ** @param uint8_t range + ** @param uint32_t values_len + ** @param const int32_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_configure_output_property_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + uint8_t pending /**< */, + uint8_t range /**< */, + uint32_t values_len /**< */, + const int32_t *values /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_randr_configure_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + xcb_out.pending = pending; + xcb_out.range = range; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_configure_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param uint8_t pending + ** @param uint8_t range + ** @param uint32_t values_len + ** @param const int32_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_configure_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + uint8_t pending /**< */, + uint8_t range /**< */, + uint32_t values_len /**< */, + const int32_t *values /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_randr_configure_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + xcb_out.pending = pending; + xcb_out.range = range; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_change_output_property_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint8_t format + ** @param uint8_t mode + ** @param uint32_t num_units + ** @param const void *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_change_output_property_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint8_t format /**< */, + uint8_t mode /**< */, + uint32_t num_units /**< */, + const void *data /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_randr_change_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + xcb_out.type = type; + xcb_out.format = format; + xcb_out.mode = mode; + memset(xcb_out.pad0, 0, 2); + xcb_out.num_units = num_units; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_change_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint8_t format + ** @param uint8_t mode + ** @param uint32_t num_units + ** @param const void *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_change_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint8_t format /**< */, + uint8_t mode /**< */, + uint32_t num_units /**< */, + const void *data /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_CHANGE_OUTPUT_PROPERTY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_randr_change_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + xcb_out.type = type; + xcb_out.format = format; + xcb_out.mode = mode; + memset(xcb_out.pad0, 0, 2); + xcb_out.num_units = num_units; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_property_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_property_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_delete_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_DELETE_OUTPUT_PROPERTY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_delete_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint32_t long_offset + ** @param uint32_t long_length + ** @param uint8_t _delete + ** @param uint8_t pending + ** @returns xcb_randr_get_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_property_cookie_t +xcb_randr_get_output_property (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint32_t long_offset /**< */, + uint32_t long_length /**< */, + uint8_t _delete /**< */, + uint8_t pending /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_output_property_cookie_t xcb_ret; + xcb_randr_get_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + xcb_out.type = type; + xcb_out.long_offset = long_offset; + xcb_out.long_length = long_length; + xcb_out._delete = _delete; + xcb_out.pending = pending; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_property_cookie_t xcb_randr_get_output_property_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_atom_t property + ** @param xcb_atom_t type + ** @param uint32_t long_offset + ** @param uint32_t long_length + ** @param uint8_t _delete + ** @param uint8_t pending + ** @returns xcb_randr_get_output_property_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_property_cookie_t +xcb_randr_get_output_property_unchecked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_atom_t property /**< */, + xcb_atom_t type /**< */, + uint32_t long_offset /**< */, + uint32_t long_length /**< */, + uint8_t _delete /**< */, + uint8_t pending /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_OUTPUT_PROPERTY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_output_property_cookie_t xcb_ret; + xcb_randr_get_output_property_request_t xcb_out; + + xcb_out.output = output; + xcb_out.property = property; + xcb_out.type = type; + xcb_out.long_offset = long_offset; + xcb_out.long_length = long_length; + xcb_out._delete = _delete; + xcb_out.pending = pending; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_output_property_data + ** + ** @param const xcb_randr_get_output_property_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_output_property_data (const xcb_randr_get_output_property_reply_t *R /**< */) +{ + return (uint8_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_output_property_data_length + ** + ** @param const xcb_randr_get_output_property_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_output_property_data_length (const xcb_randr_get_output_property_reply_t *R /**< */) +{ + return (R->num_items * (R->format / 8)); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_output_property_data_end + ** + ** @param const xcb_randr_get_output_property_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_output_property_data_end (const xcb_randr_get_output_property_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((uint8_t *) (R + 1)) + ((R->num_items * (R->format / 8))); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_property_reply_t * xcb_randr_get_output_property_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_output_property_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_output_property_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_output_property_reply_t * +xcb_randr_get_output_property_reply (xcb_connection_t *c /**< */, + xcb_randr_get_output_property_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_output_property_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_mode_info_t mode_info + ** @param uint32_t name_len + ** @param const char *name + ** @returns xcb_randr_create_mode_cookie_t + ** + *****************************************************************************/ + +xcb_randr_create_mode_cookie_t +xcb_randr_create_mode (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_mode_info_t mode_info /**< */, + uint32_t name_len /**< */, + const char *name /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_CREATE_MODE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[6]; + xcb_randr_create_mode_cookie_t xcb_ret; + xcb_randr_create_mode_request_t xcb_out; + + xcb_out.window = window; + xcb_out.mode_info = mode_info; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_randr_create_mode_cookie_t xcb_randr_create_mode_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_mode_info_t mode_info + ** @param uint32_t name_len + ** @param const char *name + ** @returns xcb_randr_create_mode_cookie_t + ** + *****************************************************************************/ + +xcb_randr_create_mode_cookie_t +xcb_randr_create_mode_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_mode_info_t mode_info /**< */, + uint32_t name_len /**< */, + const char *name /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_CREATE_MODE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[6]; + xcb_randr_create_mode_cookie_t xcb_ret; + xcb_randr_create_mode_request_t xcb_out; + + xcb_out.window = window; + xcb_out.mode_info = mode_info; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_randr_create_mode_reply_t * xcb_randr_create_mode_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_create_mode_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_create_mode_reply_t * + ** + *****************************************************************************/ + +xcb_randr_create_mode_reply_t * +xcb_randr_create_mode_reply (xcb_connection_t *c /**< */, + xcb_randr_create_mode_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_create_mode_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_destroy_mode_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_destroy_mode_checked (xcb_connection_t *c /**< */, + xcb_randr_mode_t mode /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_DESTROY_MODE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_destroy_mode_request_t xcb_out; + + xcb_out.mode = mode; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_destroy_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_destroy_mode (xcb_connection_t *c /**< */, + xcb_randr_mode_t mode /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_DESTROY_MODE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_destroy_mode_request_t xcb_out; + + xcb_out.mode = mode; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_add_output_mode_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_add_output_mode_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_add_output_mode_request_t xcb_out; + + xcb_out.output = output; + xcb_out.mode = mode; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_add_output_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_add_output_mode (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_ADD_OUTPUT_MODE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_add_output_mode_request_t xcb_out; + + xcb_out.output = output; + xcb_out.mode = mode; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_mode_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_mode_checked (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_delete_output_mode_request_t xcb_out; + + xcb_out.output = output; + xcb_out.mode = mode; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_delete_output_mode + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_output_t output + ** @param xcb_randr_mode_t mode + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_delete_output_mode (xcb_connection_t *c /**< */, + xcb_randr_output_t output /**< */, + xcb_randr_mode_t mode /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_DELETE_OUTPUT_MODE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_delete_output_mode_request_t xcb_out; + + xcb_out.output = output; + xcb_out.mode = mode; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_crtc_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_info_cookie_t +xcb_randr_get_crtc_info (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t config_timestamp /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_INFO, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_info_cookie_t xcb_ret; + xcb_randr_get_crtc_info_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.config_timestamp = config_timestamp; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_info_cookie_t xcb_randr_get_crtc_info_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t config_timestamp + ** @returns xcb_randr_get_crtc_info_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_info_cookie_t +xcb_randr_get_crtc_info_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t config_timestamp /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_INFO, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_info_cookie_t xcb_ret; + xcb_randr_get_crtc_info_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.config_timestamp = config_timestamp; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_crtc_info_outputs + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_crtc_info_outputs (const xcb_randr_get_crtc_info_reply_t *R /**< */) +{ + return (xcb_randr_output_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_info_outputs_length + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_info_outputs_length (const xcb_randr_get_crtc_info_reply_t *R /**< */) +{ + return R->num_outputs; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_info_outputs_end + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_info_outputs_end (const xcb_randr_get_crtc_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((xcb_randr_output_t *) (R + 1)) + (R->num_outputs); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_crtc_info_possible + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_crtc_info_possible (const xcb_randr_get_crtc_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_crtc_info_outputs_end(R); + return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_info_possible_length + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_info_possible_length (const xcb_randr_get_crtc_info_reply_t *R /**< */) +{ + return R->num_possible_outputs; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_info_possible_end + ** + ** @param const xcb_randr_get_crtc_info_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_info_possible_end (const xcb_randr_get_crtc_info_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_crtc_info_outputs_end(R); + i.data = ((xcb_randr_output_t *) child.data) + (R->num_possible_outputs); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_info_reply_t * xcb_randr_get_crtc_info_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_info_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_info_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_info_reply_t * +xcb_randr_get_crtc_info_reply (xcb_connection_t *c /**< */, + xcb_randr_get_crtc_info_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_crtc_info_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param int16_t x + ** @param int16_t y + ** @param xcb_randr_mode_t mode + ** @param uint16_t rotation + ** @param uint32_t outputs_len + ** @param const xcb_randr_output_t *outputs + ** @returns xcb_randr_set_crtc_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_crtc_config_cookie_t +xcb_randr_set_crtc_config (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + int16_t x /**< */, + int16_t y /**< */, + xcb_randr_mode_t mode /**< */, + uint16_t rotation /**< */, + uint32_t outputs_len /**< */, + const xcb_randr_output_t *outputs /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_CRTC_CONFIG, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[6]; + xcb_randr_set_crtc_config_cookie_t xcb_ret; + xcb_randr_set_crtc_config_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.timestamp = timestamp; + xcb_out.config_timestamp = config_timestamp; + xcb_out.x = x; + xcb_out.y = y; + xcb_out.mode = mode; + xcb_out.rotation = rotation; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_randr_set_crtc_config_cookie_t xcb_randr_set_crtc_config_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param xcb_timestamp_t config_timestamp + ** @param int16_t x + ** @param int16_t y + ** @param xcb_randr_mode_t mode + ** @param uint16_t rotation + ** @param uint32_t outputs_len + ** @param const xcb_randr_output_t *outputs + ** @returns xcb_randr_set_crtc_config_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_crtc_config_cookie_t +xcb_randr_set_crtc_config_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + xcb_timestamp_t config_timestamp /**< */, + int16_t x /**< */, + int16_t y /**< */, + xcb_randr_mode_t mode /**< */, + uint16_t rotation /**< */, + uint32_t outputs_len /**< */, + const xcb_randr_output_t *outputs /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_CRTC_CONFIG, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[6]; + xcb_randr_set_crtc_config_cookie_t xcb_ret; + xcb_randr_set_crtc_config_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.timestamp = timestamp; + xcb_out.config_timestamp = config_timestamp; + xcb_out.x = x; + xcb_out.y = y; + xcb_out.mode = mode; + xcb_out.rotation = rotation; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_randr_set_crtc_config_reply_t * xcb_randr_set_crtc_config_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_set_crtc_config_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_set_crtc_config_reply_t * + ** + *****************************************************************************/ + +xcb_randr_set_crtc_config_reply_t * +xcb_randr_set_crtc_config_reply (xcb_connection_t *c /**< */, + xcb_randr_set_crtc_config_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_set_crtc_config_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_size_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_size_cookie_t +xcb_randr_get_crtc_gamma_size (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret; + xcb_randr_get_crtc_gamma_size_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_size_cookie_t xcb_randr_get_crtc_gamma_size_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_size_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_size_cookie_t +xcb_randr_get_crtc_gamma_size_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_GAMMA_SIZE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_gamma_size_cookie_t xcb_ret; + xcb_randr_get_crtc_gamma_size_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_size_reply_t * xcb_randr_get_crtc_gamma_size_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_gamma_size_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_gamma_size_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_size_reply_t * +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 /**< */) +{ + return (xcb_randr_get_crtc_gamma_size_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_cookie_t +xcb_randr_get_crtc_gamma (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_GAMMA, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_gamma_cookie_t xcb_ret; + xcb_randr_get_crtc_gamma_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_cookie_t xcb_randr_get_crtc_gamma_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_gamma_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_cookie_t +xcb_randr_get_crtc_gamma_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_GAMMA, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_gamma_cookie_t xcb_ret; + xcb_randr_get_crtc_gamma_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_get_crtc_gamma_red + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_get_crtc_gamma_red (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + return (uint16_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_gamma_red_length + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_gamma_red_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + return R->size; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_red_end + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_red_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((uint16_t *) (R + 1)) + (R->size); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_get_crtc_gamma_green + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_get_crtc_gamma_green (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_red_end(R); + return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_gamma_green_length + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_gamma_green_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + return R->size; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_green_end + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_green_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_red_end(R); + i.data = ((uint16_t *) child.data) + (R->size); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** uint16_t * xcb_randr_get_crtc_gamma_blue + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_randr_get_crtc_gamma_blue (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_crtc_gamma_green_end(R); + return (uint16_t *) ((char *) prev.data + XCB_TYPE_PAD(uint16_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_gamma_blue_length + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_gamma_blue_length (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + return R->size; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_gamma_blue_end + ** + ** @param const xcb_randr_get_crtc_gamma_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_gamma_blue_end (const xcb_randr_get_crtc_gamma_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_crtc_gamma_green_end(R); + i.data = ((uint16_t *) child.data) + (R->size); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_gamma_reply_t * xcb_randr_get_crtc_gamma_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_gamma_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_gamma_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_gamma_reply_t * +xcb_randr_get_crtc_gamma_reply (xcb_connection_t *c /**< */, + xcb_randr_get_crtc_gamma_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_crtc_gamma_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_gamma_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param uint16_t size + ** @param const uint16_t *red + ** @param const uint16_t *green + ** @param const uint16_t *blue + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_gamma_checked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + uint16_t size /**< */, + const uint16_t *red /**< */, + const uint16_t *green /**< */, + const uint16_t *blue /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 8, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_CRTC_GAMMA, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[10]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_crtc_gamma_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.size = size; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; + 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; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_gamma + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param uint16_t size + ** @param const uint16_t *red + ** @param const uint16_t *green + ** @param const uint16_t *blue + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_gamma (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + uint16_t size /**< */, + const uint16_t *red /**< */, + const uint16_t *green /**< */, + const uint16_t *blue /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 8, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_CRTC_GAMMA, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[10]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_crtc_gamma_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.size = size; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; + 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; + 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; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_current_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_current_cookie_t +xcb_randr_get_screen_resources_current (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_resources_current_cookie_t xcb_ret; + xcb_randr_get_screen_resources_current_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_current_cookie_t xcb_randr_get_screen_resources_current_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_screen_resources_current_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_current_cookie_t +xcb_randr_get_screen_resources_current_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_screen_resources_current_cookie_t xcb_ret; + xcb_randr_get_screen_resources_current_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_crtc_t * xcb_randr_get_screen_resources_current_crtcs + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_crtc_t * + ** + *****************************************************************************/ + +xcb_randr_crtc_t * +xcb_randr_get_screen_resources_current_crtcs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + return (xcb_randr_crtc_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_crtcs_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_crtcs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + return R->num_crtcs; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_crtcs_end + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_crtcs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((xcb_randr_crtc_t *) (R + 1)) + (R->num_crtcs); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_output_t * xcb_randr_get_screen_resources_current_outputs + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_output_t * + ** + *****************************************************************************/ + +xcb_randr_output_t * +xcb_randr_get_screen_resources_current_outputs (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_crtcs_end(R); + return (xcb_randr_output_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_output_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_outputs_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_outputs_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + return R->num_outputs; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_outputs_end + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_outputs_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_screen_resources_current_crtcs_end(R); + i.data = ((xcb_randr_output_t *) child.data) + (R->num_outputs); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_t * xcb_randr_get_screen_resources_current_modes + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_mode_info_t * + ** + *****************************************************************************/ + +xcb_randr_mode_info_t * +xcb_randr_get_screen_resources_current_modes (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R); + return (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_modes_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_modes_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + return R->num_modes; +} + + +/***************************************************************************** + ** + ** xcb_randr_mode_info_iterator_t xcb_randr_get_screen_resources_current_modes_iterator + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_randr_mode_info_iterator_t + ** + *****************************************************************************/ + +xcb_randr_mode_info_iterator_t +xcb_randr_get_screen_resources_current_modes_iterator (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + xcb_randr_mode_info_iterator_t i; + xcb_generic_iterator_t prev = xcb_randr_get_screen_resources_current_outputs_end(R); + i.data = (xcb_randr_mode_info_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_randr_mode_info_t, prev.index)); + i.rem = R->num_modes; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** uint8_t * xcb_randr_get_screen_resources_current_names + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns uint8_t * + ** + *****************************************************************************/ + +uint8_t * +xcb_randr_get_screen_resources_current_names (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R)); + return (uint8_t *) ((char *) prev.data + XCB_TYPE_PAD(uint8_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_screen_resources_current_names_length + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_screen_resources_current_names_length (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + return R->names_len; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_screen_resources_current_names_end + ** + ** @param const xcb_randr_get_screen_resources_current_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_screen_resources_current_names_end (const xcb_randr_get_screen_resources_current_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_mode_info_end(xcb_randr_get_screen_resources_current_modes_iterator(R)); + i.data = ((uint8_t *) child.data) + (R->names_len); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_screen_resources_current_reply_t * xcb_randr_get_screen_resources_current_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_screen_resources_current_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_screen_resources_current_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_screen_resources_current_reply_t * +xcb_randr_get_screen_resources_current_reply (xcb_connection_t *c /**< */, + xcb_randr_get_screen_resources_current_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_screen_resources_current_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_transform_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_render_transform_t transform + ** @param uint16_t filter_len + ** @param const char *filter_name + ** @param uint32_t filter_params_len + ** @param const xcb_render_fixed_t *filter_params + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_transform_checked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_render_transform_t transform /**< */, + uint16_t filter_len /**< */, + const char *filter_name /**< */, + uint32_t filter_params_len /**< */, + const xcb_render_fixed_t *filter_params /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_crtc_transform_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.transform = transform; + xcb_out.filter_len = filter_len; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_crtc_transform + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_render_transform_t transform + ** @param uint16_t filter_len + ** @param const char *filter_name + ** @param uint32_t filter_params_len + ** @param const xcb_render_fixed_t *filter_params + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_crtc_transform (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_render_transform_t transform /**< */, + uint16_t filter_len /**< */, + const char *filter_name /**< */, + uint32_t filter_params_len /**< */, + const xcb_render_fixed_t *filter_params /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_CRTC_TRANSFORM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_crtc_transform_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.transform = transform; + xcb_out.filter_len = filter_len; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_transform_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_transform_cookie_t +xcb_randr_get_crtc_transform (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_transform_cookie_t xcb_ret; + xcb_randr_get_crtc_transform_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_transform_cookie_t xcb_randr_get_crtc_transform_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_crtc_transform_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_crtc_transform_cookie_t +xcb_randr_get_crtc_transform_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_CRTC_TRANSFORM, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_crtc_transform_cookie_t xcb_ret; + xcb_randr_get_crtc_transform_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** char * xcb_randr_get_crtc_transform_pending_filter_name + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_randr_get_crtc_transform_pending_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + return (char *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_pending_filter_name_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_pending_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + return R->pending_len; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_filter_name_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_pending_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((char *) (R + 1)) + (R->pending_len); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_pending_params + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_render_fixed_t * + ** + *****************************************************************************/ + +xcb_render_fixed_t * +xcb_randr_get_crtc_transform_pending_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_filter_name_end(R); + return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_pending_params_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_pending_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + return R->pending_nparams; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_pending_params_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_pending_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_filter_name_end(R); + i.data = ((xcb_render_fixed_t *) child.data) + (R->pending_nparams); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** char * xcb_randr_get_crtc_transform_current_filter_name + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_randr_get_crtc_transform_current_filter_name (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_pending_params_end(R); + return (char *) ((char *) prev.data + XCB_TYPE_PAD(char, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_current_filter_name_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_current_filter_name_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + return R->current_len; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_filter_name_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_current_filter_name_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_pending_params_end(R); + i.data = ((char *) child.data) + (R->current_len); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_render_fixed_t * xcb_randr_get_crtc_transform_current_params + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_render_fixed_t * + ** + *****************************************************************************/ + +xcb_render_fixed_t * +xcb_randr_get_crtc_transform_current_params (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_randr_get_crtc_transform_current_filter_name_end(R); + return (xcb_render_fixed_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_fixed_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_randr_get_crtc_transform_current_params_length + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_randr_get_crtc_transform_current_params_length (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + return R->current_nparams; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_get_crtc_transform_current_params_end + ** + ** @param const xcb_randr_get_crtc_transform_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_get_crtc_transform_current_params_end (const xcb_randr_get_crtc_transform_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_randr_get_crtc_transform_current_filter_name_end(R); + i.data = ((xcb_render_fixed_t *) child.data) + (R->current_nparams); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_crtc_transform_reply_t * xcb_randr_get_crtc_transform_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_crtc_transform_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_crtc_transform_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_crtc_transform_reply_t * +xcb_randr_get_crtc_transform_reply (xcb_connection_t *c /**< */, + xcb_randr_get_crtc_transform_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_crtc_transform_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_panning_cookie_t +xcb_randr_get_panning (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_PANNING, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_panning_cookie_t xcb_ret; + xcb_randr_get_panning_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_panning_cookie_t xcb_randr_get_panning_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @returns xcb_randr_get_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_panning_cookie_t +xcb_randr_get_panning_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_PANNING, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_panning_cookie_t xcb_ret; + xcb_randr_get_panning_request_t xcb_out; + + xcb_out.crtc = crtc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_panning_reply_t * xcb_randr_get_panning_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_panning_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_panning_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_panning_reply_t * +xcb_randr_get_panning_reply (xcb_connection_t *c /**< */, + xcb_randr_get_panning_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param uint16_t left + ** @param uint16_t top + ** @param uint16_t width + ** @param uint16_t height + ** @param uint16_t track_left + ** @param uint16_t track_top + ** @param uint16_t track_width + ** @param uint16_t track_height + ** @param int16_t border_left + ** @param int16_t border_top + ** @param int16_t border_right + ** @param int16_t border_bottom + ** @returns xcb_randr_set_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_panning_cookie_t +xcb_randr_set_panning (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + uint16_t left /**< */, + uint16_t top /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint16_t track_left /**< */, + uint16_t track_top /**< */, + uint16_t track_width /**< */, + uint16_t track_height /**< */, + int16_t border_left /**< */, + int16_t border_top /**< */, + int16_t border_right /**< */, + int16_t border_bottom /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_PANNING, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_set_panning_cookie_t xcb_ret; + xcb_randr_set_panning_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.timestamp = timestamp; + xcb_out.left = left; + xcb_out.top = top; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.track_left = track_left; + xcb_out.track_top = track_top; + xcb_out.track_width = track_width; + xcb_out.track_height = track_height; + xcb_out.border_left = border_left; + xcb_out.border_top = border_top; + xcb_out.border_right = border_right; + xcb_out.border_bottom = border_bottom; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_set_panning_cookie_t xcb_randr_set_panning_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_crtc_t crtc + ** @param xcb_timestamp_t timestamp + ** @param uint16_t left + ** @param uint16_t top + ** @param uint16_t width + ** @param uint16_t height + ** @param uint16_t track_left + ** @param uint16_t track_top + ** @param uint16_t track_width + ** @param uint16_t track_height + ** @param int16_t border_left + ** @param int16_t border_top + ** @param int16_t border_right + ** @param int16_t border_bottom + ** @returns xcb_randr_set_panning_cookie_t + ** + *****************************************************************************/ + +xcb_randr_set_panning_cookie_t +xcb_randr_set_panning_unchecked (xcb_connection_t *c /**< */, + xcb_randr_crtc_t crtc /**< */, + xcb_timestamp_t timestamp /**< */, + uint16_t left /**< */, + uint16_t top /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint16_t track_left /**< */, + uint16_t track_top /**< */, + uint16_t track_width /**< */, + uint16_t track_height /**< */, + int16_t border_left /**< */, + int16_t border_top /**< */, + int16_t border_right /**< */, + int16_t border_bottom /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_PANNING, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_set_panning_cookie_t xcb_ret; + xcb_randr_set_panning_request_t xcb_out; + + xcb_out.crtc = crtc; + xcb_out.timestamp = timestamp; + xcb_out.left = left; + xcb_out.top = top; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.track_left = track_left; + xcb_out.track_top = track_top; + xcb_out.track_width = track_width; + xcb_out.track_height = track_height; + xcb_out.border_left = border_left; + xcb_out.border_top = border_top; + xcb_out.border_right = border_right; + xcb_out.border_bottom = border_bottom; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_set_panning_reply_t * xcb_randr_set_panning_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_set_panning_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_set_panning_reply_t * + ** + *****************************************************************************/ + +xcb_randr_set_panning_reply_t * +xcb_randr_set_panning_reply (xcb_connection_t *c /**< */, + xcb_randr_set_panning_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_set_panning_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_output_primary_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_output_t output + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_output_primary_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_output_t output /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_output_primary_request_t xcb_out; + + xcb_out.window = window; + xcb_out.output = output; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_randr_set_output_primary + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_randr_output_t output + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_randr_set_output_primary (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_randr_output_t output /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_SET_OUTPUT_PRIMARY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_randr_set_output_primary_request_t xcb_out; + + xcb_out.window = window; + xcb_out.output = output; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_output_primary_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_primary_cookie_t +xcb_randr_get_output_primary (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_output_primary_cookie_t xcb_ret; + xcb_randr_get_output_primary_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_primary_cookie_t xcb_randr_get_output_primary_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_randr_get_output_primary_cookie_t + ** + *****************************************************************************/ + +xcb_randr_get_output_primary_cookie_t +xcb_randr_get_output_primary_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_randr_id, + /* opcode */ XCB_RANDR_GET_OUTPUT_PRIMARY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_randr_get_output_primary_cookie_t xcb_ret; + xcb_randr_get_output_primary_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_randr_get_output_primary_reply_t * xcb_randr_get_output_primary_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_randr_get_output_primary_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_randr_get_output_primary_reply_t * + ** + *****************************************************************************/ + +xcb_randr_get_output_primary_reply_t * +xcb_randr_get_output_primary_reply (xcb_connection_t *c /**< */, + xcb_randr_get_output_primary_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_randr_get_output_primary_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** void xcb_randr_crtc_change_next + ** + ** @param xcb_randr_crtc_change_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_crtc_change_next (xcb_randr_crtc_change_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_crtc_change_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_crtc_change_end + ** + ** @param xcb_randr_crtc_change_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_crtc_change_end (xcb_randr_crtc_change_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_randr_output_change_next + ** + ** @param xcb_randr_output_change_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_output_change_next (xcb_randr_output_change_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_output_change_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_output_change_end + ** + ** @param xcb_randr_output_change_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_output_change_end (xcb_randr_output_change_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_randr_output_property_next + ** + ** @param xcb_randr_output_property_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_output_property_next (xcb_randr_output_property_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_output_property_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_output_property_end + ** + ** @param xcb_randr_output_property_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_output_property_end (xcb_randr_output_property_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_randr_notify_data_next + ** + ** @param xcb_randr_notify_data_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_randr_notify_data_next (xcb_randr_notify_data_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_randr_notify_data_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_randr_notify_data_end + ** + ** @param xcb_randr_notify_data_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_randr_notify_data_end (xcb_randr_notify_data_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + diff --git a/src/3rdparty/xcb/libxcb/render.c b/src/3rdparty/xcb/libxcb/render.c new file mode 100644 index 0000000000..b251f8814c --- /dev/null +++ b/src/3rdparty/xcb/libxcb/render.c @@ -0,0 +1,4353 @@ +/* + * This file generated automatically from render.xml by c_client.py. + * Edit at your peril. + */ + +#include +#include +#include "xcbext.h" +#include "render.h" +#include "xproto.h" + +xcb_extension_t xcb_render_id = { "RENDER", 0 }; + + +/***************************************************************************** + ** + ** void xcb_render_glyph_next + ** + ** @param xcb_render_glyph_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_glyph_next (xcb_render_glyph_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_glyph_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_glyph_end + ** + ** @param xcb_render_glyph_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_glyph_end (xcb_render_glyph_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_glyphset_next + ** + ** @param xcb_render_glyphset_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_glyphset_next (xcb_render_glyphset_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_glyphset_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_glyphset_end + ** + ** @param xcb_render_glyphset_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_glyphset_end (xcb_render_glyphset_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_picture_next + ** + ** @param xcb_render_picture_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_picture_next (xcb_render_picture_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_picture_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_picture_end + ** + ** @param xcb_render_picture_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_picture_end (xcb_render_picture_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_pictformat_next + ** + ** @param xcb_render_pictformat_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictformat_next (xcb_render_pictformat_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_pictformat_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictformat_end + ** + ** @param xcb_render_pictformat_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictformat_end (xcb_render_pictformat_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_fixed_next + ** + ** @param xcb_render_fixed_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_fixed_next (xcb_render_fixed_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_fixed_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_fixed_end + ** + ** @param xcb_render_fixed_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_fixed_end (xcb_render_fixed_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_directformat_next + ** + ** @param xcb_render_directformat_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_directformat_next (xcb_render_directformat_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_directformat_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_directformat_end + ** + ** @param xcb_render_directformat_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_directformat_end (xcb_render_directformat_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_pictforminfo_next + ** + ** @param xcb_render_pictforminfo_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictforminfo_next (xcb_render_pictforminfo_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_pictforminfo_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictforminfo_end + ** + ** @param xcb_render_pictforminfo_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictforminfo_end (xcb_render_pictforminfo_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_pictvisual_next + ** + ** @param xcb_render_pictvisual_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pictvisual_next (xcb_render_pictvisual_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_pictvisual_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictvisual_end + ** + ** @param xcb_render_pictvisual_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictvisual_end (xcb_render_pictvisual_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_render_pictvisual_t * xcb_render_pictdepth_visuals + ** + ** @param const xcb_render_pictdepth_t *R + ** @returns xcb_render_pictvisual_t * + ** + *****************************************************************************/ + +xcb_render_pictvisual_t * +xcb_render_pictdepth_visuals (const xcb_render_pictdepth_t *R /**< */) +{ + return (xcb_render_pictvisual_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_render_pictdepth_visuals_length + ** + ** @param const xcb_render_pictdepth_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_pictdepth_visuals_length (const xcb_render_pictdepth_t *R /**< */) +{ + return R->num_visuals; +} + + +/***************************************************************************** + ** + ** xcb_render_pictvisual_iterator_t xcb_render_pictdepth_visuals_iterator + ** + ** @param const xcb_render_pictdepth_t *R + ** @returns xcb_render_pictvisual_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictvisual_iterator_t +xcb_render_pictdepth_visuals_iterator (const xcb_render_pictdepth_t *R /**< */) +{ + xcb_render_pictvisual_iterator_t i; + i.data = (xcb_render_pictvisual_t *) (R + 1); + i.rem = R->num_visuals; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** void xcb_render_pictdepth_next + ** + ** @param xcb_render_pictdepth_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +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)); + --i->rem; + i->data = (xcb_render_pictdepth_t *) child.data; + i->index = child.index; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictdepth_end + ** + ** @param xcb_render_pictdepth_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictdepth_end (xcb_render_pictdepth_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + while(i.rem > 0) + xcb_render_pictdepth_next(&i); + ret.data = i.data; + ret.rem = i.rem; + ret.index = i.index; + return ret; +} + + +/***************************************************************************** + ** + ** int xcb_render_pictscreen_depths_length + ** + ** @param const xcb_render_pictscreen_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_pictscreen_depths_length (const xcb_render_pictscreen_t *R /**< */) +{ + return R->num_depths; +} + + +/***************************************************************************** + ** + ** xcb_render_pictdepth_iterator_t xcb_render_pictscreen_depths_iterator + ** + ** @param const xcb_render_pictscreen_t *R + ** @returns xcb_render_pictdepth_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictdepth_iterator_t +xcb_render_pictscreen_depths_iterator (const xcb_render_pictscreen_t *R /**< */) +{ + xcb_render_pictdepth_iterator_t i; + i.data = (xcb_render_pictdepth_t *) (R + 1); + i.rem = R->num_depths; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** void xcb_render_pictscreen_next + ** + ** @param xcb_render_pictscreen_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +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)); + --i->rem; + i->data = (xcb_render_pictscreen_t *) child.data; + i->index = child.index; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pictscreen_end + ** + ** @param xcb_render_pictscreen_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pictscreen_end (xcb_render_pictscreen_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + while(i.rem > 0) + xcb_render_pictscreen_next(&i); + ret.data = i.data; + ret.rem = i.rem; + ret.index = i.index; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_indexvalue_next + ** + ** @param xcb_render_indexvalue_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_indexvalue_next (xcb_render_indexvalue_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_indexvalue_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_indexvalue_end + ** + ** @param xcb_render_indexvalue_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_indexvalue_end (xcb_render_indexvalue_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_color_next + ** + ** @param xcb_render_color_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_color_next (xcb_render_color_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_color_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_color_end + ** + ** @param xcb_render_color_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_color_end (xcb_render_color_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_pointfix_next + ** + ** @param xcb_render_pointfix_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_pointfix_next (xcb_render_pointfix_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_pointfix_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_pointfix_end + ** + ** @param xcb_render_pointfix_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_pointfix_end (xcb_render_pointfix_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_linefix_next + ** + ** @param xcb_render_linefix_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_linefix_next (xcb_render_linefix_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_linefix_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_linefix_end + ** + ** @param xcb_render_linefix_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_linefix_end (xcb_render_linefix_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_triangle_next + ** + ** @param xcb_render_triangle_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_triangle_next (xcb_render_triangle_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_triangle_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_triangle_end + ** + ** @param xcb_render_triangle_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_triangle_end (xcb_render_triangle_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_trapezoid_next + ** + ** @param xcb_render_trapezoid_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_trapezoid_next (xcb_render_trapezoid_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_trapezoid_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_trapezoid_end + ** + ** @param xcb_render_trapezoid_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_trapezoid_end (xcb_render_trapezoid_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_glyphinfo_next + ** + ** @param xcb_render_glyphinfo_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_glyphinfo_next (xcb_render_glyphinfo_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_glyphinfo_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_glyphinfo_end + ** + ** @param xcb_render_glyphinfo_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_glyphinfo_end (xcb_render_glyphinfo_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_render_query_version_cookie_t xcb_render_query_version + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_render_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_version_cookie_t +xcb_render_query_version (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_version_cookie_t xcb_ret; + xcb_render_query_version_request_t xcb_out; + + xcb_out.client_major_version = client_major_version; + xcb_out.client_minor_version = client_minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_query_version_cookie_t xcb_render_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_render_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_version_cookie_t +xcb_render_query_version_unchecked (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_version_cookie_t xcb_ret; + xcb_render_query_version_request_t xcb_out; + + xcb_out.client_major_version = client_major_version; + xcb_out.client_minor_version = client_minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_query_version_reply_t * xcb_render_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_version_reply_t * +xcb_render_query_version_reply (xcb_connection_t *c /**< */, + xcb_render_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_render_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats + ** + ** @param xcb_connection_t *c + ** @returns xcb_render_query_pict_formats_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_pict_formats_cookie_t +xcb_render_query_pict_formats (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_pict_formats_cookie_t xcb_ret; + xcb_render_query_pict_formats_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_query_pict_formats_cookie_t xcb_render_query_pict_formats_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_render_query_pict_formats_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_pict_formats_cookie_t +xcb_render_query_pict_formats_unchecked (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_PICT_FORMATS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_pict_formats_cookie_t xcb_ret; + xcb_render_query_pict_formats_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_pictforminfo_t * xcb_render_query_pict_formats_formats + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_render_pictforminfo_t * + ** + *****************************************************************************/ + +xcb_render_pictforminfo_t * +xcb_render_query_pict_formats_formats (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + return (xcb_render_pictforminfo_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_formats_formats_length + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_formats_formats_length (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + return R->num_formats; +} + + +/***************************************************************************** + ** + ** xcb_render_pictforminfo_iterator_t xcb_render_query_pict_formats_formats_iterator + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_render_pictforminfo_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictforminfo_iterator_t +xcb_render_query_pict_formats_formats_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + xcb_render_pictforminfo_iterator_t i; + i.data = (xcb_render_pictforminfo_t *) (R + 1); + i.rem = R->num_formats; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_formats_screens_length + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_formats_screens_length (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + return R->num_screens; +} + + +/***************************************************************************** + ** + ** xcb_render_pictscreen_iterator_t xcb_render_query_pict_formats_screens_iterator + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_render_pictscreen_iterator_t + ** + *****************************************************************************/ + +xcb_render_pictscreen_iterator_t +xcb_render_query_pict_formats_screens_iterator (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + xcb_render_pictscreen_iterator_t i; + xcb_generic_iterator_t prev = xcb_render_pictforminfo_end(xcb_render_query_pict_formats_formats_iterator(R)); + i.data = (xcb_render_pictscreen_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_render_pictscreen_t, prev.index)); + i.rem = R->num_screens; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** uint32_t * xcb_render_query_pict_formats_subpixels + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns uint32_t * + ** + *****************************************************************************/ + +uint32_t * +xcb_render_query_pict_formats_subpixels (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R)); + return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_formats_subpixels_length + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_formats_subpixels_length (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + return R->num_subpixel; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_query_pict_formats_subpixels_end + ** + ** @param const xcb_render_query_pict_formats_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_query_pict_formats_subpixels_end (const xcb_render_query_pict_formats_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_render_pictscreen_end(xcb_render_query_pict_formats_screens_iterator(R)); + i.data = ((uint32_t *) child.data) + (R->num_subpixel); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_render_query_pict_formats_reply_t * xcb_render_query_pict_formats_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_pict_formats_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_pict_formats_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_pict_formats_reply_t * +xcb_render_query_pict_formats_reply (xcb_connection_t *c /**< */, + xcb_render_query_pict_formats_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_render_query_pict_formats_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values + ** + ** @param xcb_connection_t *c + ** @param xcb_render_pictformat_t format + ** @returns xcb_render_query_pict_index_values_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_pict_index_values_cookie_t +xcb_render_query_pict_index_values (xcb_connection_t *c /**< */, + xcb_render_pictformat_t format /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_pict_index_values_cookie_t xcb_ret; + xcb_render_query_pict_index_values_request_t xcb_out; + + xcb_out.format = format; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_query_pict_index_values_cookie_t xcb_render_query_pict_index_values_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_pictformat_t format + ** @returns xcb_render_query_pict_index_values_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_pict_index_values_cookie_t +xcb_render_query_pict_index_values_unchecked (xcb_connection_t *c /**< */, + xcb_render_pictformat_t format /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_PICT_INDEX_VALUES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_pict_index_values_cookie_t xcb_ret; + xcb_render_query_pict_index_values_request_t xcb_out; + + xcb_out.format = format; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_indexvalue_t * xcb_render_query_pict_index_values_values + ** + ** @param const xcb_render_query_pict_index_values_reply_t *R + ** @returns xcb_render_indexvalue_t * + ** + *****************************************************************************/ + +xcb_render_indexvalue_t * +xcb_render_query_pict_index_values_values (const xcb_render_query_pict_index_values_reply_t *R /**< */) +{ + return (xcb_render_indexvalue_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_render_query_pict_index_values_values_length + ** + ** @param const xcb_render_query_pict_index_values_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_pict_index_values_values_length (const xcb_render_query_pict_index_values_reply_t *R /**< */) +{ + return R->num_values; +} + + +/***************************************************************************** + ** + ** xcb_render_indexvalue_iterator_t xcb_render_query_pict_index_values_values_iterator + ** + ** @param const xcb_render_query_pict_index_values_reply_t *R + ** @returns xcb_render_indexvalue_iterator_t + ** + *****************************************************************************/ + +xcb_render_indexvalue_iterator_t +xcb_render_query_pict_index_values_values_iterator (const xcb_render_query_pict_index_values_reply_t *R /**< */) +{ + xcb_render_indexvalue_iterator_t i; + i.data = (xcb_render_indexvalue_t *) (R + 1); + i.rem = R->num_values; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_render_query_pict_index_values_reply_t * xcb_render_query_pict_index_values_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_pict_index_values_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_pict_index_values_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_pict_index_values_reply_t * +xcb_render_query_pict_index_values_reply (xcb_connection_t *c /**< */, + xcb_render_query_pict_index_values_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_render_query_pict_index_values_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t pid + ** @param xcb_drawable_t drawable + ** @param xcb_render_pictformat_t format + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_picture_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t pid /**< */, + xcb_drawable_t drawable /**< */, + xcb_render_pictformat_t format /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_picture_request_t xcb_out; + + xcb_out.pid = pid; + xcb_out.drawable = drawable; + xcb_out.format = format; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t pid + ** @param xcb_drawable_t drawable + ** @param xcb_render_pictformat_t format + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_picture (xcb_connection_t *c /**< */, + xcb_render_picture_t pid /**< */, + xcb_drawable_t drawable /**< */, + xcb_render_pictformat_t format /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_picture_request_t xcb_out; + + xcb_out.pid = pid; + xcb_out.drawable = drawable; + xcb_out.format = format; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_change_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_change_picture_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CHANGE_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_change_picture_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_change_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_change_picture (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CHANGE_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_change_picture_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t clip_x_origin + ** @param int16_t clip_y_origin + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_clip_rectangles_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t clip_x_origin /**< */, + int16_t clip_y_origin /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_set_picture_clip_rectangles_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.clip_x_origin = clip_x_origin; + xcb_out.clip_y_origin = clip_y_origin; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_clip_rectangles + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t clip_x_origin + ** @param int16_t clip_y_origin + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_clip_rectangles (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t clip_x_origin /**< */, + int16_t clip_y_origin /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_SET_PICTURE_CLIP_RECTANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_set_picture_clip_rectangles_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.clip_x_origin = clip_x_origin; + xcb_out.clip_y_origin = clip_y_origin; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_picture_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FREE_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_free_picture_request_t xcb_out; + + xcb_out.picture = picture; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_picture (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FREE_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_free_picture_request_t xcb_out; + + xcb_out.picture = picture; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t mask + ** @param xcb_render_picture_t dst + ** @param int16_t src_x + ** @param int16_t src_y + ** @param int16_t mask_x + ** @param int16_t mask_y + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint16_t width + ** @param uint16_t height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t mask /**< */, + xcb_render_picture_t dst /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + int16_t mask_x /**< */, + int16_t mask_y /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint16_t width /**< */, + uint16_t height /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.mask = mask; + xcb_out.dst = dst; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + xcb_out.mask_x = mask_x; + xcb_out.mask_y = mask_y; + xcb_out.dst_x = dst_x; + xcb_out.dst_y = dst_y; + xcb_out.width = width; + xcb_out.height = height; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t mask + ** @param xcb_render_picture_t dst + ** @param int16_t src_x + ** @param int16_t src_y + ** @param int16_t mask_x + ** @param int16_t mask_y + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint16_t width + ** @param uint16_t height + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t mask /**< */, + xcb_render_picture_t dst /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + int16_t mask_x /**< */, + int16_t mask_y /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint16_t width /**< */, + uint16_t height /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.mask = mask; + xcb_out.dst = dst; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + xcb_out.mask_x = mask_x; + xcb_out.mask_y = mask_y; + xcb_out.dst_x = dst_x; + xcb_out.dst_y = dst_y; + xcb_out.width = width; + xcb_out.height = height; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_trapezoids_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t traps_len + ** @param const xcb_render_trapezoid_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_trapezoids_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t traps_len /**< */, + const xcb_render_trapezoid_t *traps /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRAPEZOIDS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_trapezoids_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_trapezoids + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t traps_len + ** @param const xcb_render_trapezoid_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_trapezoids (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t traps_len /**< */, + const xcb_render_trapezoid_t *traps /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRAPEZOIDS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_trapezoids_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_triangles_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t triangles_len + ** @param const xcb_render_triangle_t *triangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_triangles_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t triangles_len /**< */, + const xcb_render_triangle_t *triangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRIANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_triangles_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_triangles + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t triangles_len + ** @param const xcb_render_triangle_t *triangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_triangles (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t triangles_len /**< */, + const xcb_render_triangle_t *triangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRIANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_triangles_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_strip_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_strip_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRI_STRIP, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_tri_strip_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_strip + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_strip (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRI_STRIP, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_tri_strip_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_fan_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_fan_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRI_FAN, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_tri_fan_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_tri_fan + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t points_len + ** @param const xcb_render_pointfix_t *points + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_tri_fan (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t points_len /**< */, + const xcb_render_pointfix_t *points /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_TRI_FAN, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_tri_fan_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_glyph_set_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_pictformat_t format + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_glyph_set_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_pictformat_t format /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_GLYPH_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_glyph_set_request_t xcb_out; + + xcb_out.gsid = gsid; + xcb_out.format = format; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_glyph_set + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_pictformat_t format + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_glyph_set (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_pictformat_t format /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_GLYPH_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_glyph_set_request_t xcb_out; + + xcb_out.gsid = gsid; + xcb_out.format = format; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_reference_glyph_set_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_glyphset_t existing + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_reference_glyph_set_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_glyphset_t existing /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_reference_glyph_set_request_t xcb_out; + + xcb_out.gsid = gsid; + xcb_out.existing = existing; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_reference_glyph_set + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t gsid + ** @param xcb_render_glyphset_t existing + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_reference_glyph_set (xcb_connection_t *c /**< */, + xcb_render_glyphset_t gsid /**< */, + xcb_render_glyphset_t existing /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_REFERENCE_GLYPH_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_reference_glyph_set_request_t xcb_out; + + xcb_out.gsid = gsid; + xcb_out.existing = existing; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyph_set_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_glyph_set_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FREE_GLYPH_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_free_glyph_set_request_t xcb_out; + + xcb_out.glyphset = glyphset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyph_set + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_glyph_set (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FREE_GLYPH_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_free_glyph_set_request_t xcb_out; + + xcb_out.glyphset = glyphset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_glyphs_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const uint32_t *glyphids + ** @param const xcb_render_glyphinfo_t *glyphs + ** @param uint32_t data_len + ** @param const uint8_t *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_glyphs_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const uint32_t *glyphids /**< */, + const xcb_render_glyphinfo_t *glyphs /**< */, + uint32_t data_len /**< */, + const uint8_t *data /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 8, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_ADD_GLYPHS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[10]; + xcb_void_cookie_t xcb_ret; + xcb_render_add_glyphs_request_t xcb_out; + + xcb_out.glyphset = glyphset; + xcb_out.glyphs_len = glyphs_len; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_glyphs + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const uint32_t *glyphids + ** @param const xcb_render_glyphinfo_t *glyphs + ** @param uint32_t data_len + ** @param const uint8_t *data + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_glyphs (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const uint32_t *glyphids /**< */, + const xcb_render_glyphinfo_t *glyphs /**< */, + uint32_t data_len /**< */, + const uint8_t *data /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 8, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_ADD_GLYPHS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[10]; + xcb_void_cookie_t xcb_ret; + xcb_render_add_glyphs_request_t xcb_out; + + xcb_out.glyphset = glyphset; + xcb_out.glyphs_len = glyphs_len; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyphs_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const xcb_render_glyph_t *glyphs + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_glyphs_checked (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const xcb_render_glyph_t *glyphs /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FREE_GLYPHS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_free_glyphs_request_t xcb_out; + + xcb_out.glyphset = glyphset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_free_glyphs + ** + ** @param xcb_connection_t *c + ** @param xcb_render_glyphset_t glyphset + ** @param uint32_t glyphs_len + ** @param const xcb_render_glyph_t *glyphs + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_free_glyphs (xcb_connection_t *c /**< */, + xcb_render_glyphset_t glyphset /**< */, + uint32_t glyphs_len /**< */, + const xcb_render_glyph_t *glyphs /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FREE_GLYPHS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_free_glyphs_request_t xcb_out; + + xcb_out.glyphset = glyphset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_8_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_8_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_glyphs_8_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.glyphset = glyphset; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_8 + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_8 (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_8, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_glyphs_8_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.glyphset = glyphset; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_16_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_16_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_glyphs_16_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.glyphset = glyphset; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_16 + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_16 (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_16, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_glyphs_16_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.glyphset = glyphset; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_32_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_32_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_glyphs_32_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.glyphset = glyphset; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_composite_glyphs_32 + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t src + ** @param xcb_render_picture_t dst + ** @param xcb_render_pictformat_t mask_format + ** @param xcb_render_glyphset_t glyphset + ** @param int16_t src_x + ** @param int16_t src_y + ** @param uint32_t glyphcmds_len + ** @param const uint8_t *glyphcmds + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_composite_glyphs_32 (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t src /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_pictformat_t mask_format /**< */, + xcb_render_glyphset_t glyphset /**< */, + int16_t src_x /**< */, + int16_t src_y /**< */, + uint32_t glyphcmds_len /**< */, + const uint8_t *glyphcmds /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_COMPOSITE_GLYPHS_32, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_composite_glyphs_32_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.src = src; + xcb_out.dst = dst; + xcb_out.mask_format = mask_format; + xcb_out.glyphset = glyphset; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_fill_rectangles_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t dst + ** @param xcb_render_color_t color + ** @param uint32_t rects_len + ** @param const xcb_rectangle_t *rects + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_fill_rectangles_checked (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_color_t color /**< */, + uint32_t rects_len /**< */, + const xcb_rectangle_t *rects /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FILL_RECTANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_fill_rectangles_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.dst = dst; + xcb_out.color = color; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_fill_rectangles + ** + ** @param xcb_connection_t *c + ** @param uint8_t op + ** @param xcb_render_picture_t dst + ** @param xcb_render_color_t color + ** @param uint32_t rects_len + ** @param const xcb_rectangle_t *rects + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_fill_rectangles (xcb_connection_t *c /**< */, + uint8_t op /**< */, + xcb_render_picture_t dst /**< */, + xcb_render_color_t color /**< */, + uint32_t rects_len /**< */, + const xcb_rectangle_t *rects /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_FILL_RECTANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_fill_rectangles_request_t xcb_out; + + xcb_out.op = op; + memset(xcb_out.pad0, 0, 3); + xcb_out.dst = dst; + xcb_out.color = color; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param xcb_render_picture_t source + ** @param uint16_t x + ** @param uint16_t y + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_cursor_checked (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + xcb_render_picture_t source /**< */, + uint16_t x /**< */, + uint16_t y /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_cursor_request_t xcb_out; + + xcb_out.cid = cid; + xcb_out.source = source; + xcb_out.x = x; + xcb_out.y = y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param xcb_render_picture_t source + ** @param uint16_t x + ** @param uint16_t y + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_cursor (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + xcb_render_picture_t source /**< */, + uint16_t x /**< */, + uint16_t y /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_cursor_request_t xcb_out; + + xcb_out.cid = cid; + xcb_out.source = source; + xcb_out.x = x; + xcb_out.y = y; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_transform_next + ** + ** @param xcb_render_transform_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_transform_next (xcb_render_transform_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_transform_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_transform_end + ** + ** @param xcb_render_transform_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_transform_end (xcb_render_transform_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_transform_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_transform_t transform + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_transform_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_transform_t transform /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_set_picture_transform_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.transform = transform; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_transform + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_transform_t transform + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_transform (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_transform_t transform /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_SET_PICTURE_TRANSFORM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_set_picture_transform_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.transform = transform; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_query_filters_cookie_t xcb_render_query_filters + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @returns xcb_render_query_filters_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_filters_cookie_t +xcb_render_query_filters (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_FILTERS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_filters_cookie_t xcb_ret; + xcb_render_query_filters_request_t xcb_out; + + xcb_out.drawable = drawable; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_render_query_filters_cookie_t xcb_render_query_filters_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @returns xcb_render_query_filters_cookie_t + ** + *****************************************************************************/ + +xcb_render_query_filters_cookie_t +xcb_render_query_filters_unchecked (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_QUERY_FILTERS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_render_query_filters_cookie_t xcb_ret; + xcb_render_query_filters_request_t xcb_out; + + xcb_out.drawable = drawable; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** uint16_t * xcb_render_query_filters_aliases + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns uint16_t * + ** + *****************************************************************************/ + +uint16_t * +xcb_render_query_filters_aliases (const xcb_render_query_filters_reply_t *R /**< */) +{ + return (uint16_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_render_query_filters_aliases_length + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_filters_aliases_length (const xcb_render_query_filters_reply_t *R /**< */) +{ + return R->num_aliases; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_query_filters_aliases_end + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_query_filters_aliases_end (const xcb_render_query_filters_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((uint16_t *) (R + 1)) + (R->num_aliases); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** int xcb_render_query_filters_filters_length + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_render_query_filters_filters_length (const xcb_render_query_filters_reply_t *R /**< */) +{ + return R->num_filters; +} + + +/***************************************************************************** + ** + ** xcb_str_iterator_t xcb_render_query_filters_filters_iterator + ** + ** @param const xcb_render_query_filters_reply_t *R + ** @returns xcb_str_iterator_t + ** + *****************************************************************************/ + +xcb_str_iterator_t +xcb_render_query_filters_filters_iterator (const xcb_render_query_filters_reply_t *R /**< */) +{ + xcb_str_iterator_t i; + xcb_generic_iterator_t prev = xcb_render_query_filters_aliases_end(R); + i.data = (xcb_str_t *) ((char *) prev.data + XCB_TYPE_PAD(xcb_str_t, prev.index)); + i.rem = R->num_filters; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_render_query_filters_reply_t * xcb_render_query_filters_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_render_query_filters_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_render_query_filters_reply_t * + ** + *****************************************************************************/ + +xcb_render_query_filters_reply_t * +xcb_render_query_filters_reply (xcb_connection_t *c /**< */, + xcb_render_query_filters_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_render_query_filters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_filter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint16_t filter_len + ** @param const char *filter + ** @param uint32_t values_len + ** @param const xcb_render_fixed_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_filter_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint16_t filter_len /**< */, + const char *filter /**< */, + uint32_t values_len /**< */, + const xcb_render_fixed_t *values /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_SET_PICTURE_FILTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_set_picture_filter_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.filter_len = filter_len; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_set_picture_filter + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param uint16_t filter_len + ** @param const char *filter + ** @param uint32_t values_len + ** @param const xcb_render_fixed_t *values + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_set_picture_filter (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + uint16_t filter_len /**< */, + const char *filter /**< */, + uint32_t values_len /**< */, + const xcb_render_fixed_t *values /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_SET_PICTURE_FILTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_set_picture_filter_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.filter_len = filter_len; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** void xcb_render_animcursorelt_next + ** + ** @param xcb_render_animcursorelt_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_animcursorelt_next (xcb_render_animcursorelt_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_animcursorelt_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_animcursorelt_end + ** + ** @param xcb_render_animcursorelt_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_animcursorelt_end (xcb_render_animcursorelt_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_anim_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param uint32_t cursors_len + ** @param const xcb_render_animcursorelt_t *cursors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_anim_cursor_checked (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + uint32_t cursors_len /**< */, + const xcb_render_animcursorelt_t *cursors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_anim_cursor_request_t xcb_out; + + xcb_out.cid = cid; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_anim_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cid + ** @param uint32_t cursors_len + ** @param const xcb_render_animcursorelt_t *cursors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_anim_cursor (xcb_connection_t *c /**< */, + xcb_cursor_t cid /**< */, + uint32_t cursors_len /**< */, + const xcb_render_animcursorelt_t *cursors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_ANIM_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_anim_cursor_request_t xcb_out; + + xcb_out.cid = cid; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** void xcb_render_spanfix_next + ** + ** @param xcb_render_spanfix_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_spanfix_next (xcb_render_spanfix_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_spanfix_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_spanfix_end + ** + ** @param xcb_render_spanfix_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_spanfix_end (xcb_render_spanfix_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_render_trap_next + ** + ** @param xcb_render_trap_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_render_trap_next (xcb_render_trap_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_render_trap_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_render_trap_end + ** + ** @param xcb_render_trap_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_render_trap_end (xcb_render_trap_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_traps_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t x_off + ** @param int16_t y_off + ** @param uint32_t traps_len + ** @param const xcb_render_trap_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_traps_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t x_off /**< */, + int16_t y_off /**< */, + uint32_t traps_len /**< */, + const xcb_render_trap_t *traps /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_ADD_TRAPS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_add_traps_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.x_off = x_off; + xcb_out.y_off = y_off; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_add_traps + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param int16_t x_off + ** @param int16_t y_off + ** @param uint32_t traps_len + ** @param const xcb_render_trap_t *traps + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_add_traps (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + int16_t x_off /**< */, + int16_t y_off /**< */, + uint32_t traps_len /**< */, + const xcb_render_trap_t *traps /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_ADD_TRAPS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_render_add_traps_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.x_off = x_off; + xcb_out.y_off = y_off; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_solid_fill_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_color_t color + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_solid_fill_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_color_t color /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_SOLID_FILL, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_solid_fill_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.color = color; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_solid_fill + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_color_t color + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_solid_fill (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_color_t color /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_SOLID_FILL, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_solid_fill_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.color = color; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_linear_gradient_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t p1 + ** @param xcb_render_pointfix_t p2 + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_linear_gradient_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t p1 /**< */, + xcb_render_pointfix_t p2 /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_linear_gradient_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.p1 = p1; + xcb_out.p2 = p2; + xcb_out.num_stops = num_stops; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_linear_gradient + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t p1 + ** @param xcb_render_pointfix_t p2 + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_linear_gradient (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t p1 /**< */, + xcb_render_pointfix_t p2 /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_LINEAR_GRADIENT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_linear_gradient_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.p1 = p1; + xcb_out.p2 = p2; + xcb_out.num_stops = num_stops; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_radial_gradient_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t inner + ** @param xcb_render_pointfix_t outer + ** @param xcb_render_fixed_t inner_radius + ** @param xcb_render_fixed_t outer_radius + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_radial_gradient_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t inner /**< */, + xcb_render_pointfix_t outer /**< */, + xcb_render_fixed_t inner_radius /**< */, + xcb_render_fixed_t outer_radius /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_radial_gradient_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.inner = inner; + xcb_out.outer = outer; + xcb_out.inner_radius = inner_radius; + xcb_out.outer_radius = outer_radius; + xcb_out.num_stops = num_stops; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_radial_gradient + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t inner + ** @param xcb_render_pointfix_t outer + ** @param xcb_render_fixed_t inner_radius + ** @param xcb_render_fixed_t outer_radius + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_radial_gradient (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t inner /**< */, + xcb_render_pointfix_t outer /**< */, + xcb_render_fixed_t inner_radius /**< */, + xcb_render_fixed_t outer_radius /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_RADIAL_GRADIENT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_radial_gradient_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.inner = inner; + xcb_out.outer = outer; + xcb_out.inner_radius = inner_radius; + xcb_out.outer_radius = outer_radius; + xcb_out.num_stops = num_stops; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_conical_gradient_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t center + ** @param xcb_render_fixed_t angle + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_conical_gradient_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t center /**< */, + xcb_render_fixed_t angle /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_conical_gradient_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.center = center; + xcb_out.angle = angle; + xcb_out.num_stops = num_stops; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_render_create_conical_gradient + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_render_pointfix_t center + ** @param xcb_render_fixed_t angle + ** @param uint32_t num_stops + ** @param const xcb_render_fixed_t *stops + ** @param const xcb_render_color_t *colors + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_render_create_conical_gradient (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_render_pointfix_t center /**< */, + xcb_render_fixed_t angle /**< */, + uint32_t num_stops /**< */, + const xcb_render_fixed_t *stops /**< */, + const xcb_render_color_t *colors /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 6, + /* ext */ &xcb_render_id, + /* opcode */ XCB_RENDER_CREATE_CONICAL_GRADIENT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[8]; + xcb_void_cookie_t xcb_ret; + xcb_render_create_conical_gradient_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.center = center; + xcb_out.angle = angle; + xcb_out.num_stops = num_stops; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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_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/src/3rdparty/xcb/libxcb/shape.c b/src/3rdparty/xcb/libxcb/shape.c new file mode 100644 index 0000000000..948522581e --- /dev/null +++ b/src/3rdparty/xcb/libxcb/shape.c @@ -0,0 +1,1017 @@ +/* + * This file generated automatically from shape.xml by c_client.py. + * Edit at your peril. + */ + +#include +#include +#include "xcbext.h" +#include "shape.h" +#include "xproto.h" + +xcb_extension_t xcb_shape_id = { "SHAPE", 0 }; + + +/***************************************************************************** + ** + ** void xcb_shape_op_next + ** + ** @param xcb_shape_op_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_shape_op_next (xcb_shape_op_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_shape_op_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_shape_op_end + ** + ** @param xcb_shape_op_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_shape_op_end (xcb_shape_op_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_shape_kind_next + ** + ** @param xcb_shape_kind_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_shape_kind_next (xcb_shape_kind_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_shape_kind_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_shape_kind_end + ** + ** @param xcb_shape_kind_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_shape_kind_end (xcb_shape_kind_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_query_version_cookie_t xcb_shape_query_version + ** + ** @param xcb_connection_t *c + ** @returns xcb_shape_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_shape_query_version_cookie_t +xcb_shape_query_version (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_query_version_cookie_t xcb_ret; + xcb_shape_query_version_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_query_version_cookie_t xcb_shape_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_shape_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_shape_query_version_cookie_t +xcb_shape_query_version_unchecked (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_query_version_cookie_t xcb_ret; + xcb_shape_query_version_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_query_version_reply_t * xcb_shape_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_shape_query_version_reply_t * +xcb_shape_query_version_reply (xcb_connection_t *c /**< */, + xcb_shape_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_shape_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_rectangles_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param uint8_t ordering + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_rectangles_checked (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + uint8_t ordering /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_RECTANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_shape_rectangles_request_t xcb_out; + + xcb_out.operation = operation; + xcb_out.destination_kind = destination_kind; + xcb_out.ordering = ordering; + xcb_out.pad0 = 0; + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_rectangles + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param uint8_t ordering + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_rectangles (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + uint8_t ordering /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_RECTANGLES, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_shape_rectangles_request_t xcb_out; + + xcb_out.operation = operation; + xcb_out.destination_kind = destination_kind; + xcb_out.ordering = ordering; + xcb_out.pad0 = 0; + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_mask_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_pixmap_t source_bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_mask_checked (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_pixmap_t source_bitmap /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_MASK, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_mask_request_t xcb_out; + + xcb_out.operation = operation; + xcb_out.destination_kind = destination_kind; + memset(xcb_out.pad0, 0, 2); + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + xcb_out.source_bitmap = source_bitmap; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_mask + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_pixmap_t source_bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_mask (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_pixmap_t source_bitmap /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_MASK, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_mask_request_t xcb_out; + + xcb_out.operation = operation; + xcb_out.destination_kind = destination_kind; + memset(xcb_out.pad0, 0, 2); + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + xcb_out.source_bitmap = source_bitmap; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_combine_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_shape_kind_t source_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_window_t source_window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_combine_checked (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_shape_kind_t source_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_window_t source_window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_COMBINE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_combine_request_t xcb_out; + + xcb_out.operation = operation; + xcb_out.destination_kind = destination_kind; + xcb_out.source_kind = source_kind; + xcb_out.pad0 = 0; + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + xcb_out.source_window = source_window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_combine + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_op_t operation + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_shape_kind_t source_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_window_t source_window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_combine (xcb_connection_t *c /**< */, + xcb_shape_op_t operation /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_shape_kind_t source_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_window_t source_window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_COMBINE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_combine_request_t xcb_out; + + xcb_out.operation = operation; + xcb_out.destination_kind = destination_kind; + xcb_out.source_kind = source_kind; + xcb_out.pad0 = 0; + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + xcb_out.source_window = source_window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_offset_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_offset_checked (xcb_connection_t *c /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_OFFSET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_offset_request_t xcb_out; + + xcb_out.destination_kind = destination_kind; + memset(xcb_out.pad0, 0, 3); + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_offset + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_kind_t destination_kind + ** @param xcb_window_t destination_window + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_offset (xcb_connection_t *c /**< */, + xcb_shape_kind_t destination_kind /**< */, + xcb_window_t destination_window /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_OFFSET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_offset_request_t xcb_out; + + xcb_out.destination_kind = destination_kind; + memset(xcb_out.pad0, 0, 3); + xcb_out.destination_window = destination_window; + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_query_extents_cookie_t + ** + *****************************************************************************/ + +xcb_shape_query_extents_cookie_t +xcb_shape_query_extents (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_QUERY_EXTENTS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_query_extents_cookie_t xcb_ret; + xcb_shape_query_extents_request_t xcb_out; + + xcb_out.destination_window = destination_window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_query_extents_cookie_t + ** + *****************************************************************************/ + +xcb_shape_query_extents_cookie_t +xcb_shape_query_extents_unchecked (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_QUERY_EXTENTS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_query_extents_cookie_t xcb_ret; + xcb_shape_query_extents_request_t xcb_out; + + xcb_out.destination_window = destination_window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_query_extents_reply_t * xcb_shape_query_extents_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_query_extents_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_query_extents_reply_t * + ** + *****************************************************************************/ + +xcb_shape_query_extents_reply_t * +xcb_shape_query_extents_reply (xcb_connection_t *c /**< */, + xcb_shape_query_extents_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_shape_query_extents_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_select_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @param uint8_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_select_input_checked (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */, + uint8_t enable /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_SELECT_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_select_input_request_t xcb_out; + + xcb_out.destination_window = destination_window; + xcb_out.enable = enable; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shape_select_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @param uint8_t enable + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shape_select_input (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */, + uint8_t enable /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_SELECT_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shape_select_input_request_t xcb_out; + + xcb_out.destination_window = destination_window; + xcb_out.enable = enable; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_input_selected_cookie_t + ** + *****************************************************************************/ + +xcb_shape_input_selected_cookie_t +xcb_shape_input_selected (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_INPUT_SELECTED, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_input_selected_cookie_t xcb_ret; + xcb_shape_input_selected_request_t xcb_out; + + xcb_out.destination_window = destination_window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t destination_window + ** @returns xcb_shape_input_selected_cookie_t + ** + *****************************************************************************/ + +xcb_shape_input_selected_cookie_t +xcb_shape_input_selected_unchecked (xcb_connection_t *c /**< */, + xcb_window_t destination_window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_INPUT_SELECTED, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_input_selected_cookie_t xcb_ret; + xcb_shape_input_selected_request_t xcb_out; + + xcb_out.destination_window = destination_window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_input_selected_reply_t * xcb_shape_input_selected_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_input_selected_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_input_selected_reply_t * + ** + *****************************************************************************/ + +xcb_shape_input_selected_reply_t * +xcb_shape_input_selected_reply (xcb_connection_t *c /**< */, + xcb_shape_input_selected_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_shape_input_selected_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_shape_kind_t source_kind + ** @returns xcb_shape_get_rectangles_cookie_t + ** + *****************************************************************************/ + +xcb_shape_get_rectangles_cookie_t +xcb_shape_get_rectangles (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t source_kind /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_GET_RECTANGLES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_get_rectangles_cookie_t xcb_ret; + xcb_shape_get_rectangles_request_t xcb_out; + + xcb_out.window = window; + xcb_out.source_kind = source_kind; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_shape_kind_t source_kind + ** @returns xcb_shape_get_rectangles_cookie_t + ** + *****************************************************************************/ + +xcb_shape_get_rectangles_cookie_t +xcb_shape_get_rectangles_unchecked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t source_kind /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shape_id, + /* opcode */ XCB_SHAPE_GET_RECTANGLES, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shape_get_rectangles_cookie_t xcb_ret; + xcb_shape_get_rectangles_request_t xcb_out; + + xcb_out.window = window; + xcb_out.source_kind = source_kind; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_rectangle_t * xcb_shape_get_rectangles_rectangles + ** + ** @param const xcb_shape_get_rectangles_reply_t *R + ** @returns xcb_rectangle_t * + ** + *****************************************************************************/ + +xcb_rectangle_t * +xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R /**< */) +{ + return (xcb_rectangle_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_shape_get_rectangles_rectangles_length + ** + ** @param const xcb_shape_get_rectangles_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R /**< */) +{ + return R->rectangles_len; +} + + +/***************************************************************************** + ** + ** xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator + ** + ** @param const xcb_shape_get_rectangles_reply_t *R + ** @returns xcb_rectangle_iterator_t + ** + *****************************************************************************/ + +xcb_rectangle_iterator_t +xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R /**< */) +{ + xcb_rectangle_iterator_t i; + i.data = (xcb_rectangle_t *) (R + 1); + i.rem = R->rectangles_len; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shape_get_rectangles_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shape_get_rectangles_reply_t * + ** + *****************************************************************************/ + +xcb_shape_get_rectangles_reply_t * +xcb_shape_get_rectangles_reply (xcb_connection_t *c /**< */, + xcb_shape_get_rectangles_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_shape_get_rectangles_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + diff --git a/src/3rdparty/xcb/libxcb/shm.c b/src/3rdparty/xcb/libxcb/shm.c new file mode 100644 index 0000000000..c1637a8654 --- /dev/null +++ b/src/3rdparty/xcb/libxcb/shm.c @@ -0,0 +1,705 @@ +/* + * This file generated automatically from shm.xml by c_client.py. + * Edit at your peril. + */ + +#include +#include +#include "xcbext.h" +#include "shm.h" +#include "xproto.h" + +xcb_extension_t xcb_shm_id = { "MIT-SHM", 0 }; + + +/***************************************************************************** + ** + ** void xcb_shm_seg_next + ** + ** @param xcb_shm_seg_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_shm_seg_next (xcb_shm_seg_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_shm_seg_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_shm_seg_end + ** + ** @param xcb_shm_seg_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_shm_seg_end (xcb_shm_seg_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_shm_query_version_cookie_t xcb_shm_query_version + ** + ** @param xcb_connection_t *c + ** @returns xcb_shm_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_shm_query_version_cookie_t +xcb_shm_query_version (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shm_query_version_cookie_t xcb_ret; + xcb_shm_query_version_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_shm_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_shm_query_version_cookie_t +xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shm_query_version_cookie_t xcb_ret; + xcb_shm_query_version_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shm_query_version_reply_t * xcb_shm_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shm_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_shm_query_version_reply_t * +xcb_shm_query_version_reply (xcb_connection_t *c /**< */, + xcb_shm_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_shm_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_attach_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t shmid + ** @param uint8_t read_only + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_attach_checked (xcb_connection_t *c /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t shmid /**< */, + uint8_t read_only /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_ATTACH, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_attach_request_t xcb_out; + + xcb_out.shmseg = shmseg; + xcb_out.shmid = shmid; + xcb_out.read_only = read_only; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_attach + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t shmid + ** @param uint8_t read_only + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_attach (xcb_connection_t *c /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t shmid /**< */, + uint8_t read_only /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_ATTACH, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_attach_request_t xcb_out; + + xcb_out.shmseg = shmseg; + xcb_out.shmid = shmid; + xcb_out.read_only = read_only; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_detach_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_detach_checked (xcb_connection_t *c /**< */, + xcb_shm_seg_t shmseg /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_DETACH, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_detach_request_t xcb_out; + + xcb_out.shmseg = shmseg; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_detach + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_seg_t shmseg + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_detach (xcb_connection_t *c /**< */, + xcb_shm_seg_t shmseg /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_DETACH, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_detach_request_t xcb_out; + + xcb_out.shmseg = shmseg; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_put_image_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param xcb_gcontext_t gc + ** @param uint16_t total_width + ** @param uint16_t total_height + ** @param uint16_t src_x + ** @param uint16_t src_y + ** @param uint16_t src_width + ** @param uint16_t src_height + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint8_t depth + ** @param uint8_t format + ** @param uint8_t send_event + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_put_image_checked (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + xcb_gcontext_t gc /**< */, + uint16_t total_width /**< */, + uint16_t total_height /**< */, + uint16_t src_x /**< */, + uint16_t src_y /**< */, + uint16_t src_width /**< */, + uint16_t src_height /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint8_t depth /**< */, + uint8_t format /**< */, + uint8_t send_event /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_PUT_IMAGE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_put_image_request_t xcb_out; + + xcb_out.drawable = drawable; + xcb_out.gc = gc; + xcb_out.total_width = total_width; + xcb_out.total_height = total_height; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + xcb_out.src_width = src_width; + xcb_out.src_height = src_height; + xcb_out.dst_x = dst_x; + xcb_out.dst_y = dst_y; + xcb_out.depth = depth; + xcb_out.format = format; + xcb_out.send_event = send_event; + xcb_out.pad0 = 0; + xcb_out.shmseg = shmseg; + xcb_out.offset = offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_put_image + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param xcb_gcontext_t gc + ** @param uint16_t total_width + ** @param uint16_t total_height + ** @param uint16_t src_x + ** @param uint16_t src_y + ** @param uint16_t src_width + ** @param uint16_t src_height + ** @param int16_t dst_x + ** @param int16_t dst_y + ** @param uint8_t depth + ** @param uint8_t format + ** @param uint8_t send_event + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_put_image (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + xcb_gcontext_t gc /**< */, + uint16_t total_width /**< */, + uint16_t total_height /**< */, + uint16_t src_x /**< */, + uint16_t src_y /**< */, + uint16_t src_width /**< */, + uint16_t src_height /**< */, + int16_t dst_x /**< */, + int16_t dst_y /**< */, + uint8_t depth /**< */, + uint8_t format /**< */, + uint8_t send_event /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_PUT_IMAGE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_put_image_request_t xcb_out; + + xcb_out.drawable = drawable; + xcb_out.gc = gc; + xcb_out.total_width = total_width; + xcb_out.total_height = total_height; + xcb_out.src_x = src_x; + xcb_out.src_y = src_y; + xcb_out.src_width = src_width; + xcb_out.src_height = src_height; + xcb_out.dst_x = dst_x; + xcb_out.dst_y = dst_y; + xcb_out.depth = depth; + xcb_out.format = format; + xcb_out.send_event = send_event; + xcb_out.pad0 = 0; + xcb_out.shmseg = shmseg; + xcb_out.offset = offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shm_get_image_cookie_t xcb_shm_get_image + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param int16_t x + ** @param int16_t y + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t plane_mask + ** @param uint8_t format + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_shm_get_image_cookie_t + ** + *****************************************************************************/ + +xcb_shm_get_image_cookie_t +xcb_shm_get_image (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + int16_t x /**< */, + int16_t y /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t plane_mask /**< */, + uint8_t format /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_GET_IMAGE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shm_get_image_cookie_t xcb_ret; + xcb_shm_get_image_request_t xcb_out; + + xcb_out.drawable = drawable; + xcb_out.x = x; + xcb_out.y = y; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.plane_mask = plane_mask; + xcb_out.format = format; + memset(xcb_out.pad0, 0, 3); + xcb_out.shmseg = shmseg; + xcb_out.offset = offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shm_get_image_cookie_t xcb_shm_get_image_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_drawable_t drawable + ** @param int16_t x + ** @param int16_t y + ** @param uint16_t width + ** @param uint16_t height + ** @param uint32_t plane_mask + ** @param uint8_t format + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_shm_get_image_cookie_t + ** + *****************************************************************************/ + +xcb_shm_get_image_cookie_t +xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */, + xcb_drawable_t drawable /**< */, + int16_t x /**< */, + int16_t y /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint32_t plane_mask /**< */, + uint8_t format /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_GET_IMAGE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_shm_get_image_cookie_t xcb_ret; + xcb_shm_get_image_request_t xcb_out; + + xcb_out.drawable = drawable; + xcb_out.x = x; + xcb_out.y = y; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.plane_mask = plane_mask; + xcb_out.format = format; + memset(xcb_out.pad0, 0, 3); + xcb_out.shmseg = shmseg; + xcb_out.offset = offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_shm_get_image_reply_t * xcb_shm_get_image_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_shm_get_image_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_shm_get_image_reply_t * + ** + *****************************************************************************/ + +xcb_shm_get_image_reply_t * +xcb_shm_get_image_reply (xcb_connection_t *c /**< */, + xcb_shm_get_image_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_shm_get_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_create_pixmap_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_pixmap_t pid + ** @param xcb_drawable_t drawable + ** @param uint16_t width + ** @param uint16_t height + ** @param uint8_t depth + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */, + xcb_pixmap_t pid /**< */, + xcb_drawable_t drawable /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint8_t depth /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_CREATE_PIXMAP, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_create_pixmap_request_t xcb_out; + + xcb_out.pid = pid; + xcb_out.drawable = drawable; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.depth = depth; + memset(xcb_out.pad0, 0, 3); + xcb_out.shmseg = shmseg; + xcb_out.offset = offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_shm_create_pixmap + ** + ** @param xcb_connection_t *c + ** @param xcb_pixmap_t pid + ** @param xcb_drawable_t drawable + ** @param uint16_t width + ** @param uint16_t height + ** @param uint8_t depth + ** @param xcb_shm_seg_t shmseg + ** @param uint32_t offset + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_shm_create_pixmap (xcb_connection_t *c /**< */, + xcb_pixmap_t pid /**< */, + xcb_drawable_t drawable /**< */, + uint16_t width /**< */, + uint16_t height /**< */, + uint8_t depth /**< */, + xcb_shm_seg_t shmseg /**< */, + uint32_t offset /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_shm_id, + /* opcode */ XCB_SHM_CREATE_PIXMAP, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_shm_create_pixmap_request_t xcb_out; + + xcb_out.pid = pid; + xcb_out.drawable = drawable; + xcb_out.width = width; + xcb_out.height = height; + xcb_out.depth = depth; + memset(xcb_out.pad0, 0, 3); + xcb_out.shmseg = shmseg; + xcb_out.offset = offset; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].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/src/3rdparty/xcb/libxcb/sync.c b/src/3rdparty/xcb/libxcb/sync.c new file mode 100644 index 0000000000..408a263d2b --- /dev/null +++ b/src/3rdparty/xcb/libxcb/sync.c @@ -0,0 +1,1511 @@ +/* + * This file generated automatically from sync.xml by c_client.py. + * Edit at your peril. + */ + +#include +#include +#include "xcbext.h" +#include "sync.h" +#include "xproto.h" + +xcb_extension_t xcb_sync_id = { "SYNC", 0 }; + + +/***************************************************************************** + ** + ** void xcb_sync_alarm_next + ** + ** @param xcb_sync_alarm_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_alarm_next (xcb_sync_alarm_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_sync_alarm_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_alarm_end + ** + ** @param xcb_sync_alarm_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_alarm_end (xcb_sync_alarm_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_sync_counter_next + ** + ** @param xcb_sync_counter_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_counter_next (xcb_sync_counter_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_sync_counter_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_counter_end + ** + ** @param xcb_sync_counter_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_counter_end (xcb_sync_counter_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_sync_int64_next + ** + ** @param xcb_sync_int64_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_int64_next (xcb_sync_int64_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_sync_int64_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_int64_end + ** + ** @param xcb_sync_int64_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_int64_end (xcb_sync_int64_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** char * xcb_sync_systemcounter_name + ** + ** @param const xcb_sync_systemcounter_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_sync_systemcounter_name (const xcb_sync_systemcounter_t *R /**< */) +{ + return (char *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_sync_systemcounter_name_length + ** + ** @param const xcb_sync_systemcounter_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_sync_systemcounter_name_length (const xcb_sync_systemcounter_t *R /**< */) +{ + return R->name_len; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_systemcounter_name_end + ** + ** @param const xcb_sync_systemcounter_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_systemcounter_name_end (const xcb_sync_systemcounter_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((char *) (R + 1)) + (R->name_len); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** void xcb_sync_systemcounter_next + ** + ** @param xcb_sync_systemcounter_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +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); + --i->rem; + i->data = (xcb_sync_systemcounter_t *) child.data; + i->index = child.index; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_systemcounter_end + ** + ** @param xcb_sync_systemcounter_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_systemcounter_end (xcb_sync_systemcounter_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + while(i.rem > 0) + xcb_sync_systemcounter_next(&i); + ret.data = i.data; + ret.rem = i.rem; + ret.index = i.index; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_sync_trigger_next + ** + ** @param xcb_sync_trigger_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_trigger_next (xcb_sync_trigger_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_sync_trigger_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_trigger_end + ** + ** @param xcb_sync_trigger_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_trigger_end (xcb_sync_trigger_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** void xcb_sync_waitcondition_next + ** + ** @param xcb_sync_waitcondition_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_sync_waitcondition_next (xcb_sync_waitcondition_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_sync_waitcondition_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_sync_waitcondition_end + ** + ** @param xcb_sync_waitcondition_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_sync_waitcondition_end (xcb_sync_waitcondition_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_initialize_cookie_t xcb_sync_initialize + ** + ** @param xcb_connection_t *c + ** @param uint8_t desired_major_version + ** @param uint8_t desired_minor_version + ** @returns xcb_sync_initialize_cookie_t + ** + *****************************************************************************/ + +xcb_sync_initialize_cookie_t +xcb_sync_initialize (xcb_connection_t *c /**< */, + uint8_t desired_major_version /**< */, + uint8_t desired_minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_INITIALIZE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_initialize_cookie_t xcb_ret; + xcb_sync_initialize_request_t xcb_out; + + xcb_out.desired_major_version = desired_major_version; + xcb_out.desired_minor_version = desired_minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_initialize_cookie_t xcb_sync_initialize_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint8_t desired_major_version + ** @param uint8_t desired_minor_version + ** @returns xcb_sync_initialize_cookie_t + ** + *****************************************************************************/ + +xcb_sync_initialize_cookie_t +xcb_sync_initialize_unchecked (xcb_connection_t *c /**< */, + uint8_t desired_major_version /**< */, + uint8_t desired_minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_INITIALIZE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_initialize_cookie_t xcb_ret; + xcb_sync_initialize_request_t xcb_out; + + xcb_out.desired_major_version = desired_major_version; + xcb_out.desired_minor_version = desired_minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_initialize_reply_t * xcb_sync_initialize_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_initialize_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_initialize_reply_t * + ** + *****************************************************************************/ + +xcb_sync_initialize_reply_t * +xcb_sync_initialize_reply (xcb_connection_t *c /**< */, + xcb_sync_initialize_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_sync_initialize_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters + ** + ** @param xcb_connection_t *c + ** @returns xcb_sync_list_system_counters_cookie_t + ** + *****************************************************************************/ + +xcb_sync_list_system_counters_cookie_t +xcb_sync_list_system_counters (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_LIST_SYSTEM_COUNTERS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_list_system_counters_cookie_t xcb_ret; + xcb_sync_list_system_counters_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_list_system_counters_cookie_t xcb_sync_list_system_counters_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_sync_list_system_counters_cookie_t + ** + *****************************************************************************/ + +xcb_sync_list_system_counters_cookie_t +xcb_sync_list_system_counters_unchecked (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_LIST_SYSTEM_COUNTERS, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_list_system_counters_cookie_t xcb_ret; + xcb_sync_list_system_counters_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].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_list_system_counters_counters_length + ** + ** @param const xcb_sync_list_system_counters_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_sync_list_system_counters_counters_length (const xcb_sync_list_system_counters_reply_t *R /**< */) +{ + return R->counters_len; +} + + +/***************************************************************************** + ** + ** xcb_sync_systemcounter_iterator_t xcb_sync_list_system_counters_counters_iterator + ** + ** @param const xcb_sync_list_system_counters_reply_t *R + ** @returns xcb_sync_systemcounter_iterator_t + ** + *****************************************************************************/ + +xcb_sync_systemcounter_iterator_t +xcb_sync_list_system_counters_counters_iterator (const xcb_sync_list_system_counters_reply_t *R /**< */) +{ + xcb_sync_systemcounter_iterator_t i; + i.data = (xcb_sync_systemcounter_t *) (R + 1); + i.rem = R->counters_len; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_sync_list_system_counters_reply_t * xcb_sync_list_system_counters_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_list_system_counters_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_list_system_counters_reply_t * + ** + *****************************************************************************/ + +xcb_sync_list_system_counters_reply_t * +xcb_sync_list_system_counters_reply (xcb_connection_t *c /**< */, + xcb_sync_list_system_counters_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_sync_list_system_counters_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t id + ** @param xcb_sync_int64_t initial_value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_counter_checked (xcb_connection_t *c /**< */, + xcb_sync_counter_t id /**< */, + xcb_sync_int64_t initial_value /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CREATE_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_create_counter_request_t xcb_out; + + xcb_out.id = id; + xcb_out.initial_value = initial_value; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t id + ** @param xcb_sync_int64_t initial_value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t id /**< */, + xcb_sync_int64_t initial_value /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CREATE_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_create_counter_request_t xcb_out; + + xcb_out.id = id; + xcb_out.initial_value = initial_value; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_destroy_counter_checked (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_DESTROY_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_destroy_counter_request_t xcb_out; + + xcb_out.counter = counter; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_destroy_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_DESTROY_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_destroy_counter_request_t xcb_out; + + xcb_out.counter = counter; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_query_counter_cookie_t xcb_sync_query_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_sync_query_counter_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_counter_cookie_t +xcb_sync_query_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_QUERY_COUNTER, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_query_counter_cookie_t xcb_ret; + xcb_sync_query_counter_request_t xcb_out; + + xcb_out.counter = counter; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_query_counter_cookie_t xcb_sync_query_counter_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @returns xcb_sync_query_counter_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_counter_cookie_t +xcb_sync_query_counter_unchecked (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_QUERY_COUNTER, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_query_counter_cookie_t xcb_ret; + xcb_sync_query_counter_request_t xcb_out; + + xcb_out.counter = counter; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_query_counter_reply_t * xcb_sync_query_counter_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_query_counter_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_query_counter_reply_t * + ** + *****************************************************************************/ + +xcb_sync_query_counter_reply_t * +xcb_sync_query_counter_reply (xcb_connection_t *c /**< */, + xcb_sync_query_counter_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_sync_query_counter_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_await_checked + ** + ** @param xcb_connection_t *c + ** @param uint32_t wait_list_len + ** @param const xcb_sync_waitcondition_t *wait_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_await_checked (xcb_connection_t *c /**< */, + uint32_t wait_list_len /**< */, + const xcb_sync_waitcondition_t *wait_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_AWAIT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_sync_await_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_await + ** + ** @param xcb_connection_t *c + ** @param uint32_t wait_list_len + ** @param const xcb_sync_waitcondition_t *wait_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_await (xcb_connection_t *c /**< */, + uint32_t wait_list_len /**< */, + const xcb_sync_waitcondition_t *wait_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_AWAIT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_sync_await_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t amount + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_counter_checked (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t amount /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CHANGE_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_change_counter_request_t xcb_out; + + xcb_out.counter = counter; + xcb_out.amount = amount; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t amount + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t amount /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CHANGE_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_change_counter_request_t xcb_out; + + xcb_out.counter = counter; + xcb_out.amount = amount; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_counter_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_counter_checked (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t value /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_SET_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_set_counter_request_t xcb_out; + + xcb_out.counter = counter; + xcb_out.value = value; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_counter + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_counter_t counter + ** @param xcb_sync_int64_t value + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_counter (xcb_connection_t *c /**< */, + xcb_sync_counter_t counter /**< */, + xcb_sync_int64_t value /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_SET_COUNTER, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_set_counter_request_t xcb_out; + + xcb_out.counter = counter; + xcb_out.value = value; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_alarm_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_alarm_checked (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CREATE_ALARM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_sync_create_alarm_request_t xcb_out; + + xcb_out.id = id; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_create_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_create_alarm (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CREATE_ALARM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_sync_create_alarm_request_t xcb_out; + + xcb_out.id = id; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_alarm_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_alarm_checked (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CHANGE_ALARM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_sync_change_alarm_request_t xcb_out; + + xcb_out.id = id; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_change_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t id + ** @param uint32_t value_mask + ** @param const uint32_t *value_list + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_change_alarm (xcb_connection_t *c /**< */, + xcb_sync_alarm_t id /**< */, + uint32_t value_mask /**< */, + const uint32_t *value_list /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_CHANGE_ALARM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_sync_change_alarm_request_t xcb_out; + + xcb_out.id = id; + xcb_out.value_mask = value_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_alarm_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_destroy_alarm_checked (xcb_connection_t *c /**< */, + xcb_sync_alarm_t alarm /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_DESTROY_ALARM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_destroy_alarm_request_t xcb_out; + + xcb_out.alarm = alarm; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_destroy_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_destroy_alarm (xcb_connection_t *c /**< */, + xcb_sync_alarm_t alarm /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_DESTROY_ALARM, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_destroy_alarm_request_t xcb_out; + + xcb_out.alarm = alarm; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_query_alarm_cookie_t xcb_sync_query_alarm + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_sync_query_alarm_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_alarm_cookie_t +xcb_sync_query_alarm (xcb_connection_t *c /**< */, + xcb_sync_alarm_t alarm /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_QUERY_ALARM, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_query_alarm_cookie_t xcb_ret; + xcb_sync_query_alarm_request_t xcb_out; + + xcb_out.alarm = alarm; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_query_alarm_cookie_t xcb_sync_query_alarm_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_alarm_t alarm + ** @returns xcb_sync_query_alarm_cookie_t + ** + *****************************************************************************/ + +xcb_sync_query_alarm_cookie_t +xcb_sync_query_alarm_unchecked (xcb_connection_t *c /**< */, + xcb_sync_alarm_t alarm /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_QUERY_ALARM, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_query_alarm_cookie_t xcb_ret; + xcb_sync_query_alarm_request_t xcb_out; + + xcb_out.alarm = alarm; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_query_alarm_reply_t * xcb_sync_query_alarm_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_query_alarm_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_query_alarm_reply_t * + ** + *****************************************************************************/ + +xcb_sync_query_alarm_reply_t * +xcb_sync_query_alarm_reply (xcb_connection_t *c /**< */, + xcb_sync_query_alarm_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_sync_query_alarm_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_priority_checked + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @param int32_t priority + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_priority_checked (xcb_connection_t *c /**< */, + uint32_t id /**< */, + int32_t priority /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_SET_PRIORITY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_set_priority_request_t xcb_out; + + xcb_out.id = id; + xcb_out.priority = priority; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_sync_set_priority + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @param int32_t priority + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_sync_set_priority (xcb_connection_t *c /**< */, + uint32_t id /**< */, + int32_t priority /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_SET_PRIORITY, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_sync_set_priority_request_t xcb_out; + + xcb_out.id = id; + xcb_out.priority = priority; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_get_priority_cookie_t xcb_sync_get_priority + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @returns xcb_sync_get_priority_cookie_t + ** + *****************************************************************************/ + +xcb_sync_get_priority_cookie_t +xcb_sync_get_priority (xcb_connection_t *c /**< */, + uint32_t id /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_GET_PRIORITY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_get_priority_cookie_t xcb_ret; + xcb_sync_get_priority_request_t xcb_out; + + xcb_out.id = id; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_get_priority_cookie_t xcb_sync_get_priority_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t id + ** @returns xcb_sync_get_priority_cookie_t + ** + *****************************************************************************/ + +xcb_sync_get_priority_cookie_t +xcb_sync_get_priority_unchecked (xcb_connection_t *c /**< */, + uint32_t id /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_sync_id, + /* opcode */ XCB_SYNC_GET_PRIORITY, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_sync_get_priority_cookie_t xcb_ret; + xcb_sync_get_priority_request_t xcb_out; + + xcb_out.id = id; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_sync_get_priority_reply_t * xcb_sync_get_priority_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_sync_get_priority_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_sync_get_priority_reply_t * + ** + *****************************************************************************/ + +xcb_sync_get_priority_reply_t * +xcb_sync_get_priority_reply (xcb_connection_t *c /**< */, + xcb_sync_get_priority_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_sync_get_priority_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + diff --git a/src/3rdparty/xcb/libxcb/xfixes.c b/src/3rdparty/xcb/libxcb/xfixes.c new file mode 100644 index 0000000000..541918ce16 --- /dev/null +++ b/src/3rdparty/xcb/libxcb/xfixes.c @@ -0,0 +1,2953 @@ +/* + * This file generated automatically from xfixes.xml by c_client.py. + * Edit at your peril. + */ + +#include +#include +#include "xcbext.h" +#include "xfixes.h" +#include "xproto.h" +#include "render.h" +#include "shape.h" + +xcb_extension_t xcb_xfixes_id = { "XFIXES", 0 }; + + +/***************************************************************************** + ** + ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_xfixes_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_query_version_cookie_t +xcb_xfixes_query_version (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_query_version_cookie_t xcb_ret; + xcb_xfixes_query_version_request_t xcb_out; + + xcb_out.client_major_version = client_major_version; + xcb_out.client_minor_version = client_minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_query_version_cookie_t xcb_xfixes_query_version_unchecked + ** + ** @param xcb_connection_t *c + ** @param uint32_t client_major_version + ** @param uint32_t client_minor_version + ** @returns xcb_xfixes_query_version_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_query_version_cookie_t +xcb_xfixes_query_version_unchecked (xcb_connection_t *c /**< */, + uint32_t client_major_version /**< */, + uint32_t client_minor_version /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_QUERY_VERSION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_query_version_cookie_t xcb_ret; + xcb_xfixes_query_version_request_t xcb_out; + + xcb_out.client_major_version = client_major_version; + xcb_out.client_minor_version = client_minor_version; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_query_version_reply_t * xcb_xfixes_query_version_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_query_version_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_query_version_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_query_version_reply_t * +xcb_xfixes_query_version_reply (xcb_connection_t *c /**< */, + xcb_xfixes_query_version_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_xfixes_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_save_set_checked + ** + ** @param xcb_connection_t *c + ** @param uint8_t mode + ** @param uint8_t target + ** @param uint8_t map + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_save_set_checked (xcb_connection_t *c /**< */, + uint8_t mode /**< */, + uint8_t target /**< */, + uint8_t map /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_change_save_set_request_t xcb_out; + + xcb_out.mode = mode; + xcb_out.target = target; + xcb_out.map = map; + xcb_out.pad0 = 0; + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_save_set + ** + ** @param xcb_connection_t *c + ** @param uint8_t mode + ** @param uint8_t target + ** @param uint8_t map + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_save_set (xcb_connection_t *c /**< */, + uint8_t mode /**< */, + uint8_t target /**< */, + uint8_t map /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CHANGE_SAVE_SET, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_change_save_set_request_t xcb_out; + + xcb_out.mode = mode; + xcb_out.target = target; + xcb_out.map = map; + xcb_out.pad0 = 0; + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_selection_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_atom_t selection + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_selection_input_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_atom_t selection /**< */, + uint32_t event_mask /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_select_selection_input_request_t xcb_out; + + xcb_out.window = window; + xcb_out.selection = selection; + xcb_out.event_mask = event_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_selection_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param xcb_atom_t selection + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_selection_input (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + xcb_atom_t selection /**< */, + uint32_t event_mask /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SELECT_SELECTION_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_select_selection_input_request_t xcb_out; + + xcb_out.window = window; + xcb_out.selection = selection; + xcb_out.event_mask = event_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_cursor_input_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_cursor_input_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint32_t event_mask /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_select_cursor_input_request_t xcb_out; + + xcb_out.window = window; + xcb_out.event_mask = event_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_select_cursor_input + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @param uint32_t event_mask + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_select_cursor_input (xcb_connection_t *c /**< */, + xcb_window_t window /**< */, + uint32_t event_mask /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SELECT_CURSOR_INPUT, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_select_cursor_input_request_t xcb_out; + + xcb_out.window = window; + xcb_out.event_mask = event_mask; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_cookie_t +xcb_xfixes_get_cursor_image (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_get_cursor_image_cookie_t xcb_ret; + xcb_xfixes_get_cursor_image_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_cookie_t xcb_xfixes_get_cursor_image_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_cookie_t +xcb_xfixes_get_cursor_image_unchecked (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_get_cursor_image_cookie_t xcb_ret; + xcb_xfixes_get_cursor_image_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** uint32_t * xcb_xfixes_get_cursor_image_cursor_image + ** + ** @param const xcb_xfixes_get_cursor_image_reply_t *R + ** @returns uint32_t * + ** + *****************************************************************************/ + +uint32_t * +xcb_xfixes_get_cursor_image_cursor_image (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) +{ + return (uint32_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_image_cursor_image_length + ** + ** @param const xcb_xfixes_get_cursor_image_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_image_cursor_image_length (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) +{ + return (R->width * R->height); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_cursor_image_end + ** + ** @param const xcb_xfixes_get_cursor_image_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_cursor_image_end (const xcb_xfixes_get_cursor_image_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((uint32_t *) (R + 1)) + ((R->width * R->height)); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_reply_t * xcb_xfixes_get_cursor_image_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_get_cursor_image_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_get_cursor_image_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_reply_t * +xcb_xfixes_get_cursor_image_reply (xcb_connection_t *c /**< */, + xcb_xfixes_get_cursor_image_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_xfixes_get_cursor_image_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** void xcb_xfixes_region_next + ** + ** @param xcb_xfixes_region_iterator_t *i + ** @returns void + ** + *****************************************************************************/ + +void +xcb_xfixes_region_next (xcb_xfixes_region_iterator_t *i /**< */) +{ + --i->rem; + ++i->data; + i->index += sizeof(xcb_xfixes_region_t); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_region_end + ** + ** @param xcb_xfixes_region_iterator_t i + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_region_end (xcb_xfixes_region_iterator_t i /**< */) +{ + xcb_generic_iterator_t ret; + ret.data = i.data + i.rem; + ret.index = i.index + ((char *) ret.data - (char *) i.data); + ret.rem = 0; + return ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_pixmap_t bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_bitmap_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_pixmap_t bitmap /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_bitmap_request_t xcb_out; + + xcb_out.region = region; + xcb_out.bitmap = bitmap; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_bitmap + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_pixmap_t bitmap + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_bitmap (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_pixmap_t bitmap /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_BITMAP, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_bitmap_request_t xcb_out; + + xcb_out.region = region; + xcb_out.bitmap = bitmap; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_window_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_window_t window + ** @param xcb_shape_kind_t kind + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_window_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t kind /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_window_request_t xcb_out; + + xcb_out.region = region; + xcb_out.window = window; + xcb_out.kind = kind; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_window + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_window_t window + ** @param xcb_shape_kind_t kind + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_window (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_window_t window /**< */, + xcb_shape_kind_t kind /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_WINDOW, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_window_request_t xcb_out; + + xcb_out.region = region; + xcb_out.window = window; + xcb_out.kind = kind; + memset(xcb_out.pad0, 0, 3); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_gc_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_gcontext_t gc + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_gc_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_gcontext_t gc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_gc_request_t xcb_out; + + xcb_out.region = region; + xcb_out.gc = gc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_gc + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_gcontext_t gc + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_gc (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_gcontext_t gc /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_GC, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_gc_request_t xcb_out; + + xcb_out.region = region; + xcb_out.gc = gc; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_picture_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_picture_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_render_picture_t picture /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_picture_request_t xcb_out; + + xcb_out.region = region; + xcb_out.picture = picture; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_create_region_from_picture + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param xcb_render_picture_t picture + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_create_region_from_picture (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + xcb_render_picture_t picture /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CREATE_REGION_FROM_PICTURE, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_create_region_from_picture_request_t xcb_out; + + xcb_out.region = region; + xcb_out.picture = picture; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_destroy_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_destroy_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_DESTROY_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_destroy_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_destroy_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_destroy_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_DESTROY_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_destroy_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param uint32_t rectangles_len + ** @param const xcb_rectangle_t *rectangles + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + uint32_t rectangles_len /**< */, + const xcb_rectangle_t *rectangles /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_copy_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_copy_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_COPY_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_copy_region_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_copy_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_copy_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_COPY_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_copy_region_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_union_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_union_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_UNION_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_union_region_request_t xcb_out; + + xcb_out.source1 = source1; + xcb_out.source2 = source2; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_union_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_union_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_UNION_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_union_region_request_t xcb_out; + + xcb_out.source1 = source1; + xcb_out.source2 = source2; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_intersect_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_intersect_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_INTERSECT_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_intersect_region_request_t xcb_out; + + xcb_out.source1 = source1; + xcb_out.source2 = source2; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_intersect_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_intersect_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_INTERSECT_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_intersect_region_request_t xcb_out; + + xcb_out.source1 = source1; + xcb_out.source2 = source2; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_subtract_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_subtract_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SUBTRACT_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_subtract_region_request_t xcb_out; + + xcb_out.source1 = source1; + xcb_out.source2 = source2; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_subtract_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source1 + ** @param xcb_xfixes_region_t source2 + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_subtract_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source1 /**< */, + xcb_xfixes_region_t source2 /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SUBTRACT_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_subtract_region_request_t xcb_out; + + xcb_out.source1 = source1; + xcb_out.source2 = source2; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_invert_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_rectangle_t bounds + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_invert_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_rectangle_t bounds /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_INVERT_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_invert_region_request_t xcb_out; + + xcb_out.source = source; + xcb_out.bounds = bounds; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_invert_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_rectangle_t bounds + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_invert_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_rectangle_t bounds /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_INVERT_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_invert_region_request_t xcb_out; + + xcb_out.source = source; + xcb_out.bounds = bounds; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_translate_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param int16_t dx + ** @param int16_t dy + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_translate_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + int16_t dx /**< */, + int16_t dy /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_TRANSLATE_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_translate_region_request_t xcb_out; + + xcb_out.region = region; + xcb_out.dx = dx; + xcb_out.dy = dy; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_translate_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @param int16_t dx + ** @param int16_t dy + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_translate_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */, + int16_t dx /**< */, + int16_t dy /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_TRANSLATE_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_translate_region_request_t xcb_out; + + xcb_out.region = region; + xcb_out.dx = dx; + xcb_out.dy = dy; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_region_extents_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_region_extents_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_REGION_EXTENTS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_region_extents_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_region_extents + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_region_extents (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_REGION_EXTENTS, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_region_extents_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_xfixes_fetch_region_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_fetch_region_cookie_t +xcb_xfixes_fetch_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_FETCH_REGION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_fetch_region_cookie_t xcb_ret; + xcb_xfixes_fetch_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_fetch_region_cookie_t xcb_xfixes_fetch_region_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t region + ** @returns xcb_xfixes_fetch_region_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_fetch_region_cookie_t +xcb_xfixes_fetch_region_unchecked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t region /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_FETCH_REGION, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_fetch_region_cookie_t xcb_ret; + xcb_xfixes_fetch_region_request_t xcb_out; + + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_rectangle_t * xcb_xfixes_fetch_region_rectangles + ** + ** @param const xcb_xfixes_fetch_region_reply_t *R + ** @returns xcb_rectangle_t * + ** + *****************************************************************************/ + +xcb_rectangle_t * +xcb_xfixes_fetch_region_rectangles (const xcb_xfixes_fetch_region_reply_t *R /**< */) +{ + return (xcb_rectangle_t *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_xfixes_fetch_region_rectangles_length + ** + ** @param const xcb_xfixes_fetch_region_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_fetch_region_rectangles_length (const xcb_xfixes_fetch_region_reply_t *R /**< */) +{ + return (R->length / 2); +} + + +/***************************************************************************** + ** + ** xcb_rectangle_iterator_t xcb_xfixes_fetch_region_rectangles_iterator + ** + ** @param const xcb_xfixes_fetch_region_reply_t *R + ** @returns xcb_rectangle_iterator_t + ** + *****************************************************************************/ + +xcb_rectangle_iterator_t +xcb_xfixes_fetch_region_rectangles_iterator (const xcb_xfixes_fetch_region_reply_t *R /**< */) +{ + xcb_rectangle_iterator_t i; + i.data = (xcb_rectangle_t *) (R + 1); + i.rem = (R->length / 2); + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_fetch_region_reply_t * xcb_xfixes_fetch_region_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_fetch_region_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_fetch_region_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_fetch_region_reply_t * +xcb_xfixes_fetch_region_reply (xcb_connection_t *c /**< */, + xcb_xfixes_fetch_region_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_xfixes_fetch_region_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_gcontext_t gc + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_gc_clip_region_checked (xcb_connection_t *c /**< */, + xcb_gcontext_t gc /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_gc_clip_region_request_t xcb_out; + + xcb_out.gc = gc; + xcb_out.region = region; + xcb_out.x_origin = x_origin; + xcb_out.y_origin = y_origin; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_gc_clip_region + ** + ** @param xcb_connection_t *c + ** @param xcb_gcontext_t gc + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_gc_clip_region (xcb_connection_t *c /**< */, + xcb_gcontext_t gc /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_GC_CLIP_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_gc_clip_region_request_t xcb_out; + + xcb_out.gc = gc; + xcb_out.region = region; + xcb_out.x_origin = x_origin; + xcb_out.y_origin = y_origin; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_window_shape_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t dest + ** @param xcb_shape_kind_t dest_kind + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_window_shape_region_checked (xcb_connection_t *c /**< */, + xcb_window_t dest /**< */, + xcb_shape_kind_t dest_kind /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_xfixes_region_t region /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_window_shape_region_request_t xcb_out; + + xcb_out.dest = dest; + xcb_out.dest_kind = dest_kind; + memset(xcb_out.pad0, 0, 3); + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_window_shape_region + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t dest + ** @param xcb_shape_kind_t dest_kind + ** @param int16_t x_offset + ** @param int16_t y_offset + ** @param xcb_xfixes_region_t region + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_window_shape_region (xcb_connection_t *c /**< */, + xcb_window_t dest /**< */, + xcb_shape_kind_t dest_kind /**< */, + int16_t x_offset /**< */, + int16_t y_offset /**< */, + xcb_xfixes_region_t region /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_WINDOW_SHAPE_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_window_shape_region_request_t xcb_out; + + xcb_out.dest = dest; + xcb_out.dest_kind = dest_kind; + memset(xcb_out.pad0, 0, 3); + xcb_out.x_offset = x_offset; + xcb_out.y_offset = y_offset; + xcb_out.region = region; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_picture_clip_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_picture_clip_region_checked (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_picture_clip_region_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.region = region; + xcb_out.x_origin = x_origin; + xcb_out.y_origin = y_origin; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_picture_clip_region + ** + ** @param xcb_connection_t *c + ** @param xcb_render_picture_t picture + ** @param xcb_xfixes_region_t region + ** @param int16_t x_origin + ** @param int16_t y_origin + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_picture_clip_region (xcb_connection_t *c /**< */, + xcb_render_picture_t picture /**< */, + xcb_xfixes_region_t region /**< */, + int16_t x_origin /**< */, + int16_t y_origin /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_PICTURE_CLIP_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_picture_clip_region_request_t xcb_out; + + xcb_out.picture = picture; + xcb_out.region = region; + xcb_out.x_origin = x_origin; + xcb_out.y_origin = y_origin; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_cursor_name_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_cursor_name_checked (xcb_connection_t *c /**< */, + xcb_cursor_t cursor /**< */, + uint16_t nbytes /**< */, + const char *name /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_CURSOR_NAME, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_cursor_name_request_t xcb_out; + + xcb_out.cursor = cursor; + xcb_out.nbytes = nbytes; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_set_cursor_name + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_set_cursor_name (xcb_connection_t *c /**< */, + xcb_cursor_t cursor /**< */, + uint16_t nbytes /**< */, + const char *name /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SET_CURSOR_NAME, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_set_cursor_name_request_t xcb_out; + + xcb_out.cursor = cursor; + xcb_out.nbytes = nbytes; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @returns xcb_xfixes_get_cursor_name_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_name_cookie_t +xcb_xfixes_get_cursor_name (xcb_connection_t *c /**< */, + xcb_cursor_t cursor /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_GET_CURSOR_NAME, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_get_cursor_name_cookie_t xcb_ret; + xcb_xfixes_get_cursor_name_request_t xcb_out; + + xcb_out.cursor = cursor; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_name_cookie_t xcb_xfixes_get_cursor_name_unchecked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t cursor + ** @returns xcb_xfixes_get_cursor_name_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_name_cookie_t +xcb_xfixes_get_cursor_name_unchecked (xcb_connection_t *c /**< */, + xcb_cursor_t cursor /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_GET_CURSOR_NAME, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_get_cursor_name_cookie_t xcb_ret; + xcb_xfixes_get_cursor_name_request_t xcb_out; + + xcb_out.cursor = cursor; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** char * xcb_xfixes_get_cursor_name_name + ** + ** @param const xcb_xfixes_get_cursor_name_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_xfixes_get_cursor_name_name (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) +{ + return (char *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_name_name_length + ** + ** @param const xcb_xfixes_get_cursor_name_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_name_name_length (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) +{ + return R->nbytes; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_name_name_end + ** + ** @param const xcb_xfixes_get_cursor_name_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_name_name_end (const xcb_xfixes_get_cursor_name_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((char *) (R + 1)) + (R->nbytes); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_name_reply_t * xcb_xfixes_get_cursor_name_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_get_cursor_name_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_get_cursor_name_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_name_reply_t * +xcb_xfixes_get_cursor_name_reply (xcb_connection_t *c /**< */, + xcb_xfixes_get_cursor_name_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_xfixes_get_cursor_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_and_name_cookie_t +xcb_xfixes_get_cursor_image_and_name (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret; + xcb_xfixes_get_cursor_image_and_name_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_xfixes_get_cursor_image_and_name_unchecked + ** + ** @param xcb_connection_t *c + ** @returns xcb_xfixes_get_cursor_image_and_name_cookie_t + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_and_name_cookie_t +xcb_xfixes_get_cursor_image_and_name_unchecked (xcb_connection_t *c /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_GET_CURSOR_IMAGE_AND_NAME, + /* isvoid */ 0 + }; + + struct iovec xcb_parts[4]; + xcb_xfixes_get_cursor_image_and_name_cookie_t xcb_ret; + xcb_xfixes_get_cursor_image_and_name_request_t xcb_out; + + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** char * xcb_xfixes_get_cursor_image_and_name_name + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns char * + ** + *****************************************************************************/ + +char * +xcb_xfixes_get_cursor_image_and_name_name (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) +{ + return (char *) (R + 1); +} + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_image_and_name_name_length + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_image_and_name_name_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) +{ + return R->nbytes; +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_name_end + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_and_name_name_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + i.data = ((char *) (R + 1)) + (R->nbytes); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** uint32_t * xcb_xfixes_get_cursor_image_and_name_cursor_image + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns uint32_t * + ** + *****************************************************************************/ + +uint32_t * +xcb_xfixes_get_cursor_image_and_name_cursor_image (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) +{ + xcb_generic_iterator_t prev = xcb_xfixes_get_cursor_image_and_name_name_end(R); + return (uint32_t *) ((char *) prev.data + XCB_TYPE_PAD(uint32_t, prev.index) + 0); +} + + +/***************************************************************************** + ** + ** int xcb_xfixes_get_cursor_image_and_name_cursor_image_length + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns int + ** + *****************************************************************************/ + +int +xcb_xfixes_get_cursor_image_and_name_cursor_image_length (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) +{ + return (R->width * R->height); +} + + +/***************************************************************************** + ** + ** xcb_generic_iterator_t xcb_xfixes_get_cursor_image_and_name_cursor_image_end + ** + ** @param const xcb_xfixes_get_cursor_image_and_name_reply_t *R + ** @returns xcb_generic_iterator_t + ** + *****************************************************************************/ + +xcb_generic_iterator_t +xcb_xfixes_get_cursor_image_and_name_cursor_image_end (const xcb_xfixes_get_cursor_image_and_name_reply_t *R /**< */) +{ + xcb_generic_iterator_t i; + xcb_generic_iterator_t child = xcb_xfixes_get_cursor_image_and_name_name_end(R); + i.data = ((uint32_t *) child.data) + ((R->width * R->height)); + i.rem = 0; + i.index = (char *) i.data - (char *) R; + return i; +} + + +/***************************************************************************** + ** + ** xcb_xfixes_get_cursor_image_and_name_reply_t * xcb_xfixes_get_cursor_image_and_name_reply + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_get_cursor_image_and_name_cookie_t cookie + ** @param xcb_generic_error_t **e + ** @returns xcb_xfixes_get_cursor_image_and_name_reply_t * + ** + *****************************************************************************/ + +xcb_xfixes_get_cursor_image_and_name_reply_t * +xcb_xfixes_get_cursor_image_and_name_reply (xcb_connection_t *c /**< */, + xcb_xfixes_get_cursor_image_and_name_cookie_t cookie /**< */, + xcb_generic_error_t **e /**< */) +{ + return (xcb_xfixes_get_cursor_image_and_name_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e); +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t source + ** @param xcb_cursor_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor_checked (xcb_connection_t *c /**< */, + xcb_cursor_t source /**< */, + xcb_cursor_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CHANGE_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_change_cursor_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t source + ** @param xcb_cursor_t destination + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor (xcb_connection_t *c /**< */, + xcb_cursor_t source /**< */, + xcb_cursor_t destination /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CHANGE_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_change_cursor_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t src + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor_by_name_checked (xcb_connection_t *c /**< */, + xcb_cursor_t src /**< */, + uint16_t nbytes /**< */, + const char *name /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_change_cursor_by_name_request_t xcb_out; + + xcb_out.src = src; + xcb_out.nbytes = nbytes; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_change_cursor_by_name + ** + ** @param xcb_connection_t *c + ** @param xcb_cursor_t src + ** @param uint16_t nbytes + ** @param const char *name + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_change_cursor_by_name (xcb_connection_t *c /**< */, + xcb_cursor_t src /**< */, + uint16_t nbytes /**< */, + const char *name /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 4, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_CHANGE_CURSOR_BY_NAME, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[6]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_change_cursor_by_name_request_t xcb_out; + + xcb_out.src = src; + xcb_out.nbytes = nbytes; + memset(xcb_out.pad0, 0, 2); + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + 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; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_expand_region_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @param uint16_t left + ** @param uint16_t right + ** @param uint16_t top + ** @param uint16_t bottom + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_expand_region_checked (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */, + uint16_t left /**< */, + uint16_t right /**< */, + uint16_t top /**< */, + uint16_t bottom /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_EXPAND_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_expand_region_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + xcb_out.left = left; + xcb_out.right = right; + xcb_out.top = top; + xcb_out.bottom = bottom; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_expand_region + ** + ** @param xcb_connection_t *c + ** @param xcb_xfixes_region_t source + ** @param xcb_xfixes_region_t destination + ** @param uint16_t left + ** @param uint16_t right + ** @param uint16_t top + ** @param uint16_t bottom + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_expand_region (xcb_connection_t *c /**< */, + xcb_xfixes_region_t source /**< */, + xcb_xfixes_region_t destination /**< */, + uint16_t left /**< */, + uint16_t right /**< */, + uint16_t top /**< */, + uint16_t bottom /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_EXPAND_REGION, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_expand_region_request_t xcb_out; + + xcb_out.source = source; + xcb_out.destination = destination; + xcb_out.left = left; + xcb_out.right = right; + xcb_out.top = top; + xcb_out.bottom = bottom; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_hide_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_hide_cursor_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_HIDE_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_hide_cursor_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_hide_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_hide_cursor (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_HIDE_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_hide_cursor_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_show_cursor_checked + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_show_cursor_checked (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SHOW_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_show_cursor_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3; + xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req); + return xcb_ret; +} + + +/***************************************************************************** + ** + ** xcb_void_cookie_t xcb_xfixes_show_cursor + ** + ** @param xcb_connection_t *c + ** @param xcb_window_t window + ** @returns xcb_void_cookie_t + ** + *****************************************************************************/ + +xcb_void_cookie_t +xcb_xfixes_show_cursor (xcb_connection_t *c /**< */, + xcb_window_t window /**< */) +{ + static const xcb_protocol_request_t xcb_req = { + /* count */ 2, + /* ext */ &xcb_xfixes_id, + /* opcode */ XCB_XFIXES_SHOW_CURSOR, + /* isvoid */ 1 + }; + + struct iovec xcb_parts[4]; + xcb_void_cookie_t xcb_ret; + xcb_xfixes_show_cursor_request_t xcb_out; + + xcb_out.window = window; + + xcb_parts[2].iov_base = (char *) &xcb_out; + xcb_parts[2].iov_len = sizeof(xcb_out); + xcb_parts[3].iov_base = 0; + xcb_parts[3].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/src/3rdparty/xcb/sysinclude/render.h b/src/3rdparty/xcb/sysinclude/render.h new file mode 100644 index 0000000000..00107aa169 --- /dev/null +++ b/src/3rdparty/xcb/sysinclude/render.h @@ -0,0 +1 @@ +#include diff --git a/src/3rdparty/xcb/sysinclude/xcb.h b/src/3rdparty/xcb/sysinclude/xcb.h new file mode 100644 index 0000000000..e637314c29 --- /dev/null +++ b/src/3rdparty/xcb/sysinclude/xcb.h @@ -0,0 +1 @@ +#include diff --git a/src/3rdparty/xcb/sysinclude/xcbext.h b/src/3rdparty/xcb/sysinclude/xcbext.h new file mode 100644 index 0000000000..c54f14d772 --- /dev/null +++ b/src/3rdparty/xcb/sysinclude/xcbext.h @@ -0,0 +1 @@ +#include diff --git a/src/3rdparty/xcb/sysinclude/xproto.h b/src/3rdparty/xcb/sysinclude/xproto.h new file mode 100644 index 0000000000..671249a4d7 --- /dev/null +++ b/src/3rdparty/xcb/sysinclude/xproto.h @@ -0,0 +1 @@ +#include diff --git a/src/3rdparty/xcb/xcb-util-image/xcb_image.c b/src/3rdparty/xcb/xcb-util-image/xcb_image.c new file mode 100644 index 0000000000..e426cbd00c --- /dev/null +++ b/src/3rdparty/xcb/xcb-util-image/xcb_image.c @@ -0,0 +1,1011 @@ +/* Copyright © 2007 Bart Massey + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or their + * institutions shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the authors. + */ + +#include +#include +#include + +#include +#include +#include +#include "xcb_bitops.h" +#include "xcb_image.h" +#define BUILD +#include "xcb_pixel.h" + + +static xcb_format_t * +find_format_by_depth (const xcb_setup_t *setup, uint8_t depth) +{ + xcb_format_t *fmt = xcb_setup_pixmap_formats(setup); + xcb_format_t *fmtend = fmt + xcb_setup_pixmap_formats_length(setup); + for(; fmt != fmtend; ++fmt) + if(fmt->depth == depth) + return fmt; + return 0; +} + + +static xcb_image_format_t +effective_format(xcb_image_format_t format, uint8_t bpp) +{ + if (format == XCB_IMAGE_FORMAT_Z_PIXMAP && bpp != 1) + return format; + return XCB_IMAGE_FORMAT_XY_PIXMAP; +} + + +static int +format_valid (uint8_t depth, uint8_t bpp, uint8_t unit, + xcb_image_format_t format, uint8_t xpad) +{ + xcb_image_format_t ef = effective_format(format, bpp); + if (depth > bpp) + return 0; + switch(ef) { + case XCB_IMAGE_FORMAT_XY_PIXMAP: + switch(unit) { + case 8: + case 16: + case 32: + break; + default: + return 0; + } + if (xpad < bpp) + return 0; + switch (xpad) { + case 8: + case 16: + case 32: + break; + default: + return 0; + } + break; + case XCB_IMAGE_FORMAT_Z_PIXMAP: + switch (bpp) { + case 4: + if (unit != 8) + return 0; + break; + case 8: + case 16: + case 24: + case 32: + if (unit != bpp) + return 0; + break; + default: + return 0; + } + break; + default: + return 0; + } + return 1; +} + + +static int +image_format_valid (xcb_image_t *image) { + return format_valid(image->depth, + image->bpp, + image->unit, + image->format, + image->scanline_pad); +} + + +void +xcb_image_annotate (xcb_image_t *image) +{ + xcb_image_format_t ef = effective_format(image->format, image->bpp); + switch (ef) { + case XCB_IMAGE_FORMAT_XY_PIXMAP: + image->stride = xcb_roundup(image->width, image->scanline_pad) >> 3; + image->size = image->height * image->stride * image->depth; + break; + case XCB_IMAGE_FORMAT_Z_PIXMAP: + image->stride = xcb_roundup((uint32_t)image->width * + (uint32_t)image->bpp, + image->scanline_pad) >> 3; + image->size = image->height * image->stride; + break; + default: + assert(0); + } +} + + +xcb_image_t * +xcb_image_create_native (xcb_connection_t * c, + uint16_t width, + uint16_t height, + xcb_image_format_t format, + uint8_t depth, + void * base, + uint32_t bytes, + uint8_t * data) +{ + const xcb_setup_t * setup = xcb_get_setup(c); + xcb_format_t * fmt; + xcb_image_format_t ef = format; + + if (ef == XCB_IMAGE_FORMAT_Z_PIXMAP && depth == 1) + ef = XCB_IMAGE_FORMAT_XY_PIXMAP; + switch (ef) { + case XCB_IMAGE_FORMAT_XY_BITMAP: + if (depth != 1) + return 0; + /* fall through */ + case XCB_IMAGE_FORMAT_XY_PIXMAP: + if (depth > 1) { + fmt = find_format_by_depth(setup, depth); + if (!fmt) + return 0; + } + return xcb_image_create(width, height, format, + setup->bitmap_format_scanline_pad, + depth, depth, setup->bitmap_format_scanline_unit, + setup->image_byte_order, + setup->bitmap_format_bit_order, + base, bytes, data); + case XCB_IMAGE_FORMAT_Z_PIXMAP: + fmt = find_format_by_depth(setup, depth); + if (!fmt) + return 0; + return xcb_image_create(width, height, format, + fmt->scanline_pad, + fmt->depth, fmt->bits_per_pixel, 0, + setup->image_byte_order, + XCB_IMAGE_ORDER_MSB_FIRST, + base, bytes, data); + default: + assert(0); + } + assert(0); +} + + +xcb_image_t * +xcb_image_create (uint16_t width, + uint16_t height, + xcb_image_format_t format, + uint8_t xpad, + uint8_t depth, + uint8_t bpp, + uint8_t unit, + xcb_image_order_t byte_order, + xcb_image_order_t bit_order, + void * base, + uint32_t bytes, + uint8_t * data) +{ + xcb_image_t * image; + + if (unit == 0) { + switch (format) { + case XCB_IMAGE_FORMAT_XY_BITMAP: + case XCB_IMAGE_FORMAT_XY_PIXMAP: + unit = 32; + break; + case XCB_IMAGE_FORMAT_Z_PIXMAP: + if (bpp == 1) { + unit = 32; + break; + } + if (bpp < 8) { + unit = 8; + break; + } + unit = bpp; + break; + } + } + if (!format_valid(depth, bpp, unit, format, xpad)) + return 0; + image = malloc(sizeof(*image)); + if (image == 0) + return 0; + image->width = width; + image->height = height; + image->format = format; + image->scanline_pad = xpad; + image->depth = depth; + image->bpp = bpp; + image->unit = unit; + image->plane_mask = xcb_mask(depth); + image->byte_order = byte_order; + image->bit_order = bit_order; + xcb_image_annotate(image); + + /* + * Ways this function can be called: + * * with data: we fail if bytes isn't + * large enough, else leave well enough alone. + * * with base and !data: if bytes is zero, we + * default; otherwise we fail if bytes isn't + * large enough, else fill in data + * * with !base and !data: we malloc storage + * for the data, save that address as the base, + * and fail if malloc does. + * + * When successful, we establish the invariant that data + * points at sufficient storage that may have been + * supplied, and base is set iff it should be + * auto-freed when the image is destroyed. + * + * Except as a special case when base = 0 && data == 0 && + * bytes == ~0 we just return the image structure and let + * the caller deal with getting the allocation right. + */ + if (!base && !data && bytes == ~0) { + image->base = 0; + image->data = 0; + return image; + } + if (!base && data && bytes == 0) + bytes = image->size; + image->base = base; + image->data = data; + if (!image->data) { + if (image->base) { + image->data = image->base; + } else { + bytes = image->size; + image->base = malloc(bytes); + image->data = image->base; + } + } + if (!image->data || bytes < image->size) { + free(image); + return 0; + } + return image; +} + + +void +xcb_image_destroy (xcb_image_t *image) +{ + if (image->base) + free (image->base); + free (image); +} + + +xcb_image_t * +xcb_image_get (xcb_connection_t * conn, + xcb_drawable_t draw, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint32_t plane_mask, + xcb_image_format_t format) +{ + xcb_get_image_cookie_t image_cookie; + xcb_get_image_reply_t * imrep; + xcb_image_t * image = 0; + uint32_t bytes; + uint8_t * data; + + image_cookie = xcb_get_image(conn, format, draw, x, y, + width, height, plane_mask); + imrep = xcb_get_image_reply(conn, image_cookie, 0); + if (!imrep) + return 0; + bytes = xcb_get_image_data_length(imrep); + data = xcb_get_image_data(imrep); + switch (format) { + case XCB_IMAGE_FORMAT_XY_PIXMAP: + plane_mask &= xcb_mask(imrep->depth); + if (plane_mask != xcb_mask(imrep->depth)) { + xcb_image_t * tmp_image = + xcb_image_create_native(conn, width, height, format, + imrep->depth, 0, 0, 0); + + if (!tmp_image) { + free(imrep); + return 0; + } + + int i; + uint32_t rpm = plane_mask; + uint8_t * src_plane = image->data; + uint8_t * dst_plane = tmp_image->data; + uint32_t size = image->height * image->stride; + + if (tmp_image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST) + rpm = xcb_bit_reverse(plane_mask, imrep->depth); + for (i = 0; i < imrep->depth; i++) { + if (rpm & 1) { + memcpy(dst_plane, src_plane, size); + src_plane += size; + } else { + memset(dst_plane, 0, size); + } + dst_plane += size; + } + tmp_image->plane_mask = plane_mask; + image = tmp_image; + free(imrep); + break; + } + /* fall through */ + case XCB_IMAGE_FORMAT_Z_PIXMAP: + image = xcb_image_create_native(conn, width, height, format, + imrep->depth, imrep, bytes, data); + if (!image) { + free(imrep); + return 0; + } + break; + default: + assert(0); + } + assert(bytes == image->size); + return image; +} + + +xcb_image_t * +xcb_image_native (xcb_connection_t * c, + xcb_image_t * image, + int convert) +{ + xcb_image_t * tmp_image = 0; + const xcb_setup_t * setup = xcb_get_setup(c); + xcb_format_t * fmt = 0; + xcb_image_format_t ef = effective_format(image->format, image->bpp); + uint8_t bpp = 1; + + if (image->depth > 1 || ef == XCB_IMAGE_FORMAT_Z_PIXMAP) { + fmt = find_format_by_depth(setup, image->depth); + /* XXX For now, we don't do depth conversions, even + for xy-pixmaps */ + if (!fmt) + return 0; + bpp = fmt->bits_per_pixel; + } + switch (ef) { + case XCB_IMAGE_FORMAT_XY_PIXMAP: + if (setup->bitmap_format_scanline_unit != image->unit || + setup->bitmap_format_scanline_pad != image->scanline_pad || + setup->image_byte_order != image->byte_order || + setup->bitmap_format_bit_order != image->bit_order || + bpp != image->bpp) { + if (!convert) + return 0; + tmp_image = + xcb_image_create(image->width, image->height, image->format, + setup->bitmap_format_scanline_pad, + image->depth, bpp, + setup->bitmap_format_scanline_unit, + setup->image_byte_order, + setup->bitmap_format_bit_order, + 0, 0, 0); + if (!tmp_image) + return 0; + } + break; + case XCB_IMAGE_FORMAT_Z_PIXMAP: + if (fmt->scanline_pad != image->scanline_pad || + setup->image_byte_order != image->byte_order || + bpp != image->bpp) { + if (!convert) + return 0; + tmp_image = + xcb_image_create(image->width, image->height, image->format, + fmt->scanline_pad, + image->depth, bpp, 0, + setup->image_byte_order, + XCB_IMAGE_ORDER_MSB_FIRST, + 0, 0, 0); + if (!tmp_image) + return 0; + } + break; + default: + assert(0); + } + if (tmp_image) { + if (!xcb_image_convert(image, tmp_image)) { + xcb_image_destroy(tmp_image); + return 0; + } + image = tmp_image; + } + return image; +} + + +xcb_void_cookie_t +xcb_image_put (xcb_connection_t * conn, + xcb_drawable_t draw, + xcb_gcontext_t gc, + xcb_image_t * image, + int16_t x, + int16_t y, + uint8_t left_pad) +{ + return xcb_put_image(conn, image->format, draw, gc, + image->width, image->height, + x, y, left_pad, + image->depth, + image->size, + image->data); +} + + + +/* + * Shm stuff + */ + +xcb_image_t * +xcb_image_shm_put (xcb_connection_t * conn, + xcb_drawable_t draw, + xcb_gcontext_t gc, + xcb_image_t * image, + xcb_shm_segment_info_t shminfo, + int16_t src_x, + int16_t src_y, + int16_t dest_x, + int16_t dest_y, + uint16_t src_width, + uint16_t src_height, + uint8_t send_event) +{ + if (!xcb_image_native(conn, image, 0)) + return 0; + if (!shminfo.shmaddr) + return 0; + xcb_shm_put_image(conn, draw, gc, + image->width, image->height, + src_x, src_y, src_width, src_height, + dest_x, dest_y, + image->depth, image->format, + send_event, + shminfo.shmseg, + image->data - shminfo.shmaddr); + return image; +} + + +int +xcb_image_shm_get (xcb_connection_t * conn, + xcb_drawable_t draw, + xcb_image_t * image, + xcb_shm_segment_info_t shminfo, + int16_t x, + int16_t y, + uint32_t plane_mask) +{ + xcb_shm_get_image_reply_t * setup; + xcb_shm_get_image_cookie_t cookie; + xcb_generic_error_t * err = 0; + + if (!shminfo.shmaddr) + return 0; + cookie = xcb_shm_get_image(conn, draw, + x, y, + image->width, image->height, + plane_mask, + image->format, + shminfo.shmseg, + image->data - shminfo.shmaddr); + setup = xcb_shm_get_image_reply(conn, cookie, &err); + if (err) { + fprintf(stderr, "ShmGetImageReply error %d\n", (int)err->error_code); + free(err); + return 0; + } else { + free (setup); + return 1; + } +} + + +static uint32_t +xy_image_byte (xcb_image_t *image, uint32_t x) +{ + x >>= 3; + if (image->byte_order == image->bit_order) + return x; + switch (image->unit) { + default: + case 8: + return x; + case 16: + return x ^ 1; + case 32: + return x ^ 3; + } +} + +static uint32_t +xy_image_bit (xcb_image_t *image, uint32_t x) +{ + x &= 7; + if (image->bit_order == XCB_IMAGE_ORDER_MSB_FIRST) + x = 7 - x; + return x; +} + +/* GetPixel/PutPixel */ + +/* XXX this is the most hideously done cut-and-paste + to below. Any bugs fixed there should be fixed here + and vice versa. */ +void +xcb_image_put_pixel (xcb_image_t *image, + uint32_t x, + uint32_t y, + uint32_t pixel) +{ + uint8_t *row; + + if (x > image->width || y > image->height) + return; + row = image->data + (y * image->stride); + switch (effective_format(image->format, image->bpp)) { + case XCB_IMAGE_FORMAT_XY_BITMAP: + case XCB_IMAGE_FORMAT_XY_PIXMAP: + /* block */ { + int p; + uint32_t plane_mask = image->plane_mask; + uint8_t * plane = row; + uint32_t byte = xy_image_byte(image, x); + uint32_t bit = xy_image_bit(image,x); + uint8_t mask = 1 << bit; + + for (p = image->bpp - 1; p >= 0; p--) { + if ((plane_mask >> p) & 1) { + uint8_t * bp = plane + byte; + uint8_t this_bit = ((pixel >> p) & 1) << bit; + *bp = (*bp & ~mask) | this_bit; + } + plane += image->stride * image->height; + } + } + break; + case XCB_IMAGE_FORMAT_Z_PIXMAP: + switch (image->bpp) { + uint32_t mask; + case 4: + mask = 0xf; + pixel &= 0xf; + if ((x & 1) == + (image->byte_order == XCB_IMAGE_ORDER_MSB_FIRST)) { + pixel <<= 4; + mask <<= 4; + } + row[x >> 1] = (row[x >> 1] & ~mask) | pixel; + break; + case 8: + row[x] = pixel; + break; + case 16: + switch (image->byte_order) { + case XCB_IMAGE_ORDER_LSB_FIRST: + row[x << 1] = pixel; + row[(x << 1) + 1] = pixel >> 8; + break; + case XCB_IMAGE_ORDER_MSB_FIRST: + row[x << 1] = pixel >> 8; + row[(x << 1) + 1] = pixel; + break; + } + break; + case 24: + switch (image->byte_order) { + case XCB_IMAGE_ORDER_LSB_FIRST: + row[x * 3] = pixel; + row[x * 3 + 1] = pixel >> 8; + row[x * 3 + 2] = pixel >> 16; + break; + case XCB_IMAGE_ORDER_MSB_FIRST: + row[x * 3] = pixel >> 16; + row[x * 3 + 1] = pixel >> 8; + row[x * 3 + 2] = pixel; + break; + } + break; + case 32: + switch (image->byte_order) { + case XCB_IMAGE_ORDER_LSB_FIRST: + row[x << 2] = pixel; + row[(x << 2) + 1] = pixel >> 8; + row[(x << 2) + 2] = pixel >> 16; + row[(x << 2) + 3] = pixel >> 24; + break; + case XCB_IMAGE_ORDER_MSB_FIRST: + row[x << 2] = pixel >> 24; + row[(x << 2) + 1] = pixel >> 16; + row[(x << 2) + 2] = pixel >> 8; + row[(x << 2) + 3] = pixel; + break; + } + break; + default: + assert(0); + } + break; + default: + assert(0); + } +} + + +/* XXX this is the most hideously done cut-and-paste + from above. Any bugs fixed there should be fixed here + and vice versa. */ +uint32_t +xcb_image_get_pixel (xcb_image_t *image, + uint32_t x, + uint32_t y) +{ + uint32_t pixel = 0; + uint8_t *row; + + assert(x < image->width && y < image->height); + row = image->data + (y * image->stride); + switch (effective_format(image->format, image->bpp)) { + case XCB_IMAGE_FORMAT_XY_BITMAP: + case XCB_IMAGE_FORMAT_XY_PIXMAP: + /* block */ { + int p; + uint32_t plane_mask = image->plane_mask; + uint8_t * plane = row; + uint32_t byte = xy_image_byte(image, x); + uint32_t bit = xy_image_bit(image,x); + + for (p = image->bpp - 1; p >= 0; p--) { + pixel <<= 1; + if ((plane_mask >> p) & 1) { + uint8_t * bp = plane + byte; + pixel |= (*bp >> bit) & 1; + } + plane += image->stride * image->height; + } + } + return pixel; + case XCB_IMAGE_FORMAT_Z_PIXMAP: + switch (image->bpp) { + case 4: + if ((x & 1) == (image->byte_order == XCB_IMAGE_ORDER_MSB_FIRST)) + return row[x >> 1] >> 4; + return row[x >> 1] & 0xf; + case 8: + return row[x]; + case 16: + switch (image->byte_order) { + case XCB_IMAGE_ORDER_LSB_FIRST: + pixel = row[x << 1]; + pixel |= row[(x << 1) + 1] << 8; + break; + case XCB_IMAGE_ORDER_MSB_FIRST: + pixel = row[x << 1] << 8; + pixel |= row[(x << 1) + 1]; + break; + } + break; + case 24: + switch (image->byte_order) { + case XCB_IMAGE_ORDER_LSB_FIRST: + pixel = row[x * 3]; + pixel |= row[x * 3 + 1] << 8; + pixel |= row[x * 3 + 2] << 16; + break; + case XCB_IMAGE_ORDER_MSB_FIRST: + pixel = row[x * 3] << 16; + pixel |= row[x * 3 + 1] << 8; + pixel |= row[x * 3 + 2]; + break; + } + break; + case 32: + switch (image->byte_order) { + case XCB_IMAGE_ORDER_LSB_FIRST: + pixel = row[x << 2]; + pixel |= row[(x << 2) + 1] << 8; + pixel |= row[(x << 2) + 2] << 16; + pixel |= row[(x << 2) + 3] << 24; + break; + case XCB_IMAGE_ORDER_MSB_FIRST: + pixel = row[x << 2] << 24; + pixel |= row[(x << 2) + 1] << 16; + pixel |= row[(x << 2) + 2] << 8; + pixel |= row[(x << 2) + 3]; + break; + } + break; + default: + assert(0); + } + return pixel; + default: + assert(0); + } +} + + +xcb_image_t * +xcb_image_create_from_bitmap_data (uint8_t * data, + uint32_t width, + uint32_t height) +{ + return xcb_image_create(width, height, XCB_IMAGE_FORMAT_XY_PIXMAP, + 8, 1, 1, 8, + XCB_IMAGE_ORDER_LSB_FIRST, + XCB_IMAGE_ORDER_LSB_FIRST, + 0, 0, data); +} + + +/* + * (Adapted from libX11.) + * + * xcb_create_pixmap_from_bitmap_data: Routine to make a pixmap of + * given depth from user supplied bitmap data. + * D is any drawable on the same screen that the pixmap will be used in. + * Data is a pointer to the bit data, and + * width & height give the size in bits of the pixmap. + * + * The following format is assumed for data: + * + * format=XY (will use XYPixmap for depth 1 and XYBitmap for larger) + * bit_order=LSBFirst + * padding=8 + * bitmap_unit=8 + */ +xcb_pixmap_t +xcb_create_pixmap_from_bitmap_data (xcb_connection_t * display, + xcb_drawable_t d, + uint8_t * data, + uint32_t width, + uint32_t height, + uint32_t depth, + uint32_t fg, + uint32_t bg, + xcb_gcontext_t * gcp) +{ + xcb_pixmap_t pix; + xcb_image_t * image; + xcb_image_t * final_image; + xcb_gcontext_t gc; + uint32_t mask = 0; + xcb_params_gc_t gcv; + + image = xcb_image_create_from_bitmap_data(data, width, height); + if (!image) + return 0; + if (depth > 1) + image->format = XCB_IMAGE_FORMAT_XY_BITMAP; + final_image = xcb_image_native(display, image, 1); + if (!final_image) { + xcb_image_destroy(image); + return 0; + } + pix = xcb_generate_id(display); + xcb_create_pixmap(display, depth, pix, d, width, height); + gc = xcb_generate_id(display); + XCB_AUX_ADD_PARAM(&mask, &gcv, foreground, fg); + XCB_AUX_ADD_PARAM(&mask, &gcv, background, bg); + xcb_aux_create_gc(display, gc, pix, mask, &gcv); + xcb_image_put(display, pix, gc, final_image, 0, 0, 0); + if (final_image != image) + xcb_image_destroy(final_image); + xcb_image_destroy(image); + if (gcp) + *gcp = gc; + else + xcb_free_gc(display, gc); + return pix; +} + + +/* Thanks to Keith Packard for this code */ +static void +swap_image(uint8_t * src, + uint32_t src_stride, + uint8_t * dst, + uint32_t dst_stride, + uint32_t height, + uint32_t byteswap, + int bitswap, + int nibbleswap) +{ + while (height--) { + uint32_t s; + + for (s = 0; s < src_stride; s++) { + uint8_t b; + uint32_t d = s ^ byteswap; + + if (d > dst_stride) + continue; + + b = src[s]; + if (bitswap) + b = xcb_bit_reverse(b, 8); + if (nibbleswap) + b = (b << 4) | (b >> 4); + dst[d] = b; + } + src += src_stride; + dst += dst_stride; + } +} + +/* Which order are bytes in (low two bits), given + * code which accesses an image one byte at a time + */ +static uint32_t +byte_order(xcb_image_t *i) +{ + uint32_t flip = i->byte_order == XCB_IMAGE_ORDER_MSB_FIRST; + + switch (i->bpp) { + default: + case 8: + return 0; + case 16: + return flip; + case 32: + return flip | (flip << 1); + } +} + +static uint32_t +bit_order(xcb_image_t *i) +{ + uint32_t flip = i->byte_order != i->bit_order; + + switch (i->unit) { + default: + case 8: + return 0; + case 16: + return flip; + case 32: + return flip | (flip << 1); + } +} + +/* Convert from one byte order to another by flipping the + * low two bits of the byte index along a scanline + */ +static uint32_t +conversion_byte_swap(xcb_image_t *src, xcb_image_t *dst) +{ + xcb_image_format_t ef = effective_format(src->format, src->bpp); + + /* src_ef == dst_ef in all callers of this function */ + if (ef == XCB_IMAGE_FORMAT_XY_PIXMAP) { + return bit_order(src) ^ bit_order(dst); + } else { + /* src_bpp == dst_bpp in all callers of this function */ + return byte_order(src) ^ byte_order(dst); + } +} + +xcb_image_t * +xcb_image_convert (xcb_image_t * src, + xcb_image_t * dst) +{ + xcb_image_format_t ef = effective_format(src->format, src->bpp); + + /* Things will go horribly wrong here if a bad + image is passed in, so we check some things + up front just to be nice. */ + assert(image_format_valid(src)); + assert(image_format_valid(dst)); + + /* images must be the same size + * (yes, we could copy a sub-set) + */ + if (src->width != dst->width || + src->height != dst->height) + return 0; + + if (ef == effective_format(dst->format, dst->bpp) && + src->bpp == dst->bpp) + { + if (src->unit == dst->unit && + src->scanline_pad == dst->scanline_pad && + src->byte_order == dst->byte_order && + (ef == XCB_IMAGE_FORMAT_Z_PIXMAP || + src->bit_order == dst->bit_order)) { + memcpy(dst->data, src->data, src->size); + } else { + int bitswap = 0; + int nibbleswap = 0; + uint32_t byteswap = conversion_byte_swap(src, dst); + uint32_t height = src->height;; + + if (ef == XCB_IMAGE_FORMAT_Z_PIXMAP) { + if (src->bpp == 4 && src->byte_order != dst->byte_order) + nibbleswap = 1; + } else { + if (src->bit_order != dst->bit_order) + bitswap = 1; + height *= src->depth; + } + swap_image (src->data, src->stride, dst->data, dst->stride, + height, byteswap, bitswap, nibbleswap); + } + } + else + { + uint32_t x; + uint32_t y; + /* General case: Slow pixel copy. Should we optimize + Z24<->Z32 copies of either endianness? */ + for (y = 0; y < src->height; y++) { + for (x = 0; x < src->width; x++) { + uint32_t pixel = xcb_image_get_pixel(src, x, y); + xcb_image_put_pixel(dst, x, y, pixel); + } + } + } + return dst; +} + +xcb_image_t * +xcb_image_subimage(xcb_image_t * image, + uint32_t x, + uint32_t y, + uint32_t width, + uint32_t height, + void * base, + uint32_t bytes, + uint8_t * data) +{ + int i, j; + xcb_image_t * result; + + if (x + width > image->width) + return 0; + if (y + height > image->height) + return 0; + result = xcb_image_create(width, height, image->format, + image->scanline_pad, image->depth, + image->bpp, image->unit, image->byte_order, + image->bit_order, + base, bytes, data); + if (!result) + return 0; + /* XXX FIXME For now, lose on performance. Sorry. */ + for (j = 0; j < height; j++) { + for (i = 0; i < width; i++) { + uint32_t pixel = xcb_image_get_pixel(image, x + i, y + j); + xcb_image_put_pixel(result, i, j, pixel); + } + } + return result; +} diff --git a/src/3rdparty/xcb/xcb-util-keysyms/keysyms.c b/src/3rdparty/xcb/xcb-util-keysyms/keysyms.c new file mode 100644 index 0000000000..7584cccf39 --- /dev/null +++ b/src/3rdparty/xcb/xcb-util-keysyms/keysyms.c @@ -0,0 +1,498 @@ +/* + * Copyright © 2008 Ian Osgood + * Copyright © 2008 Jamey Sharp + * Copyright © 2008 Josh Triplett + * Copyright © 2008 Ulrich Eckhardt + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or + * their institutions shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from the authors. + */ + +#include + +#include +#define XK_MISCELLANY +#define XK_XKB_KEYS +#define XK_LATIN1 +#define XK_LATIN2 +#define XK_LATIN3 +#define XK_LATIN4 +#define XK_CYRILLIC +#define XK_GREEK +#define XK_ARMENIAN +#include + +#include "xcb_keysyms.h" + +/* Private declaration */ +enum tag_t { + TAG_COOKIE, + TAG_VALUE +}; + +struct _XCBKeySymbols +{ + xcb_connection_t *c; + enum tag_t tag; + union { + xcb_get_keyboard_mapping_cookie_t cookie; + xcb_get_keyboard_mapping_reply_t *reply; + } u; +}; + +static void xcb_convert_case(xcb_keysym_t sym, + xcb_keysym_t *lower, + xcb_keysym_t *upper); + +static void xcb_key_symbols_get_reply (xcb_key_symbols_t *syms, + xcb_generic_error_t **e); + +/* public implementation */ + +xcb_key_symbols_t * +xcb_key_symbols_alloc (xcb_connection_t *c) +{ + xcb_key_symbols_t *syms; + xcb_keycode_t min_keycode; + xcb_keycode_t max_keycode; + + if (!c) + return NULL; + + syms = malloc (sizeof (xcb_key_symbols_t)); + if (!syms) + return NULL; + + syms->c = c; + syms->tag = TAG_COOKIE; + + min_keycode = xcb_get_setup (c)->min_keycode; + max_keycode = xcb_get_setup (c)->max_keycode; + + syms->u.cookie = xcb_get_keyboard_mapping(c, + min_keycode, + max_keycode - min_keycode + 1); + + return syms; +} + +void +xcb_key_symbols_free (xcb_key_symbols_t *syms) +{ + if (syms) + { + if (syms->tag == TAG_VALUE) + free (syms->u.reply); + free (syms); + syms = NULL; + } +} + +/* Use of the 'col' parameter: + +A list of KeySyms is associated with each KeyCode. The list is intended +to convey the set of symbols on the corresponding key. If the list +(ignoring trailing NoSymbol entries) is a single KeySym ``K'', then the +list is treated as if it were the list ``K NoSymbol K NoSymbol''. If the +list (ignoring trailing NoSymbol entries) is a pair of KeySyms ``K1 +K2'', then the list is treated as if it were the list ``K1 K2 K1 K2''. +If the list (ignoring trailing NoSymbol entries) is a triple of KeySyms +``K1 K2 K3'', then the list is treated as if it were the list ``K1 K2 K3 +NoSymbol''. When an explicit ``void'' element is desired in the list, +the value VoidSymbol can be used. + +The first four elements of the list are split into two groups of +KeySyms. Group 1 contains the first and second KeySyms; Group 2 contains +the third and fourth KeySyms. Within each group, if the second element +of the group is NoSymbol , then the group should be treated as if the +second element were the same as the first element, except when the first +element is an alphabetic KeySym ``K'' for which both lowercase and +uppercase forms are defined. In that case, the group should be treated +as if the first element were the lowercase form of ``K'' and the second +element were the uppercase form of ``K.'' + +The standard rules for obtaining a KeySym from a KeyPress event make use +of only the Group 1 and Group 2 KeySyms; no interpretation of other +KeySyms in the list is given. Which group to use is determined by the +modifier state. Switching between groups is controlled by the KeySym +named MODE SWITCH, by attaching that KeySym to some KeyCode and +attaching that KeyCode to any one of the modifiers Mod1 through Mod5. +This modifier is called the group modifier. For any KeyCode, Group 1 is +used when the group modifier is off, and Group 2 is used when the group +modifier is on. + +The Lock modifier is interpreted as CapsLock when the KeySym named +XK_Caps_Lock is attached to some KeyCode and that KeyCode is attached to +the Lock modifier. The Lock modifier is interpreted as ShiftLock when +the KeySym named XK_Shift_Lock is attached to some KeyCode and that +KeyCode is attached to the Lock modifier. If the Lock modifier could be +interpreted as both CapsLock and ShiftLock, the CapsLock interpretation +is used. + +The operation of keypad keys is controlled by the KeySym named +XK_Num_Lock, by attaching that KeySym to some KeyCode and attaching that +KeyCode to any one of the modifiers Mod1 through Mod5 . This modifier is +called the numlock modifier. The standard KeySyms with the prefix +``XK_KP_'' in their name are called keypad KeySyms; these are KeySyms +with numeric value in the hexadecimal range 0xFF80 to 0xFFBD inclusive. +In addition, vendor-specific KeySyms in the hexadecimal range 0x11000000 +to 0x1100FFFF are also keypad KeySyms. + +Within a group, the choice of KeySym is determined by applying the first +rule that is satisfied from the following list: + +* The numlock modifier is on and the second KeySym is a keypad KeySym. In + this case, if the Shift modifier is on, or if the Lock modifier is on + and is interpreted as ShiftLock, then the first KeySym is used, + otherwise the second KeySym is used. + +* The Shift and Lock modifiers are both off. In this case, the first + KeySym is used. + +* The Shift modifier is off, and the Lock modifier is on and is + interpreted as CapsLock. In this case, the first KeySym is used, but + if that KeySym is lowercase alphabetic, then the corresponding + uppercase KeySym is used instead. + +* The Shift modifier is on, and the Lock modifier is on and is + interpreted as CapsLock. In this case, the second KeySym is used, but + if that KeySym is lowercase alphabetic, then the corresponding + uppercase KeySym is used instead. + +* The Shift modifier is on, or the Lock modifier is on and is + interpreted as ShiftLock, or both. In this case, the second KeySym is + used. + +*/ + +xcb_keysym_t xcb_key_symbols_get_keysym (xcb_key_symbols_t *syms, + xcb_keycode_t keycode, + int col) +{ + xcb_keysym_t *keysyms; + xcb_keysym_t keysym_null = { XCB_NO_SYMBOL }; + xcb_keysym_t lsym; + xcb_keysym_t usym; + xcb_keycode_t min_keycode; + xcb_keycode_t max_keycode; + int per; + + if (!syms) + return keysym_null; + + xcb_key_symbols_get_reply (syms, NULL); + + keysyms = xcb_get_keyboard_mapping_keysyms (syms->u.reply); + min_keycode = xcb_get_setup (syms->c)->min_keycode; + max_keycode = xcb_get_setup (syms->c)->max_keycode; + + per = syms->u.reply->keysyms_per_keycode; + if ((col < 0) || ((col >= per) && (col > 3)) || + (keycode < min_keycode) || + (keycode > max_keycode)) + return keysym_null; + + keysyms = &keysyms[(keycode - min_keycode) * per]; + if (col < 4) + { + if (col > 1) + { + while ((per > 2) && (keysyms[per - 1] == XCB_NO_SYMBOL)) + per--; + if (per < 3) + col -= 2; + } + if ((per <= (col|1)) || (keysyms[col|1] == XCB_NO_SYMBOL)) + { + xcb_convert_case(keysyms[col&~1], &lsym, &usym); + if (!(col & 1)) + return lsym; + else if (usym == lsym) + return keysym_null; + else + return usym; + } + } + return keysyms[col]; +} + +xcb_keycode_t * +xcb_key_symbols_get_keycode(xcb_key_symbols_t *syms, + xcb_keysym_t keysym) +{ + xcb_keysym_t ks; + int j, nresult = 0; + xcb_keycode_t i, min, max, *result = NULL, *result_np = NULL; + + if(syms) + { + xcb_key_symbols_get_reply (syms, NULL); + min = xcb_get_setup(syms->c)->min_keycode; + max = xcb_get_setup(syms->c)->max_keycode; + + for(j = 0; j < syms->u.reply->keysyms_per_keycode; j++) + for(i = min; i && i <= max; i++) + { + ks = xcb_key_symbols_get_keysym(syms, i, j); + if(ks == keysym) + { + nresult++; + result_np = realloc(result, + sizeof(xcb_keycode_t) * (nresult + 1)); + + if(result_np == NULL) + { + free(result); + return NULL; + } + + result = result_np; + result[nresult - 1] = i; + result[nresult] = XCB_NO_SYMBOL; + } + } + } + + return result; +} + +xcb_keysym_t +xcb_key_press_lookup_keysym (xcb_key_symbols_t *syms, + xcb_key_press_event_t *event, + int col) +{ + return xcb_key_symbols_get_keysym (syms, event->detail, col); +} + +xcb_keysym_t +xcb_key_release_lookup_keysym (xcb_key_symbols_t *syms, + xcb_key_release_event_t *event, + int col) +{ + return xcb_key_symbols_get_keysym (syms, event->detail, col); +} + +int +xcb_refresh_keyboard_mapping (xcb_key_symbols_t *syms, + xcb_mapping_notify_event_t *event) +{ + if (event->request == XCB_MAPPING_KEYBOARD && syms) { + if (syms->tag == TAG_VALUE) { + xcb_keycode_t min_keycode; + xcb_keycode_t max_keycode; + + if (syms->u.reply) { + free (syms->u.reply); + syms->u.reply = NULL; + } + syms->tag = TAG_COOKIE; + min_keycode = xcb_get_setup (syms->c)->min_keycode; + max_keycode = xcb_get_setup (syms->c)->max_keycode; + + syms->u.cookie = xcb_get_keyboard_mapping(syms->c, + min_keycode, + max_keycode - min_keycode + 1); + + } + return 1; + } + return 0; +} + + +/* Tests for classes of symbols */ + +int +xcb_is_keypad_key (xcb_keysym_t keysym) +{ + return ((keysym >= XK_KP_Space) && (keysym <= XK_KP_Equal)); +} + +int +xcb_is_private_keypad_key (xcb_keysym_t keysym) +{ + return ((keysym >= 0x11000000) && (keysym <= 0x1100FFFF)); +} + +int +xcb_is_cursor_key (xcb_keysym_t keysym) +{ + return ((keysym >= XK_Home) && (keysym <= XK_Select)); +} + +int +xcb_is_pf_key (xcb_keysym_t keysym) +{ + return ((keysym >= XK_KP_F1) && (keysym <= XK_KP_F4)); +} + +int +xcb_is_function_key (xcb_keysym_t keysym) +{ + return ((keysym >= XK_F1) && (keysym <= XK_F35)); +} + +int +xcb_is_misc_function_key (xcb_keysym_t keysym) +{ + return ((keysym >= XK_Select) && (keysym <= XK_Break)); +} + +int +xcb_is_modifier_key (xcb_keysym_t keysym) +{ + return (((keysym >= XK_Shift_L) && (keysym <= XK_Hyper_R)) || + ((keysym >= XK_ISO_Lock) && (keysym <= XK_ISO_Level5_Lock)) || + (keysym == XK_Mode_switch) || + (keysym == XK_Num_Lock)); +} + +/* private functions */ + +void +xcb_convert_case(xcb_keysym_t sym, + xcb_keysym_t *lower, + xcb_keysym_t *upper) +{ + *lower = sym; + *upper = sym; + + switch(sym >> 8) + { + case 0: /* Latin 1 */ + if ((sym >= XK_A) && (sym <= XK_Z)) + *lower += (XK_a - XK_A); + else if ((sym >= XK_a) && (sym <= XK_z)) + *upper -= (XK_a - XK_A); + else if ((sym >= XK_Agrave) && (sym <= XK_Odiaeresis)) + *lower += (XK_agrave - XK_Agrave); + else if ((sym >= XK_agrave) && (sym <= XK_odiaeresis)) + *upper -= (XK_agrave - XK_Agrave); + else if ((sym >= XK_Ooblique) && (sym <= XK_Thorn)) + *lower += (XK_oslash - XK_Ooblique); + else if ((sym >= XK_oslash) && (sym <= XK_thorn)) + *upper -= (XK_oslash - XK_Ooblique); + break; + case 1: /* Latin 2 */ + /* Assume the KeySym is a legal value (ignore discontinuities) */ + if (sym == XK_Aogonek) + *lower = XK_aogonek; + else if (sym >= XK_Lstroke && sym <= XK_Sacute) + *lower += (XK_lstroke - XK_Lstroke); + else if (sym >= XK_Scaron && sym <= XK_Zacute) + *lower += (XK_scaron - XK_Scaron); + else if (sym >= XK_Zcaron && sym <= XK_Zabovedot) + *lower += (XK_zcaron - XK_Zcaron); + else if (sym == XK_aogonek) + *upper = XK_Aogonek; + else if (sym >= XK_lstroke && sym <= XK_sacute) + *upper -= (XK_lstroke - XK_Lstroke); + else if (sym >= XK_scaron && sym <= XK_zacute) + *upper -= (XK_scaron - XK_Scaron); + else if (sym >= XK_zcaron && sym <= XK_zabovedot) + *upper -= (XK_zcaron - XK_Zcaron); + else if (sym >= XK_Racute && sym <= XK_Tcedilla) + *lower += (XK_racute - XK_Racute); + else if (sym >= XK_racute && sym <= XK_tcedilla) + *upper -= (XK_racute - XK_Racute); + break; + case 2: /* Latin 3 */ + /* Assume the KeySym is a legal value (ignore discontinuities) */ + if (sym >= XK_Hstroke && sym <= XK_Hcircumflex) + *lower += (XK_hstroke - XK_Hstroke); + else if (sym >= XK_Gbreve && sym <= XK_Jcircumflex) + *lower += (XK_gbreve - XK_Gbreve); + else if (sym >= XK_hstroke && sym <= XK_hcircumflex) + *upper -= (XK_hstroke - XK_Hstroke); + else if (sym >= XK_gbreve && sym <= XK_jcircumflex) + *upper -= (XK_gbreve - XK_Gbreve); + else if (sym >= XK_Cabovedot && sym <= XK_Scircumflex) + *lower += (XK_cabovedot - XK_Cabovedot); + else if (sym >= XK_cabovedot && sym <= XK_scircumflex) + *upper -= (XK_cabovedot - XK_Cabovedot); + break; + case 3: /* Latin 4 */ + /* Assume the KeySym is a legal value (ignore discontinuities) */ + if (sym >= XK_Rcedilla && sym <= XK_Tslash) + *lower += (XK_rcedilla - XK_Rcedilla); + else if (sym >= XK_rcedilla && sym <= XK_tslash) + *upper -= (XK_rcedilla - XK_Rcedilla); + else if (sym == XK_ENG) + *lower = XK_eng; + else if (sym == XK_eng) + *upper = XK_ENG; + else if (sym >= XK_Amacron && sym <= XK_Umacron) + *lower += (XK_amacron - XK_Amacron); + else if (sym >= XK_amacron && sym <= XK_umacron) + *upper -= (XK_amacron - XK_Amacron); + break; + case 6: /* Cyrillic */ + /* Assume the KeySym is a legal value (ignore discontinuities) */ + if (sym >= XK_Serbian_DJE && sym <= XK_Serbian_DZE) + *lower -= (XK_Serbian_DJE - XK_Serbian_dje); + else if (sym >= XK_Serbian_dje && sym <= XK_Serbian_dze) + *upper += (XK_Serbian_DJE - XK_Serbian_dje); + else if (sym >= XK_Cyrillic_YU && sym <= XK_Cyrillic_HARDSIGN) + *lower -= (XK_Cyrillic_YU - XK_Cyrillic_yu); + else if (sym >= XK_Cyrillic_yu && sym <= XK_Cyrillic_hardsign) + *upper += (XK_Cyrillic_YU - XK_Cyrillic_yu); + break; + case 7: /* Greek */ + /* Assume the KeySym is a legal value (ignore discontinuities) */ + if (sym >= XK_Greek_ALPHAaccent && sym <= XK_Greek_OMEGAaccent) + *lower += (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent); + else if (sym >= XK_Greek_alphaaccent && sym <= XK_Greek_omegaaccent && + sym != XK_Greek_iotaaccentdieresis && + sym != XK_Greek_upsilonaccentdieresis) + *upper -= (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent); + else if (sym >= XK_Greek_ALPHA && sym <= XK_Greek_OMEGA) + *lower += (XK_Greek_alpha - XK_Greek_ALPHA); + else if (sym >= XK_Greek_alpha && sym <= XK_Greek_omega && + sym != XK_Greek_finalsmallsigma) + *upper -= (XK_Greek_alpha - XK_Greek_ALPHA); + break; + case 0x14: /* Armenian */ + if (sym >= XK_Armenian_AYB && sym <= XK_Armenian_fe) { + *lower = sym | 1; + *upper = sym & ~1; + } + break; + } +} + +void +xcb_key_symbols_get_reply (xcb_key_symbols_t *syms, + xcb_generic_error_t **e) +{ + if (!syms) + return; + + if (syms->tag == TAG_COOKIE) + { + syms->tag = TAG_VALUE; + syms->u.reply = xcb_get_keyboard_mapping_reply(syms->c, + syms->u.cookie, + e); + } +} diff --git a/src/3rdparty/xcb/xcb-util-renderutil/util.c b/src/3rdparty/xcb/xcb-util-renderutil/util.c new file mode 100644 index 0000000000..2d8840d204 --- /dev/null +++ b/src/3rdparty/xcb/xcb-util-renderutil/util.c @@ -0,0 +1,251 @@ +/* Copyright © 2000 Keith Packard + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + +#include "xcb_renderutil.h" + +xcb_render_pictvisual_t * +xcb_render_util_find_visual_format (const xcb_render_query_pict_formats_reply_t *formats, + const xcb_visualid_t visual) +{ + xcb_render_pictscreen_iterator_t screens; + xcb_render_pictdepth_iterator_t depths; + xcb_render_pictvisual_iterator_t visuals; + if (!formats) + return 0; + for (screens = xcb_render_query_pict_formats_screens_iterator(formats); screens.rem; xcb_render_pictscreen_next(&screens)) + for (depths = xcb_render_pictscreen_depths_iterator(screens.data); depths.rem; xcb_render_pictdepth_next(&depths)) + for (visuals = xcb_render_pictdepth_visuals_iterator(depths.data); visuals.rem; xcb_render_pictvisual_next(&visuals)) + if (visuals.data->visual == visual) + return visuals.data; + return 0; +} + +xcb_render_pictforminfo_t * +xcb_render_util_find_format (const xcb_render_query_pict_formats_reply_t *formats, + unsigned long mask, + const xcb_render_pictforminfo_t *template, + int count) +{ + xcb_render_pictforminfo_iterator_t i; + if (!formats) + return 0; + for (i = xcb_render_query_pict_formats_formats_iterator(formats); i.rem; xcb_render_pictforminfo_next(&i)) + { + if (mask & XCB_PICT_FORMAT_ID) + if (template->id != i.data->id) + continue; + if (mask & XCB_PICT_FORMAT_TYPE) + if (template->type != i.data->type) + continue; + if (mask & XCB_PICT_FORMAT_DEPTH) + if (template->depth != i.data->depth) + continue; + if (mask & XCB_PICT_FORMAT_RED) + if (template->direct.red_shift != i.data->direct.red_shift) + continue; + if (mask & XCB_PICT_FORMAT_RED_MASK) + if (template->direct.red_mask != i.data->direct.red_mask) + continue; + if (mask & XCB_PICT_FORMAT_GREEN) + if (template->direct.green_shift != i.data->direct.green_shift) + continue; + if (mask & XCB_PICT_FORMAT_GREEN_MASK) + if (template->direct.green_mask != i.data->direct.green_mask) + continue; + if (mask & XCB_PICT_FORMAT_BLUE) + if (template->direct.blue_shift != i.data->direct.blue_shift) + continue; + if (mask & XCB_PICT_FORMAT_BLUE_MASK) + if (template->direct.blue_mask != i.data->direct.blue_mask) + continue; + if (mask & XCB_PICT_FORMAT_ALPHA) + if (template->direct.alpha_shift != i.data->direct.alpha_shift) + continue; + if (mask & XCB_PICT_FORMAT_ALPHA_MASK) + if (template->direct.alpha_mask != i.data->direct.alpha_mask) + continue; + if (mask & XCB_PICT_FORMAT_COLORMAP) + if (template->colormap != i.data->colormap) + continue; + if (count-- == 0) + return i.data; + } + return 0; +} + +xcb_render_pictforminfo_t * +xcb_render_util_find_standard_format (const xcb_render_query_pict_formats_reply_t *formats, + xcb_pict_standard_t format) +{ + static const struct { + xcb_render_pictforminfo_t templ; + unsigned long mask; + } standardFormats[] = { + /* XCB_PICT_STANDARD_ARGB_32 */ + { + { + 0, /* id */ + XCB_RENDER_PICT_TYPE_DIRECT, /* type */ + 32, /* depth */ + { 0 }, /* pad */ + { /* direct */ + 16, /* direct.red */ + 0xff, /* direct.red_mask */ + 8, /* direct.green */ + 0xff, /* direct.green_mask */ + 0, /* direct.blue */ + 0xff, /* direct.blue_mask */ + 24, /* direct.alpha */ + 0xff, /* direct.alpha_mask */ + }, + 0, /* colormap */ + }, + XCB_PICT_FORMAT_TYPE | + XCB_PICT_FORMAT_DEPTH | + XCB_PICT_FORMAT_RED | + XCB_PICT_FORMAT_RED_MASK | + XCB_PICT_FORMAT_GREEN | + XCB_PICT_FORMAT_GREEN_MASK | + XCB_PICT_FORMAT_BLUE | + XCB_PICT_FORMAT_BLUE_MASK | + XCB_PICT_FORMAT_ALPHA | + XCB_PICT_FORMAT_ALPHA_MASK, + }, + /* XCB_PICT_STANDARD_RGB_24 */ + { + { + 0, /* id */ + XCB_RENDER_PICT_TYPE_DIRECT, /* type */ + 24, /* depth */ + { 0 }, /* pad */ + { /* direct */ + 16, /* direct.red */ + 0xff, /* direct.red_MASK */ + 8, /* direct.green */ + 0xff, /* direct.green_MASK */ + 0, /* direct.blue */ + 0xff, /* direct.blue_MASK */ + 0, /* direct.alpha */ + 0x00, /* direct.alpha_MASK */ + }, + 0, /* colormap */ + }, + XCB_PICT_FORMAT_TYPE | + XCB_PICT_FORMAT_DEPTH | + XCB_PICT_FORMAT_RED | + XCB_PICT_FORMAT_RED_MASK | + XCB_PICT_FORMAT_GREEN | + XCB_PICT_FORMAT_GREEN_MASK | + XCB_PICT_FORMAT_BLUE | + XCB_PICT_FORMAT_BLUE_MASK | + XCB_PICT_FORMAT_ALPHA_MASK, + }, + /* XCB_PICT_STANDARD_A_8 */ + { + { + 0, /* id */ + XCB_RENDER_PICT_TYPE_DIRECT, /* type */ + 8, /* depth */ + { 0 }, /* pad */ + { /* direct */ + 0, /* direct.red */ + 0x00, /* direct.red_MASK */ + 0, /* direct.green */ + 0x00, /* direct.green_MASK */ + 0, /* direct.blue */ + 0x00, /* direct.blue_MASK */ + 0, /* direct.alpha */ + 0xff, /* direct.alpha_MASK */ + }, + 0, /* colormap */ + }, + XCB_PICT_FORMAT_TYPE | + XCB_PICT_FORMAT_DEPTH | + XCB_PICT_FORMAT_RED_MASK | + XCB_PICT_FORMAT_GREEN_MASK | + XCB_PICT_FORMAT_BLUE_MASK | + XCB_PICT_FORMAT_ALPHA | + XCB_PICT_FORMAT_ALPHA_MASK, + }, + /* XCB_PICT_STANDARD_A_4 */ + { + { + 0, /* id */ + XCB_RENDER_PICT_TYPE_DIRECT, /* type */ + 4, /* depth */ + { 0 }, /* pad */ + { /* direct */ + 0, /* direct.red */ + 0x00, /* direct.red_MASK */ + 0, /* direct.green */ + 0x00, /* direct.green_MASK */ + 0, /* direct.blue */ + 0x00, /* direct.blue_MASK */ + 0, /* direct.alpha */ + 0x0f, /* direct.alpha_MASK */ + }, + 0, /* colormap */ + }, + XCB_PICT_FORMAT_TYPE | + XCB_PICT_FORMAT_DEPTH | + XCB_PICT_FORMAT_RED_MASK | + XCB_PICT_FORMAT_GREEN_MASK | + XCB_PICT_FORMAT_BLUE_MASK | + XCB_PICT_FORMAT_ALPHA | + XCB_PICT_FORMAT_ALPHA_MASK, + }, + /* XCB_PICT_STANDARD_A_1 */ + { + { + 0, /* id */ + XCB_RENDER_PICT_TYPE_DIRECT, /* type */ + 1, /* depth */ + { 0 }, /* pad */ + { /* direct */ + 0, /* direct.red */ + 0x00, /* direct.red_MASK */ + 0, /* direct.green */ + 0x00, /* direct.green_MASK */ + 0, /* direct.blue */ + 0x00, /* direct.blue_MASK */ + 0, /* direct.alpha */ + 0x01, /* direct.alpha_MASK */ + }, + 0, /* colormap */ + }, + XCB_PICT_FORMAT_TYPE | + XCB_PICT_FORMAT_DEPTH | + XCB_PICT_FORMAT_RED_MASK | + XCB_PICT_FORMAT_GREEN_MASK | + XCB_PICT_FORMAT_BLUE_MASK | + XCB_PICT_FORMAT_ALPHA | + XCB_PICT_FORMAT_ALPHA_MASK, + }, + }; + + if (format < 0 || format >= sizeof(standardFormats) / sizeof(*standardFormats)) + return 0; + + return xcb_render_util_find_format (formats, + standardFormats[format].mask, + &standardFormats[format].templ, + 0); +} diff --git a/src/3rdparty/xcb/xcb-util-wm/icccm.c b/src/3rdparty/xcb/xcb-util-wm/icccm.c new file mode 100644 index 0000000000..ed623d08d1 --- /dev/null +++ b/src/3rdparty/xcb/xcb-util-wm/icccm.c @@ -0,0 +1,845 @@ +/* + * Copyright © 2008 Arnaud Fontaine + * Copyright © 2007-2008 Vincent Torri + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or + * their institutions shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from the authors. + */ + +#include +#include +#include + +#include + +#include "xcb_icccm.h" + +xcb_get_property_cookie_t +xcb_icccm_get_text_property(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property) +{ + return xcb_get_property(c, 0, window, property, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX); +} + +xcb_get_property_cookie_t +xcb_icccm_get_text_property_unchecked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t property) +{ + return xcb_get_property_unchecked(c, 0, window, property, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX); +} + +uint8_t +xcb_icccm_get_text_property_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e) +{ + xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e); + + if(!reply || reply->type == XCB_NONE) { + free(reply); + return 0; + } + + prop->_reply = reply; + prop->encoding = prop->_reply->type; + prop->format = prop->_reply->format; + prop->name_len = xcb_get_property_value_length(prop->_reply); + prop->name = xcb_get_property_value(prop->_reply); + + return 1; +} + +void +xcb_icccm_get_text_property_reply_wipe(xcb_icccm_get_text_property_reply_t *prop) +{ + free(prop->_reply); +} + +/* WM_NAME */ + +xcb_void_cookie_t +xcb_icccm_set_wm_name_checked(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t encoding, uint8_t format, + uint32_t name_len, const char *name) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_NAME, encoding, format, + name_len, name); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_name(xcb_connection_t *c, xcb_window_t window, xcb_atom_t encoding, + uint8_t format, uint32_t name_len, const char *name) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_NAME, encoding, format, name_len, + name); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_name(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_icccm_get_text_property(c, window, XCB_ATOM_WM_NAME); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_name_unchecked(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_icccm_get_text_property_unchecked(c, window, XCB_ATOM_WM_NAME); +} + +uint8_t +xcb_icccm_get_wm_name_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e) +{ + return xcb_icccm_get_text_property_reply(c, cookie, prop, e); +} + +/* WM_ICON_NAME */ + +xcb_void_cookie_t +xcb_icccm_set_wm_icon_name_checked(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t encoding, uint8_t format, + uint32_t name_len, const char *name) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_ICON_NAME, encoding, format, + name_len, name); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_icon_name(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t encoding, uint8_t format, uint32_t name_len, + const char *name) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_ICON_NAME, encoding, format, + name_len, name); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_icon_name(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_icccm_get_text_property(c, window, XCB_ATOM_WM_ICON_NAME); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_icon_name_unchecked(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_icccm_get_text_property_unchecked(c, window, XCB_ATOM_WM_ICON_NAME); +} + +uint8_t +xcb_icccm_get_wm_icon_name_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e) +{ + return xcb_icccm_get_text_property_reply(c, cookie, prop, e); +} + +/* WM_COLORMAP_WINDOWS */ + +xcb_void_cookie_t +xcb_icccm_set_wm_colormap_windows_checked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom, + uint32_t list_len, + const xcb_window_t *list) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, + wm_colormap_windows_atom, XCB_ATOM_WINDOW, + 32, list_len, list); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_colormap_windows(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom, + uint32_t list_len, + const xcb_atom_t *list) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, + wm_colormap_windows_atom, XCB_ATOM_WINDOW, 32, + list_len, list); +} + + +xcb_get_property_cookie_t +xcb_icccm_get_wm_colormap_windows(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom ) +{ + return xcb_get_property(c, 0, window, wm_colormap_windows_atom, + XCB_ATOM_WINDOW, 0, UINT_MAX); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_colormap_windows_unchecked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_colormap_windows_atom) +{ + return xcb_get_property_unchecked(c, 0, window, wm_colormap_windows_atom, + XCB_ATOM_WINDOW, 0, UINT_MAX); +} + +uint8_t +xcb_icccm_get_wm_colormap_windows_from_reply(xcb_get_property_reply_t *reply, + xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows) +{ + if(!reply || reply->type != XCB_ATOM_WINDOW || reply->format != 32) + return 0; + + colormap_windows->_reply = reply; + colormap_windows->windows_len = xcb_get_property_value_length(colormap_windows->_reply) / (reply->format / 8); + colormap_windows->windows = (xcb_window_t *) xcb_get_property_value(colormap_windows->_reply); + + return 1; +} + +uint8_t +xcb_icccm_get_wm_colormap_windows_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows, + xcb_generic_error_t **e) +{ + xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e); + uint8_t ret = xcb_icccm_get_wm_colormap_windows_from_reply(reply, colormap_windows); + if(!ret) + free(reply); + return ret; +} + +void +xcb_icccm_get_wm_colormap_windows_reply_wipe(xcb_icccm_get_wm_colormap_windows_reply_t *colormap_windows) +{ + free(colormap_windows->_reply); +} + +/* WM_CLIENT_MACHINE */ + +xcb_void_cookie_t +xcb_icccm_set_wm_client_machine_checked(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t encoding, uint8_t format, + uint32_t name_len, const char *name) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_CLIENT_MACHINE, encoding, + format, name_len, name); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_client_machine(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t encoding, uint8_t format, + uint32_t name_len, const char *name) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_CLIENT_MACHINE, encoding, format, + name_len, name); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_client_machine(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_icccm_get_text_property(c, window, XCB_ATOM_WM_CLIENT_MACHINE); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_client_machine_unchecked(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_icccm_get_text_property_unchecked(c, window, XCB_ATOM_WM_CLIENT_MACHINE); +} + +uint8_t +xcb_icccm_get_wm_client_machine_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_text_property_reply_t *prop, + xcb_generic_error_t **e) +{ + return xcb_icccm_get_text_property_reply(c, cookie, prop, e); +} + +/* WM_CLASS */ + +xcb_void_cookie_t +xcb_icccm_set_wm_class_checked(xcb_connection_t *c, + xcb_window_t window, + uint32_t class_len, + const char *class) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8, + class_len, class); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_class(xcb_connection_t *c, + xcb_window_t window, + uint32_t class_len, + const char *class) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 8, + class_len, class); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_class(xcb_connection_t *c, xcb_window_t window) +{ + return xcb_get_property(c, 0, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0L, 2048L); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_class_unchecked(xcb_connection_t *c, xcb_window_t window) +{ + return xcb_get_property_unchecked(c, 0, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0L, 2048L); +} + +uint8_t +xcb_icccm_get_wm_class_from_reply(xcb_icccm_get_wm_class_reply_t *prop, + xcb_get_property_reply_t *reply) +{ + if(!reply || reply->type != XCB_ATOM_STRING || reply->format != 8) + return 0; + + prop->_reply = reply; + prop->instance_name = (char *) xcb_get_property_value(prop->_reply); + + int len = xcb_get_property_value_length(prop->_reply); + /* Ensure there's a C end-of-string at the end of the property. + Truncate the property if necessary (the spec says there's already + a 0 in the last position, so this only hurts invalid props). */ + if(len < reply->length * 4) + prop->instance_name[len] = 0; + else + prop->instance_name[len-1] = 0; + + int name_len = strlen(prop->instance_name); + if(name_len == len) + name_len--; + + prop->class_name = prop->instance_name + name_len + 1; + + return 1; +} + +uint8_t +xcb_icccm_get_wm_class_reply(xcb_connection_t *c, xcb_get_property_cookie_t cookie, + xcb_icccm_get_wm_class_reply_t *prop, xcb_generic_error_t **e) +{ + xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e); + uint8_t ret = xcb_icccm_get_wm_class_from_reply(prop, reply); + /* if reply parsing failed, free the reply to avoid mem leak */ + if(!ret) + free(reply); + return ret; +} + +void +xcb_icccm_get_wm_class_reply_wipe(xcb_icccm_get_wm_class_reply_t *prop) +{ + free(prop->_reply); +} + +/* WM_TRANSIENT_FOR */ + +xcb_void_cookie_t +xcb_icccm_set_wm_transient_for_checked(xcb_connection_t *c, xcb_window_t window, + xcb_window_t transient_for_window) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_TRANSIENT_FOR, + XCB_ATOM_WINDOW, 32, 1, + &transient_for_window); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_transient_for(xcb_connection_t *c, xcb_window_t window, + xcb_window_t transient_for_window) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, + XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 32, + 1, &transient_for_window); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_transient_for(xcb_connection_t *c, xcb_window_t window) +{ + return xcb_get_property(c, 0, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 1); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_transient_for_unchecked(xcb_connection_t *c, xcb_window_t window) +{ + return xcb_get_property_unchecked(c, 0, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 1); +} + +uint8_t +xcb_icccm_get_wm_transient_for_from_reply(xcb_window_t *prop, + xcb_get_property_reply_t *reply) +{ + if(!reply || reply->type != XCB_ATOM_WINDOW || reply->format != 32 || !reply->length) + return 0; + + *prop = *((xcb_window_t *) xcb_get_property_value(reply)); + + return 1; +} + +uint8_t +xcb_icccm_get_wm_transient_for_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_window_t *prop, + xcb_generic_error_t **e) +{ + xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e); + uint8_t ret = xcb_icccm_get_wm_transient_for_from_reply(prop, reply); + free(reply); + return ret; +} + +/* WM_SIZE_HINTS */ + +void +xcb_icccm_size_hints_set_position(xcb_size_hints_t *hints, int user_specified, + int32_t x, int32_t y) +{ + hints->flags &= ~(XCB_ICCCM_SIZE_HINT_US_POSITION | XCB_ICCCM_SIZE_HINT_P_POSITION); + if (user_specified) + hints->flags |= XCB_ICCCM_SIZE_HINT_US_POSITION; + else + hints->flags |= XCB_ICCCM_SIZE_HINT_P_POSITION; + hints->x = x; + hints->y = y; +} + +void +xcb_icccm_size_hints_set_size(xcb_size_hints_t *hints, int user_specified, + int32_t width, int32_t height) +{ + hints->flags &= ~(XCB_ICCCM_SIZE_HINT_US_SIZE | XCB_ICCCM_SIZE_HINT_P_SIZE); + if (user_specified) + hints->flags |= XCB_ICCCM_SIZE_HINT_US_SIZE; + else + hints->flags |= XCB_ICCCM_SIZE_HINT_P_SIZE; + hints->width = width; + hints->height = height; +} + +void +xcb_icccm_size_hints_set_min_size(xcb_size_hints_t *hints, int32_t min_width, + int32_t min_height) +{ + hints->flags |= XCB_ICCCM_SIZE_HINT_P_MIN_SIZE; + hints->min_width = min_width; + hints->min_height = min_height; +} + +void +xcb_icccm_size_hints_set_max_size(xcb_size_hints_t *hints, int32_t max_width, + int32_t max_height) +{ + hints->flags |= XCB_ICCCM_SIZE_HINT_P_MAX_SIZE; + hints->max_width = max_width; + hints->max_height = max_height; +} + +void +xcb_icccm_size_hints_set_resize_inc(xcb_size_hints_t *hints, int32_t width_inc, + int32_t height_inc) +{ + hints->flags |= XCB_ICCCM_SIZE_HINT_P_RESIZE_INC; + hints->width_inc = width_inc; + hints->height_inc = height_inc; +} + +void +xcb_icccm_size_hints_set_aspect(xcb_size_hints_t *hints, int32_t min_aspect_num, + int32_t min_aspect_den, int32_t max_aspect_num, + int32_t max_aspect_den) +{ + hints->flags |= XCB_ICCCM_SIZE_HINT_P_ASPECT; + hints->min_aspect_num = min_aspect_num; + hints->min_aspect_den = min_aspect_den; + hints->max_aspect_num = max_aspect_num; + hints->max_aspect_den = max_aspect_den; +} + +void +xcb_icccm_size_hints_set_base_size(xcb_size_hints_t *hints, int32_t base_width, + int32_t base_height) +{ + hints->flags |= XCB_ICCCM_SIZE_HINT_BASE_SIZE; + hints->base_width = base_width; + hints->base_height = base_height; +} + +void +xcb_icccm_size_hints_set_win_gravity(xcb_size_hints_t *hints, xcb_gravity_t win_gravity) +{ + hints->flags |= XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY; + hints->win_gravity = win_gravity; +} + +xcb_void_cookie_t +xcb_icccm_set_wm_size_hints_checked(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t property, xcb_size_hints_t *hints) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, property, + XCB_ATOM_WM_SIZE_HINTS, 32, sizeof(*hints) >> 2, + hints); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_size_hints(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t property, xcb_size_hints_t *hints) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, property, + XCB_ATOM_WM_SIZE_HINTS, 32, sizeof(*hints) >> 2, hints); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_size_hints(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t property) +{ + return xcb_get_property(c, 0, window, property, XCB_ATOM_WM_SIZE_HINTS, 0L, XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_size_hints_unchecked(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t property) +{ + return xcb_get_property_unchecked(c, 0, window, property, XCB_ATOM_WM_SIZE_HINTS, + 0L, XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS); +} + +uint8_t +xcb_icccm_get_wm_size_hints_from_reply(xcb_size_hints_t *hints, xcb_get_property_reply_t *reply) +{ + uint32_t flags; + int length; + + if(!reply) + return 0; + + if (!(reply->type == XCB_ATOM_WM_SIZE_HINTS && + reply->format == 32)) + return 0; + + length = xcb_get_property_value_length(reply) / (reply->format / 8); + + if(length > XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS) + length = XCB_ICCCM_NUM_WM_SIZE_HINTS_ELEMENTS; + + memcpy(hints, (xcb_size_hints_t *) xcb_get_property_value (reply), + length * (reply->format / 8)); + + flags = (XCB_ICCCM_SIZE_HINT_US_POSITION | XCB_ICCCM_SIZE_HINT_US_SIZE | + XCB_ICCCM_SIZE_HINT_P_POSITION | XCB_ICCCM_SIZE_HINT_P_SIZE | + XCB_ICCCM_SIZE_HINT_P_MIN_SIZE | XCB_ICCCM_SIZE_HINT_P_MAX_SIZE | + XCB_ICCCM_SIZE_HINT_P_RESIZE_INC | XCB_ICCCM_SIZE_HINT_P_ASPECT); + + /* NumPropSizeElements = 18 (ICCCM version 1) */ + if(length >= 18) + flags |= (XCB_ICCCM_SIZE_HINT_BASE_SIZE | XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY); + else + { + hints->base_width = 0; + hints->base_height = 0; + hints->win_gravity = 0; + } + /* get rid of unwanted bits */ + hints->flags &= flags; + + return 1; +} + +uint8_t +xcb_icccm_get_wm_size_hints_reply(xcb_connection_t *c, xcb_get_property_cookie_t cookie, + xcb_size_hints_t *hints, xcb_generic_error_t **e) +{ + xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e); + uint8_t ret = xcb_icccm_get_wm_size_hints_from_reply(hints, reply); + free(reply); + return ret; +} + +/* WM_NORMAL_HINTS */ + +xcb_void_cookie_t +xcb_icccm_set_wm_normal_hints_checked(xcb_connection_t *c, xcb_window_t window, + xcb_size_hints_t *hints) +{ + return xcb_icccm_set_wm_size_hints_checked(c, window, XCB_ATOM_WM_NORMAL_HINTS, hints); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_normal_hints(xcb_connection_t *c, xcb_window_t window, + xcb_size_hints_t *hints) +{ + return xcb_icccm_set_wm_size_hints(c, window, XCB_ATOM_WM_NORMAL_HINTS, hints); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_normal_hints(xcb_connection_t *c, xcb_window_t window) +{ + return xcb_icccm_get_wm_size_hints(c, window, XCB_ATOM_WM_NORMAL_HINTS); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_normal_hints_unchecked(xcb_connection_t *c, xcb_window_t window) +{ + return xcb_icccm_get_wm_size_hints_unchecked(c, window, XCB_ATOM_WM_NORMAL_HINTS); +} + +uint8_t +xcb_icccm_get_wm_normal_hints_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_size_hints_t *hints, + xcb_generic_error_t **e) +{ + return xcb_icccm_get_wm_size_hints_reply(c, cookie, hints, e); +} + +/* WM_HINTS */ + +uint32_t +xcb_icccm_wm_hints_get_urgency(xcb_icccm_wm_hints_t *hints) +{ + return (hints->flags & XCB_ICCCM_WM_HINT_X_URGENCY); +} + +void +xcb_icccm_wm_hints_set_input(xcb_icccm_wm_hints_t *hints, uint8_t input) +{ + hints->input = input; + hints->flags |= XCB_ICCCM_WM_HINT_INPUT; +} + +void +xcb_icccm_wm_hints_set_iconic(xcb_icccm_wm_hints_t *hints) +{ + hints->initial_state = XCB_ICCCM_WM_STATE_ICONIC; + hints->flags |= XCB_ICCCM_WM_HINT_STATE; +} + +void +xcb_icccm_wm_hints_set_normal(xcb_icccm_wm_hints_t *hints) +{ + hints->initial_state = XCB_ICCCM_WM_STATE_NORMAL; + hints->flags |= XCB_ICCCM_WM_HINT_STATE; +} + +void +xcb_icccm_wm_hints_set_withdrawn(xcb_icccm_wm_hints_t *hints) +{ + hints->initial_state = XCB_ICCCM_WM_STATE_WITHDRAWN; + hints->flags |= XCB_ICCCM_WM_HINT_STATE; +} + +void +xcb_icccm_wm_hints_set_none(xcb_icccm_wm_hints_t *hints) +{ + hints->flags &= ~XCB_ICCCM_WM_HINT_STATE; +} + +void +xcb_icccm_wm_hints_set_icon_pixmap(xcb_icccm_wm_hints_t *hints, xcb_pixmap_t icon_pixmap) +{ + hints->icon_pixmap = icon_pixmap; + hints->flags |= XCB_ICCCM_WM_HINT_ICON_PIXMAP; +} + +void +xcb_icccm_wm_hints_set_icon_mask(xcb_icccm_wm_hints_t *hints, xcb_pixmap_t icon_mask) +{ + hints->icon_mask = icon_mask; + hints->flags |= XCB_ICCCM_WM_HINT_ICON_MASK; +} + +void +xcb_icccm_wm_hints_set_icon_window(xcb_icccm_wm_hints_t *hints, xcb_window_t icon_window) +{ + hints->icon_window = icon_window; + hints->flags |= XCB_ICCCM_WM_HINT_ICON_WINDOW; +} + +void +xcb_icccm_wm_hints_set_window_group(xcb_icccm_wm_hints_t *hints, xcb_window_t window_group) +{ + hints->window_group = window_group; + hints->flags |= XCB_ICCCM_WM_HINT_WINDOW_GROUP; +} + +void +xcb_icccm_wm_hints_set_urgency(xcb_icccm_wm_hints_t *hints) +{ + hints->flags |= XCB_ICCCM_WM_HINT_X_URGENCY; +} + +xcb_void_cookie_t +xcb_icccm_set_wm_hints_checked(xcb_connection_t *c, xcb_window_t window, + xcb_icccm_wm_hints_t *hints) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_HINTS, + XCB_ATOM_WM_HINTS, 32, sizeof(*hints) >> 2, hints); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_hints(xcb_connection_t *c, xcb_window_t window, + xcb_icccm_wm_hints_t *hints) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_HINTS, + XCB_ATOM_WM_HINTS, 32, sizeof(*hints) >> 2, hints); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_hints(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_get_property(c, 0, window, XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS, 0L, + XCB_ICCCM_NUM_WM_HINTS_ELEMENTS); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_hints_unchecked(xcb_connection_t *c, + xcb_window_t window) +{ + return xcb_get_property_unchecked(c, 0, window, XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS, 0L, + XCB_ICCCM_NUM_WM_HINTS_ELEMENTS); +} + +uint8_t +xcb_icccm_get_wm_hints_from_reply(xcb_icccm_wm_hints_t *hints, + xcb_get_property_reply_t *reply) +{ + if(!reply || reply->type != XCB_ATOM_WM_HINTS || reply->format != 32) + return 0; + + int length = xcb_get_property_value_length(reply); + int num_elem = length / (reply->format / 8); + + if(num_elem < XCB_ICCCM_NUM_WM_HINTS_ELEMENTS - 1) + return 0; + + if(length > sizeof(xcb_size_hints_t)) + length = sizeof(xcb_size_hints_t); + + memcpy(hints, (xcb_size_hints_t *) xcb_get_property_value(reply), length); + + if(num_elem < XCB_ICCCM_NUM_WM_HINTS_ELEMENTS) + hints->window_group = XCB_NONE; + + return 1; +} + +uint8_t +xcb_icccm_get_wm_hints_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_wm_hints_t *hints, + xcb_generic_error_t **e) +{ + xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e); + int ret = xcb_icccm_get_wm_hints_from_reply(hints, reply); + free(reply); + return ret; +} + +/* WM_PROTOCOLS */ + +xcb_void_cookie_t +xcb_icccm_set_wm_protocols_checked(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t wm_protocols, uint32_t list_len, + xcb_atom_t *list) +{ + return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, + wm_protocols, XCB_ATOM_ATOM, 32, list_len, list); +} + +xcb_void_cookie_t +xcb_icccm_set_wm_protocols(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t wm_protocols, uint32_t list_len, xcb_atom_t *list) +{ + return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, wm_protocols, + XCB_ATOM_ATOM, 32, list_len, list); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_protocols(xcb_connection_t *c, xcb_window_t window, + xcb_atom_t wm_protocol_atom) +{ + return xcb_get_property(c, 0, window, wm_protocol_atom, XCB_ATOM_ATOM, 0, UINT_MAX); +} + +xcb_get_property_cookie_t +xcb_icccm_get_wm_protocols_unchecked(xcb_connection_t *c, + xcb_window_t window, + xcb_atom_t wm_protocol_atom) +{ + return xcb_get_property_unchecked(c, 0, window, wm_protocol_atom, XCB_ATOM_ATOM, 0, + UINT_MAX); +} + +uint8_t +xcb_icccm_get_wm_protocols_from_reply(xcb_get_property_reply_t *reply, xcb_icccm_get_wm_protocols_reply_t *protocols) +{ + if(!reply || reply->type != XCB_ATOM_ATOM || reply->format != 32) + return 0; + + protocols->_reply = reply; + protocols->atoms_len = xcb_get_property_value_length(protocols->_reply) / (reply->format / 8); + protocols->atoms = (xcb_atom_t *) xcb_get_property_value(protocols->_reply); + + return 1; +} + +uint8_t +xcb_icccm_get_wm_protocols_reply(xcb_connection_t *c, + xcb_get_property_cookie_t cookie, + xcb_icccm_get_wm_protocols_reply_t *protocols, + xcb_generic_error_t **e) +{ + xcb_get_property_reply_t *reply = xcb_get_property_reply(c, cookie, e); + uint8_t ret = xcb_icccm_get_wm_protocols_from_reply(reply, protocols); + if(!ret) + free(reply); + return ret; +} + +void +xcb_icccm_get_wm_protocols_reply_wipe(xcb_icccm_get_wm_protocols_reply_t *protocols) +{ + free(protocols->_reply); +} diff --git a/src/3rdparty/xcb/xcb-util/atoms.c b/src/3rdparty/xcb/xcb-util/atoms.c new file mode 100644 index 0000000000..7b3aec6c0e --- /dev/null +++ b/src/3rdparty/xcb/xcb-util/atoms.c @@ -0,0 +1,76 @@ +/* Rely on vasprintf (GNU extension) instead of vsnprintf if + possible... */ +#ifdef HAVE_VASPRINTF +#define _GNU_SOURCE +#include +#endif + +#include +#include +#include +#include "xcb_atom.h" + +static char *makename(const char *fmt, ...) +{ + char *ret; + int n; + va_list ap; + +#ifndef HAVE_VASPRINTF + char *np; + int size = 64; + + /* First allocate 'size' bytes, should be enough usually */ + if((ret = malloc(size)) == NULL) + return NULL; + + while(1) + { + va_start(ap, fmt); + n = vsnprintf(ret, size, fmt, ap); + va_end(ap); + + if(n < 0) + return NULL; + + if(n < size) + return ret; + + size = n + 1; + if((np = realloc(ret, size)) == NULL) + { + free(ret); + return NULL; + } + + ret = np; + } +#else + va_start(ap, fmt); + n = vasprintf(&ret, fmt, ap); + va_end(ap); + + if(n < 0) + return NULL; + + return ret; +#endif +} + +char *xcb_atom_name_by_screen(const char *base, uint8_t screen) +{ + return makename("%s_S%u", base, screen); +} + +char *xcb_atom_name_by_resource(const char *base, uint32_t resource) +{ + return makename("%s_R%08X", base, resource); +} + +char *xcb_atom_name_unique(const char *base, uint32_t id) +{ + if(base) + return makename("%s_U%lu", base, id); + else + return makename("U%lu", id); +} diff --git a/src/3rdparty/xcb/xcb-util/event.c b/src/3rdparty/xcb/xcb-util/event.c new file mode 100644 index 0000000000..de8899adcd --- /dev/null +++ b/src/3rdparty/xcb/xcb-util/event.c @@ -0,0 +1,257 @@ +/* + * Copyright © 2008-2009 Julien Danjou + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or + * their institutions shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from the authors. + */ + +#include +#include +#include + +#include "xcb_event.h" + +#ifdef HAVE_SYS_TYPES_H +# include +#endif + +#define ssizeof(foo) (ssize_t)sizeof(foo) +#define countof(foo) (ssizeof(foo) / ssizeof(foo[0])) + +static const char *labelError[] = +{ + "Success", + "BadRequest", + "BadValue", + "BadWindow", + "BadPixmap", + "BadAtom", + "BadCursor", + "BadFont", + "BadMatch", + "BadDrawable", + "BadAccess", + "BadAlloc", + "BadColor", + "BadGC", + "BadIDChoice", + "BadName", + "BadLength", + "BadImplementation", +}; + +static const char *labelRequest[] = +{ + "no request", + "CreateWindow", + "ChangeWindowAttributes", + "GetWindowAttributes", + "DestroyWindow", + "DestroySubwindows", + "ChangeSaveSet", + "ReparentWindow", + "MapWindow", + "MapSubwindows", + "UnmapWindow", + "UnmapSubwindows", + "ConfigureWindow", + "CirculateWindow", + "GetGeometry", + "QueryTree", + "InternAtom", + "GetAtomName", + "ChangeProperty", + "DeleteProperty", + "GetProperty", + "ListProperties", + "SetSelectionOwner", + "GetSelectionOwner", + "ConvertSelection", + "SendEvent", + "GrabPointer", + "UngrabPointer", + "GrabButton", + "UngrabButton", + "ChangeActivePointerGrab", + "GrabKeyboard", + "UngrabKeyboard", + "GrabKey", + "UngrabKey", + "AllowEvents", + "GrabServer", + "UngrabServer", + "QueryPointer", + "GetMotionEvents", + "TranslateCoords", + "WarpPointer", + "SetInputFocus", + "GetInputFocus", + "QueryKeymap", + "OpenFont", + "CloseFont", + "QueryFont", + "QueryTextExtents", + "ListFonts", + "ListFontsWithInfo", + "SetFontPath", + "GetFontPath", + "CreatePixmap", + "FreePixmap", + "CreateGC", + "ChangeGC", + "CopyGC", + "SetDashes", + "SetClipRectangles", + "FreeGC", + "ClearArea", + "CopyArea", + "CopyPlane", + "PolyPoint", + "PolyLine", + "PolySegment", + "PolyRectangle", + "PolyArc", + "FillPoly", + "PolyFillRectangle", + "PolyFillArc", + "PutImage", + "GetImage", + "PolyText", + "PolyText", + "ImageText", + "ImageText", + "CreateColormap", + "FreeColormap", + "CopyColormapAndFree", + "InstallColormap", + "UninstallColormap", + "ListInstalledColormaps", + "AllocColor", + "AllocNamedColor", + "AllocColorCells", + "AllocColorPlanes", + "FreeColors", + "StoreColors", + "StoreNamedColor", + "QueryColors", + "LookupColor", + "CreateCursor", + "CreateGlyphCursor", + "FreeCursor", + "RecolorCursor", + "QueryBestSize", + "QueryExtension", + "ListExtensions", + "ChangeKeyboardMapping", + "GetKeyboardMapping", + "ChangeKeyboardControl", + "GetKeyboardControl", + "Bell", + "ChangePointerControl", + "GetPointerControl", + "SetScreenSaver", + "GetScreenSaver", + "ChangeHosts", + "ListHosts", + "SetAccessControl", + "SetCloseDownMode", + "KillClient", + "RotateProperties", + "ForceScreenSaver", + "SetPointerMapping", + "GetPointerMapping", + "SetModifierMapping", + "GetModifierMapping", + "major 120", + "major 121", + "major 122", + "major 123", + "major 124", + "major 125", + "major 126", + "NoOperation", +}; + +static const char *labelEvent[] = +{ + "error", + "reply", + "KeyPress", + "KeyRelease", + "ButtonPress", + "ButtonRelease", + "MotionNotify", + "EnterNotify", + "LeaveNotify", + "FocusIn", + "FocusOut", + "KeymapNotify", + "Expose", + "GraphicsExpose", + "NoExpose", + "VisibilityNotify", + "CreateNotify", + "DestroyNotify", + "UnmapNotify", + "MapNotify", + "MapRequest", + "ReparentNotify", + "ConfigureNotify", + "ConfigureRequest", + "GravityNotify", + "ResizeRequest", + "CirculateNotify", + "CirculateRequest", + "PropertyNotify", + "SelectionClear", + "SelectionRequest", + "SelectionNotify", + "ColormapNotify", + "ClientMessage", + "MappingNotify", +}; + +const char * +xcb_event_get_label(uint8_t type) +{ + if(type < countof(labelEvent)) + return labelEvent[type]; + return NULL; +} + +const char * +xcb_event_get_error_label(uint8_t type) +{ + if(type < countof(labelError)) + return labelError[type]; + return NULL; +} + +const char * +xcb_event_get_request_label(uint8_t type) +{ + if(type < countof(labelRequest)) + return labelRequest[type]; + return NULL; +} diff --git a/src/3rdparty/xcb/xcb-util/xcb_aux.c b/src/3rdparty/xcb/xcb-util/xcb_aux.c new file mode 100644 index 0000000000..c81039885f --- /dev/null +++ b/src/3rdparty/xcb/xcb-util/xcb_aux.c @@ -0,0 +1,374 @@ +/* + * Copyright © 2008 Bart Massey + * Copyright © 2008 Ian Osgood + * Copyright © 2008 Jamey Sharp + * Copyright © 2008 Josh Triplett + * + * Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, copy, + * modify, merge, publish, distribute, sublicense, and/or sell copies + * of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF + * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the names of the authors or + * their institutions shall not be used in advertising or otherwise to + * promote the sale, use or other dealings in this Software without + * prior written authorization from the authors. + */ + +#include +#include +#include + +#include +#include "xcb_aux.h" + +/* Connection related functions */ + +uint8_t +xcb_aux_get_depth (xcb_connection_t *c, + xcb_screen_t *screen) +{ + xcb_drawable_t drawable; + xcb_get_geometry_reply_t *geom; + int depth = 0; + + drawable = screen->root; + geom = xcb_get_geometry_reply (c, xcb_get_geometry(c, drawable), 0); + + if (geom) { + depth = geom->depth; + free (geom); + } + + return depth; +} + +uint8_t +xcb_aux_get_depth_of_visual (xcb_screen_t *screen, + xcb_visualid_t id) +{ + xcb_depth_iterator_t i; + xcb_visualtype_iterator_t j; + for (i = xcb_screen_allowed_depths_iterator(screen); + i.rem; xcb_depth_next(&i)) + for (j = xcb_depth_visuals_iterator(i.data); + j.rem; xcb_visualtype_next(&j)) + if (j.data->visual_id == id) + return i.data->depth; + return 0; +} + +xcb_screen_t * +xcb_aux_get_screen (xcb_connection_t *c, + int screen) +{ + xcb_screen_iterator_t i = xcb_setup_roots_iterator(xcb_get_setup(c)); + for (; i.rem; --screen, xcb_screen_next(&i)) + if (screen == 0) + return i.data; + return 0; +} + +xcb_visualtype_t * +xcb_aux_get_visualtype (xcb_connection_t *c, + int scr, + xcb_visualid_t vid) +{ + xcb_screen_t *screen; + xcb_depth_t *depth; + xcb_visualtype_iterator_t iter; + int cur; + + screen = xcb_aux_get_screen (c, scr); + if (!screen) return NULL; + + depth = xcb_screen_allowed_depths_iterator(screen).data; + if (!depth) return NULL; + + iter = xcb_depth_visuals_iterator(depth); + for (cur = 0 ; cur < iter.rem ; xcb_visualtype_next(&iter), ++cur) + if (vid == iter.data->visual_id) + return iter.data; + + return NULL; +} + +xcb_visualtype_t * +xcb_aux_find_visual_by_id (xcb_screen_t *screen, + xcb_visualid_t id) +{ + xcb_depth_iterator_t i; + xcb_visualtype_iterator_t j; + for (i = xcb_screen_allowed_depths_iterator(screen); + i.rem; xcb_depth_next(&i)) + for (j = xcb_depth_visuals_iterator(i.data); + j.rem; xcb_visualtype_next(&j)) + if (j.data->visual_id == id) + return j.data; + return 0; +} + +xcb_visualtype_t * +xcb_aux_find_visual_by_attrs (xcb_screen_t *screen, + int8_t class, + int8_t depth) +{ + xcb_depth_iterator_t i; + xcb_visualtype_iterator_t j; + for (i = xcb_screen_allowed_depths_iterator(screen); + i.rem; xcb_depth_next(&i)) { + if (depth != -1 && i.data->depth != depth) + continue; + for (j = xcb_depth_visuals_iterator(i.data); + j.rem; xcb_visualtype_next(&j)) + if (class == -1 || j.data->_class == class) + return j.data; + } + return 0; +} + +void +xcb_aux_sync (xcb_connection_t *c) +{ + free(xcb_get_input_focus_reply(c, xcb_get_input_focus(c), NULL)); +} + +/* structs instead of value lists */ +/* TODO: generate the struct types and functions from protocol masks and descriptions */ + +/* This generic implementation of pack_list depends on: + a) structs packed to uint32_t size + b) structs consist of just uint32_t/int32_t fields in the same order as bitmask +*/ + +static void +pack_list( uint32_t mask, const uint32_t *src, uint32_t *dest ) +{ + for ( ; mask; mask >>= 1, src++) + if (mask & 1) + *dest++ = *src; +} + +xcb_void_cookie_t +xcb_aux_create_window (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t _class, + xcb_visualid_t visual, + uint32_t mask, + const xcb_params_cw_t *params) +{ + uint32_t value_list[16]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_create_window(c, depth, wid, parent, + x, y, width, height, border_width, + _class, visual, mask, value_list); +} + +xcb_void_cookie_t +xcb_aux_create_window_checked (xcb_connection_t *c, + uint8_t depth, + xcb_window_t wid, + xcb_window_t parent, + int16_t x, + int16_t y, + uint16_t width, + uint16_t height, + uint16_t border_width, + uint16_t _class, + xcb_visualid_t visual, + uint32_t mask, + const xcb_params_cw_t *params) +{ + uint32_t value_list[16]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_create_window_checked(c, depth, wid, parent, + x, y, width, height, border_width, + _class, visual, mask, value_list); +} + +xcb_void_cookie_t +xcb_aux_change_window_attributes_checked (xcb_connection_t *c, + xcb_window_t window, + uint32_t mask, + const xcb_params_cw_t *params) +{ + uint32_t value_list[16]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_change_window_attributes_checked( c, window, mask, value_list ); +} + +xcb_void_cookie_t +xcb_aux_change_window_attributes (xcb_connection_t *c, + xcb_window_t window, + uint32_t mask, + const xcb_params_cw_t *params) +{ + uint32_t value_list[16]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_change_window_attributes( c, window, mask, value_list ); +} + +xcb_void_cookie_t +xcb_aux_configure_window (xcb_connection_t *c, + xcb_window_t window, + uint16_t mask, + const xcb_params_configure_window_t *params) +{ + uint32_t value_list[8]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_configure_window( c, window, mask, value_list ); +} + +xcb_void_cookie_t +xcb_aux_create_gc (xcb_connection_t *c, + xcb_gcontext_t gid, + xcb_drawable_t drawable, + uint32_t mask, + const xcb_params_gc_t *params) +{ + uint32_t value_list[32]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_create_gc( c, gid, drawable, mask, value_list ); +} + +xcb_void_cookie_t +xcb_aux_create_gc_checked (xcb_connection_t *c, + xcb_gcontext_t gid, + xcb_drawable_t drawable, + uint32_t mask, + const xcb_params_gc_t *params) +{ + uint32_t value_list[32]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_create_gc_checked( c, gid, drawable, mask, value_list); +} + +xcb_void_cookie_t +xcb_aux_change_gc (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t mask, + const xcb_params_gc_t *params) +{ + uint32_t value_list[32]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_change_gc( c, gc, mask, value_list ); +} + +xcb_void_cookie_t +xcb_aux_change_gc_checked (xcb_connection_t *c, + xcb_gcontext_t gc, + uint32_t mask, + const xcb_params_gc_t *params) +{ + uint32_t value_list[32]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_change_gc_checked( c, gc, mask, value_list ); +} + +xcb_void_cookie_t +xcb_aux_change_keyboard_control (xcb_connection_t *c, + uint32_t mask, + const xcb_params_keyboard_t *params) +{ + uint32_t value_list[16]; + pack_list(mask, (const uint32_t *)params, value_list); + return xcb_change_keyboard_control( c, mask, value_list ); +} + +/* Color related functions */ + +/* Return true if the given color name can be translated locally, + in which case load the components. Otherwise, a lookup_color request + will be needed, so return false. */ +int +xcb_aux_parse_color(char *color_name, + uint16_t *red, uint16_t *green, uint16_t *blue) +{ + int n, r, g, b, i; + if (!color_name || *color_name != '#') + return 0; + /* + * Excitingly weird RGB parsing code from Xlib. + */ + n = strlen (color_name); + color_name++; + n--; + if (n != 3 && n != 6 && n != 9 && n != 12) + return 0; + n /= 3; + g = b = 0; + do { + r = g; + g = b; + b = 0; + for (i = n; --i >= 0; ) { + char c = *color_name++; + b <<= 4; + if (c >= '0' && c <= '9') + b |= c - '0'; + else if (c >= 'A' && c <= 'F') + b |= c - ('A' - 10); + else if (c >= 'a' && c <= 'f') + b |= c - ('a' - 10); + else return 0; + } + } while (*color_name != '\0'); + n <<= 2; + n = 16 - n; + *red = r << n; + *green = g << n; + *blue = b << n; + return 1; +} + +/* Drawing related functions */ + +/* Adapted from Xlib */ +xcb_void_cookie_t +xcb_aux_set_line_attributes_checked (xcb_connection_t *dpy, + xcb_gcontext_t gc, + uint16_t linewidth, + int32_t linestyle, + int32_t capstyle, + int32_t joinstyle) +{ + uint32_t mask = 0; + xcb_params_gc_t gv; + + XCB_AUX_ADD_PARAM(&mask, &gv, line_width, linewidth); + XCB_AUX_ADD_PARAM(&mask, &gv, line_style, linestyle); + XCB_AUX_ADD_PARAM(&mask, &gv, cap_style, capstyle); + XCB_AUX_ADD_PARAM(&mask, &gv, join_style, joinstyle); + return xcb_aux_change_gc_checked(dpy, gc, mask, &gv); +} + +/* Adapted from Xlib */ +/* XXX It would be wiser for apps just to call + clear_area() directly. */ +xcb_void_cookie_t +xcb_aux_clear_window(xcb_connection_t * dpy, + xcb_window_t w) +{ + return xcb_clear_area(dpy, 0, w, 0, 0, 0, 0); +} -- cgit v1.2.3