00001
00002
00003
00004
00005
00012 #ifndef __XTEST_H
00013 #define __XTEST_H
00014
00015 #include "xcb.h"
00016 #include "xproto.h"
00017
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021
00022 #define XCB_TEST_MAJOR_VERSION 2
00023 #define XCB_TEST_MINOR_VERSION 2
00024
00025 extern xcb_extension_t xcb_test_id;
00026
00030 typedef struct xcb_test_get_version_cookie_t {
00031 unsigned int sequence;
00032 } xcb_test_get_version_cookie_t;
00033
00035 #define XCB_TEST_GET_VERSION 0
00036
00040 typedef struct xcb_test_get_version_request_t {
00041 uint8_t major_opcode;
00042 uint8_t minor_opcode;
00043 uint16_t length;
00044 uint8_t major_version;
00045 uint8_t pad0;
00046 uint16_t minor_version;
00047 } xcb_test_get_version_request_t;
00048
00052 typedef struct xcb_test_get_version_reply_t {
00053 uint8_t response_type;
00054 uint8_t major_version;
00055 uint16_t sequence;
00056 uint32_t length;
00057 uint16_t minor_version;
00058 } xcb_test_get_version_reply_t;
00059
00060 typedef enum xcb_test_cursor_t {
00061 XCB_TEST_CURSOR_NONE = 0,
00062 XCB_TEST_CURSOR_CURRENT = 1
00063 } xcb_test_cursor_t;
00064
00068 typedef struct xcb_test_compare_cursor_cookie_t {
00069 unsigned int sequence;
00070 } xcb_test_compare_cursor_cookie_t;
00071
00073 #define XCB_TEST_COMPARE_CURSOR 1
00074
00078 typedef struct xcb_test_compare_cursor_request_t {
00079 uint8_t major_opcode;
00080 uint8_t minor_opcode;
00081 uint16_t length;
00082 xcb_window_t window;
00083 xcb_cursor_t cursor;
00084 } xcb_test_compare_cursor_request_t;
00085
00089 typedef struct xcb_test_compare_cursor_reply_t {
00090 uint8_t response_type;
00091 uint8_t same;
00092 uint16_t sequence;
00093 uint32_t length;
00094 } xcb_test_compare_cursor_reply_t;
00095
00097 #define XCB_TEST_FAKE_INPUT 2
00098
00102 typedef struct xcb_test_fake_input_request_t {
00103 uint8_t major_opcode;
00104 uint8_t minor_opcode;
00105 uint16_t length;
00106 uint8_t type;
00107 uint8_t detail;
00108 uint8_t pad0[2];
00109 uint32_t time;
00110 xcb_window_t root;
00111 uint8_t pad1[8];
00112 int16_t rootX;
00113 int16_t rootY;
00114 uint8_t pad2[7];
00115 uint8_t deviceid;
00116 } xcb_test_fake_input_request_t;
00117
00119 #define XCB_TEST_GRAB_CONTROL 3
00120
00124 typedef struct xcb_test_grab_control_request_t {
00125 uint8_t major_opcode;
00126 uint8_t minor_opcode;
00127 uint16_t length;
00128 uint8_t impervious;
00129 uint8_t pad0[3];
00130 } xcb_test_grab_control_request_t;
00131
00140 xcb_test_get_version_cookie_t
00141 xcb_test_get_version (xcb_connection_t *c ,
00142 uint8_t major_version ,
00143 uint16_t minor_version );
00144
00156 xcb_test_get_version_cookie_t
00157 xcb_test_get_version_unchecked (xcb_connection_t *c ,
00158 uint8_t major_version ,
00159 uint16_t minor_version );
00160
00175 xcb_test_get_version_reply_t *
00176 xcb_test_get_version_reply (xcb_connection_t *c ,
00177 xcb_test_get_version_cookie_t cookie ,
00178 xcb_generic_error_t **e );
00179
00188 xcb_test_compare_cursor_cookie_t
00189 xcb_test_compare_cursor (xcb_connection_t *c ,
00190 xcb_window_t window ,
00191 xcb_cursor_t cursor );
00192
00204 xcb_test_compare_cursor_cookie_t
00205 xcb_test_compare_cursor_unchecked (xcb_connection_t *c ,
00206 xcb_window_t window ,
00207 xcb_cursor_t cursor );
00208
00223 xcb_test_compare_cursor_reply_t *
00224 xcb_test_compare_cursor_reply (xcb_connection_t *c ,
00225 xcb_test_compare_cursor_cookie_t cookie ,
00226 xcb_generic_error_t **e );
00227
00239 xcb_void_cookie_t
00240 xcb_test_fake_input_checked (xcb_connection_t *c ,
00241 uint8_t type ,
00242 uint8_t detail ,
00243 uint32_t time ,
00244 xcb_window_t root ,
00245 int16_t rootX ,
00246 int16_t rootY ,
00247 uint8_t deviceid );
00248
00257 xcb_void_cookie_t
00258 xcb_test_fake_input (xcb_connection_t *c ,
00259 uint8_t type ,
00260 uint8_t detail ,
00261 uint32_t time ,
00262 xcb_window_t root ,
00263 int16_t rootX ,
00264 int16_t rootY ,
00265 uint8_t deviceid );
00266
00278 xcb_void_cookie_t
00279 xcb_test_grab_control_checked (xcb_connection_t *c ,
00280 uint8_t impervious );
00281
00290 xcb_void_cookie_t
00291 xcb_test_grab_control (xcb_connection_t *c ,
00292 uint8_t impervious );
00293
00294
00295 #ifdef __cplusplus
00296 }
00297 #endif
00298
00299 #endif
00300