~ubuntu-branches/ubuntu/natty/libxcb/natty

« back to all changes in this revision

Viewing changes to src/shape.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Danjou
  • Date: 2009-02-17 14:09:31 UTC
  • mto: (2.2.1 sid) (1.1.4 upstream)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090217140931-q3v3ihpvmid8m7ib
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * This file generated automatically from shape.xml by c-client.xsl using XSLT.
3
 
 * Edit at your peril.
4
 
 */
5
 
 
6
 
#include <string.h>
7
 
#include <assert.h>
8
 
#include "xcbext.h"
9
 
#include "shape.h"
10
 
 
11
 
xcb_extension_t xcb_shape_id = { "SHAPE" };
12
 
 
13
 
 
14
 
/*****************************************************************************
15
 
 **
16
 
 ** void xcb_shape_op_next
17
 
 ** 
18
 
 ** @param xcb_shape_op_iterator_t *i
19
 
 ** @returns void
20
 
 **
21
 
 *****************************************************************************/
22
 
 
23
 
void
24
 
xcb_shape_op_next (xcb_shape_op_iterator_t *i  /**< */)
25
 
{
26
 
    --i->rem;
27
 
    ++i->data;
28
 
    i->index += sizeof(xcb_shape_op_t);
29
 
}
30
 
 
31
 
 
32
 
/*****************************************************************************
33
 
 **
34
 
 ** xcb_generic_iterator_t xcb_shape_op_end
35
 
 ** 
36
 
 ** @param xcb_shape_op_iterator_t i
37
 
 ** @returns xcb_generic_iterator_t
38
 
 **
39
 
 *****************************************************************************/
40
 
 
41
 
xcb_generic_iterator_t
42
 
xcb_shape_op_end (xcb_shape_op_iterator_t i  /**< */)
43
 
{
44
 
    xcb_generic_iterator_t ret;
45
 
    ret.data = i.data + i.rem;
46
 
    ret.index = i.index + ((char *) ret.data - (char *) i.data);
47
 
    ret.rem = 0;
48
 
    return ret;
49
 
}
50
 
 
51
 
 
52
 
/*****************************************************************************
53
 
 **
54
 
 ** void xcb_shape_kind_next
55
 
 ** 
56
 
 ** @param xcb_shape_kind_iterator_t *i
57
 
 ** @returns void
58
 
 **
59
 
 *****************************************************************************/
60
 
 
61
 
void
62
 
xcb_shape_kind_next (xcb_shape_kind_iterator_t *i  /**< */)
63
 
{
64
 
    --i->rem;
65
 
    ++i->data;
66
 
    i->index += sizeof(xcb_shape_kind_t);
67
 
}
68
 
 
69
 
 
70
 
/*****************************************************************************
71
 
 **
72
 
 ** xcb_generic_iterator_t xcb_shape_kind_end
73
 
 ** 
74
 
 ** @param xcb_shape_kind_iterator_t i
75
 
 ** @returns xcb_generic_iterator_t
76
 
 **
77
 
 *****************************************************************************/
78
 
 
79
 
xcb_generic_iterator_t
80
 
xcb_shape_kind_end (xcb_shape_kind_iterator_t i  /**< */)
81
 
{
82
 
    xcb_generic_iterator_t ret;
83
 
    ret.data = i.data + i.rem;
84
 
    ret.index = i.index + ((char *) ret.data - (char *) i.data);
85
 
    ret.rem = 0;
86
 
    return ret;
87
 
}
88
 
 
89
 
 
90
 
/*****************************************************************************
91
 
 **
92
 
 ** xcb_shape_query_version_cookie_t xcb_shape_query_version
93
 
 ** 
94
 
 ** @param xcb_connection_t *c
95
 
 ** @returns xcb_shape_query_version_cookie_t
96
 
 **
97
 
 *****************************************************************************/
98
 
 
99
 
xcb_shape_query_version_cookie_t
100
 
xcb_shape_query_version (xcb_connection_t *c  /**< */)
101
 
{
102
 
    static const xcb_protocol_request_t xcb_req = {
103
 
        /* count */ 2,
104
 
        /* ext */ &xcb_shape_id,
105
 
        /* opcode */ XCB_SHAPE_QUERY_VERSION,
106
 
        /* isvoid */ 0
107
 
    };
108
 
    
109
 
    struct iovec xcb_parts[4];
110
 
    xcb_shape_query_version_cookie_t xcb_ret;
111
 
    xcb_shape_query_version_request_t xcb_out;
112
 
    
113
 
    
114
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
115
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
116
 
    xcb_parts[3].iov_base = 0;
117
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
118
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
119
 
    return xcb_ret;
120
 
}
121
 
 
122
 
 
123
 
/*****************************************************************************
124
 
 **
125
 
 ** xcb_shape_query_version_cookie_t xcb_shape_query_version_unchecked
126
 
 ** 
127
 
 ** @param xcb_connection_t *c
128
 
 ** @returns xcb_shape_query_version_cookie_t
129
 
 **
130
 
 *****************************************************************************/
131
 
 
132
 
xcb_shape_query_version_cookie_t
133
 
xcb_shape_query_version_unchecked (xcb_connection_t *c  /**< */)
134
 
{
135
 
    static const xcb_protocol_request_t xcb_req = {
136
 
        /* count */ 2,
137
 
        /* ext */ &xcb_shape_id,
138
 
        /* opcode */ XCB_SHAPE_QUERY_VERSION,
139
 
        /* isvoid */ 0
140
 
    };
141
 
    
142
 
    struct iovec xcb_parts[4];
143
 
    xcb_shape_query_version_cookie_t xcb_ret;
144
 
    xcb_shape_query_version_request_t xcb_out;
145
 
    
146
 
    
147
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
148
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
149
 
    xcb_parts[3].iov_base = 0;
150
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
151
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
152
 
    return xcb_ret;
153
 
}
154
 
 
155
 
 
156
 
/*****************************************************************************
157
 
 **
158
 
 ** xcb_shape_query_version_reply_t * xcb_shape_query_version_reply
159
 
 ** 
160
 
 ** @param xcb_connection_t                  *c
161
 
 ** @param xcb_shape_query_version_cookie_t   cookie
162
 
 ** @param xcb_generic_error_t              **e
163
 
 ** @returns xcb_shape_query_version_reply_t *
164
 
 **
165
 
 *****************************************************************************/
166
 
 
167
 
xcb_shape_query_version_reply_t *
168
 
xcb_shape_query_version_reply (xcb_connection_t                  *c  /**< */,
169
 
                               xcb_shape_query_version_cookie_t   cookie  /**< */,
170
 
                               xcb_generic_error_t              **e  /**< */)
171
 
{
172
 
    return (xcb_shape_query_version_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
173
 
}
174
 
 
175
 
 
176
 
/*****************************************************************************
177
 
 **
178
 
 ** xcb_void_cookie_t xcb_shape_rectangles_checked
179
 
 ** 
180
 
 ** @param xcb_connection_t      *c
181
 
 ** @param xcb_shape_op_t         operation
182
 
 ** @param xcb_shape_kind_t       destination_kind
183
 
 ** @param uint8_t                ordering
184
 
 ** @param xcb_window_t           destination_window
185
 
 ** @param int16_t                x_offset
186
 
 ** @param int16_t                y_offset
187
 
 ** @param uint32_t               rectangles_len
188
 
 ** @param const xcb_rectangle_t *rectangles
189
 
 ** @returns xcb_void_cookie_t
190
 
 **
191
 
 *****************************************************************************/
192
 
 
193
 
xcb_void_cookie_t
194
 
xcb_shape_rectangles_checked (xcb_connection_t      *c  /**< */,
195
 
                              xcb_shape_op_t         operation  /**< */,
196
 
                              xcb_shape_kind_t       destination_kind  /**< */,
197
 
                              uint8_t                ordering  /**< */,
198
 
                              xcb_window_t           destination_window  /**< */,
199
 
                              int16_t                x_offset  /**< */,
200
 
                              int16_t                y_offset  /**< */,
201
 
                              uint32_t               rectangles_len  /**< */,
202
 
                              const xcb_rectangle_t *rectangles  /**< */)
203
 
{
204
 
    static const xcb_protocol_request_t xcb_req = {
205
 
        /* count */ 4,
206
 
        /* ext */ &xcb_shape_id,
207
 
        /* opcode */ XCB_SHAPE_RECTANGLES,
208
 
        /* isvoid */ 1
209
 
    };
210
 
    
211
 
    struct iovec xcb_parts[6];
212
 
    xcb_void_cookie_t xcb_ret;
213
 
    xcb_shape_rectangles_request_t xcb_out;
214
 
    
215
 
    xcb_out.operation = operation;
216
 
    xcb_out.destination_kind = destination_kind;
217
 
    xcb_out.ordering = ordering;
218
 
    xcb_out.pad0 = 0;
219
 
    xcb_out.destination_window = destination_window;
220
 
    xcb_out.x_offset = x_offset;
221
 
    xcb_out.y_offset = y_offset;
222
 
    
223
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
224
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
225
 
    xcb_parts[3].iov_base = 0;
226
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
227
 
    xcb_parts[4].iov_base = (char *) rectangles;
228
 
    xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
229
 
    xcb_parts[5].iov_base = 0;
230
 
    xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
231
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
232
 
    return xcb_ret;
233
 
}
234
 
 
235
 
 
236
 
/*****************************************************************************
237
 
 **
238
 
 ** xcb_void_cookie_t xcb_shape_rectangles
239
 
 ** 
240
 
 ** @param xcb_connection_t      *c
241
 
 ** @param xcb_shape_op_t         operation
242
 
 ** @param xcb_shape_kind_t       destination_kind
243
 
 ** @param uint8_t                ordering
244
 
 ** @param xcb_window_t           destination_window
245
 
 ** @param int16_t                x_offset
246
 
 ** @param int16_t                y_offset
247
 
 ** @param uint32_t               rectangles_len
248
 
 ** @param const xcb_rectangle_t *rectangles
249
 
 ** @returns xcb_void_cookie_t
250
 
 **
251
 
 *****************************************************************************/
252
 
 
253
 
xcb_void_cookie_t
254
 
xcb_shape_rectangles (xcb_connection_t      *c  /**< */,
255
 
                      xcb_shape_op_t         operation  /**< */,
256
 
                      xcb_shape_kind_t       destination_kind  /**< */,
257
 
                      uint8_t                ordering  /**< */,
258
 
                      xcb_window_t           destination_window  /**< */,
259
 
                      int16_t                x_offset  /**< */,
260
 
                      int16_t                y_offset  /**< */,
261
 
                      uint32_t               rectangles_len  /**< */,
262
 
                      const xcb_rectangle_t *rectangles  /**< */)
263
 
{
264
 
    static const xcb_protocol_request_t xcb_req = {
265
 
        /* count */ 4,
266
 
        /* ext */ &xcb_shape_id,
267
 
        /* opcode */ XCB_SHAPE_RECTANGLES,
268
 
        /* isvoid */ 1
269
 
    };
270
 
    
271
 
    struct iovec xcb_parts[6];
272
 
    xcb_void_cookie_t xcb_ret;
273
 
    xcb_shape_rectangles_request_t xcb_out;
274
 
    
275
 
    xcb_out.operation = operation;
276
 
    xcb_out.destination_kind = destination_kind;
277
 
    xcb_out.ordering = ordering;
278
 
    xcb_out.pad0 = 0;
279
 
    xcb_out.destination_window = destination_window;
280
 
    xcb_out.x_offset = x_offset;
281
 
    xcb_out.y_offset = y_offset;
282
 
    
283
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
284
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
285
 
    xcb_parts[3].iov_base = 0;
286
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
287
 
    xcb_parts[4].iov_base = (char *) rectangles;
288
 
    xcb_parts[4].iov_len = rectangles_len * sizeof(xcb_rectangle_t);
289
 
    xcb_parts[5].iov_base = 0;
290
 
    xcb_parts[5].iov_len = -xcb_parts[4].iov_len & 3;
291
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
292
 
    return xcb_ret;
293
 
}
294
 
 
295
 
 
296
 
/*****************************************************************************
297
 
 **
298
 
 ** xcb_void_cookie_t xcb_shape_mask_checked
299
 
 ** 
300
 
 ** @param xcb_connection_t *c
301
 
 ** @param xcb_shape_op_t    operation
302
 
 ** @param xcb_shape_kind_t  destination_kind
303
 
 ** @param xcb_window_t      destination_window
304
 
 ** @param int16_t           x_offset
305
 
 ** @param int16_t           y_offset
306
 
 ** @param xcb_pixmap_t      source_bitmap
307
 
 ** @returns xcb_void_cookie_t
308
 
 **
309
 
 *****************************************************************************/
310
 
 
311
 
xcb_void_cookie_t
312
 
xcb_shape_mask_checked (xcb_connection_t *c  /**< */,
313
 
                        xcb_shape_op_t    operation  /**< */,
314
 
                        xcb_shape_kind_t  destination_kind  /**< */,
315
 
                        xcb_window_t      destination_window  /**< */,
316
 
                        int16_t           x_offset  /**< */,
317
 
                        int16_t           y_offset  /**< */,
318
 
                        xcb_pixmap_t      source_bitmap  /**< */)
319
 
{
320
 
    static const xcb_protocol_request_t xcb_req = {
321
 
        /* count */ 2,
322
 
        /* ext */ &xcb_shape_id,
323
 
        /* opcode */ XCB_SHAPE_MASK,
324
 
        /* isvoid */ 1
325
 
    };
326
 
    
327
 
    struct iovec xcb_parts[4];
328
 
    xcb_void_cookie_t xcb_ret;
329
 
    xcb_shape_mask_request_t xcb_out;
330
 
    
331
 
    xcb_out.operation = operation;
332
 
    xcb_out.destination_kind = destination_kind;
333
 
    memset(xcb_out.pad0, 0, 2);
334
 
    xcb_out.destination_window = destination_window;
335
 
    xcb_out.x_offset = x_offset;
336
 
    xcb_out.y_offset = y_offset;
337
 
    xcb_out.source_bitmap = source_bitmap;
338
 
    
339
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
340
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
341
 
    xcb_parts[3].iov_base = 0;
342
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
343
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
344
 
    return xcb_ret;
345
 
}
346
 
 
347
 
 
348
 
/*****************************************************************************
349
 
 **
350
 
 ** xcb_void_cookie_t xcb_shape_mask
351
 
 ** 
352
 
 ** @param xcb_connection_t *c
353
 
 ** @param xcb_shape_op_t    operation
354
 
 ** @param xcb_shape_kind_t  destination_kind
355
 
 ** @param xcb_window_t      destination_window
356
 
 ** @param int16_t           x_offset
357
 
 ** @param int16_t           y_offset
358
 
 ** @param xcb_pixmap_t      source_bitmap
359
 
 ** @returns xcb_void_cookie_t
360
 
 **
361
 
 *****************************************************************************/
362
 
 
363
 
xcb_void_cookie_t
364
 
xcb_shape_mask (xcb_connection_t *c  /**< */,
365
 
                xcb_shape_op_t    operation  /**< */,
366
 
                xcb_shape_kind_t  destination_kind  /**< */,
367
 
                xcb_window_t      destination_window  /**< */,
368
 
                int16_t           x_offset  /**< */,
369
 
                int16_t           y_offset  /**< */,
370
 
                xcb_pixmap_t      source_bitmap  /**< */)
371
 
{
372
 
    static const xcb_protocol_request_t xcb_req = {
373
 
        /* count */ 2,
374
 
        /* ext */ &xcb_shape_id,
375
 
        /* opcode */ XCB_SHAPE_MASK,
376
 
        /* isvoid */ 1
377
 
    };
378
 
    
379
 
    struct iovec xcb_parts[4];
380
 
    xcb_void_cookie_t xcb_ret;
381
 
    xcb_shape_mask_request_t xcb_out;
382
 
    
383
 
    xcb_out.operation = operation;
384
 
    xcb_out.destination_kind = destination_kind;
385
 
    memset(xcb_out.pad0, 0, 2);
386
 
    xcb_out.destination_window = destination_window;
387
 
    xcb_out.x_offset = x_offset;
388
 
    xcb_out.y_offset = y_offset;
389
 
    xcb_out.source_bitmap = source_bitmap;
390
 
    
391
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
392
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
393
 
    xcb_parts[3].iov_base = 0;
394
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
395
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
396
 
    return xcb_ret;
397
 
}
398
 
 
399
 
 
400
 
/*****************************************************************************
401
 
 **
402
 
 ** xcb_void_cookie_t xcb_shape_combine_checked
403
 
 ** 
404
 
 ** @param xcb_connection_t *c
405
 
 ** @param xcb_shape_op_t    operation
406
 
 ** @param xcb_shape_kind_t  destination_kind
407
 
 ** @param xcb_shape_kind_t  source_kind
408
 
 ** @param xcb_window_t      destination_window
409
 
 ** @param int16_t           x_offset
410
 
 ** @param int16_t           y_offset
411
 
 ** @param xcb_window_t      source_window
412
 
 ** @returns xcb_void_cookie_t
413
 
 **
414
 
 *****************************************************************************/
415
 
 
416
 
xcb_void_cookie_t
417
 
xcb_shape_combine_checked (xcb_connection_t *c  /**< */,
418
 
                           xcb_shape_op_t    operation  /**< */,
419
 
                           xcb_shape_kind_t  destination_kind  /**< */,
420
 
                           xcb_shape_kind_t  source_kind  /**< */,
421
 
                           xcb_window_t      destination_window  /**< */,
422
 
                           int16_t           x_offset  /**< */,
423
 
                           int16_t           y_offset  /**< */,
424
 
                           xcb_window_t      source_window  /**< */)
425
 
{
426
 
    static const xcb_protocol_request_t xcb_req = {
427
 
        /* count */ 2,
428
 
        /* ext */ &xcb_shape_id,
429
 
        /* opcode */ XCB_SHAPE_COMBINE,
430
 
        /* isvoid */ 1
431
 
    };
432
 
    
433
 
    struct iovec xcb_parts[4];
434
 
    xcb_void_cookie_t xcb_ret;
435
 
    xcb_shape_combine_request_t xcb_out;
436
 
    
437
 
    xcb_out.operation = operation;
438
 
    xcb_out.destination_kind = destination_kind;
439
 
    xcb_out.source_kind = source_kind;
440
 
    xcb_out.pad0 = 0;
441
 
    xcb_out.destination_window = destination_window;
442
 
    xcb_out.x_offset = x_offset;
443
 
    xcb_out.y_offset = y_offset;
444
 
    xcb_out.source_window = source_window;
445
 
    
446
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
447
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
448
 
    xcb_parts[3].iov_base = 0;
449
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
450
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
451
 
    return xcb_ret;
452
 
}
453
 
 
454
 
 
455
 
/*****************************************************************************
456
 
 **
457
 
 ** xcb_void_cookie_t xcb_shape_combine
458
 
 ** 
459
 
 ** @param xcb_connection_t *c
460
 
 ** @param xcb_shape_op_t    operation
461
 
 ** @param xcb_shape_kind_t  destination_kind
462
 
 ** @param xcb_shape_kind_t  source_kind
463
 
 ** @param xcb_window_t      destination_window
464
 
 ** @param int16_t           x_offset
465
 
 ** @param int16_t           y_offset
466
 
 ** @param xcb_window_t      source_window
467
 
 ** @returns xcb_void_cookie_t
468
 
 **
469
 
 *****************************************************************************/
470
 
 
471
 
xcb_void_cookie_t
472
 
xcb_shape_combine (xcb_connection_t *c  /**< */,
473
 
                   xcb_shape_op_t    operation  /**< */,
474
 
                   xcb_shape_kind_t  destination_kind  /**< */,
475
 
                   xcb_shape_kind_t  source_kind  /**< */,
476
 
                   xcb_window_t      destination_window  /**< */,
477
 
                   int16_t           x_offset  /**< */,
478
 
                   int16_t           y_offset  /**< */,
479
 
                   xcb_window_t      source_window  /**< */)
480
 
{
481
 
    static const xcb_protocol_request_t xcb_req = {
482
 
        /* count */ 2,
483
 
        /* ext */ &xcb_shape_id,
484
 
        /* opcode */ XCB_SHAPE_COMBINE,
485
 
        /* isvoid */ 1
486
 
    };
487
 
    
488
 
    struct iovec xcb_parts[4];
489
 
    xcb_void_cookie_t xcb_ret;
490
 
    xcb_shape_combine_request_t xcb_out;
491
 
    
492
 
    xcb_out.operation = operation;
493
 
    xcb_out.destination_kind = destination_kind;
494
 
    xcb_out.source_kind = source_kind;
495
 
    xcb_out.pad0 = 0;
496
 
    xcb_out.destination_window = destination_window;
497
 
    xcb_out.x_offset = x_offset;
498
 
    xcb_out.y_offset = y_offset;
499
 
    xcb_out.source_window = source_window;
500
 
    
501
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
502
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
503
 
    xcb_parts[3].iov_base = 0;
504
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
505
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
506
 
    return xcb_ret;
507
 
}
508
 
 
509
 
 
510
 
/*****************************************************************************
511
 
 **
512
 
 ** xcb_void_cookie_t xcb_shape_offset_checked
513
 
 ** 
514
 
 ** @param xcb_connection_t *c
515
 
 ** @param xcb_shape_kind_t  destination_kind
516
 
 ** @param xcb_window_t      destination_window
517
 
 ** @param int16_t           x_offset
518
 
 ** @param int16_t           y_offset
519
 
 ** @returns xcb_void_cookie_t
520
 
 **
521
 
 *****************************************************************************/
522
 
 
523
 
xcb_void_cookie_t
524
 
xcb_shape_offset_checked (xcb_connection_t *c  /**< */,
525
 
                          xcb_shape_kind_t  destination_kind  /**< */,
526
 
                          xcb_window_t      destination_window  /**< */,
527
 
                          int16_t           x_offset  /**< */,
528
 
                          int16_t           y_offset  /**< */)
529
 
{
530
 
    static const xcb_protocol_request_t xcb_req = {
531
 
        /* count */ 2,
532
 
        /* ext */ &xcb_shape_id,
533
 
        /* opcode */ XCB_SHAPE_OFFSET,
534
 
        /* isvoid */ 1
535
 
    };
536
 
    
537
 
    struct iovec xcb_parts[4];
538
 
    xcb_void_cookie_t xcb_ret;
539
 
    xcb_shape_offset_request_t xcb_out;
540
 
    
541
 
    xcb_out.destination_kind = destination_kind;
542
 
    memset(xcb_out.pad0, 0, 3);
543
 
    xcb_out.destination_window = destination_window;
544
 
    xcb_out.x_offset = x_offset;
545
 
    xcb_out.y_offset = y_offset;
546
 
    
547
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
548
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
549
 
    xcb_parts[3].iov_base = 0;
550
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
551
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
552
 
    return xcb_ret;
553
 
}
554
 
 
555
 
 
556
 
/*****************************************************************************
557
 
 **
558
 
 ** xcb_void_cookie_t xcb_shape_offset
559
 
 ** 
560
 
 ** @param xcb_connection_t *c
561
 
 ** @param xcb_shape_kind_t  destination_kind
562
 
 ** @param xcb_window_t      destination_window
563
 
 ** @param int16_t           x_offset
564
 
 ** @param int16_t           y_offset
565
 
 ** @returns xcb_void_cookie_t
566
 
 **
567
 
 *****************************************************************************/
568
 
 
569
 
xcb_void_cookie_t
570
 
xcb_shape_offset (xcb_connection_t *c  /**< */,
571
 
                  xcb_shape_kind_t  destination_kind  /**< */,
572
 
                  xcb_window_t      destination_window  /**< */,
573
 
                  int16_t           x_offset  /**< */,
574
 
                  int16_t           y_offset  /**< */)
575
 
{
576
 
    static const xcb_protocol_request_t xcb_req = {
577
 
        /* count */ 2,
578
 
        /* ext */ &xcb_shape_id,
579
 
        /* opcode */ XCB_SHAPE_OFFSET,
580
 
        /* isvoid */ 1
581
 
    };
582
 
    
583
 
    struct iovec xcb_parts[4];
584
 
    xcb_void_cookie_t xcb_ret;
585
 
    xcb_shape_offset_request_t xcb_out;
586
 
    
587
 
    xcb_out.destination_kind = destination_kind;
588
 
    memset(xcb_out.pad0, 0, 3);
589
 
    xcb_out.destination_window = destination_window;
590
 
    xcb_out.x_offset = x_offset;
591
 
    xcb_out.y_offset = y_offset;
592
 
    
593
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
594
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
595
 
    xcb_parts[3].iov_base = 0;
596
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
597
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
598
 
    return xcb_ret;
599
 
}
600
 
 
601
 
 
602
 
/*****************************************************************************
603
 
 **
604
 
 ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents
605
 
 ** 
606
 
 ** @param xcb_connection_t *c
607
 
 ** @param xcb_window_t      destination_window
608
 
 ** @returns xcb_shape_query_extents_cookie_t
609
 
 **
610
 
 *****************************************************************************/
611
 
 
612
 
xcb_shape_query_extents_cookie_t
613
 
xcb_shape_query_extents (xcb_connection_t *c  /**< */,
614
 
                         xcb_window_t      destination_window  /**< */)
615
 
{
616
 
    static const xcb_protocol_request_t xcb_req = {
617
 
        /* count */ 2,
618
 
        /* ext */ &xcb_shape_id,
619
 
        /* opcode */ XCB_SHAPE_QUERY_EXTENTS,
620
 
        /* isvoid */ 0
621
 
    };
622
 
    
623
 
    struct iovec xcb_parts[4];
624
 
    xcb_shape_query_extents_cookie_t xcb_ret;
625
 
    xcb_shape_query_extents_request_t xcb_out;
626
 
    
627
 
    xcb_out.destination_window = destination_window;
628
 
    
629
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
630
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
631
 
    xcb_parts[3].iov_base = 0;
632
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
633
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
634
 
    return xcb_ret;
635
 
}
636
 
 
637
 
 
638
 
/*****************************************************************************
639
 
 **
640
 
 ** xcb_shape_query_extents_cookie_t xcb_shape_query_extents_unchecked
641
 
 ** 
642
 
 ** @param xcb_connection_t *c
643
 
 ** @param xcb_window_t      destination_window
644
 
 ** @returns xcb_shape_query_extents_cookie_t
645
 
 **
646
 
 *****************************************************************************/
647
 
 
648
 
xcb_shape_query_extents_cookie_t
649
 
xcb_shape_query_extents_unchecked (xcb_connection_t *c  /**< */,
650
 
                                   xcb_window_t      destination_window  /**< */)
651
 
{
652
 
    static const xcb_protocol_request_t xcb_req = {
653
 
        /* count */ 2,
654
 
        /* ext */ &xcb_shape_id,
655
 
        /* opcode */ XCB_SHAPE_QUERY_EXTENTS,
656
 
        /* isvoid */ 0
657
 
    };
658
 
    
659
 
    struct iovec xcb_parts[4];
660
 
    xcb_shape_query_extents_cookie_t xcb_ret;
661
 
    xcb_shape_query_extents_request_t xcb_out;
662
 
    
663
 
    xcb_out.destination_window = destination_window;
664
 
    
665
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
666
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
667
 
    xcb_parts[3].iov_base = 0;
668
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
669
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
670
 
    return xcb_ret;
671
 
}
672
 
 
673
 
 
674
 
/*****************************************************************************
675
 
 **
676
 
 ** xcb_shape_query_extents_reply_t * xcb_shape_query_extents_reply
677
 
 ** 
678
 
 ** @param xcb_connection_t                  *c
679
 
 ** @param xcb_shape_query_extents_cookie_t   cookie
680
 
 ** @param xcb_generic_error_t              **e
681
 
 ** @returns xcb_shape_query_extents_reply_t *
682
 
 **
683
 
 *****************************************************************************/
684
 
 
685
 
xcb_shape_query_extents_reply_t *
686
 
xcb_shape_query_extents_reply (xcb_connection_t                  *c  /**< */,
687
 
                               xcb_shape_query_extents_cookie_t   cookie  /**< */,
688
 
                               xcb_generic_error_t              **e  /**< */)
689
 
{
690
 
    return (xcb_shape_query_extents_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
691
 
}
692
 
 
693
 
 
694
 
/*****************************************************************************
695
 
 **
696
 
 ** xcb_void_cookie_t xcb_shape_select_input_checked
697
 
 ** 
698
 
 ** @param xcb_connection_t *c
699
 
 ** @param xcb_window_t      destination_window
700
 
 ** @param uint8_t           enable
701
 
 ** @returns xcb_void_cookie_t
702
 
 **
703
 
 *****************************************************************************/
704
 
 
705
 
xcb_void_cookie_t
706
 
xcb_shape_select_input_checked (xcb_connection_t *c  /**< */,
707
 
                                xcb_window_t      destination_window  /**< */,
708
 
                                uint8_t           enable  /**< */)
709
 
{
710
 
    static const xcb_protocol_request_t xcb_req = {
711
 
        /* count */ 2,
712
 
        /* ext */ &xcb_shape_id,
713
 
        /* opcode */ XCB_SHAPE_SELECT_INPUT,
714
 
        /* isvoid */ 1
715
 
    };
716
 
    
717
 
    struct iovec xcb_parts[4];
718
 
    xcb_void_cookie_t xcb_ret;
719
 
    xcb_shape_select_input_request_t xcb_out;
720
 
    
721
 
    xcb_out.destination_window = destination_window;
722
 
    xcb_out.enable = enable;
723
 
    
724
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
725
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
726
 
    xcb_parts[3].iov_base = 0;
727
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
728
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
729
 
    return xcb_ret;
730
 
}
731
 
 
732
 
 
733
 
/*****************************************************************************
734
 
 **
735
 
 ** xcb_void_cookie_t xcb_shape_select_input
736
 
 ** 
737
 
 ** @param xcb_connection_t *c
738
 
 ** @param xcb_window_t      destination_window
739
 
 ** @param uint8_t           enable
740
 
 ** @returns xcb_void_cookie_t
741
 
 **
742
 
 *****************************************************************************/
743
 
 
744
 
xcb_void_cookie_t
745
 
xcb_shape_select_input (xcb_connection_t *c  /**< */,
746
 
                        xcb_window_t      destination_window  /**< */,
747
 
                        uint8_t           enable  /**< */)
748
 
{
749
 
    static const xcb_protocol_request_t xcb_req = {
750
 
        /* count */ 2,
751
 
        /* ext */ &xcb_shape_id,
752
 
        /* opcode */ XCB_SHAPE_SELECT_INPUT,
753
 
        /* isvoid */ 1
754
 
    };
755
 
    
756
 
    struct iovec xcb_parts[4];
757
 
    xcb_void_cookie_t xcb_ret;
758
 
    xcb_shape_select_input_request_t xcb_out;
759
 
    
760
 
    xcb_out.destination_window = destination_window;
761
 
    xcb_out.enable = enable;
762
 
    
763
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
764
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
765
 
    xcb_parts[3].iov_base = 0;
766
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
767
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
768
 
    return xcb_ret;
769
 
}
770
 
 
771
 
 
772
 
/*****************************************************************************
773
 
 **
774
 
 ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected
775
 
 ** 
776
 
 ** @param xcb_connection_t *c
777
 
 ** @param xcb_window_t      destination_window
778
 
 ** @returns xcb_shape_input_selected_cookie_t
779
 
 **
780
 
 *****************************************************************************/
781
 
 
782
 
xcb_shape_input_selected_cookie_t
783
 
xcb_shape_input_selected (xcb_connection_t *c  /**< */,
784
 
                          xcb_window_t      destination_window  /**< */)
785
 
{
786
 
    static const xcb_protocol_request_t xcb_req = {
787
 
        /* count */ 2,
788
 
        /* ext */ &xcb_shape_id,
789
 
        /* opcode */ XCB_SHAPE_INPUT_SELECTED,
790
 
        /* isvoid */ 0
791
 
    };
792
 
    
793
 
    struct iovec xcb_parts[4];
794
 
    xcb_shape_input_selected_cookie_t xcb_ret;
795
 
    xcb_shape_input_selected_request_t xcb_out;
796
 
    
797
 
    xcb_out.destination_window = destination_window;
798
 
    
799
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
800
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
801
 
    xcb_parts[3].iov_base = 0;
802
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
803
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
804
 
    return xcb_ret;
805
 
}
806
 
 
807
 
 
808
 
/*****************************************************************************
809
 
 **
810
 
 ** xcb_shape_input_selected_cookie_t xcb_shape_input_selected_unchecked
811
 
 ** 
812
 
 ** @param xcb_connection_t *c
813
 
 ** @param xcb_window_t      destination_window
814
 
 ** @returns xcb_shape_input_selected_cookie_t
815
 
 **
816
 
 *****************************************************************************/
817
 
 
818
 
xcb_shape_input_selected_cookie_t
819
 
xcb_shape_input_selected_unchecked (xcb_connection_t *c  /**< */,
820
 
                                    xcb_window_t      destination_window  /**< */)
821
 
{
822
 
    static const xcb_protocol_request_t xcb_req = {
823
 
        /* count */ 2,
824
 
        /* ext */ &xcb_shape_id,
825
 
        /* opcode */ XCB_SHAPE_INPUT_SELECTED,
826
 
        /* isvoid */ 0
827
 
    };
828
 
    
829
 
    struct iovec xcb_parts[4];
830
 
    xcb_shape_input_selected_cookie_t xcb_ret;
831
 
    xcb_shape_input_selected_request_t xcb_out;
832
 
    
833
 
    xcb_out.destination_window = destination_window;
834
 
    
835
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
836
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
837
 
    xcb_parts[3].iov_base = 0;
838
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
839
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
840
 
    return xcb_ret;
841
 
}
842
 
 
843
 
 
844
 
/*****************************************************************************
845
 
 **
846
 
 ** xcb_shape_input_selected_reply_t * xcb_shape_input_selected_reply
847
 
 ** 
848
 
 ** @param xcb_connection_t                   *c
849
 
 ** @param xcb_shape_input_selected_cookie_t   cookie
850
 
 ** @param xcb_generic_error_t               **e
851
 
 ** @returns xcb_shape_input_selected_reply_t *
852
 
 **
853
 
 *****************************************************************************/
854
 
 
855
 
xcb_shape_input_selected_reply_t *
856
 
xcb_shape_input_selected_reply (xcb_connection_t                   *c  /**< */,
857
 
                                xcb_shape_input_selected_cookie_t   cookie  /**< */,
858
 
                                xcb_generic_error_t               **e  /**< */)
859
 
{
860
 
    return (xcb_shape_input_selected_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
861
 
}
862
 
 
863
 
 
864
 
/*****************************************************************************
865
 
 **
866
 
 ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles
867
 
 ** 
868
 
 ** @param xcb_connection_t *c
869
 
 ** @param xcb_window_t      window
870
 
 ** @param xcb_shape_kind_t  source_kind
871
 
 ** @returns xcb_shape_get_rectangles_cookie_t
872
 
 **
873
 
 *****************************************************************************/
874
 
 
875
 
xcb_shape_get_rectangles_cookie_t
876
 
xcb_shape_get_rectangles (xcb_connection_t *c  /**< */,
877
 
                          xcb_window_t      window  /**< */,
878
 
                          xcb_shape_kind_t  source_kind  /**< */)
879
 
{
880
 
    static const xcb_protocol_request_t xcb_req = {
881
 
        /* count */ 2,
882
 
        /* ext */ &xcb_shape_id,
883
 
        /* opcode */ XCB_SHAPE_GET_RECTANGLES,
884
 
        /* isvoid */ 0
885
 
    };
886
 
    
887
 
    struct iovec xcb_parts[4];
888
 
    xcb_shape_get_rectangles_cookie_t xcb_ret;
889
 
    xcb_shape_get_rectangles_request_t xcb_out;
890
 
    
891
 
    xcb_out.window = window;
892
 
    xcb_out.source_kind = source_kind;
893
 
    
894
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
895
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
896
 
    xcb_parts[3].iov_base = 0;
897
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
898
 
    xcb_ret.sequence = xcb_send_request(c, XCB_REQUEST_CHECKED, xcb_parts + 2, &xcb_req);
899
 
    return xcb_ret;
900
 
}
901
 
 
902
 
 
903
 
/*****************************************************************************
904
 
 **
905
 
 ** xcb_shape_get_rectangles_cookie_t xcb_shape_get_rectangles_unchecked
906
 
 ** 
907
 
 ** @param xcb_connection_t *c
908
 
 ** @param xcb_window_t      window
909
 
 ** @param xcb_shape_kind_t  source_kind
910
 
 ** @returns xcb_shape_get_rectangles_cookie_t
911
 
 **
912
 
 *****************************************************************************/
913
 
 
914
 
xcb_shape_get_rectangles_cookie_t
915
 
xcb_shape_get_rectangles_unchecked (xcb_connection_t *c  /**< */,
916
 
                                    xcb_window_t      window  /**< */,
917
 
                                    xcb_shape_kind_t  source_kind  /**< */)
918
 
{
919
 
    static const xcb_protocol_request_t xcb_req = {
920
 
        /* count */ 2,
921
 
        /* ext */ &xcb_shape_id,
922
 
        /* opcode */ XCB_SHAPE_GET_RECTANGLES,
923
 
        /* isvoid */ 0
924
 
    };
925
 
    
926
 
    struct iovec xcb_parts[4];
927
 
    xcb_shape_get_rectangles_cookie_t xcb_ret;
928
 
    xcb_shape_get_rectangles_request_t xcb_out;
929
 
    
930
 
    xcb_out.window = window;
931
 
    xcb_out.source_kind = source_kind;
932
 
    
933
 
    xcb_parts[2].iov_base = (char *) &xcb_out;
934
 
    xcb_parts[2].iov_len = sizeof(xcb_out);
935
 
    xcb_parts[3].iov_base = 0;
936
 
    xcb_parts[3].iov_len = -xcb_parts[2].iov_len & 3;
937
 
    xcb_ret.sequence = xcb_send_request(c, 0, xcb_parts + 2, &xcb_req);
938
 
    return xcb_ret;
939
 
}
940
 
 
941
 
 
942
 
/*****************************************************************************
943
 
 **
944
 
 ** xcb_rectangle_t * xcb_shape_get_rectangles_rectangles
945
 
 ** 
946
 
 ** @param const xcb_shape_get_rectangles_reply_t *R
947
 
 ** @returns xcb_rectangle_t *
948
 
 **
949
 
 *****************************************************************************/
950
 
 
951
 
xcb_rectangle_t *
952
 
xcb_shape_get_rectangles_rectangles (const xcb_shape_get_rectangles_reply_t *R  /**< */)
953
 
{
954
 
    return (xcb_rectangle_t *) (R + 1);
955
 
}
956
 
 
957
 
 
958
 
/*****************************************************************************
959
 
 **
960
 
 ** int xcb_shape_get_rectangles_rectangles_length
961
 
 ** 
962
 
 ** @param const xcb_shape_get_rectangles_reply_t *R
963
 
 ** @returns int
964
 
 **
965
 
 *****************************************************************************/
966
 
 
967
 
int
968
 
xcb_shape_get_rectangles_rectangles_length (const xcb_shape_get_rectangles_reply_t *R  /**< */)
969
 
{
970
 
    return R->rectangles_len;
971
 
}
972
 
 
973
 
 
974
 
/*****************************************************************************
975
 
 **
976
 
 ** xcb_rectangle_iterator_t xcb_shape_get_rectangles_rectangles_iterator
977
 
 ** 
978
 
 ** @param const xcb_shape_get_rectangles_reply_t *R
979
 
 ** @returns xcb_rectangle_iterator_t
980
 
 **
981
 
 *****************************************************************************/
982
 
 
983
 
xcb_rectangle_iterator_t
984
 
xcb_shape_get_rectangles_rectangles_iterator (const xcb_shape_get_rectangles_reply_t *R  /**< */)
985
 
{
986
 
    xcb_rectangle_iterator_t i;
987
 
    i.data = (xcb_rectangle_t *) (R + 1);
988
 
    i.rem = R->rectangles_len;
989
 
    i.index = (char *) i.data - (char *) R;
990
 
    return i;
991
 
}
992
 
 
993
 
 
994
 
/*****************************************************************************
995
 
 **
996
 
 ** xcb_shape_get_rectangles_reply_t * xcb_shape_get_rectangles_reply
997
 
 ** 
998
 
 ** @param xcb_connection_t                   *c
999
 
 ** @param xcb_shape_get_rectangles_cookie_t   cookie
1000
 
 ** @param xcb_generic_error_t               **e
1001
 
 ** @returns xcb_shape_get_rectangles_reply_t *
1002
 
 **
1003
 
 *****************************************************************************/
1004
 
 
1005
 
xcb_shape_get_rectangles_reply_t *
1006
 
xcb_shape_get_rectangles_reply (xcb_connection_t                   *c  /**< */,
1007
 
                                xcb_shape_get_rectangles_cookie_t   cookie  /**< */,
1008
 
                                xcb_generic_error_t               **e  /**< */)
1009
 
{
1010
 
    return (xcb_shape_get_rectangles_reply_t *) xcb_wait_for_reply(c, cookie.sequence, e);
1011
 
}
1012