XCB  1.9.3
shm.h
00001 /*
00002  * This file generated automatically from shm.xml by c_client.py.
00003  * Edit at your peril.
00004  */
00005 
00012 #ifndef __SHM_H
00013 #define __SHM_H
00014 
00015 #include "xcb.h"
00016 #include "xproto.h"
00017 
00018 #ifdef __cplusplus
00019 extern "C" {
00020 #endif
00021 
00022 #define XCB_SHM_MAJOR_VERSION 1
00023 #define XCB_SHM_MINOR_VERSION 2
00024   
00025 extern xcb_extension_t xcb_shm_id;
00026 
00027 typedef uint32_t xcb_shm_seg_t;
00028 
00032 typedef struct xcb_shm_seg_iterator_t {
00033     xcb_shm_seg_t *data; 
00034     int            rem; 
00035     int            index; 
00036 } xcb_shm_seg_iterator_t;
00037 
00039 #define XCB_SHM_COMPLETION 0
00040 
00044 typedef struct xcb_shm_completion_event_t {
00045     uint8_t        response_type; 
00046     uint8_t        pad0; 
00047     uint16_t       sequence; 
00048     xcb_drawable_t drawable; 
00049     uint16_t       minor_event; 
00050     uint8_t        major_event; 
00051     uint8_t        pad1; 
00052     xcb_shm_seg_t  shmseg; 
00053     uint32_t       offset; 
00054 } xcb_shm_completion_event_t;
00055 
00057 #define XCB_SHM_BAD_SEG 0
00058 
00059 typedef xcb_value_error_t xcb_shm_bad_seg_error_t;
00060 
00064 typedef struct xcb_shm_query_version_cookie_t {
00065     unsigned int sequence; 
00066 } xcb_shm_query_version_cookie_t;
00067 
00069 #define XCB_SHM_QUERY_VERSION 0
00070 
00074 typedef struct xcb_shm_query_version_request_t {
00075     uint8_t  major_opcode; 
00076     uint8_t  minor_opcode; 
00077     uint16_t length; 
00078 } xcb_shm_query_version_request_t;
00079 
00083 typedef struct xcb_shm_query_version_reply_t {
00084     uint8_t  response_type; 
00085     uint8_t  shared_pixmaps; 
00086     uint16_t sequence; 
00087     uint32_t length; 
00088     uint16_t major_version; 
00089     uint16_t minor_version; 
00090     uint16_t uid; 
00091     uint16_t gid; 
00092     uint8_t  pixmap_format; 
00093     uint8_t  pad0[15]; 
00094 } xcb_shm_query_version_reply_t;
00095 
00097 #define XCB_SHM_ATTACH 1
00098 
00102 typedef struct xcb_shm_attach_request_t {
00103     uint8_t       major_opcode; 
00104     uint8_t       minor_opcode; 
00105     uint16_t      length; 
00106     xcb_shm_seg_t shmseg; 
00107     uint32_t      shmid; 
00108     uint8_t       read_only; 
00109     uint8_t       pad0[3]; 
00110 } xcb_shm_attach_request_t;
00111 
00113 #define XCB_SHM_DETACH 2
00114 
00118 typedef struct xcb_shm_detach_request_t {
00119     uint8_t       major_opcode; 
00120     uint8_t       minor_opcode; 
00121     uint16_t      length; 
00122     xcb_shm_seg_t shmseg; 
00123 } xcb_shm_detach_request_t;
00124 
00126 #define XCB_SHM_PUT_IMAGE 3
00127 
00131 typedef struct xcb_shm_put_image_request_t {
00132     uint8_t        major_opcode; 
00133     uint8_t        minor_opcode; 
00134     uint16_t       length; 
00135     xcb_drawable_t drawable; 
00136     xcb_gcontext_t gc; 
00137     uint16_t       total_width; 
00138     uint16_t       total_height; 
00139     uint16_t       src_x; 
00140     uint16_t       src_y; 
00141     uint16_t       src_width; 
00142     uint16_t       src_height; 
00143     int16_t        dst_x; 
00144     int16_t        dst_y; 
00145     uint8_t        depth; 
00146     uint8_t        format; 
00147     uint8_t        send_event; 
00148     uint8_t        pad0; 
00149     xcb_shm_seg_t  shmseg; 
00150     uint32_t       offset; 
00151 } xcb_shm_put_image_request_t;
00152 
00156 typedef struct xcb_shm_get_image_cookie_t {
00157     unsigned int sequence; 
00158 } xcb_shm_get_image_cookie_t;
00159 
00161 #define XCB_SHM_GET_IMAGE 4
00162 
00166 typedef struct xcb_shm_get_image_request_t {
00167     uint8_t        major_opcode; 
00168     uint8_t        minor_opcode; 
00169     uint16_t       length; 
00170     xcb_drawable_t drawable; 
00171     int16_t        x; 
00172     int16_t        y; 
00173     uint16_t       width; 
00174     uint16_t       height; 
00175     uint32_t       plane_mask; 
00176     uint8_t        format; 
00177     uint8_t        pad0[3]; 
00178     xcb_shm_seg_t  shmseg; 
00179     uint32_t       offset; 
00180 } xcb_shm_get_image_request_t;
00181 
00185 typedef struct xcb_shm_get_image_reply_t {
00186     uint8_t        response_type; 
00187     uint8_t        depth; 
00188     uint16_t       sequence; 
00189     uint32_t       length; 
00190     xcb_visualid_t visual; 
00191     uint32_t       size; 
00192 } xcb_shm_get_image_reply_t;
00193 
00195 #define XCB_SHM_CREATE_PIXMAP 5
00196 
00200 typedef struct xcb_shm_create_pixmap_request_t {
00201     uint8_t        major_opcode; 
00202     uint8_t        minor_opcode; 
00203     uint16_t       length; 
00204     xcb_pixmap_t   pid; 
00205     xcb_drawable_t drawable; 
00206     uint16_t       width; 
00207     uint16_t       height; 
00208     uint8_t        depth; 
00209     uint8_t        pad0[3]; 
00210     xcb_shm_seg_t  shmseg; 
00211     uint32_t       offset; 
00212 } xcb_shm_create_pixmap_request_t;
00213 
00215 #define XCB_SHM_ATTACH_FD 6
00216 
00220 typedef struct xcb_shm_attach_fd_request_t {
00221     uint8_t       major_opcode; 
00222     uint8_t       minor_opcode; 
00223     uint16_t      length; 
00224     xcb_shm_seg_t shmseg; 
00225     uint8_t       read_only; 
00226     uint8_t       pad0[3]; 
00227 } xcb_shm_attach_fd_request_t;
00228 
00232 typedef struct xcb_shm_create_segment_cookie_t {
00233     unsigned int sequence; 
00234 } xcb_shm_create_segment_cookie_t;
00235 
00237 #define XCB_SHM_CREATE_SEGMENT 7
00238 
00242 typedef struct xcb_shm_create_segment_request_t {
00243     uint8_t       major_opcode; 
00244     uint8_t       minor_opcode; 
00245     uint16_t      length; 
00246     xcb_shm_seg_t shmseg; 
00247     uint32_t      size; 
00248     uint8_t       read_only; 
00249     uint8_t       pad0[3]; 
00250 } xcb_shm_create_segment_request_t;
00251 
00255 typedef struct xcb_shm_create_segment_reply_t {
00256     uint8_t  response_type; 
00257     uint8_t  nfd; 
00258     uint16_t sequence; 
00259     uint32_t length; 
00260     uint8_t  pad0[24]; 
00261 } xcb_shm_create_segment_reply_t;
00262 
00272 /*****************************************************************************
00273  **
00274  ** void xcb_shm_seg_next
00275  ** 
00276  ** @param xcb_shm_seg_iterator_t *i
00277  ** @returns void
00278  **
00279  *****************************************************************************/
00280  
00281 void
00282 xcb_shm_seg_next (xcb_shm_seg_iterator_t *i  );
00283 
00294 /*****************************************************************************
00295  **
00296  ** xcb_generic_iterator_t xcb_shm_seg_end
00297  ** 
00298  ** @param xcb_shm_seg_iterator_t i
00299  ** @returns xcb_generic_iterator_t
00300  **
00301  *****************************************************************************/
00302  
00303 xcb_generic_iterator_t
00304 xcb_shm_seg_end (xcb_shm_seg_iterator_t i  );
00305 
00315 /*****************************************************************************
00316  **
00317  ** xcb_shm_query_version_cookie_t xcb_shm_query_version
00318  ** 
00319  ** @param xcb_connection_t *c
00320  ** @returns xcb_shm_query_version_cookie_t
00321  **
00322  *****************************************************************************/
00323  
00324 xcb_shm_query_version_cookie_t
00325 xcb_shm_query_version (xcb_connection_t *c  );
00326 
00339 /*****************************************************************************
00340  **
00341  ** xcb_shm_query_version_cookie_t xcb_shm_query_version_unchecked
00342  ** 
00343  ** @param xcb_connection_t *c
00344  ** @returns xcb_shm_query_version_cookie_t
00345  **
00346  *****************************************************************************/
00347  
00348 xcb_shm_query_version_cookie_t
00349 xcb_shm_query_version_unchecked (xcb_connection_t *c  );
00350 
00366 /*****************************************************************************
00367  **
00368  ** xcb_shm_query_version_reply_t * xcb_shm_query_version_reply
00369  ** 
00370  ** @param xcb_connection_t                *c
00371  ** @param xcb_shm_query_version_cookie_t   cookie
00372  ** @param xcb_generic_error_t            **e
00373  ** @returns xcb_shm_query_version_reply_t *
00374  **
00375  *****************************************************************************/
00376  
00377 xcb_shm_query_version_reply_t *
00378 xcb_shm_query_version_reply (xcb_connection_t                *c  ,
00379                              xcb_shm_query_version_cookie_t   cookie  ,
00380                              xcb_generic_error_t            **e  );
00381 
00394 /*****************************************************************************
00395  **
00396  ** xcb_void_cookie_t xcb_shm_attach_checked
00397  ** 
00398  ** @param xcb_connection_t *c
00399  ** @param xcb_shm_seg_t     shmseg
00400  ** @param uint32_t          shmid
00401  ** @param uint8_t           read_only
00402  ** @returns xcb_void_cookie_t
00403  **
00404  *****************************************************************************/
00405  
00406 xcb_void_cookie_t
00407 xcb_shm_attach_checked (xcb_connection_t *c  ,
00408                         xcb_shm_seg_t     shmseg  ,
00409                         uint32_t          shmid  ,
00410                         uint8_t           read_only  );
00411 
00421 /*****************************************************************************
00422  **
00423  ** xcb_void_cookie_t xcb_shm_attach
00424  ** 
00425  ** @param xcb_connection_t *c
00426  ** @param xcb_shm_seg_t     shmseg
00427  ** @param uint32_t          shmid
00428  ** @param uint8_t           read_only
00429  ** @returns xcb_void_cookie_t
00430  **
00431  *****************************************************************************/
00432  
00433 xcb_void_cookie_t
00434 xcb_shm_attach (xcb_connection_t *c  ,
00435                 xcb_shm_seg_t     shmseg  ,
00436                 uint32_t          shmid  ,
00437                 uint8_t           read_only  );
00438 
00451 /*****************************************************************************
00452  **
00453  ** xcb_void_cookie_t xcb_shm_detach_checked
00454  ** 
00455  ** @param xcb_connection_t *c
00456  ** @param xcb_shm_seg_t     shmseg
00457  ** @returns xcb_void_cookie_t
00458  **
00459  *****************************************************************************/
00460  
00461 xcb_void_cookie_t
00462 xcb_shm_detach_checked (xcb_connection_t *c  ,
00463                         xcb_shm_seg_t     shmseg  );
00464 
00474 /*****************************************************************************
00475  **
00476  ** xcb_void_cookie_t xcb_shm_detach
00477  ** 
00478  ** @param xcb_connection_t *c
00479  ** @param xcb_shm_seg_t     shmseg
00480  ** @returns xcb_void_cookie_t
00481  **
00482  *****************************************************************************/
00483  
00484 xcb_void_cookie_t
00485 xcb_shm_detach (xcb_connection_t *c  ,
00486                 xcb_shm_seg_t     shmseg  );
00487 
00500 /*****************************************************************************
00501  **
00502  ** xcb_void_cookie_t xcb_shm_put_image_checked
00503  ** 
00504  ** @param xcb_connection_t *c
00505  ** @param xcb_drawable_t    drawable
00506  ** @param xcb_gcontext_t    gc
00507  ** @param uint16_t          total_width
00508  ** @param uint16_t          total_height
00509  ** @param uint16_t          src_x
00510  ** @param uint16_t          src_y
00511  ** @param uint16_t          src_width
00512  ** @param uint16_t          src_height
00513  ** @param int16_t           dst_x
00514  ** @param int16_t           dst_y
00515  ** @param uint8_t           depth
00516  ** @param uint8_t           format
00517  ** @param uint8_t           send_event
00518  ** @param xcb_shm_seg_t     shmseg
00519  ** @param uint32_t          offset
00520  ** @returns xcb_void_cookie_t
00521  **
00522  *****************************************************************************/
00523  
00524 xcb_void_cookie_t
00525 xcb_shm_put_image_checked (xcb_connection_t *c  ,
00526                            xcb_drawable_t    drawable  ,
00527                            xcb_gcontext_t    gc  ,
00528                            uint16_t          total_width  ,
00529                            uint16_t          total_height  ,
00530                            uint16_t          src_x  ,
00531                            uint16_t          src_y  ,
00532                            uint16_t          src_width  ,
00533                            uint16_t          src_height  ,
00534                            int16_t           dst_x  ,
00535                            int16_t           dst_y  ,
00536                            uint8_t           depth  ,
00537                            uint8_t           format  ,
00538                            uint8_t           send_event  ,
00539                            xcb_shm_seg_t     shmseg  ,
00540                            uint32_t          offset  );
00541 
00551 /*****************************************************************************
00552  **
00553  ** xcb_void_cookie_t xcb_shm_put_image
00554  ** 
00555  ** @param xcb_connection_t *c
00556  ** @param xcb_drawable_t    drawable
00557  ** @param xcb_gcontext_t    gc
00558  ** @param uint16_t          total_width
00559  ** @param uint16_t          total_height
00560  ** @param uint16_t          src_x
00561  ** @param uint16_t          src_y
00562  ** @param uint16_t          src_width
00563  ** @param uint16_t          src_height
00564  ** @param int16_t           dst_x
00565  ** @param int16_t           dst_y
00566  ** @param uint8_t           depth
00567  ** @param uint8_t           format
00568  ** @param uint8_t           send_event
00569  ** @param xcb_shm_seg_t     shmseg
00570  ** @param uint32_t          offset
00571  ** @returns xcb_void_cookie_t
00572  **
00573  *****************************************************************************/
00574  
00575 xcb_void_cookie_t
00576 xcb_shm_put_image (xcb_connection_t *c  ,
00577                    xcb_drawable_t    drawable  ,
00578                    xcb_gcontext_t    gc  ,
00579                    uint16_t          total_width  ,
00580                    uint16_t          total_height  ,
00581                    uint16_t          src_x  ,
00582                    uint16_t          src_y  ,
00583                    uint16_t          src_width  ,
00584                    uint16_t          src_height  ,
00585                    int16_t           dst_x  ,
00586                    int16_t           dst_y  ,
00587                    uint8_t           depth  ,
00588                    uint8_t           format  ,
00589                    uint8_t           send_event  ,
00590                    xcb_shm_seg_t     shmseg  ,
00591                    uint32_t          offset  );
00592 
00602 /*****************************************************************************
00603  **
00604  ** xcb_shm_get_image_cookie_t xcb_shm_get_image
00605  ** 
00606  ** @param xcb_connection_t *c
00607  ** @param xcb_drawable_t    drawable
00608  ** @param int16_t           x
00609  ** @param int16_t           y
00610  ** @param uint16_t          width
00611  ** @param uint16_t          height
00612  ** @param uint32_t          plane_mask
00613  ** @param uint8_t           format
00614  ** @param xcb_shm_seg_t     shmseg
00615  ** @param uint32_t          offset
00616  ** @returns xcb_shm_get_image_cookie_t
00617  **
00618  *****************************************************************************/
00619  
00620 xcb_shm_get_image_cookie_t
00621 xcb_shm_get_image (xcb_connection_t *c  ,
00622                    xcb_drawable_t    drawable  ,
00623                    int16_t           x  ,
00624                    int16_t           y  ,
00625                    uint16_t          width  ,
00626                    uint16_t          height  ,
00627                    uint32_t          plane_mask  ,
00628                    uint8_t           format  ,
00629                    xcb_shm_seg_t     shmseg  ,
00630                    uint32_t          offset  );
00631 
00644 /*****************************************************************************
00645  **
00646  ** xcb_shm_get_image_cookie_t xcb_shm_get_image_unchecked
00647  ** 
00648  ** @param xcb_connection_t *c
00649  ** @param xcb_drawable_t    drawable
00650  ** @param int16_t           x
00651  ** @param int16_t           y
00652  ** @param uint16_t          width
00653  ** @param uint16_t          height
00654  ** @param uint32_t          plane_mask
00655  ** @param uint8_t           format
00656  ** @param xcb_shm_seg_t     shmseg
00657  ** @param uint32_t          offset
00658  ** @returns xcb_shm_get_image_cookie_t
00659  **
00660  *****************************************************************************/
00661  
00662 xcb_shm_get_image_cookie_t
00663 xcb_shm_get_image_unchecked (xcb_connection_t *c  ,
00664                              xcb_drawable_t    drawable  ,
00665                              int16_t           x  ,
00666                              int16_t           y  ,
00667                              uint16_t          width  ,
00668                              uint16_t          height  ,
00669                              uint32_t          plane_mask  ,
00670                              uint8_t           format  ,
00671                              xcb_shm_seg_t     shmseg  ,
00672                              uint32_t          offset  );
00673 
00689 /*****************************************************************************
00690  **
00691  ** xcb_shm_get_image_reply_t * xcb_shm_get_image_reply
00692  ** 
00693  ** @param xcb_connection_t            *c
00694  ** @param xcb_shm_get_image_cookie_t   cookie
00695  ** @param xcb_generic_error_t        **e
00696  ** @returns xcb_shm_get_image_reply_t *
00697  **
00698  *****************************************************************************/
00699  
00700 xcb_shm_get_image_reply_t *
00701 xcb_shm_get_image_reply (xcb_connection_t            *c  ,
00702                          xcb_shm_get_image_cookie_t   cookie  ,
00703                          xcb_generic_error_t        **e  );
00704 
00717 /*****************************************************************************
00718  **
00719  ** xcb_void_cookie_t xcb_shm_create_pixmap_checked
00720  ** 
00721  ** @param xcb_connection_t *c
00722  ** @param xcb_pixmap_t      pid
00723  ** @param xcb_drawable_t    drawable
00724  ** @param uint16_t          width
00725  ** @param uint16_t          height
00726  ** @param uint8_t           depth
00727  ** @param xcb_shm_seg_t     shmseg
00728  ** @param uint32_t          offset
00729  ** @returns xcb_void_cookie_t
00730  **
00731  *****************************************************************************/
00732  
00733 xcb_void_cookie_t
00734 xcb_shm_create_pixmap_checked (xcb_connection_t *c  ,
00735                                xcb_pixmap_t      pid  ,
00736                                xcb_drawable_t    drawable  ,
00737                                uint16_t          width  ,
00738                                uint16_t          height  ,
00739                                uint8_t           depth  ,
00740                                xcb_shm_seg_t     shmseg  ,
00741                                uint32_t          offset  );
00742 
00752 /*****************************************************************************
00753  **
00754  ** xcb_void_cookie_t xcb_shm_create_pixmap
00755  ** 
00756  ** @param xcb_connection_t *c
00757  ** @param xcb_pixmap_t      pid
00758  ** @param xcb_drawable_t    drawable
00759  ** @param uint16_t          width
00760  ** @param uint16_t          height
00761  ** @param uint8_t           depth
00762  ** @param xcb_shm_seg_t     shmseg
00763  ** @param uint32_t          offset
00764  ** @returns xcb_void_cookie_t
00765  **
00766  *****************************************************************************/
00767  
00768 xcb_void_cookie_t
00769 xcb_shm_create_pixmap (xcb_connection_t *c  ,
00770                        xcb_pixmap_t      pid  ,
00771                        xcb_drawable_t    drawable  ,
00772                        uint16_t          width  ,
00773                        uint16_t          height  ,
00774                        uint8_t           depth  ,
00775                        xcb_shm_seg_t     shmseg  ,
00776                        uint32_t          offset  );
00777 
00790 /*****************************************************************************
00791  **
00792  ** xcb_void_cookie_t xcb_shm_attach_fd_checked
00793  ** 
00794  ** @param xcb_connection_t *c
00795  ** @param xcb_shm_seg_t     shmseg
00796  ** @param int32_t           shm_fd
00797  ** @param uint8_t           read_only
00798  ** @returns xcb_void_cookie_t
00799  **
00800  *****************************************************************************/
00801  
00802 xcb_void_cookie_t
00803 xcb_shm_attach_fd_checked (xcb_connection_t *c  ,
00804                            xcb_shm_seg_t     shmseg  ,
00805                            int32_t           shm_fd  ,
00806                            uint8_t           read_only  );
00807 
00817 /*****************************************************************************
00818  **
00819  ** xcb_void_cookie_t xcb_shm_attach_fd
00820  ** 
00821  ** @param xcb_connection_t *c
00822  ** @param xcb_shm_seg_t     shmseg
00823  ** @param int32_t           shm_fd
00824  ** @param uint8_t           read_only
00825  ** @returns xcb_void_cookie_t
00826  **
00827  *****************************************************************************/
00828  
00829 xcb_void_cookie_t
00830 xcb_shm_attach_fd (xcb_connection_t *c  ,
00831                    xcb_shm_seg_t     shmseg  ,
00832                    int32_t           shm_fd  ,
00833                    uint8_t           read_only  );
00834 
00844 /*****************************************************************************
00845  **
00846  ** xcb_shm_create_segment_cookie_t xcb_shm_create_segment
00847  ** 
00848  ** @param xcb_connection_t *c
00849  ** @param xcb_shm_seg_t     shmseg
00850  ** @param uint32_t          size
00851  ** @param uint8_t           read_only
00852  ** @returns xcb_shm_create_segment_cookie_t
00853  **
00854  *****************************************************************************/
00855  
00856 xcb_shm_create_segment_cookie_t
00857 xcb_shm_create_segment (xcb_connection_t *c  ,
00858                         xcb_shm_seg_t     shmseg  ,
00859                         uint32_t          size  ,
00860                         uint8_t           read_only  );
00861 
00874 /*****************************************************************************
00875  **
00876  ** xcb_shm_create_segment_cookie_t xcb_shm_create_segment_unchecked
00877  ** 
00878  ** @param xcb_connection_t *c
00879  ** @param xcb_shm_seg_t     shmseg
00880  ** @param uint32_t          size
00881  ** @param uint8_t           read_only
00882  ** @returns xcb_shm_create_segment_cookie_t
00883  **
00884  *****************************************************************************/
00885  
00886 xcb_shm_create_segment_cookie_t
00887 xcb_shm_create_segment_unchecked (xcb_connection_t *c  ,
00888                                   xcb_shm_seg_t     shmseg  ,
00889                                   uint32_t          size  ,
00890                                   uint8_t           read_only  );
00891 
00907 /*****************************************************************************
00908  **
00909  ** xcb_shm_create_segment_reply_t * xcb_shm_create_segment_reply
00910  ** 
00911  ** @param xcb_connection_t                 *c
00912  ** @param xcb_shm_create_segment_cookie_t   cookie
00913  ** @param xcb_generic_error_t             **e
00914  ** @returns xcb_shm_create_segment_reply_t *
00915  **
00916  *****************************************************************************/
00917  
00918 xcb_shm_create_segment_reply_t *
00919 xcb_shm_create_segment_reply (xcb_connection_t                 *c  ,
00920                               xcb_shm_create_segment_cookie_t   cookie  ,
00921                               xcb_generic_error_t             **e  );
00922 
00933 /*****************************************************************************
00934  **
00935  ** int * xcb_shm_create_segment_reply_fds
00936  ** 
00937  ** @param xcb_connection_t                *c
00938  ** @param xcb_shm_create_segment_reply_t  *reply
00939  ** @returns int *
00940  **
00941  *****************************************************************************/
00942  
00943 int *
00944 xcb_shm_create_segment_reply_fds (xcb_connection_t                *c  ,
00945                                   xcb_shm_create_segment_reply_t  *reply  );
00946 
00947 
00948 #ifdef __cplusplus
00949 }
00950 #endif
00951 
00952 #endif
00953