Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:26:30

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 #ifndef _SHAPEPROTO_H_
0028 #define _SHAPEPROTO_H_
0029 
0030 #include <X11/extensions/shapeconst.h>
0031 
0032 /*
0033  * Protocol requests constants and alignment values
0034  * These would really be in SHAPE's X.h and Xproto.h equivalents
0035  */
0036 
0037 #define Window CARD32
0038 #define Time CARD32
0039 
0040 #define X_ShapeQueryVersion     0
0041 #define X_ShapeRectangles       1
0042 #define X_ShapeMask         2
0043 #define X_ShapeCombine          3
0044 #define X_ShapeOffset           4
0045 #define X_ShapeQueryExtents     5
0046 #define X_ShapeSelectInput      6
0047 #define X_ShapeInputSelected        7
0048 #define X_ShapeGetRectangles        8
0049 
0050 typedef struct _ShapeQueryVersion {
0051     CARD8   reqType;        /* always ShapeReqCode */
0052     CARD8   shapeReqType;       /* always X_ShapeQueryVersion */
0053     CARD16  length B16;
0054 } xShapeQueryVersionReq;
0055 #define sz_xShapeQueryVersionReq    4
0056 
0057 typedef struct {
0058     BYTE    type;           /* X_Reply */
0059     CARD8   unused;         /* not used */
0060     CARD16  sequenceNumber B16;
0061     CARD32  length B32;
0062     CARD16  majorVersion B16;   /* major version of SHAPE protocol */
0063     CARD16  minorVersion B16;   /* minor version of SHAPE protocol */
0064     CARD32  pad0 B32;
0065     CARD32  pad1 B32;
0066     CARD32  pad2 B32;
0067     CARD32  pad3 B32;
0068     CARD32  pad4 B32;
0069 } xShapeQueryVersionReply;
0070 #define sz_xShapeQueryVersionReply  32
0071 
0072 typedef struct _ShapeRectangles {
0073     CARD8   reqType;    /* always ShapeReqCode */
0074     CARD8   shapeReqType;   /* always X_ShapeRectangles */
0075     CARD16  length B16;
0076     CARD8   op;     /* Set, ... */
0077     CARD8   destKind;   /* ShapeBounding or ShapeClip */
0078     CARD8   ordering;   /* UnSorted, YSorted, YXSorted, YXBanded */
0079     CARD8   pad0;       /* not used */
0080     Window  dest B32;
0081     INT16   xOff B16;
0082     INT16   yOff B16;
0083 } xShapeRectanglesReq;      /* followed by xRects */
0084 #define sz_xShapeRectanglesReq  16
0085 
0086 typedef struct _ShapeMask {
0087     CARD8   reqType;    /* always ShapeReqCode */
0088     CARD8   shapeReqType;   /* always X_ShapeMask */
0089     CARD16  length B16;
0090 
0091     CARD8   op;     /* Set, ... */
0092     CARD8   destKind;   /* ShapeBounding or ShapeClip */
0093     CARD16  junk B16;   /* not used */
0094 
0095     Window  dest B32;
0096     INT16   xOff B16;
0097     INT16   yOff B16;
0098     CARD32  src B32;    /* 1 bit pixmap */
0099 } xShapeMaskReq;
0100 #define sz_xShapeMaskReq    20
0101 
0102 typedef struct _ShapeCombine {
0103     CARD8   reqType;    /* always ShapeReqCode */
0104     CARD8   shapeReqType;   /* always X_ShapeCombine */
0105     CARD16  length B16;
0106     CARD8   op;     /* Set, ... */
0107     CARD8   destKind;   /* ShapeBounding or ShapeClip */
0108     CARD8   srcKind;    /* ShapeBounding or ShapeClip */
0109     CARD8   junk;       /* not used */
0110     Window  dest B32;
0111     INT16   xOff B16;
0112     INT16   yOff B16;
0113     Window  src B32;
0114 } xShapeCombineReq;
0115 #define sz_xShapeCombineReq 20
0116 
0117 typedef struct _ShapeOffset {
0118     CARD8   reqType;    /* always ShapeReqCode */
0119     CARD8   shapeReqType;   /* always X_ShapeOffset */
0120     CARD16  length B16;
0121     CARD8   destKind;   /* ShapeBounding or ShapeClip */
0122     CARD8   junk1;      /* not used */
0123     CARD16  junk2 B16;  /* not used */
0124     Window  dest B32;
0125     INT16   xOff B16;
0126     INT16   yOff B16;
0127 } xShapeOffsetReq;
0128 #define sz_xShapeOffsetReq  16
0129 
0130 typedef struct _ShapeQueryExtents {
0131     CARD8   reqType;    /* always ShapeReqCode */
0132     CARD8   shapeReqType;   /* always X_ShapeQueryExtents */
0133     CARD16  length B16;
0134     Window  window B32;
0135 } xShapeQueryExtentsReq;
0136 #define sz_xShapeQueryExtentsReq    8
0137 
0138 typedef struct {
0139     BYTE    type;           /* X_Reply */
0140     CARD8   unused;         /* not used */
0141     CARD16  sequenceNumber B16;
0142     CARD32  length B32;     /* 0 */
0143     CARD8   boundingShaped;     /* window has bounding shape */
0144     CARD8   clipShaped;     /* window has clip shape */
0145     CARD16  unused1 B16;
0146     INT16   xBoundingShape B16; /* extents of bounding shape */
0147     INT16   yBoundingShape B16;
0148     CARD16  widthBoundingShape B16;
0149     CARD16  heightBoundingShape B16;
0150     INT16   xClipShape B16;     /* extents of clip shape */
0151     INT16   yClipShape B16;
0152     CARD16  widthClipShape B16;
0153     CARD16  heightClipShape B16;
0154     CARD32  pad1 B32;
0155 } xShapeQueryExtentsReply;
0156 #define sz_xShapeQueryExtentsReply  32
0157 
0158 typedef struct _ShapeSelectInput {
0159     CARD8   reqType;    /* always ShapeReqCode */
0160     CARD8   shapeReqType;   /* always X_ShapeSelectInput */
0161     CARD16  length B16;
0162     Window  window B32;
0163     BYTE    enable;     /* xTrue -> send events */
0164     BYTE    pad1;
0165     CARD16  pad2 B16;
0166 } xShapeSelectInputReq;
0167 #define sz_xShapeSelectInputReq 12
0168 
0169 typedef struct _ShapeNotify {
0170     BYTE    type;       /* always eventBase + ShapeNotify */
0171     BYTE    kind;       /* either ShapeBounding or ShapeClip */
0172     CARD16  sequenceNumber B16;
0173     Window  window B32;
0174     INT16   x B16;
0175     INT16   y B16;      /* extents of new shape */
0176     CARD16  width B16;
0177     CARD16  height B16;
0178     Time    time B32;   /* time of change */
0179     BYTE    shaped;     /* set when a shape actual exists */
0180     BYTE    pad0;
0181     CARD16  pad1 B16;
0182     CARD32  pad2 B32;
0183     CARD32  pad3 B32;
0184 } xShapeNotifyEvent;
0185 #define sz_xShapeNotifyEvent    32
0186 
0187 typedef struct _ShapeInputSelected {
0188     CARD8   reqType;    /* always ShapeReqCode */
0189     CARD8   shapeReqType;   /* always X_ShapeInputSelected */
0190     CARD16  length B16;
0191     Window  window B32;
0192 } xShapeInputSelectedReq;
0193 #define sz_xShapeInputSelectedReq 8
0194 
0195 typedef struct {
0196     BYTE    type;           /* X_Reply */
0197     CARD8   enabled;        /* current status */
0198     CARD16  sequenceNumber B16;
0199     CARD32  length B32;     /* 0 */
0200     CARD32  pad1 B32;       /* unused */
0201     CARD32  pad2 B32;
0202     CARD32  pad3 B32;
0203     CARD32  pad4 B32;
0204     CARD32  pad5 B32;
0205     CARD32  pad6 B32;
0206 } xShapeInputSelectedReply;
0207 #define sz_xShapeInputSelectedReply 32
0208 
0209 typedef struct _ShapeGetRectangles {
0210     CARD8   reqType;        /* always ShapeReqCode */
0211     CARD8   shapeReqType;   /* always X_ShapeGetRectangles */
0212     CARD16  length B16;
0213     Window  window B32;
0214     CARD8   kind;       /* ShapeBounding or ShapeClip */
0215     CARD8   junk1;
0216     CARD16  junk2 B16;
0217 } xShapeGetRectanglesReq;
0218 #define sz_xShapeGetRectanglesReq   12
0219 
0220 typedef struct {
0221     BYTE    type;           /* X_Reply */
0222     CARD8   ordering;   /* UnSorted, YSorted, YXSorted, YXBanded */
0223     CARD16  sequenceNumber B16;
0224     CARD32  length B32;     /* not zero */
0225     CARD32  nrects B32;     /* number of rectangles */
0226     CARD32 pad1 B32;
0227     CARD32 pad2 B32;
0228     CARD32 pad3 B32;
0229     CARD32 pad4 B32;
0230     CARD32 pad5 B32;
0231 } xShapeGetRectanglesReply;     /* followed by xRectangles */
0232 #define sz_xShapeGetRectanglesReply 32
0233 
0234 #undef Window
0235 #undef Time
0236 
0237 #endif /* _SHAPEPROTO_H_ */