XCB: shm.h Source File

XCB 1.17.0

shm.h
1/*
2 * This file generated automatically from shm.xml by c_client.py.
3 * Edit at your peril.
4 */
5
11
12#ifndef __SHM_H
13#define __SHM_H
14
15#include "xcb.h"
16#include "xproto.h"
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#define XCB_SHM_MAJOR_VERSION 1
23#define XCB_SHM_MINOR_VERSION 2
24
25extern xcb_extension_t xcb_shm_id;
26
27typedef uint32_t xcb_shm_seg_t;
28
32 typedef struct xcb_shm_seg_iterator_t {
33 xcb_shm_seg_t *data;
34 int rem;
35 int index;
36} xcb_shm_seg_iterator_t;
37
39#define XCB_SHM_COMPLETION 0
40
44 typedef struct xcb_shm_completion_event_t {
45 uint8_t response_type;
46 uint8_t pad0;
47 uint16_t sequence;
48 xcb_drawable_t drawable;
49 uint16_t minor_event;
50 uint8_t major_event;
51 uint8_t pad1;
52 xcb_shm_seg_t shmseg;
53 uint32_t offset;
54} xcb_shm_completion_event_t;
55
57#define XCB_SHM_BAD_SEG 0
58
59typedef xcb_value_error_t xcb_shm_bad_seg_error_t;
60
64 typedef struct xcb_shm_query_version_cookie_t {
65 unsigned int sequence;
66} xcb_shm_query_version_cookie_t;
67
69#define XCB_SHM_QUERY_VERSION 0
70
74 typedef struct xcb_shm_query_version_request_t {
75 uint8_t major_opcode;
76 uint8_t minor_opcode;
77 uint16_t length;
78} xcb_shm_query_version_request_t;
79
83 typedef struct xcb_shm_query_version_reply_t {
84 uint8_t response_type;
85 uint8_t shared_pixmaps;
86 uint16_t sequence;
87 uint32_t length;
88 uint16_t major_version;
89 uint16_t minor_version;
90 uint16_t uid;
91 uint16_t gid;
92 uint8_t pixmap_format;
93 uint8_t pad0[15];
94} xcb_shm_query_version_reply_t;
95
97#define XCB_SHM_ATTACH 1
98
102 typedef struct xcb_shm_attach_request_t {
103 uint8_t major_opcode;
104 uint8_t minor_opcode;
105 uint16_t length;
106 xcb_shm_seg_t shmseg;
107 uint32_t shmid;
108 uint8_t read_only;
109 uint8_t pad0[3];
110} xcb_shm_attach_request_t;
111
113#define XCB_SHM_DETACH 2
114
118 typedef struct xcb_shm_detach_request_t {
119 uint8_t major_opcode;
120 uint8_t minor_opcode;
121 uint16_t length;
122 xcb_shm_seg_t shmseg;
123} xcb_shm_detach_request_t;
124
126#define XCB_SHM_PUT_IMAGE 3
127
131 typedef struct xcb_shm_put_image_request_t {
132 uint8_t major_opcode;
133 uint8_t minor_opcode;
134 uint16_t length;
135 xcb_drawable_t drawable;
136 xcb_gcontext_t gc;
137 uint16_t total_width;
138 uint16_t total_height;
139 uint16_t src_x;
140 uint16_t src_y;
141 uint16_t src_width;
142 uint16_t src_height;
143 int16_t dst_x;
144 int16_t dst_y;
145 uint8_t depth;
146 uint8_t format;
147 uint8_t send_event;
148 uint8_t pad0;
149 xcb_shm_seg_t shmseg;
150 uint32_t offset;
151} xcb_shm_put_image_request_t;
152
156 typedef struct xcb_shm_get_image_cookie_t {
157 unsigned int sequence;
158} xcb_shm_get_image_cookie_t;
159
161#define XCB_SHM_GET_IMAGE 4
162
166 typedef struct xcb_shm_get_image_request_t {
167 uint8_t major_opcode;
168 uint8_t minor_opcode;
169 uint16_t length;
170 xcb_drawable_t drawable;
171 int16_t x;
172 int16_t y;
173 uint16_t width;
174 uint16_t height;
175 uint32_t plane_mask;
176 uint8_t format;
177 uint8_t pad0[3];
178 xcb_shm_seg_t shmseg;
179 uint32_t offset;
180} xcb_shm_get_image_request_t;
181
185 typedef struct xcb_shm_get_image_reply_t {
186 uint8_t response_type;
187 uint8_t depth;
188 uint16_t sequence;
189 uint32_t length;
190 xcb_visualid_t visual;
191 uint32_t size;
192} xcb_shm_get_image_reply_t;
193
195#define XCB_SHM_CREATE_PIXMAP 5
196
200 typedef struct xcb_shm_create_pixmap_request_t {
201 uint8_t major_opcode;
202 uint8_t minor_opcode;
203 uint16_t length;
204 xcb_pixmap_t pid;
205 xcb_drawable_t drawable;
206 uint16_t width;
207 uint16_t height;
208 uint8_t depth;
209 uint8_t pad0[3];
210 xcb_shm_seg_t shmseg;
211 uint32_t offset;
212} xcb_shm_create_pixmap_request_t;
213
215#define XCB_SHM_ATTACH_FD 6
216
220 typedef struct xcb_shm_attach_fd_request_t {
221 uint8_t major_opcode;
222 uint8_t minor_opcode;
223 uint16_t length;
224 xcb_shm_seg_t shmseg;
225 uint8_t read_only;
226 uint8_t pad0[3];
227} xcb_shm_attach_fd_request_t;
228
232 typedef struct xcb_shm_create_segment_cookie_t {
233 unsigned int sequence;
234} xcb_shm_create_segment_cookie_t;
235
237#define XCB_SHM_CREATE_SEGMENT 7
238
242 typedef struct xcb_shm_create_segment_request_t {
243 uint8_t major_opcode;
244 uint8_t minor_opcode;
245 uint16_t length;
246 xcb_shm_seg_t shmseg;
247 uint32_t size;
248 uint8_t read_only;
249 uint8_t pad0[3];
250} xcb_shm_create_segment_request_t;
251
255 typedef struct xcb_shm_create_segment_reply_t {
256 uint8_t response_type;
257 uint8_t nfd;
258 uint16_t sequence;
259 uint32_t length;
260 uint8_t pad0[24];
261} xcb_shm_create_segment_reply_t;
262
271void
272 xcb_shm_seg_next (xcb_shm_seg_iterator_t *i);
273
283 xcb_generic_iterator_t
284 xcb_shm_seg_end (xcb_shm_seg_iterator_t i);
285
297 xcb_shm_query_version_cookie_t
298 xcb_shm_query_version (xcb_connection_t *c);
299
314 xcb_shm_query_version_cookie_t
315 xcb_shm_query_version_unchecked (xcb_connection_t *c);
316
331 xcb_shm_query_version_reply_t *
332 xcb_shm_query_version_reply (xcb_connection_t *c,
333 xcb_shm_query_version_cookie_t cookie ,
334 xcb_generic_error_t **e);
335
354 xcb_void_cookie_t
355 xcb_shm_attach_checked (xcb_connection_t *c,
356 xcb_shm_seg_t shmseg,
357 uint32_t shmid,
358 uint8_t read_only);
359
375 xcb_void_cookie_t
376 xcb_shm_attach (xcb_connection_t *c,
377 xcb_shm_seg_t shmseg,
378 uint32_t shmid,
379 uint8_t read_only);
380
395 xcb_void_cookie_t
396 xcb_shm_detach_checked (xcb_connection_t *c,
397 xcb_shm_seg_t shmseg);
398
410 xcb_void_cookie_t
411 xcb_shm_detach (xcb_connection_t *c,
412 xcb_shm_seg_t shmseg);
413
451 xcb_void_cookie_t
452 xcb_shm_put_image_checked (xcb_connection_t *c,
453 xcb_drawable_t drawable,
454 xcb_gcontext_t gc,
455 uint16_t total_width,
456 uint16_t total_height,
457 uint16_t src_x,
458 uint16_t src_y,
459 uint16_t src_width,
460 uint16_t src_height,
461 int16_t dst_x,
462 int16_t dst_y,
463 uint8_t depth,
464 uint8_t format,
465 uint8_t send_event,
466 xcb_shm_seg_t shmseg,
467 uint32_t offset);
468
503 xcb_void_cookie_t
504 xcb_shm_put_image (xcb_connection_t *c,
505 xcb_drawable_t drawable,
506 xcb_gcontext_t gc,
507 uint16_t total_width,
508 uint16_t total_height,
509 uint16_t src_x,
510 uint16_t src_y,
511 uint16_t src_width,
512 uint16_t src_height,
513 int16_t dst_x,
514 int16_t dst_y,
515 uint8_t depth,
516 uint8_t format,
517 uint8_t send_event,
518 xcb_shm_seg_t shmseg,
519 uint32_t offset);
520
541 xcb_shm_get_image_cookie_t
542 xcb_shm_get_image (xcb_connection_t *c,
543 xcb_drawable_t drawable,
544 int16_t x,
545 int16_t y,
546 uint16_t width,
547 uint16_t height,
548 uint32_t plane_mask,
549 uint8_t format,
550 xcb_shm_seg_t shmseg,
551 uint32_t offset);
552
576 xcb_shm_get_image_cookie_t
577 xcb_shm_get_image_unchecked (xcb_connection_t *c,
578 xcb_drawable_t drawable,
579 int16_t x,
580 int16_t y,
581 uint16_t width,
582 uint16_t height,
583 uint32_t plane_mask,
584 uint8_t format,
585 xcb_shm_seg_t shmseg,
586 uint32_t offset);
587
602 xcb_shm_get_image_reply_t *
603 xcb_shm_get_image_reply (xcb_connection_t *c,
604 xcb_shm_get_image_cookie_t cookie ,
605 xcb_generic_error_t **e);
606
628 xcb_void_cookie_t
629 xcb_shm_create_pixmap_checked (xcb_connection_t *c,
630 xcb_pixmap_t pid,
631 xcb_drawable_t drawable,
632 uint16_t width,
633 uint16_t height,
634 uint8_t depth,
635 xcb_shm_seg_t shmseg,
636 uint32_t offset);
637
656 xcb_void_cookie_t
657 xcb_shm_create_pixmap (xcb_connection_t *c,
658 xcb_pixmap_t pid,
659 xcb_drawable_t drawable,
660 uint16_t width,
661 uint16_t height,
662 uint8_t depth,
663 xcb_shm_seg_t shmseg,
664 uint32_t offset);
665
683 xcb_void_cookie_t
684 xcb_shm_attach_fd_checked (xcb_connection_t *c,
685 xcb_shm_seg_t shmseg,
686 int32_t shm_fd,
687 uint8_t read_only);
688
703 xcb_void_cookie_t
704 xcb_shm_attach_fd (xcb_connection_t *c,
705 xcb_shm_seg_t shmseg,
706 int32_t shm_fd,
707 uint8_t read_only);
708
722 xcb_shm_create_segment_cookie_t
723 xcb_shm_create_segment (xcb_connection_t *c,
724 xcb_shm_seg_t shmseg,
725 uint32_t size,
726 uint8_t read_only);
727
744 xcb_shm_create_segment_cookie_t
745 xcb_shm_create_segment_unchecked (xcb_connection_t *c,
746 xcb_shm_seg_t shmseg,
747 uint32_t size,
748 uint8_t read_only);
749
764 xcb_shm_create_segment_reply_t *
765 xcb_shm_create_segment_reply (xcb_connection_t *c,
766 xcb_shm_create_segment_cookie_t cookie ,
767 xcb_generic_error_t **e);
768
779int *
780 xcb_shm_create_segment_reply_fds (xcb_connection_t *c ,
781 xcb_shm_create_segment_reply_t *reply);
782
783
784#ifdef __cplusplus
785}
786#endif
787
788#endif
789
xcb_shm_get_image_unchecked
xcb_shm_get_image_cookie_t xcb_shm_get_image_unchecked(xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t plane_mask, uint8_t format, xcb_shm_seg_t shmseg, uint32_t offset)
Copies data from the specified drawable to the shared memory segment.
Definition shm.c:363
xcb_shm_query_version_unchecked
xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked(xcb_connection_t *c)
Query the version of the MIT-SHM extension.
Definition shm.c:64
xcb_shm_create_segment_unchecked
xcb_shm_create_segment_cookie_t xcb_shm_create_segment_unchecked(xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t size, uint8_t read_only)
Asks the server to allocate a shared memory segment.
Definition shm.c:589
xcb_shm_seg_end
xcb_generic_iterator_t xcb_shm_seg_end(xcb_shm_seg_iterator_t i)
Definition shm.c:30
xcb_shm_attach
xcb_void_cookie_t xcb_shm_attach(xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t shmid, uint8_t read_only)
Attach a System V shared memory segment.
Definition shm.c:127
xcb_shm_create_pixmap
xcb_void_cookie_t xcb_shm_create_pixmap(xcb_connection_t *c, xcb_pixmap_t pid, xcb_drawable_t drawable, uint16_t width, uint16_t height, uint8_t depth, xcb_shm_seg_t shmseg, uint32_t offset)
Create a pixmap backed by shared memory.
Definition shm.c:453
xcb_shm_query_version
xcb_shm_query_version_cookie_t xcb_shm_query_version(xcb_connection_t *c)
Query the version of the MIT-SHM extension.
Definition shm.c:40
xcb_shm_query_version_reply
xcb_shm_query_version_reply_t * xcb_shm_query_version_reply(xcb_connection_t *c, xcb_shm_query_version_cookie_t cookie, xcb_generic_error_t **e)
Definition shm.c:88
xcb_shm_get_image_reply
xcb_shm_get_image_reply_t * xcb_shm_get_image_reply(xcb_connection_t *c, xcb_shm_get_image_cookie_t cookie, xcb_generic_error_t **e)
Definition shm.c:406
xcb_shm_detach_checked
xcb_void_cookie_t xcb_shm_detach_checked(xcb_connection_t *c, xcb_shm_seg_t shmseg)
Destroys the specified shared memory segment.
Definition shm.c:158
xcb_shm_detach
xcb_void_cookie_t xcb_shm_detach(xcb_connection_t *c, xcb_shm_seg_t shmseg)
Destroys the specified shared memory segment.
Definition shm.c:184
xcb_shm_attach_fd
xcb_void_cookie_t xcb_shm_attach_fd(xcb_connection_t *c, xcb_shm_seg_t shmseg, int32_t shm_fd, uint8_t read_only)
Create a shared memory segment.
Definition shm.c:525
xcb_shm_create_pixmap_checked
xcb_void_cookie_t xcb_shm_create_pixmap_checked(xcb_connection_t *c, xcb_pixmap_t pid, xcb_drawable_t drawable, uint16_t width, uint16_t height, uint8_t depth, xcb_shm_seg_t shmseg, uint32_t offset)
Create a pixmap backed by shared memory.
Definition shm.c:414
xcb_shm_attach_fd_checked
xcb_void_cookie_t xcb_shm_attach_fd_checked(xcb_connection_t *c, xcb_shm_seg_t shmseg, int32_t shm_fd, uint8_t read_only)
Create a shared memory segment.
Definition shm.c:492
xcb_shm_put_image_checked
xcb_void_cookie_t xcb_shm_put_image_checked(xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint16_t total_width, uint16_t total_height, uint16_t src_x, uint16_t src_y, uint16_t src_width, uint16_t src_height, int16_t dst_x, int16_t dst_y, uint8_t depth, uint8_t format, uint8_t send_event, xcb_shm_seg_t shmseg, uint32_t offset)
Copy data from the shared memory to the specified drawable.
Definition shm.c:210
xcb_shm_create_segment_reply
xcb_shm_create_segment_reply_t * xcb_shm_create_segment_reply(xcb_connection_t *c, xcb_shm_create_segment_cookie_t cookie, xcb_generic_error_t **e)
Definition shm.c:620
xcb_shm_get_image
xcb_shm_get_image_cookie_t xcb_shm_get_image(xcb_connection_t *c, xcb_drawable_t drawable, int16_t x, int16_t y, uint16_t width, uint16_t height, uint32_t plane_mask, uint8_t format, xcb_shm_seg_t shmseg, uint32_t offset)
Copies data from the specified drawable to the shared memory segment.
Definition shm.c:320
xcb_shm_put_image
xcb_void_cookie_t xcb_shm_put_image(xcb_connection_t *c, xcb_drawable_t drawable, xcb_gcontext_t gc, uint16_t total_width, uint16_t total_height, uint16_t src_x, uint16_t src_y, uint16_t src_width, uint16_t src_height, int16_t dst_x, int16_t dst_y, uint8_t depth, uint8_t format, uint8_t send_event, xcb_shm_seg_t shmseg, uint32_t offset)
Copy data from the shared memory to the specified drawable.
Definition shm.c:265
xcb_shm_seg_next
void xcb_shm_seg_next(xcb_shm_seg_iterator_t *i)
Definition shm.c:22
xcb_shm_create_segment_reply_fds
int * xcb_shm_create_segment_reply_fds(xcb_connection_t *c, xcb_shm_create_segment_reply_t *reply)
Definition shm.c:628
xcb_shm_create_segment
xcb_shm_create_segment_cookie_t xcb_shm_create_segment(xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t size, uint8_t read_only)
Asks the server to allocate a shared memory segment.
Definition shm.c:558
xcb_shm_attach_checked
xcb_void_cookie_t xcb_shm_attach_checked(xcb_connection_t *c, xcb_shm_seg_t shmseg, uint32_t shmid, uint8_t read_only)
Attach a System V shared memory segment.
Definition shm.c:96
xcb_connection_t
Definition xcbint.h:208
xcb_extension_t
Definition xcbext.h:39
xcb_generic_error_t
Generic error.
Definition xcb.h:186
xcb_generic_iterator_t
Generic iterator.
Definition xcb.h:118
xcb_shm_attach_fd_request_t
xcb_shm_attach_fd_request_t
Definition shm.h:220
xcb_shm_attach_request_t
xcb_shm_attach_request_t
Definition shm.h:102
xcb_shm_completion_event_t
xcb_shm_completion_event_t
Definition shm.h:44
xcb_shm_create_pixmap_request_t
xcb_shm_create_pixmap_request_t
Definition shm.h:200
xcb_shm_create_segment_cookie_t
xcb_shm_create_segment_cookie_t
Definition shm.h:232
xcb_shm_create_segment_reply_t
xcb_shm_create_segment_reply_t
Definition shm.h:255
xcb_shm_create_segment_request_t
xcb_shm_create_segment_request_t
Definition shm.h:242
xcb_shm_detach_request_t
xcb_shm_detach_request_t
Definition shm.h:118
xcb_shm_get_image_cookie_t
xcb_shm_get_image_cookie_t
Definition shm.h:156
xcb_shm_get_image_reply_t
xcb_shm_get_image_reply_t
Definition shm.h:185
xcb_shm_get_image_request_t
xcb_shm_get_image_request_t
Definition shm.h:166
xcb_shm_put_image_request_t
xcb_shm_put_image_request_t
Definition shm.h:131
xcb_shm_query_version_cookie_t
xcb_shm_query_version_cookie_t
Definition shm.h:64
xcb_shm_query_version_reply_t
xcb_shm_query_version_reply_t
Definition shm.h:83
xcb_shm_query_version_request_t
xcb_shm_query_version_request_t
Definition shm.h:74
xcb_shm_seg_iterator_t
xcb_shm_seg_iterator_t
Definition shm.h:32
xcb_value_error_t
xcb_value_error_t
Definition xproto.h:1263
xcb_void_cookie_t
Generic cookie.
Definition xcb.h:203
xcb.h