Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:19

0001 /************************************************************
0002 
0003 Copyright 1989, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024 
0025 ********************************************************/
0026 
0027 /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
0028 
0029 #ifndef _SHMPROTO_H_
0030 #define _SHMPROTO_H_
0031 
0032 #include <X11/extensions/shm.h>
0033 
0034 #define ShmSeg CARD32
0035 #define Drawable CARD32
0036 #define VisualID CARD32
0037 #define GContext CARD32
0038 #define Pixmap CARD32
0039 
0040 #define X_ShmQueryVersion       0
0041 #define X_ShmAttach         1
0042 #define X_ShmDetach         2
0043 #define X_ShmPutImage           3
0044 #define X_ShmGetImage           4
0045 #define X_ShmCreatePixmap       5
0046 #define X_ShmAttachFd                   6
0047 #define X_ShmCreateSegment              7
0048 
0049 typedef struct _ShmQueryVersion {
0050     CARD8   reqType;        /* always ShmReqCode */
0051     CARD8   shmReqType;     /* always X_ShmQueryVersion */
0052     CARD16  length B16;
0053 } xShmQueryVersionReq;
0054 #define sz_xShmQueryVersionReq  4
0055 
0056 typedef struct {
0057     BYTE    type;           /* X_Reply */
0058     BOOL    sharedPixmaps;
0059     CARD16  sequenceNumber B16;
0060     CARD32  length B32;
0061     CARD16  majorVersion B16;   /* major version of SHM protocol */
0062     CARD16  minorVersion B16;   /* minor version of SHM protocol */
0063     CARD16  uid B16;
0064     CARD16  gid B16;
0065     CARD8   pixmapFormat;
0066     CARD8   pad0;
0067     CARD16  pad1 B16;
0068     CARD32  pad2 B32;
0069     CARD32  pad3 B32;
0070     CARD32  pad4 B32;
0071 } xShmQueryVersionReply;
0072 #define sz_xShmQueryVersionReply    32
0073 
0074 typedef struct _ShmAttach {
0075     CARD8   reqType;    /* always ShmReqCode */
0076     CARD8   shmReqType; /* always X_ShmAttach */
0077     CARD16  length B16;
0078     ShmSeg  shmseg B32;
0079     CARD32  shmid B32;
0080     BOOL    readOnly;
0081     BYTE    pad0;
0082     CARD16  pad1 B16;
0083 } xShmAttachReq;
0084 #define sz_xShmAttachReq    16
0085 
0086 typedef struct _ShmDetach {
0087     CARD8   reqType;    /* always ShmReqCode */
0088     CARD8   shmReqType; /* always X_ShmDetach */
0089     CARD16  length B16;
0090     ShmSeg  shmseg B32;
0091 } xShmDetachReq;
0092 #define sz_xShmDetachReq    8
0093 
0094 typedef struct _ShmPutImage {
0095     CARD8   reqType;    /* always ShmReqCode */
0096     CARD8   shmReqType; /* always X_ShmPutImage */
0097     CARD16  length B16;
0098     Drawable    drawable B32;
0099     GContext    gc B32;
0100     CARD16  totalWidth B16;
0101     CARD16  totalHeight B16;
0102     CARD16  srcX B16;
0103     CARD16  srcY B16;
0104     CARD16  srcWidth B16;
0105     CARD16  srcHeight B16;
0106     INT16   dstX B16;
0107     INT16   dstY B16;
0108     CARD8   depth;
0109     CARD8   format;
0110     CARD8   sendEvent;
0111     CARD8   bpad;
0112     ShmSeg  shmseg B32;
0113     CARD32  offset B32;
0114 } xShmPutImageReq;
0115 #define sz_xShmPutImageReq  40
0116 
0117 typedef struct _ShmGetImage {
0118     CARD8   reqType;    /* always ShmReqCode */
0119     CARD8   shmReqType; /* always X_ShmGetImage */
0120     CARD16  length B16;
0121     Drawable    drawable B32;
0122     INT16   x B16;
0123     INT16   y B16;
0124     CARD16  width B16;
0125     CARD16  height B16;
0126     CARD32  planeMask B32;
0127     CARD8   format;
0128     CARD8   pad0;
0129     CARD8   pad1;
0130     CARD8   pad2;
0131     ShmSeg  shmseg B32;
0132     CARD32  offset B32;
0133 } xShmGetImageReq;
0134 #define sz_xShmGetImageReq  32
0135 
0136 typedef struct _ShmGetImageReply {
0137     BYTE    type;  /* X_Reply */
0138     CARD8   depth;
0139     CARD16  sequenceNumber B16;
0140     CARD32  length B32;
0141     VisualID    visual B32;
0142     CARD32  size B32;
0143     CARD32  pad0 B32;
0144     CARD32  pad1 B32;
0145     CARD32  pad2 B32;
0146     CARD32  pad3 B32;
0147 } xShmGetImageReply;
0148 #define sz_xShmGetImageReply    32
0149 
0150 typedef struct _ShmCreatePixmap {
0151     CARD8   reqType;    /* always ShmReqCode */
0152     CARD8   shmReqType; /* always X_ShmCreatePixmap */
0153     CARD16  length B16;
0154     Pixmap  pid B32;
0155     Drawable    drawable B32;
0156     CARD16  width B16;
0157     CARD16  height B16;
0158     CARD8   depth;
0159     CARD8   pad0;
0160     CARD8   pad1;
0161     CARD8   pad2;
0162     ShmSeg  shmseg B32;
0163     CARD32  offset B32;
0164 } xShmCreatePixmapReq;
0165 #define sz_xShmCreatePixmapReq 28
0166 
0167 typedef struct _ShmCompletion {
0168     BYTE    type;       /* always eventBase + ShmCompletion */
0169     BYTE    bpad0;
0170     CARD16  sequenceNumber B16;
0171     Drawable    drawable B32;
0172     CARD16  minorEvent B16;
0173     BYTE    majorEvent;
0174     BYTE    bpad1;
0175     ShmSeg  shmseg B32;
0176     CARD32  offset B32;
0177     CARD32  pad0 B32;
0178     CARD32  pad1 B32;
0179     CARD32  pad2 B32;
0180 } xShmCompletionEvent;
0181 #define sz_xShmCompletionEvent  32
0182 
0183 /* Version 1.2 additions */
0184 typedef struct _ShmAttachFd {
0185     CARD8   reqType;    /* always ShmReqCode */
0186     CARD8   shmReqType; /* always X_ShmAttachFd */
0187     CARD16  length B16;
0188     ShmSeg  shmseg B32;
0189     BOOL    readOnly;
0190     BYTE    pad0;
0191     CARD16  pad1 B16;
0192 } xShmAttachFdReq;
0193 /* File descriptor is passed with this request */
0194 #define sz_xShmAttachFdReq  12
0195 
0196 typedef struct _ShmCreateSegment {
0197     CARD8   reqType;    /* always ShmReqCode */
0198     CARD8   shmReqType; /* always X_ShmAttachFd */
0199     CARD16  length B16;
0200     ShmSeg  shmseg B32;
0201     CARD32      size B32;
0202     BOOL    readOnly;
0203     BYTE    pad0;
0204     CARD16  pad1 B16;
0205 } xShmCreateSegmentReq;
0206 #define sz_xShmCreateSegmentReq 16
0207 
0208 typedef struct {
0209     CARD8   type;           /* must be X_Reply */
0210     CARD8   nfd;            /* must be 1    */
0211     CARD16  sequenceNumber  B16;    /* last sequence number */
0212     CARD32  length  B32;        /* 0 */
0213     CARD32  pad2    B32;        /* unused */
0214     CARD32  pad3    B32;        /* unused */
0215     CARD32  pad4    B32;        /* unused */
0216     CARD32  pad5    B32;        /* unused */
0217     CARD32  pad6    B32;        /* unused */
0218     CARD32  pad7    B32;        /* unused */
0219 } xShmCreateSegmentReply;
0220 /* File descriptor is passed with this reply */
0221 #define sz_xShmCreateSegmentReply   32
0222 
0223 #undef ShmSeg
0224 #undef Drawable
0225 #undef VisualID
0226 #undef GContext
0227 #undef Pixmap
0228 
0229 #endif /* _SHMPROTO_H_ */