1 /*
2 * This file generated automatically from shm.xml by c-client.xsl using XSLT.
3 * Edit at your peril.
4 */
5
6 /**
7 * @defgroup XCB_Shm_API XCB Shm API
8 * @brief Shm XCB Protocol Implementation.
9 * @{
10 **/
11
12
13 module std.c.linux.X11.xcb.shm;
14 version(USE_XCB):
15
16 import std.c.linux.X11.xcb.xcb;
17 import std.c.linux.X11.xcb.xproto;
18
19 const int XCB_SHM_MAJOR_VERSION =1;
20 const int XCB_SHM_MINOR_VERSION =1;
21
22 extern(C) extern xcb_extension_t xcb_shm_id;
23
24 alias uint xcb_shm_seg_t;
25
26 /**
27 * @brief xcb_shm_seg_iterator_t
28 **/
29 struct xcb_shm_seg_iterator_t {
30 xcb_shm_seg_t *data; /**< */
31 int rem; /**< */
32 int index; /**< */
33 } ;
34
35 /** Opcode for xcb_shm_completion. */
36 const uint XCB_SHM_COMPLETION = 0;
37
38 /**
39 * @brief xcb_shm_completion_event_t
40 **/
41 struct xcb_shm_completion_event_t {
42 ubyte response_type; /**< */
43 ubyte pad0; /**< */
44 ushort sequence; /**< */
45 xcb_drawable_t drawable; /**< */
46 xcb_shm_seg_t shmseg; /**< */
47 ushort minor_event; /**< */
48 ubyte major_event; /**< */
49 ubyte pad1; /**< */
50 uint offset; /**< */
51 } ;
52
53 /** Opcode for xcb_shm_bad_seg. */
54 const uint XCB_SHM_BAD_SEG = 0;
55
56 alias xcb_value_error_t xcb_shm_bad_seg_error_t;
57
58 /**
59 * @brief xcb_shm_query_version_cookie_t
60 **/
61 struct xcb_shm_query_version_cookie_t {
62 uint sequence; /**< */
63 } ;
64
65 /** Opcode for xcb_shm_query_version. */
66 const uint XCB_SHM_QUERY_VERSION = 0;
67
68 /**
69 * @brief xcb_shm_query_version_request_t
70 **/
71 struct xcb_shm_query_version_request_t {
72 ubyte major_opcode; /**< */
73 ubyte minor_opcode; /**< */
74 ushort length; /**< */
75 } ;
76
77 /**
78 * @brief xcb_shm_query_version_reply_t
79 **/
80 struct xcb_shm_query_version_reply_t {
81 ubyte response_type; /**< */
82 bool shared_pixmaps; /**< */
83 ushort sequence; /**< */
84 uint length; /**< */
85 ushort major_version; /**< */
86 ushort minor_version; /**< */
87 ushort uid; /**< */
88 ushort gid; /**< */
89 ubyte pixmap_format; /**< */
90 } ;
91
92 /** Opcode for xcb_shm_attach. */
93 const uint XCB_SHM_ATTACH = 1;
94
95 /**
96 * @brief xcb_shm_attach_request_t
97 **/
98 struct xcb_shm_attach_request_t {
99 ubyte major_opcode; /**< */
100 ubyte minor_opcode; /**< */
101 ushort length; /**< */
102 xcb_shm_seg_t shmseg; /**< */
103 uint shmid; /**< */
104 bool read_only; /**< */
105 } ;
106
107 /** Opcode for xcb_shm_detach. */
108 const uint XCB_SHM_DETACH = 2;
109
110 /**
111 * @brief xcb_shm_detach_request_t
112 **/
113 struct xcb_shm_detach_request_t {
114 ubyte major_opcode; /**< */
115 ubyte minor_opcode; /**< */
116 ushort length; /**< */
117 xcb_shm_seg_t shmseg; /**< */
118 } ;
119
120 /** Opcode for xcb_shm_put_image. */
121 const uint XCB_SHM_PUT_IMAGE = 3;
122
123 /**
124 * @brief xcb_shm_put_image_request_t
125 **/
126 struct xcb_shm_put_image_request_t {
127 ubyte major_opcode; /**< */
128 ubyte minor_opcode; /**< */
129 ushort length; /**< */
130 xcb_drawable_t drawable; /**< */
131 xcb_gcontext_t gc; /**< */
132 ushort total_width; /**< */
133 ushort total_height; /**< */
134 ushort src_x; /**< */
135 ushort src_y; /**< */
136 ushort src_width; /**< */
137 ushort src_height; /**< */
138 short dst_x; /**< */
139 short dst_y; /**< */
140 ubyte depth; /**< */
141 ubyte format; /**< */
142 ubyte send_event; /**< */
143 ubyte pad0; /**< */
144 xcb_shm_seg_t shmseg; /**< */
145 uint offset; /**< */
146 } ;
147
148 /**
149 * @brief xcb_shm_get_image_cookie_t
150 **/
151 struct xcb_shm_get_image_cookie_t {
152 uint sequence; /**< */
153 } ;
154
155 /** Opcode for xcb_shm_get_image. */
156 const uint XCB_SHM_GET_IMAGE = 4;
157
158 /**
159 * @brief xcb_shm_get_image_request_t
160 **/
161 struct xcb_shm_get_image_request_t {
162 ubyte major_opcode; /**< */
163 ubyte minor_opcode; /**< */
164 ushort length; /**< */
165 xcb_drawable_t drawable; /**< */
166 short x; /**< */
167 short y; /**< */
168 ushort width; /**< */
169 ushort height; /**< */
170 uint plane_mask; /**< */
171 ubyte format; /**< */
172 ubyte pad0[3]; /**< */
173 xcb_shm_seg_t shmseg; /**< */
174 uint offset; /**< */
175 } ;
176
177 /**
178 * @brief xcb_shm_get_image_reply_t
179 **/
180 struct xcb_shm_get_image_reply_t {
181 ubyte response_type; /**< */
182 ubyte depth; /**< */
183 ushort sequence; /**< */
184 uint length; /**< */
185 xcb_visualid_t visual; /**< */
186 uint size; /**< */
187 } ;
188
189 /** Opcode for xcb_shm_create_pixmap. */
190 const uint XCB_SHM_CREATE_PIXMAP = 5;
191
192 /**
193 * @brief xcb_shm_create_pixmap_request_t
194 **/
195 struct xcb_shm_create_pixmap_request_t {
196 ubyte major_opcode; /**< */
197 ubyte minor_opcode; /**< */
198 ushort length; /**< */
199 xcb_pixmap_t pid; /**< */
200 xcb_drawable_t drawable; /**< */
201 ushort width; /**< */
202 ushort height; /**< */
203 ubyte depth; /**< */
204 ubyte pad0[3]; /**< */
205 xcb_shm_seg_t shmseg; /**< */
206 uint offset; /**< */
207 } ;
208
209
210 /*****************************************************************************
211 **
212 ** void xcb_shm_seg_next
213 **
214 ** @param xcb_shm_seg_iterator_t *i
215 ** @returns void
216 **
217 *****************************************************************************/
218
219 extern(C) void
220 xcb_shm_seg_next (xcb_shm_seg_iterator_t *i /**< */);
221
222
223 /*****************************************************************************
224 **
225 ** xcb_generic_iterator_t xcb_shm_seg_end
226 **
227 ** @param xcb_shm_seg_iterator_t i
228 ** @returns xcb_generic_iterator_t
229 **
230 *****************************************************************************/
231
232 extern(C) xcb_generic_iterator_t
233 xcb_shm_seg_end (xcb_shm_seg_iterator_t i /**< */);
234
235
236 /*****************************************************************************
237 **
238 ** xcb_shm_query_version_cookie_t xcb_shm_query_version
239 **
240 ** @param xcb_connection_t *c
241 ** @returns xcb_shm_query_version_cookie_t
242 **
243 *****************************************************************************/
244
245 extern(C) xcb_shm_query_version_cookie_t
246 xcb_shm_query_version (xcb_connection_t *c /**< */);
247
248
249 /*****************************************************************************
250 **
251 ** xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked
252 **
253 ** @param xcb_connection_t *c
254 ** @returns xcb_shm_query_version_cookie_t
255 **
256 *****************************************************************************/
257
258 extern(C) xcb_shm_query_version_cookie_t
259 xcb_shm_query_version_unchecked (xcb_connection_t *c /**< */);
260
261
262 /*****************************************************************************
263 **
264 ** xcb_shm_query_version_reply_t * xcb_shm_query_version_reply
265 **
266 ** @param xcb_connection_t *c
267 ** @param xcb_shm_query_version_cookie_t cookie
268 ** @param xcb_generic_error_t **e
269 ** @returns xcb_shm_query_version_reply_t *
270 **
271 *****************************************************************************/
272
273 extern(C) xcb_shm_query_version_reply_t *
274 xcb_shm_query_version_reply (xcb_connection_t *c /**< */,
275 xcb_shm_query_version_cookie_t cookie /**< */,
276 xcb_generic_error_t **e /**< */);
277
278
279 /*****************************************************************************
280 **
281 ** xcb_void_cookie_t xcb_shm_attach_checked
282 **
283 ** @param xcb_connection_t *c
284 ** @param xcb_shm_seg_t shmseg
285 ** @param uint shmid
286 ** @param bool read_only
287 ** @returns xcb_void_cookie_t
288 **
289 *****************************************************************************/
290
291 extern(C) xcb_void_cookie_t
292 xcb_shm_attach_checked (xcb_connection_t *c /**< */,
293 xcb_shm_seg_t shmseg /**< */,
294 uint shmid /**< */,
295 bool read_only /**< */);
296
297
298 /*****************************************************************************
299 **
300 ** xcb_void_cookie_t xcb_shm_attach
301 **
302 ** @param xcb_connection_t *c
303 ** @param xcb_shm_seg_t shmseg
304 ** @param uint shmid
305 ** @param bool read_only
306 ** @returns xcb_void_cookie_t
307 **
308 *****************************************************************************/
309
310 extern(C) xcb_void_cookie_t
311 xcb_shm_attach (xcb_connection_t *c /**< */,
312 xcb_shm_seg_t shmseg /**< */,
313 uint shmid /**< */,
314 bool read_only /**< */);
315
316
317 /*****************************************************************************
318 **
319 ** xcb_void_cookie_t xcb_shm_detach_checked
320 **
321 ** @param xcb_connection_t *c
322 ** @param xcb_shm_seg_t shmseg
323 ** @returns xcb_void_cookie_t
324 **
325 *****************************************************************************/
326
327 extern(C) xcb_void_cookie_t
328 xcb_shm_detach_checked (xcb_connection_t *c /**< */,
329 xcb_shm_seg_t shmseg /**< */);
330
331
332 /*****************************************************************************
333 **
334 ** xcb_void_cookie_t xcb_shm_detach
335 **
336 ** @param xcb_connection_t *c
337 ** @param xcb_shm_seg_t shmseg
338 ** @returns xcb_void_cookie_t
339 **
340 *****************************************************************************/
341
342 extern(C) xcb_void_cookie_t
343 xcb_shm_detach (xcb_connection_t *c /**< */,
344 xcb_shm_seg_t shmseg /**< */);
345
346
347 /*****************************************************************************
348 **
349 ** xcb_void_cookie_t xcb_shm_put_image_checked
350 **
351 ** @param xcb_connection_t *c
352 ** @param xcb_drawable_t drawable
353 ** @param xcb_gcontext_t gc
354 ** @param ushort total_width
355 ** @param ushort total_height
356 ** @param ushort src_x
357 ** @param ushort src_y
358 ** @param ushort src_width
359 ** @param ushort src_height
360 ** @param short dst_x
361 ** @param short dst_y
362 ** @param ubyte depth
363 ** @param ubyte format
364 ** @param ubyte send_event
365 ** @param xcb_shm_seg_t shmseg
366 ** @param uint offset
367 ** @returns xcb_void_cookie_t
368 **
369 *****************************************************************************/
370
371 extern(C) xcb_void_cookie_t
372 xcb_shm_put_image_checked (xcb_connection_t *c /**< */,
373 xcb_drawable_t drawable /**< */,
374 xcb_gcontext_t gc /**< */,
375 ushort total_width /**< */,
376 ushort total_height /**< */,
377 ushort src_x /**< */,
378 ushort src_y /**< */,
379 ushort src_width /**< */,
380 ushort src_height /**< */,
381 short dst_x /**< */,
382 short dst_y /**< */,
383 ubyte depth /**< */,
384 ubyte format /**< */,
385 ubyte send_event /**< */,
386 xcb_shm_seg_t shmseg /**< */,
387 uint offset /**< */);
388
389
390 /*****************************************************************************
391 **
392 ** xcb_void_cookie_t xcb_shm_put_image
393 **
394 ** @param xcb_connection_t *c
395 ** @param xcb_drawable_t drawable
396 ** @param xcb_gcontext_t gc
397 ** @param ushort total_width
398 ** @param ushort total_height
399 ** @param ushort src_x
400 ** @param ushort src_y
401 ** @param ushort src_width
402 ** @param ushort src_height
403 ** @param short dst_x
404 ** @param short dst_y
405 ** @param ubyte depth
406 ** @param ubyte format
407 ** @param ubyte send_event
408 ** @param xcb_shm_seg_t shmseg
409 ** @param uint offset
410 ** @returns xcb_void_cookie_t
411 **
412 *****************************************************************************/
413
414 extern(C) xcb_void_cookie_t
415 xcb_shm_put_image (xcb_connection_t *c /**< */,
416 xcb_drawable_t drawable /**< */,
417 xcb_gcontext_t gc /**< */,
418 ushort total_width /**< */,
419 ushort total_height /**< */,
420 ushort src_x /**< */,
421 ushort src_y /**< */,
422 ushort src_width /**< */,
423 ushort src_height /**< */,
424 short dst_x /**< */,
425 short dst_y /**< */,
426 ubyte depth /**< */,
427 ubyte format /**< */,
428 ubyte send_event /**< */,
429 xcb_shm_seg_t shmseg /**< */,
430 uint offset /**< */);
431
432
433 /*****************************************************************************
434 **
435 ** xcb_shm_get_image_cookie_t xcb_shm_get_image
436 **
437 ** @param xcb_connection_t *c
438 ** @param xcb_drawable_t drawable
439 ** @param short x
440 ** @param short y
441 ** @param ushort width
442 ** @param ushort height
443 ** @param uint plane_mask
444 ** @param ubyte format
445 ** @param xcb_shm_seg_t shmseg
446 ** @param uint offset
447 ** @returns xcb_shm_get_image_cookie_t
448 **
449 *****************************************************************************/
450
451 extern(C) xcb_shm_get_image_cookie_t
452 xcb_shm_get_image (xcb_connection_t *c /**< */,
453 xcb_drawable_t drawable /**< */,
454 short x /**< */,
455 short y /**< */,
456 ushort width /**< */,
457 ushort height /**< */,
458 uint plane_mask /**< */,
459 ubyte format /**< */,
460 xcb_shm_seg_t shmseg /**< */,
461 uint offset /**< */);
462
463
464 /*****************************************************************************
465 **
466 ** xcb_shm_get_image_cookie_t xcb_shm_get_image_unchecked
467 **
468 ** @param xcb_connection_t *c
469 ** @param xcb_drawable_t drawable
470 ** @param short x
471 ** @param short y
472 ** @param ushort width
473 ** @param ushort height
474 ** @param uint plane_mask
475 ** @param ubyte format
476 ** @param xcb_shm_seg_t shmseg
477 ** @param uint offset
478 ** @returns xcb_shm_get_image_cookie_t
479 **
480 *****************************************************************************/
481
482 extern(C) xcb_shm_get_image_cookie_t
483 xcb_shm_get_image_unchecked (xcb_connection_t *c /**< */,
484 xcb_drawable_t drawable /**< */,
485 short x /**< */,
486 short y /**< */,
487 ushort width /**< */,
488 ushort height /**< */,
489 uint plane_mask /**< */,
490 ubyte format /**< */,
491 xcb_shm_seg_t shmseg /**< */,
492 uint offset /**< */);
493
494
495 /*****************************************************************************
496 **
497 ** xcb_shm_get_image_reply_t * xcb_shm_get_image_reply
498 **
499 ** @param xcb_connection_t *c
500 ** @param xcb_shm_get_image_cookie_t cookie
501 ** @param xcb_generic_error_t **e
502 ** @returns xcb_shm_get_image_reply_t *
503 **
504 *****************************************************************************/
505
506 extern(C) xcb_shm_get_image_reply_t *
507 xcb_shm_get_image_reply (xcb_connection_t *c /**< */,
508 xcb_shm_get_image_cookie_t cookie /**< */,
509 xcb_generic_error_t **e /**< */);
510
511
512 /*****************************************************************************
513 **
514 ** xcb_void_cookie_t xcb_shm_create_pixmap_checked
515 **
516 ** @param xcb_connection_t *c
517 ** @param xcb_pixmap_t pid
518 ** @param xcb_drawable_t drawable
519 ** @param ushort width
520 ** @param ushort height
521 ** @param ubyte depth
522 ** @param xcb_shm_seg_t shmseg
523 ** @param uint offset
524 ** @returns xcb_void_cookie_t
525 **
526 *****************************************************************************/
527
528 extern(C) xcb_void_cookie_t
529 xcb_shm_create_pixmap_checked (xcb_connection_t *c /**< */,
530 xcb_pixmap_t pid /**< */,
531 xcb_drawable_t drawable /**< */,
532 ushort width /**< */,
533 ushort height /**< */,
534 ubyte depth /**< */,
535 xcb_shm_seg_t shmseg /**< */,
536 uint offset /**< */);
537
538
539 /*****************************************************************************
540 **
541 ** xcb_void_cookie_t xcb_shm_create_pixmap
542 **
543 ** @param xcb_connection_t *c
544 ** @param xcb_pixmap_t pid
545 ** @param xcb_drawable_t drawable
546 ** @param ushort width
547 ** @param ushort height
548 ** @param ubyte depth
549 ** @param xcb_shm_seg_t shmseg
550 ** @param uint offset
551 ** @returns xcb_void_cookie_t
552 **
553 *****************************************************************************/
554
555 extern(C) xcb_void_cookie_t
556 xcb_shm_create_pixmap (xcb_connection_t *c /**< */,
557 xcb_pixmap_t pid /**< */,
558 xcb_drawable_t drawable /**< */,
559 ushort width /**< */,
560 ushort height /**< */,
561 ubyte depth /**< */,
562 xcb_shm_seg_t shmseg /**< */,
563 uint offset /**< */);
564
565
566
567 /**
568 * @}
569 */