2 * This file generated automatically from screensaver.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
14 #include "screensaver.h"
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
19 xcb_extension_t xcb_screensaver_id
= { "MIT-SCREEN-SAVER", 0 };
21 xcb_screensaver_query_version_cookie_t
22 xcb_screensaver_query_version (xcb_connection_t
*c
/**< */,
23 uint8_t client_major_version
/**< */,
24 uint8_t client_minor_version
/**< */)
26 static const xcb_protocol_request_t xcb_req
= {
28 /* ext */ &xcb_screensaver_id
,
29 /* opcode */ XCB_SCREENSAVER_QUERY_VERSION
,
33 struct iovec xcb_parts
[4];
34 xcb_screensaver_query_version_cookie_t xcb_ret
;
35 xcb_screensaver_query_version_request_t xcb_out
;
37 xcb_out
.client_major_version
= client_major_version
;
38 xcb_out
.client_minor_version
= client_minor_version
;
39 memset(xcb_out
.pad0
, 0, 2);
41 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
42 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
43 xcb_parts
[3].iov_base
= 0;
44 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
46 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
50 xcb_screensaver_query_version_cookie_t
51 xcb_screensaver_query_version_unchecked (xcb_connection_t
*c
/**< */,
52 uint8_t client_major_version
/**< */,
53 uint8_t client_minor_version
/**< */)
55 static const xcb_protocol_request_t xcb_req
= {
57 /* ext */ &xcb_screensaver_id
,
58 /* opcode */ XCB_SCREENSAVER_QUERY_VERSION
,
62 struct iovec xcb_parts
[4];
63 xcb_screensaver_query_version_cookie_t xcb_ret
;
64 xcb_screensaver_query_version_request_t xcb_out
;
66 xcb_out
.client_major_version
= client_major_version
;
67 xcb_out
.client_minor_version
= client_minor_version
;
68 memset(xcb_out
.pad0
, 0, 2);
70 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
71 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
72 xcb_parts
[3].iov_base
= 0;
73 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
75 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
79 xcb_screensaver_query_version_reply_t
*
80 xcb_screensaver_query_version_reply (xcb_connection_t
*c
/**< */,
81 xcb_screensaver_query_version_cookie_t cookie
/**< */,
82 xcb_generic_error_t
**e
/**< */)
84 return (xcb_screensaver_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
87 xcb_screensaver_query_info_cookie_t
88 xcb_screensaver_query_info (xcb_connection_t
*c
/**< */,
89 xcb_drawable_t drawable
/**< */)
91 static const xcb_protocol_request_t xcb_req
= {
93 /* ext */ &xcb_screensaver_id
,
94 /* opcode */ XCB_SCREENSAVER_QUERY_INFO
,
98 struct iovec xcb_parts
[4];
99 xcb_screensaver_query_info_cookie_t xcb_ret
;
100 xcb_screensaver_query_info_request_t xcb_out
;
102 xcb_out
.drawable
= drawable
;
104 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
105 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
106 xcb_parts
[3].iov_base
= 0;
107 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
109 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
113 xcb_screensaver_query_info_cookie_t
114 xcb_screensaver_query_info_unchecked (xcb_connection_t
*c
/**< */,
115 xcb_drawable_t drawable
/**< */)
117 static const xcb_protocol_request_t xcb_req
= {
119 /* ext */ &xcb_screensaver_id
,
120 /* opcode */ XCB_SCREENSAVER_QUERY_INFO
,
124 struct iovec xcb_parts
[4];
125 xcb_screensaver_query_info_cookie_t xcb_ret
;
126 xcb_screensaver_query_info_request_t xcb_out
;
128 xcb_out
.drawable
= drawable
;
130 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
131 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
132 xcb_parts
[3].iov_base
= 0;
133 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
135 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
139 xcb_screensaver_query_info_reply_t
*
140 xcb_screensaver_query_info_reply (xcb_connection_t
*c
/**< */,
141 xcb_screensaver_query_info_cookie_t cookie
/**< */,
142 xcb_generic_error_t
**e
/**< */)
144 return (xcb_screensaver_query_info_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
148 xcb_screensaver_select_input_checked (xcb_connection_t
*c
/**< */,
149 xcb_drawable_t drawable
/**< */,
150 uint32_t event_mask
/**< */)
152 static const xcb_protocol_request_t xcb_req
= {
154 /* ext */ &xcb_screensaver_id
,
155 /* opcode */ XCB_SCREENSAVER_SELECT_INPUT
,
159 struct iovec xcb_parts
[4];
160 xcb_void_cookie_t xcb_ret
;
161 xcb_screensaver_select_input_request_t xcb_out
;
163 xcb_out
.drawable
= drawable
;
164 xcb_out
.event_mask
= event_mask
;
166 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
167 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
168 xcb_parts
[3].iov_base
= 0;
169 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
171 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
176 xcb_screensaver_select_input (xcb_connection_t
*c
/**< */,
177 xcb_drawable_t drawable
/**< */,
178 uint32_t event_mask
/**< */)
180 static const xcb_protocol_request_t xcb_req
= {
182 /* ext */ &xcb_screensaver_id
,
183 /* opcode */ XCB_SCREENSAVER_SELECT_INPUT
,
187 struct iovec xcb_parts
[4];
188 xcb_void_cookie_t xcb_ret
;
189 xcb_screensaver_select_input_request_t xcb_out
;
191 xcb_out
.drawable
= drawable
;
192 xcb_out
.event_mask
= event_mask
;
194 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
195 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
196 xcb_parts
[3].iov_base
= 0;
197 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
199 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
204 xcb_screensaver_set_attributes_sizeof (const void *_buffer
/**< */)
206 char *xcb_tmp
= (char *)_buffer
;
207 const xcb_screensaver_set_attributes_request_t
*_aux
= (xcb_screensaver_set_attributes_request_t
*)_buffer
;
208 unsigned int xcb_buffer_len
= 0;
209 unsigned int xcb_block_len
= 0;
210 unsigned int xcb_pad
= 0;
211 unsigned int xcb_align_to
= 0;
214 xcb_block_len
+= sizeof(xcb_screensaver_set_attributes_request_t
);
215 xcb_tmp
+= xcb_block_len
;
216 xcb_buffer_len
+= xcb_block_len
;
219 xcb_block_len
+= xcb_popcount(_aux
->value_mask
) * sizeof(uint32_t);
220 xcb_tmp
+= xcb_block_len
;
221 xcb_align_to
= ALIGNOF(uint32_t);
223 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
224 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
231 return xcb_buffer_len
;
235 xcb_screensaver_set_attributes_checked (xcb_connection_t
*c
/**< */,
236 xcb_drawable_t drawable
/**< */,
239 uint16_t width
/**< */,
240 uint16_t height
/**< */,
241 uint16_t border_width
/**< */,
242 uint8_t _class
/**< */,
243 uint8_t depth
/**< */,
244 xcb_visualid_t visual
/**< */,
245 uint32_t value_mask
/**< */,
246 const uint32_t *value_list
/**< */)
248 static const xcb_protocol_request_t xcb_req
= {
250 /* ext */ &xcb_screensaver_id
,
251 /* opcode */ XCB_SCREENSAVER_SET_ATTRIBUTES
,
255 struct iovec xcb_parts
[6];
256 xcb_void_cookie_t xcb_ret
;
257 xcb_screensaver_set_attributes_request_t xcb_out
;
259 xcb_out
.drawable
= drawable
;
262 xcb_out
.width
= width
;
263 xcb_out
.height
= height
;
264 xcb_out
.border_width
= border_width
;
265 xcb_out
._class
= _class
;
266 xcb_out
.depth
= depth
;
267 xcb_out
.visual
= visual
;
268 xcb_out
.value_mask
= value_mask
;
270 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
271 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
272 xcb_parts
[3].iov_base
= 0;
273 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
274 /* uint32_t value_list */
275 xcb_parts
[4].iov_base
= (char *) value_list
;
276 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
277 xcb_parts
[5].iov_base
= 0;
278 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
280 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
285 xcb_screensaver_set_attributes (xcb_connection_t
*c
/**< */,
286 xcb_drawable_t drawable
/**< */,
289 uint16_t width
/**< */,
290 uint16_t height
/**< */,
291 uint16_t border_width
/**< */,
292 uint8_t _class
/**< */,
293 uint8_t depth
/**< */,
294 xcb_visualid_t visual
/**< */,
295 uint32_t value_mask
/**< */,
296 const uint32_t *value_list
/**< */)
298 static const xcb_protocol_request_t xcb_req
= {
300 /* ext */ &xcb_screensaver_id
,
301 /* opcode */ XCB_SCREENSAVER_SET_ATTRIBUTES
,
305 struct iovec xcb_parts
[6];
306 xcb_void_cookie_t xcb_ret
;
307 xcb_screensaver_set_attributes_request_t xcb_out
;
309 xcb_out
.drawable
= drawable
;
312 xcb_out
.width
= width
;
313 xcb_out
.height
= height
;
314 xcb_out
.border_width
= border_width
;
315 xcb_out
._class
= _class
;
316 xcb_out
.depth
= depth
;
317 xcb_out
.visual
= visual
;
318 xcb_out
.value_mask
= value_mask
;
320 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
321 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
322 xcb_parts
[3].iov_base
= 0;
323 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
324 /* uint32_t value_list */
325 xcb_parts
[4].iov_base
= (char *) value_list
;
326 xcb_parts
[4].iov_len
= xcb_popcount(value_mask
) * sizeof(uint32_t);
327 xcb_parts
[5].iov_base
= 0;
328 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
330 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
335 xcb_screensaver_unset_attributes_checked (xcb_connection_t
*c
/**< */,
336 xcb_drawable_t drawable
/**< */)
338 static const xcb_protocol_request_t xcb_req
= {
340 /* ext */ &xcb_screensaver_id
,
341 /* opcode */ XCB_SCREENSAVER_UNSET_ATTRIBUTES
,
345 struct iovec xcb_parts
[4];
346 xcb_void_cookie_t xcb_ret
;
347 xcb_screensaver_unset_attributes_request_t xcb_out
;
349 xcb_out
.drawable
= drawable
;
351 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
352 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
353 xcb_parts
[3].iov_base
= 0;
354 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
356 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
361 xcb_screensaver_unset_attributes (xcb_connection_t
*c
/**< */,
362 xcb_drawable_t drawable
/**< */)
364 static const xcb_protocol_request_t xcb_req
= {
366 /* ext */ &xcb_screensaver_id
,
367 /* opcode */ XCB_SCREENSAVER_UNSET_ATTRIBUTES
,
371 struct iovec xcb_parts
[4];
372 xcb_void_cookie_t xcb_ret
;
373 xcb_screensaver_unset_attributes_request_t xcb_out
;
375 xcb_out
.drawable
= drawable
;
377 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
378 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
379 xcb_parts
[3].iov_base
= 0;
380 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
382 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
387 xcb_screensaver_suspend_checked (xcb_connection_t
*c
/**< */,
388 uint8_t suspend
/**< */)
390 static const xcb_protocol_request_t xcb_req
= {
392 /* ext */ &xcb_screensaver_id
,
393 /* opcode */ XCB_SCREENSAVER_SUSPEND
,
397 struct iovec xcb_parts
[4];
398 xcb_void_cookie_t xcb_ret
;
399 xcb_screensaver_suspend_request_t xcb_out
;
401 xcb_out
.suspend
= suspend
;
402 memset(xcb_out
.pad0
, 0, 3);
404 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
405 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
406 xcb_parts
[3].iov_base
= 0;
407 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
409 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
414 xcb_screensaver_suspend (xcb_connection_t
*c
/**< */,
415 uint8_t suspend
/**< */)
417 static const xcb_protocol_request_t xcb_req
= {
419 /* ext */ &xcb_screensaver_id
,
420 /* opcode */ XCB_SCREENSAVER_SUSPEND
,
424 struct iovec xcb_parts
[4];
425 xcb_void_cookie_t xcb_ret
;
426 xcb_screensaver_suspend_request_t xcb_out
;
428 xcb_out
.suspend
= suspend
;
429 memset(xcb_out
.pad0
, 0, 3);
431 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
432 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
433 xcb_parts
[3].iov_base
= 0;
434 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
436 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);