|
||||
File indexing completed on 2025-01-18 10:14:40
0001 /* 0002 * This file generated automatically from shm.xml by c_client.py. 0003 * Edit at your peril. 0004 */ 0005 0006 /** 0007 * @defgroup XCB_Shm_API XCB Shm API 0008 * @brief Shm XCB Protocol Implementation. 0009 * @{ 0010 **/ 0011 0012 #ifndef __SHM_H 0013 #define __SHM_H 0014 0015 #include "xcb.h" 0016 #include "xproto.h" 0017 0018 #ifdef __cplusplus 0019 extern "C" { 0020 #endif 0021 0022 #define XCB_SHM_MAJOR_VERSION 1 0023 #define XCB_SHM_MINOR_VERSION 2 0024 0025 extern xcb_extension_t xcb_shm_id; 0026 0027 typedef uint32_t xcb_shm_seg_t; 0028 0029 /** 0030 * @brief xcb_shm_seg_iterator_t 0031 **/ 0032 typedef struct xcb_shm_seg_iterator_t { 0033 xcb_shm_seg_t *data; 0034 int rem; 0035 int index; 0036 } xcb_shm_seg_iterator_t; 0037 0038 /** Opcode for xcb_shm_completion. */ 0039 #define XCB_SHM_COMPLETION 0 0040 0041 /** 0042 * @brief xcb_shm_completion_event_t 0043 **/ 0044 typedef struct xcb_shm_completion_event_t { 0045 uint8_t response_type; 0046 uint8_t pad0; 0047 uint16_t sequence; 0048 xcb_drawable_t drawable; 0049 uint16_t minor_event; 0050 uint8_t major_event; 0051 uint8_t pad1; 0052 xcb_shm_seg_t shmseg; 0053 uint32_t offset; 0054 } xcb_shm_completion_event_t; 0055 0056 /** Opcode for xcb_shm_bad_seg. */ 0057 #define XCB_SHM_BAD_SEG 0 0058 0059 typedef xcb_value_error_t xcb_shm_bad_seg_error_t; 0060 0061 /** 0062 * @brief xcb_shm_query_version_cookie_t 0063 **/ 0064 typedef struct xcb_shm_query_version_cookie_t { 0065 unsigned int sequence; 0066 } xcb_shm_query_version_cookie_t; 0067 0068 /** Opcode for xcb_shm_query_version. */ 0069 #define XCB_SHM_QUERY_VERSION 0 0070 0071 /** 0072 * @brief xcb_shm_query_version_request_t 0073 **/ 0074 typedef struct xcb_shm_query_version_request_t { 0075 uint8_t major_opcode; 0076 uint8_t minor_opcode; 0077 uint16_t length; 0078 } xcb_shm_query_version_request_t; 0079 0080 /** 0081 * @brief xcb_shm_query_version_reply_t 0082 **/ 0083 typedef struct xcb_shm_query_version_reply_t { 0084 uint8_t response_type; 0085 uint8_t shared_pixmaps; 0086 uint16_t sequence; 0087 uint32_t length; 0088 uint16_t major_version; 0089 uint16_t minor_version; 0090 uint16_t uid; 0091 uint16_t gid; 0092 uint8_t pixmap_format; 0093 uint8_t pad0[15]; 0094 } xcb_shm_query_version_reply_t; 0095 0096 /** Opcode for xcb_shm_attach. */ 0097 #define XCB_SHM_ATTACH 1 0098 0099 /** 0100 * @brief xcb_shm_attach_request_t 0101 **/ 0102 typedef struct xcb_shm_attach_request_t { 0103 uint8_t major_opcode; 0104 uint8_t minor_opcode; 0105 uint16_t length; 0106 xcb_shm_seg_t shmseg; 0107 uint32_t shmid; 0108 uint8_t read_only; 0109 uint8_t pad0[3]; 0110 } xcb_shm_attach_request_t; 0111 0112 /** Opcode for xcb_shm_detach. */ 0113 #define XCB_SHM_DETACH 2 0114 0115 /** 0116 * @brief xcb_shm_detach_request_t 0117 **/ 0118 typedef struct xcb_shm_detach_request_t { 0119 uint8_t major_opcode; 0120 uint8_t minor_opcode; 0121 uint16_t length; 0122 xcb_shm_seg_t shmseg; 0123 } xcb_shm_detach_request_t; 0124 0125 /** Opcode for xcb_shm_put_image. */ 0126 #define XCB_SHM_PUT_IMAGE 3 0127 0128 /** 0129 * @brief xcb_shm_put_image_request_t 0130 **/ 0131 typedef struct xcb_shm_put_image_request_t { 0132 uint8_t major_opcode; 0133 uint8_t minor_opcode; 0134 uint16_t length; 0135 xcb_drawable_t drawable; 0136 xcb_gcontext_t gc; 0137 uint16_t total_width; 0138 uint16_t total_height; 0139 uint16_t src_x; 0140 uint16_t src_y; 0141 uint16_t src_width; 0142 uint16_t src_height; 0143 int16_t dst_x; 0144 int16_t dst_y; 0145 uint8_t depth; 0146 uint8_t format; 0147 uint8_t send_event; 0148 uint8_t pad0; 0149 xcb_shm_seg_t shmseg; 0150 uint32_t offset; 0151 } xcb_shm_put_image_request_t; 0152 0153 /** 0154 * @brief xcb_shm_get_image_cookie_t 0155 **/ 0156 typedef struct xcb_shm_get_image_cookie_t { 0157 unsigned int sequence; 0158 } xcb_shm_get_image_cookie_t; 0159 0160 /** Opcode for xcb_shm_get_image. */ 0161 #define XCB_SHM_GET_IMAGE 4 0162 0163 /** 0164 * @brief xcb_shm_get_image_request_t 0165 **/ 0166 typedef struct xcb_shm_get_image_request_t { 0167 uint8_t major_opcode; 0168 uint8_t minor_opcode; 0169 uint16_t length; 0170 xcb_drawable_t drawable; 0171 int16_t x; 0172 int16_t y; 0173 uint16_t width; 0174 uint16_t height; 0175 uint32_t plane_mask; 0176 uint8_t format; 0177 uint8_t pad0[3]; 0178 xcb_shm_seg_t shmseg; 0179 uint32_t offset; 0180 } xcb_shm_get_image_request_t; 0181 0182 /** 0183 * @brief xcb_shm_get_image_reply_t 0184 **/ 0185 typedef struct xcb_shm_get_image_reply_t { 0186 uint8_t response_type; 0187 uint8_t depth; 0188 uint16_t sequence; 0189 uint32_t length; 0190 xcb_visualid_t visual; 0191 uint32_t size; 0192 } xcb_shm_get_image_reply_t; 0193 0194 /** Opcode for xcb_shm_create_pixmap. */ 0195 #define XCB_SHM_CREATE_PIXMAP 5 0196 0197 /** 0198 * @brief xcb_shm_create_pixmap_request_t 0199 **/ 0200 typedef struct xcb_shm_create_pixmap_request_t { 0201 uint8_t major_opcode; 0202 uint8_t minor_opcode; 0203 uint16_t length; 0204 xcb_pixmap_t pid; 0205 xcb_drawable_t drawable; 0206 uint16_t width; 0207 uint16_t height; 0208 uint8_t depth; 0209 uint8_t pad0[3]; 0210 xcb_shm_seg_t shmseg; 0211 uint32_t offset; 0212 } xcb_shm_create_pixmap_request_t; 0213 0214 /** Opcode for xcb_shm_attach_fd. */ 0215 #define XCB_SHM_ATTACH_FD 6 0216 0217 /** 0218 * @brief xcb_shm_attach_fd_request_t 0219 **/ 0220 typedef struct xcb_shm_attach_fd_request_t { 0221 uint8_t major_opcode; 0222 uint8_t minor_opcode; 0223 uint16_t length; 0224 xcb_shm_seg_t shmseg; 0225 uint8_t read_only; 0226 uint8_t pad0[3]; 0227 } xcb_shm_attach_fd_request_t; 0228 0229 /** 0230 * @brief xcb_shm_create_segment_cookie_t 0231 **/ 0232 typedef struct xcb_shm_create_segment_cookie_t { 0233 unsigned int sequence; 0234 } xcb_shm_create_segment_cookie_t; 0235 0236 /** Opcode for xcb_shm_create_segment. */ 0237 #define XCB_SHM_CREATE_SEGMENT 7 0238 0239 /** 0240 * @brief xcb_shm_create_segment_request_t 0241 **/ 0242 typedef struct xcb_shm_create_segment_request_t { 0243 uint8_t major_opcode; 0244 uint8_t minor_opcode; 0245 uint16_t length; 0246 xcb_shm_seg_t shmseg; 0247 uint32_t size; 0248 uint8_t read_only; 0249 uint8_t pad0[3]; 0250 } xcb_shm_create_segment_request_t; 0251 0252 /** 0253 * @brief xcb_shm_create_segment_reply_t 0254 **/ 0255 typedef struct xcb_shm_create_segment_reply_t { 0256 uint8_t response_type; 0257 uint8_t nfd; 0258 uint16_t sequence; 0259 uint32_t length; 0260 uint8_t pad0[24]; 0261 } xcb_shm_create_segment_reply_t; 0262 0263 /** 0264 * Get the next element of the iterator 0265 * @param i Pointer to a xcb_shm_seg_iterator_t 0266 * 0267 * Get the next element in the iterator. The member rem is 0268 * decreased by one. The member data points to the next 0269 * element. The member index is increased by sizeof(xcb_shm_seg_t) 0270 */ 0271 void 0272 xcb_shm_seg_next (xcb_shm_seg_iterator_t *i); 0273 0274 /** 0275 * Return the iterator pointing to the last element 0276 * @param i An xcb_shm_seg_iterator_t 0277 * @return The iterator pointing to the last element 0278 * 0279 * Set the current element in the iterator to the last element. 0280 * The member rem is set to 0. The member data points to the 0281 * last element. 0282 */ 0283 xcb_generic_iterator_t 0284 xcb_shm_seg_end (xcb_shm_seg_iterator_t i); 0285 0286 /** 0287 * @brief Query the version of the MIT-SHM extension. 0288 * 0289 * @param c The connection 0290 * @return A cookie 0291 * 0292 * This is used to determine the version of the MIT-SHM extension supported by the 0293 * X server. Clients MUST NOT make other requests in this extension until a reply 0294 * to this requests indicates the X server supports them. 0295 * 0296 */ 0297 xcb_shm_query_version_cookie_t 0298 xcb_shm_query_version (xcb_connection_t *c); 0299 0300 /** 0301 * @brief Query the version of the MIT-SHM extension. 0302 * 0303 * @param c The connection 0304 * @return A cookie 0305 * 0306 * This is used to determine the version of the MIT-SHM extension supported by the 0307 * X server. Clients MUST NOT make other requests in this extension until a reply 0308 * to this requests indicates the X server supports them. 0309 * 0310 * This form can be used only if the request will cause 0311 * a reply to be generated. Any returned error will be 0312 * placed in the event queue. 0313 */ 0314 xcb_shm_query_version_cookie_t 0315 xcb_shm_query_version_unchecked (xcb_connection_t *c); 0316 0317 /** 0318 * Return the reply 0319 * @param c The connection 0320 * @param cookie The cookie 0321 * @param e The xcb_generic_error_t supplied 0322 * 0323 * Returns the reply of the request asked by 0324 * 0325 * The parameter @p e supplied to this function must be NULL if 0326 * xcb_shm_query_version_unchecked(). is used. 0327 * Otherwise, it stores the error if any. 0328 * 0329 * The returned value must be freed by the caller using free(). 0330 */ 0331 xcb_shm_query_version_reply_t * 0332 xcb_shm_query_version_reply (xcb_connection_t *c, 0333 xcb_shm_query_version_cookie_t cookie /**< */, 0334 xcb_generic_error_t **e); 0335 0336 /** 0337 * @brief Attach a System V shared memory segment. 0338 * 0339 * @param c The connection 0340 * @param shmseg A shared memory segment ID created with xcb_generate_id(). 0341 * @param shmid The System V shared memory segment the server should map. 0342 * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. 0343 * @return A cookie 0344 * 0345 * Attach a System V shared memory segment to the server. This will fail unless 0346 * the server has permission to map the segment. The client may destroy the segment 0347 * as soon as it receives a XCB_SHM_COMPLETION event with the shmseg value in this 0348 * request and with the appropriate serial number. 0349 * 0350 * This form can be used only if the request will not cause 0351 * a reply to be generated. Any returned error will be 0352 * saved for handling by xcb_request_check(). 0353 */ 0354 xcb_void_cookie_t 0355 xcb_shm_attach_checked (xcb_connection_t *c, 0356 xcb_shm_seg_t shmseg, 0357 uint32_t shmid, 0358 uint8_t read_only); 0359 0360 /** 0361 * @brief Attach a System V shared memory segment. 0362 * 0363 * @param c The connection 0364 * @param shmseg A shared memory segment ID created with xcb_generate_id(). 0365 * @param shmid The System V shared memory segment the server should map. 0366 * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. 0367 * @return A cookie 0368 * 0369 * Attach a System V shared memory segment to the server. This will fail unless 0370 * the server has permission to map the segment. The client may destroy the segment 0371 * as soon as it receives a XCB_SHM_COMPLETION event with the shmseg value in this 0372 * request and with the appropriate serial number. 0373 * 0374 */ 0375 xcb_void_cookie_t 0376 xcb_shm_attach (xcb_connection_t *c, 0377 xcb_shm_seg_t shmseg, 0378 uint32_t shmid, 0379 uint8_t read_only); 0380 0381 /** 0382 * @brief Destroys the specified shared memory segment. 0383 * 0384 * @param c The connection 0385 * @param shmseg The segment to be destroyed. 0386 * @return A cookie 0387 * 0388 * Destroys the specified shared memory segment. This will never fail unless the 0389 * segment number is incorrect. 0390 * 0391 * This form can be used only if the request will not cause 0392 * a reply to be generated. Any returned error will be 0393 * saved for handling by xcb_request_check(). 0394 */ 0395 xcb_void_cookie_t 0396 xcb_shm_detach_checked (xcb_connection_t *c, 0397 xcb_shm_seg_t shmseg); 0398 0399 /** 0400 * @brief Destroys the specified shared memory segment. 0401 * 0402 * @param c The connection 0403 * @param shmseg The segment to be destroyed. 0404 * @return A cookie 0405 * 0406 * Destroys the specified shared memory segment. This will never fail unless the 0407 * segment number is incorrect. 0408 * 0409 */ 0410 xcb_void_cookie_t 0411 xcb_shm_detach (xcb_connection_t *c, 0412 xcb_shm_seg_t shmseg); 0413 0414 /** 0415 * @brief Copy data from the shared memory to the specified drawable. 0416 * 0417 * @param c The connection 0418 * @param drawable The drawable to draw to. 0419 * @param gc The graphics context to use. 0420 * @param total_width The total width of the source image. 0421 * @param total_height The total height of the source image. 0422 * @param src_x The source X coordinate of the sub-image to copy. 0423 * @param src_y The source Y coordinate of the sub-image to copy. 0424 * @param src_width The width, in source image coordinates, of the data to copy from the source. 0425 * The X server will use this to determine the amount of data to copy. The amount 0426 * of the destination image that is overwritten is determined automatically. 0427 * @param src_height The height, in source image coordinates, of the data to copy from the source. 0428 * The X server will use this to determine the amount of data to copy. The amount 0429 * of the destination image that is overwritten is determined automatically. 0430 * @param dst_x The X coordinate on the destination drawable to copy to. 0431 * @param dst_y The Y coordinate on the destination drawable to copy to. 0432 * @param depth The depth to use. 0433 * @param format The format of the image being drawn. If it is XYBitmap, depth must be 1, or a 0434 * "BadMatch" error results. The foreground pixel in the GC determines the source 0435 * for the one bits in the image, and the background pixel determines the source 0436 * for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of 0437 * the drawable, or a "BadMatch" error results. 0438 * @param send_event True if the server should send an XCB_SHM_COMPLETION event when the blit 0439 * completes. 0440 * @param offset The offset that the source image starts at. 0441 * @return A cookie 0442 * 0443 * Copy data from the shared memory to the specified drawable. The amount of bytes 0444 * written to the destination image is always equal to the number of bytes read 0445 * from the shared memory segment. 0446 * 0447 * This form can be used only if the request will not cause 0448 * a reply to be generated. Any returned error will be 0449 * saved for handling by xcb_request_check(). 0450 */ 0451 xcb_void_cookie_t 0452 xcb_shm_put_image_checked (xcb_connection_t *c, 0453 xcb_drawable_t drawable, 0454 xcb_gcontext_t gc, 0455 uint16_t total_width, 0456 uint16_t total_height, 0457 uint16_t src_x, 0458 uint16_t src_y, 0459 uint16_t src_width, 0460 uint16_t src_height, 0461 int16_t dst_x, 0462 int16_t dst_y, 0463 uint8_t depth, 0464 uint8_t format, 0465 uint8_t send_event, 0466 xcb_shm_seg_t shmseg, 0467 uint32_t offset); 0468 0469 /** 0470 * @brief Copy data from the shared memory to the specified drawable. 0471 * 0472 * @param c The connection 0473 * @param drawable The drawable to draw to. 0474 * @param gc The graphics context to use. 0475 * @param total_width The total width of the source image. 0476 * @param total_height The total height of the source image. 0477 * @param src_x The source X coordinate of the sub-image to copy. 0478 * @param src_y The source Y coordinate of the sub-image to copy. 0479 * @param src_width The width, in source image coordinates, of the data to copy from the source. 0480 * The X server will use this to determine the amount of data to copy. The amount 0481 * of the destination image that is overwritten is determined automatically. 0482 * @param src_height The height, in source image coordinates, of the data to copy from the source. 0483 * The X server will use this to determine the amount of data to copy. The amount 0484 * of the destination image that is overwritten is determined automatically. 0485 * @param dst_x The X coordinate on the destination drawable to copy to. 0486 * @param dst_y The Y coordinate on the destination drawable to copy to. 0487 * @param depth The depth to use. 0488 * @param format The format of the image being drawn. If it is XYBitmap, depth must be 1, or a 0489 * "BadMatch" error results. The foreground pixel in the GC determines the source 0490 * for the one bits in the image, and the background pixel determines the source 0491 * for the zero bits. For XYPixmap and ZPixmap, the depth must match the depth of 0492 * the drawable, or a "BadMatch" error results. 0493 * @param send_event True if the server should send an XCB_SHM_COMPLETION event when the blit 0494 * completes. 0495 * @param offset The offset that the source image starts at. 0496 * @return A cookie 0497 * 0498 * Copy data from the shared memory to the specified drawable. The amount of bytes 0499 * written to the destination image is always equal to the number of bytes read 0500 * from the shared memory segment. 0501 * 0502 */ 0503 xcb_void_cookie_t 0504 xcb_shm_put_image (xcb_connection_t *c, 0505 xcb_drawable_t drawable, 0506 xcb_gcontext_t gc, 0507 uint16_t total_width, 0508 uint16_t total_height, 0509 uint16_t src_x, 0510 uint16_t src_y, 0511 uint16_t src_width, 0512 uint16_t src_height, 0513 int16_t dst_x, 0514 int16_t dst_y, 0515 uint8_t depth, 0516 uint8_t format, 0517 uint8_t send_event, 0518 xcb_shm_seg_t shmseg, 0519 uint32_t offset); 0520 0521 /** 0522 * @brief Copies data from the specified drawable to the shared memory segment. 0523 * 0524 * @param c The connection 0525 * @param drawable The drawable to copy the image out of. 0526 * @param x The X coordinate in the drawable to begin copying at. 0527 * @param y The Y coordinate in the drawable to begin copying at. 0528 * @param width The width of the image to copy. 0529 * @param height The height of the image to copy. 0530 * @param plane_mask A mask that determines which planes are used. 0531 * @param format The format to use for the copy (???). 0532 * @param shmseg The destination shared memory segment. 0533 * @param offset The offset in the shared memory segment to copy data to. 0534 * @return A cookie 0535 * 0536 * Copy data from the specified drawable to the shared memory segment. The amount 0537 * of bytes written to the destination image is always equal to the number of bytes 0538 * read from the shared memory segment. 0539 * 0540 */ 0541 xcb_shm_get_image_cookie_t 0542 xcb_shm_get_image (xcb_connection_t *c, 0543 xcb_drawable_t drawable, 0544 int16_t x, 0545 int16_t y, 0546 uint16_t width, 0547 uint16_t height, 0548 uint32_t plane_mask, 0549 uint8_t format, 0550 xcb_shm_seg_t shmseg, 0551 uint32_t offset); 0552 0553 /** 0554 * @brief Copies data from the specified drawable to the shared memory segment. 0555 * 0556 * @param c The connection 0557 * @param drawable The drawable to copy the image out of. 0558 * @param x The X coordinate in the drawable to begin copying at. 0559 * @param y The Y coordinate in the drawable to begin copying at. 0560 * @param width The width of the image to copy. 0561 * @param height The height of the image to copy. 0562 * @param plane_mask A mask that determines which planes are used. 0563 * @param format The format to use for the copy (???). 0564 * @param shmseg The destination shared memory segment. 0565 * @param offset The offset in the shared memory segment to copy data to. 0566 * @return A cookie 0567 * 0568 * Copy data from the specified drawable to the shared memory segment. The amount 0569 * of bytes written to the destination image is always equal to the number of bytes 0570 * read from the shared memory segment. 0571 * 0572 * This form can be used only if the request will cause 0573 * a reply to be generated. Any returned error will be 0574 * placed in the event queue. 0575 */ 0576 xcb_shm_get_image_cookie_t 0577 xcb_shm_get_image_unchecked (xcb_connection_t *c, 0578 xcb_drawable_t drawable, 0579 int16_t x, 0580 int16_t y, 0581 uint16_t width, 0582 uint16_t height, 0583 uint32_t plane_mask, 0584 uint8_t format, 0585 xcb_shm_seg_t shmseg, 0586 uint32_t offset); 0587 0588 /** 0589 * Return the reply 0590 * @param c The connection 0591 * @param cookie The cookie 0592 * @param e The xcb_generic_error_t supplied 0593 * 0594 * Returns the reply of the request asked by 0595 * 0596 * The parameter @p e supplied to this function must be NULL if 0597 * xcb_shm_get_image_unchecked(). is used. 0598 * Otherwise, it stores the error if any. 0599 * 0600 * The returned value must be freed by the caller using free(). 0601 */ 0602 xcb_shm_get_image_reply_t * 0603 xcb_shm_get_image_reply (xcb_connection_t *c, 0604 xcb_shm_get_image_cookie_t cookie /**< */, 0605 xcb_generic_error_t **e); 0606 0607 /** 0608 * @brief Create a pixmap backed by shared memory. 0609 * 0610 * @param c The connection 0611 * @param pid A pixmap ID created with xcb_generate_id(). 0612 * @param drawable The drawable to create the pixmap in. 0613 * @param width The width of the pixmap to create. Must be nonzero, or a Value error results. 0614 * @param height The height of the pixmap to create. Must be nonzero, or a Value error results. 0615 * @param depth The depth of the pixmap to create. Must be nonzero, or a Value error results. 0616 * @param shmseg The shared memory segment to use to create the pixmap. 0617 * @param offset The offset in the segment to create the pixmap at. 0618 * @return A cookie 0619 * 0620 * Create a pixmap backed by shared memory. Writes to the shared memory will be 0621 * reflected in the contents of the pixmap, and writes to the pixmap will be 0622 * reflected in the contents of the shared memory. 0623 * 0624 * This form can be used only if the request will not cause 0625 * a reply to be generated. Any returned error will be 0626 * saved for handling by xcb_request_check(). 0627 */ 0628 xcb_void_cookie_t 0629 xcb_shm_create_pixmap_checked (xcb_connection_t *c, 0630 xcb_pixmap_t pid, 0631 xcb_drawable_t drawable, 0632 uint16_t width, 0633 uint16_t height, 0634 uint8_t depth, 0635 xcb_shm_seg_t shmseg, 0636 uint32_t offset); 0637 0638 /** 0639 * @brief Create a pixmap backed by shared memory. 0640 * 0641 * @param c The connection 0642 * @param pid A pixmap ID created with xcb_generate_id(). 0643 * @param drawable The drawable to create the pixmap in. 0644 * @param width The width of the pixmap to create. Must be nonzero, or a Value error results. 0645 * @param height The height of the pixmap to create. Must be nonzero, or a Value error results. 0646 * @param depth The depth of the pixmap to create. Must be nonzero, or a Value error results. 0647 * @param shmseg The shared memory segment to use to create the pixmap. 0648 * @param offset The offset in the segment to create the pixmap at. 0649 * @return A cookie 0650 * 0651 * Create a pixmap backed by shared memory. Writes to the shared memory will be 0652 * reflected in the contents of the pixmap, and writes to the pixmap will be 0653 * reflected in the contents of the shared memory. 0654 * 0655 */ 0656 xcb_void_cookie_t 0657 xcb_shm_create_pixmap (xcb_connection_t *c, 0658 xcb_pixmap_t pid, 0659 xcb_drawable_t drawable, 0660 uint16_t width, 0661 uint16_t height, 0662 uint8_t depth, 0663 xcb_shm_seg_t shmseg, 0664 uint32_t offset); 0665 0666 /** 0667 * @brief Create a shared memory segment 0668 * 0669 * @param c The connection 0670 * @param shmseg A shared memory segment ID created with xcb_generate_id(). 0671 * @param shm_fd The file descriptor the server should mmap(). 0672 * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. 0673 * @return A cookie 0674 * 0675 * Create a shared memory segment. The file descriptor will be mapped at offset 0676 * zero, and the size will be obtained using fstat(). A zero size will result in a 0677 * Value error. 0678 * 0679 * This form can be used only if the request will not cause 0680 * a reply to be generated. Any returned error will be 0681 * saved for handling by xcb_request_check(). 0682 */ 0683 xcb_void_cookie_t 0684 xcb_shm_attach_fd_checked (xcb_connection_t *c, 0685 xcb_shm_seg_t shmseg, 0686 int32_t shm_fd, 0687 uint8_t read_only); 0688 0689 /** 0690 * @brief Create a shared memory segment 0691 * 0692 * @param c The connection 0693 * @param shmseg A shared memory segment ID created with xcb_generate_id(). 0694 * @param shm_fd The file descriptor the server should mmap(). 0695 * @param read_only True if the segment shall be mapped read only by the X11 server, otherwise false. 0696 * @return A cookie 0697 * 0698 * Create a shared memory segment. The file descriptor will be mapped at offset 0699 * zero, and the size will be obtained using fstat(). A zero size will result in a 0700 * Value error. 0701 * 0702 */ 0703 xcb_void_cookie_t 0704 xcb_shm_attach_fd (xcb_connection_t *c, 0705 xcb_shm_seg_t shmseg, 0706 int32_t shm_fd, 0707 uint8_t read_only); 0708 0709 /** 0710 * @brief Asks the server to allocate a shared memory segment. 0711 * 0712 * @param c The connection 0713 * @param shmseg A shared memory segment ID created with xcb_generate_id(). 0714 * @param size The size of the segment to create. 0715 * @param read_only True if the server should map the segment read-only; otherwise false. 0716 * @return A cookie 0717 * 0718 * Asks the server to allocate a shared memory segment. The server’s reply will 0719 * include a file descriptor for the client to pass to mmap(). 0720 * 0721 */ 0722 xcb_shm_create_segment_cookie_t 0723 xcb_shm_create_segment (xcb_connection_t *c, 0724 xcb_shm_seg_t shmseg, 0725 uint32_t size, 0726 uint8_t read_only); 0727 0728 /** 0729 * @brief Asks the server to allocate a shared memory segment. 0730 * 0731 * @param c The connection 0732 * @param shmseg A shared memory segment ID created with xcb_generate_id(). 0733 * @param size The size of the segment to create. 0734 * @param read_only True if the server should map the segment read-only; otherwise false. 0735 * @return A cookie 0736 * 0737 * Asks the server to allocate a shared memory segment. The server’s reply will 0738 * include a file descriptor for the client to pass to mmap(). 0739 * 0740 * This form can be used only if the request will cause 0741 * a reply to be generated. Any returned error will be 0742 * placed in the event queue. 0743 */ 0744 xcb_shm_create_segment_cookie_t 0745 xcb_shm_create_segment_unchecked (xcb_connection_t *c, 0746 xcb_shm_seg_t shmseg, 0747 uint32_t size, 0748 uint8_t read_only); 0749 0750 /** 0751 * Return the reply 0752 * @param c The connection 0753 * @param cookie The cookie 0754 * @param e The xcb_generic_error_t supplied 0755 * 0756 * Returns the reply of the request asked by 0757 * 0758 * The parameter @p e supplied to this function must be NULL if 0759 * xcb_shm_create_segment_unchecked(). is used. 0760 * Otherwise, it stores the error if any. 0761 * 0762 * The returned value must be freed by the caller using free(). 0763 */ 0764 xcb_shm_create_segment_reply_t * 0765 xcb_shm_create_segment_reply (xcb_connection_t *c, 0766 xcb_shm_create_segment_cookie_t cookie /**< */, 0767 xcb_generic_error_t **e); 0768 0769 /** 0770 * Return the reply fds 0771 * @param c The connection 0772 * @param reply The reply 0773 * 0774 * Returns a pointer to the array of reply fds of the reply. 0775 * 0776 * The returned value points into the reply and must not be free(). 0777 * The fds are not managed by xcb. You must close() them before freeing the reply. 0778 */ 0779 int * 0780 xcb_shm_create_segment_reply_fds (xcb_connection_t *c /**< */, 0781 xcb_shm_create_segment_reply_t *reply); 0782 0783 0784 #ifdef __cplusplus 0785 } 0786 #endif 0787 0788 #endif 0789 0790 /** 0791 * @} 0792 */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |