1 /* 2 * This file generated automatically from screensaver.xml by c_client.py. 3 * Edit at your peril. 4 */ 5 6 /** 7 * @defgroup XCB_ScreenSaver_API XCB ScreenSaver API 8 * @brief ScreenSaver XCB Protocol Implementation. 9 * @{ 10 **/ 11 12 #ifndef __SCREENSAVER_H 13 #define __SCREENSAVER_H 14 15 #include "xcb.h" 16 #include "xproto.h" 17 18 #ifdef __cplusplus 19 extern "C" { 20 #endif 21 22 #define XCB_SCREENSAVER_MAJOR_VERSION 1 23 #define XCB_SCREENSAVER_MINOR_VERSION 1 24 25 extern xcb_extension_t xcb_screensaver_id; 26 27 typedef enum xcb_screensaver_kind_t { 28 XCB_SCREENSAVER_KIND_BLANKED = 0, 29 XCB_SCREENSAVER_KIND_INTERNAL = 1, 30 XCB_SCREENSAVER_KIND_EXTERNAL = 2 31 } xcb_screensaver_kind_t; 32 33 typedef enum xcb_screensaver_event_t { 34 XCB_SCREENSAVER_EVENT_NOTIFY_MASK = 1, 35 XCB_SCREENSAVER_EVENT_CYCLE_MASK = 2 36 } xcb_screensaver_event_t; 37 38 typedef enum xcb_screensaver_state_t { 39 XCB_SCREENSAVER_STATE_OFF = 0, 40 XCB_SCREENSAVER_STATE_ON = 1, 41 XCB_SCREENSAVER_STATE_CYCLE = 2, 42 XCB_SCREENSAVER_STATE_DISABLED = 3 43 } xcb_screensaver_state_t; 44 45 /** 46 * @brief xcb_screensaver_query_version_cookie_t 47 **/ 48 typedef struct xcb_screensaver_query_version_cookie_t { 49 unsigned int sequence; /**< */ 50 } xcb_screensaver_query_version_cookie_t; 51 52 /** Opcode for xcb_screensaver_query_version. */ 53 #define XCB_SCREENSAVER_QUERY_VERSION 0 54 55 /** 56 * @brief xcb_screensaver_query_version_request_t 57 **/ 58 typedef struct xcb_screensaver_query_version_request_t { 59 uint8_t major_opcode; /**< */ 60 uint8_t minor_opcode; /**< */ 61 uint16_t length; /**< */ 62 uint8_t client_major_version; /**< */ 63 uint8_t client_minor_version; /**< */ 64 uint8_t pad0[2]; /**< */ 65 } xcb_screensaver_query_version_request_t; 66 67 /** 68 * @brief xcb_screensaver_query_version_reply_t 69 **/ 70 typedef struct xcb_screensaver_query_version_reply_t { 71 uint8_t response_type; /**< */ 72 uint8_t pad0; /**< */ 73 uint16_t sequence; /**< */ 74 uint32_t length; /**< */ 75 uint16_t server_major_version; /**< */ 76 uint16_t server_minor_version; /**< */ 77 uint8_t pad1[20]; /**< */ 78 } xcb_screensaver_query_version_reply_t; 79 80 /** 81 * @brief xcb_screensaver_query_info_cookie_t 82 **/ 83 typedef struct xcb_screensaver_query_info_cookie_t { 84 unsigned int sequence; /**< */ 85 } xcb_screensaver_query_info_cookie_t; 86 87 /** Opcode for xcb_screensaver_query_info. */ 88 #define XCB_SCREENSAVER_QUERY_INFO 1 89 90 /** 91 * @brief xcb_screensaver_query_info_request_t 92 **/ 93 typedef struct xcb_screensaver_query_info_request_t { 94 uint8_t major_opcode; /**< */ 95 uint8_t minor_opcode; /**< */ 96 uint16_t length; /**< */ 97 xcb_drawable_t drawable; /**< */ 98 } xcb_screensaver_query_info_request_t; 99 100 /** 101 * @brief xcb_screensaver_query_info_reply_t 102 **/ 103 typedef struct xcb_screensaver_query_info_reply_t { 104 uint8_t response_type; /**< */ 105 uint8_t state; /**< */ 106 uint16_t sequence; /**< */ 107 uint32_t length; /**< */ 108 xcb_window_t saver_window; /**< */ 109 uint32_t ms_until_server; /**< */ 110 uint32_t ms_since_user_input; /**< */ 111 uint32_t event_mask; /**< */ 112 uint8_t kind; /**< */ 113 uint8_t pad0[7]; /**< */ 114 } xcb_screensaver_query_info_reply_t; 115 116 /** Opcode for xcb_screensaver_select_input. */ 117 #define XCB_SCREENSAVER_SELECT_INPUT 2 118 119 /** 120 * @brief xcb_screensaver_select_input_request_t 121 **/ 122 typedef struct xcb_screensaver_select_input_request_t { 123 uint8_t major_opcode; /**< */ 124 uint8_t minor_opcode; /**< */ 125 uint16_t length; /**< */ 126 xcb_drawable_t drawable; /**< */ 127 uint32_t event_mask; /**< */ 128 } xcb_screensaver_select_input_request_t; 129 130 /** Opcode for xcb_screensaver_set_attributes. */ 131 #define XCB_SCREENSAVER_SET_ATTRIBUTES 3 132 133 /** 134 * @brief xcb_screensaver_set_attributes_request_t 135 **/ 136 typedef struct xcb_screensaver_set_attributes_request_t { 137 uint8_t major_opcode; /**< */ 138 uint8_t minor_opcode; /**< */ 139 uint16_t length; /**< */ 140 xcb_drawable_t drawable; /**< */ 141 int16_t x; /**< */ 142 int16_t y; /**< */ 143 uint16_t width; /**< */ 144 uint16_t height; /**< */ 145 uint16_t border_width; /**< */ 146 uint8_t _class; /**< */ 147 uint8_t depth; /**< */ 148 xcb_visualid_t visual; /**< */ 149 uint32_t value_mask; /**< */ 150 } xcb_screensaver_set_attributes_request_t; 151 152 /** Opcode for xcb_screensaver_unset_attributes. */ 153 #define XCB_SCREENSAVER_UNSET_ATTRIBUTES 4 154 155 /** 156 * @brief xcb_screensaver_unset_attributes_request_t 157 **/ 158 typedef struct xcb_screensaver_unset_attributes_request_t { 159 uint8_t major_opcode; /**< */ 160 uint8_t minor_opcode; /**< */ 161 uint16_t length; /**< */ 162 xcb_drawable_t drawable; /**< */ 163 } xcb_screensaver_unset_attributes_request_t; 164 165 /** Opcode for xcb_screensaver_suspend. */ 166 #define XCB_SCREENSAVER_SUSPEND 5 167 168 /** 169 * @brief xcb_screensaver_suspend_request_t 170 **/ 171 typedef struct xcb_screensaver_suspend_request_t { 172 uint8_t major_opcode; /**< */ 173 uint8_t minor_opcode; /**< */ 174 uint16_t length; /**< */ 175 uint8_t suspend; /**< */ 176 uint8_t pad0[3]; /**< */ 177 } xcb_screensaver_suspend_request_t; 178 179 /** Opcode for xcb_screensaver_notify. */ 180 #define XCB_SCREENSAVER_NOTIFY 0 181 182 /** 183 * @brief xcb_screensaver_notify_event_t 184 **/ 185 typedef struct xcb_screensaver_notify_event_t { 186 uint8_t response_type; /**< */ 187 uint8_t state; /**< */ 188 uint16_t sequence; /**< */ 189 xcb_timestamp_t time; /**< */ 190 xcb_window_t root; /**< */ 191 xcb_window_t window; /**< */ 192 uint8_t kind; /**< */ 193 uint8_t forced; /**< */ 194 uint8_t pad0[14]; /**< */ 195 } xcb_screensaver_notify_event_t; 196 197 /** 198 * 199 * @param c The connection 200 * @return A cookie 201 * 202 * Delivers a request to the X server. 203 * 204 */ 205 xcb_screensaver_query_version_cookie_t 206 xcb_screensaver_query_version (xcb_connection_t *c /**< */, 207 uint8_t client_major_version /**< */, 208 uint8_t client_minor_version /**< */); 209 210 /** 211 * 212 * @param c The connection 213 * @return A cookie 214 * 215 * Delivers a request to the X server. 216 * 217 * This form can be used only if the request will cause 218 * a reply to be generated. Any returned error will be 219 * placed in the event queue. 220 */ 221 xcb_screensaver_query_version_cookie_t 222 xcb_screensaver_query_version_unchecked (xcb_connection_t *c /**< */, 223 uint8_t client_major_version /**< */, 224 uint8_t client_minor_version /**< */); 225 226 /** 227 * Return the reply 228 * @param c The connection 229 * @param cookie The cookie 230 * @param e The xcb_generic_error_t supplied 231 * 232 * Returns the reply of the request asked by 233 * 234 * The parameter @p e supplied to this function must be NULL if 235 * xcb_screensaver_query_version_unchecked(). is used. 236 * Otherwise, it stores the error if any. 237 * 238 * The returned value must be freed by the caller using free(). 239 */ 240 xcb_screensaver_query_version_reply_t * 241 xcb_screensaver_query_version_reply (xcb_connection_t *c /**< */, 242 xcb_screensaver_query_version_cookie_t cookie /**< */, 243 xcb_generic_error_t **e /**< */); 244 245 /** 246 * 247 * @param c The connection 248 * @return A cookie 249 * 250 * Delivers a request to the X server. 251 * 252 */ 253 xcb_screensaver_query_info_cookie_t 254 xcb_screensaver_query_info (xcb_connection_t *c /**< */, 255 xcb_drawable_t drawable /**< */); 256 257 /** 258 * 259 * @param c The connection 260 * @return A cookie 261 * 262 * Delivers a request to the X server. 263 * 264 * This form can be used only if the request will cause 265 * a reply to be generated. Any returned error will be 266 * placed in the event queue. 267 */ 268 xcb_screensaver_query_info_cookie_t 269 xcb_screensaver_query_info_unchecked (xcb_connection_t *c /**< */, 270 xcb_drawable_t drawable /**< */); 271 272 /** 273 * Return the reply 274 * @param c The connection 275 * @param cookie The cookie 276 * @param e The xcb_generic_error_t supplied 277 * 278 * Returns the reply of the request asked by 279 * 280 * The parameter @p e supplied to this function must be NULL if 281 * xcb_screensaver_query_info_unchecked(). is used. 282 * Otherwise, it stores the error if any. 283 * 284 * The returned value must be freed by the caller using free(). 285 */ 286 xcb_screensaver_query_info_reply_t * 287 xcb_screensaver_query_info_reply (xcb_connection_t *c /**< */, 288 xcb_screensaver_query_info_cookie_t cookie /**< */, 289 xcb_generic_error_t **e /**< */); 290 291 /** 292 * 293 * @param c The connection 294 * @return A cookie 295 * 296 * Delivers a request to the X server. 297 * 298 * This form can be used only if the request will not cause 299 * a reply to be generated. Any returned error will be 300 * saved for handling by xcb_request_check(). 301 */ 302 xcb_void_cookie_t 303 xcb_screensaver_select_input_checked (xcb_connection_t *c /**< */, 304 xcb_drawable_t drawable /**< */, 305 uint32_t event_mask /**< */); 306 307 /** 308 * 309 * @param c The connection 310 * @return A cookie 311 * 312 * Delivers a request to the X server. 313 * 314 */ 315 xcb_void_cookie_t 316 xcb_screensaver_select_input (xcb_connection_t *c /**< */, 317 xcb_drawable_t drawable /**< */, 318 uint32_t event_mask /**< */); 319 320 int 321 xcb_screensaver_set_attributes_sizeof (const void *_buffer /**< */); 322 323 /** 324 * 325 * @param c The connection 326 * @return A cookie 327 * 328 * Delivers a request to the X server. 329 * 330 * This form can be used only if the request will not cause 331 * a reply to be generated. Any returned error will be 332 * saved for handling by xcb_request_check(). 333 */ 334 xcb_void_cookie_t 335 xcb_screensaver_set_attributes_checked (xcb_connection_t *c /**< */, 336 xcb_drawable_t drawable /**< */, 337 int16_t x /**< */, 338 int16_t y /**< */, 339 uint16_t width /**< */, 340 uint16_t height /**< */, 341 uint16_t border_width /**< */, 342 uint8_t _class /**< */, 343 uint8_t depth /**< */, 344 xcb_visualid_t visual /**< */, 345 uint32_t value_mask /**< */, 346 const uint32_t *value_list /**< */); 347 348 /** 349 * 350 * @param c The connection 351 * @return A cookie 352 * 353 * Delivers a request to the X server. 354 * 355 */ 356 xcb_void_cookie_t 357 xcb_screensaver_set_attributes (xcb_connection_t *c /**< */, 358 xcb_drawable_t drawable /**< */, 359 int16_t x /**< */, 360 int16_t y /**< */, 361 uint16_t width /**< */, 362 uint16_t height /**< */, 363 uint16_t border_width /**< */, 364 uint8_t _class /**< */, 365 uint8_t depth /**< */, 366 xcb_visualid_t visual /**< */, 367 uint32_t value_mask /**< */, 368 const uint32_t *value_list /**< */); 369 370 /** 371 * 372 * @param c The connection 373 * @return A cookie 374 * 375 * Delivers a request to the X server. 376 * 377 * This form can be used only if the request will not cause 378 * a reply to be generated. Any returned error will be 379 * saved for handling by xcb_request_check(). 380 */ 381 xcb_void_cookie_t 382 xcb_screensaver_unset_attributes_checked (xcb_connection_t *c /**< */, 383 xcb_drawable_t drawable /**< */); 384 385 /** 386 * 387 * @param c The connection 388 * @return A cookie 389 * 390 * Delivers a request to the X server. 391 * 392 */ 393 xcb_void_cookie_t 394 xcb_screensaver_unset_attributes (xcb_connection_t *c /**< */, 395 xcb_drawable_t drawable /**< */); 396 397 /** 398 * 399 * @param c The connection 400 * @return A cookie 401 * 402 * Delivers a request to the X server. 403 * 404 * This form can be used only if the request will not cause 405 * a reply to be generated. Any returned error will be 406 * saved for handling by xcb_request_check(). 407 */ 408 xcb_void_cookie_t 409 xcb_screensaver_suspend_checked (xcb_connection_t *c /**< */, 410 uint8_t suspend /**< */); 411 412 /** 413 * 414 * @param c The connection 415 * @return A cookie 416 * 417 * Delivers a request to the X server. 418 * 419 */ 420 xcb_void_cookie_t 421 xcb_screensaver_suspend (xcb_connection_t *c /**< */, 422 uint8_t suspend /**< */); 423 424 425 #ifdef __cplusplus 426 } 427 #endif 428 429 #endif 430 431 /** 432 * @} 433 */ 434