home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1999 March / PCShareware-3-99.iso / IMPLE / DJGPP.RAR / DJGPP2 / XLIB-SR0.ZIP / SRC / EXTENSIO / SHAPESTR.H < prev    next >
C/C++ Source or Header  |  1990-06-07  |  7KB  |  224 lines

  1. /************************************************************
  2. Copyright 1989 by The Massachusetts Institute of Technology
  3.  
  4. Permission to use, copy, modify, and distribute this
  5. software and its documentation for any purpose and without
  6. fee is hereby granted, provided that the above copyright
  7. no- tice appear in all copies and that both that copyright
  8. no- tice and this permission notice appear in supporting
  9. docu- mentation, and that the name of MIT not be used in
  10. advertising or publicity pertaining to distribution of the
  11. software without specific prior written permission.
  12. M.I.T. makes no representation about the suitability of
  13. this software for any purpose. It is provided "as is"
  14. without any express or implied warranty.
  15.  
  16. MIT DISCLAIMS ALL WARRANTIES WITH REGARD TO  THIS  SOFTWARE,
  17. INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
  18. NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE  LI-
  19. ABLE  FOR  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  20. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,  DATA  OR
  21. PROFITS,  WHETHER  IN  AN  ACTION OF CONTRACT, NEGLIGENCE OR
  22. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
  23. THE USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  
  25. ********************************************************/
  26.  
  27. /* $XConsortium: shapestr.h,v 1.9 90/06/07 10:08:36 rws Exp $ */
  28.  
  29. /*
  30.  * Protocol requests constants and alignment values
  31.  * These would really be in SHAPE's X.h and Xproto.h equivalents
  32.  */
  33.  
  34. #include "shape.h"
  35.  
  36. #define SHAPENAME "SHAPE"
  37.  
  38. #define SHAPE_MAJOR_VERSION    1    /* current version numbers */
  39. #define SHAPE_MINOR_VERSION    0
  40.  
  41. typedef struct _ShapeQueryVersion {
  42.     CARD8    reqType;        /* always ShapeReqCode */
  43.     CARD8    shapeReqType;        /* always X_ShapeQueryVersion */
  44.     CARD16    length B16;
  45. } xShapeQueryVersionReq;
  46. #define sz_xShapeQueryVersionReq    4
  47.  
  48. typedef struct {
  49.     BYTE    type;            /* X_Reply */
  50.     CARD8    unused;            /* not used */
  51.     CARD16    sequenceNumber B16;
  52.     CARD32    length B32;
  53.     CARD16    majorVersion B16;    /* major version of SHAPE protocol */
  54.     CARD16    minorVersion B16;    /* minor version of SHAPE protocol */
  55.     CARD32    pad0 B32;
  56.     CARD32    pad1 B32;
  57.     CARD32    pad2 B32;
  58.     CARD32    pad3 B32;
  59.     CARD32    pad4 B32;
  60. } xShapeQueryVersionReply;
  61. #define sz_xShapeQueryVersionReply    32
  62.  
  63. typedef struct _ShapeRectangles {
  64.     CARD8    reqType;    /* always ShapeReqCode */
  65.     CARD8    shapeReqType;    /* always X_ShapeRectangles */
  66.     CARD16    length B16;
  67.     CARD8    op;        /* Set, ... */
  68.     CARD8    destKind;    /* ShapeBounding or ShapeClip */
  69.     CARD8    ordering;    /* UnSorted, YSorted, YXSorted, YXBanded */
  70.     CARD8    pad0;        /* not used */
  71.     CARD32    dest B32;    /* Window */
  72.     INT16    xOff B16;
  73.     INT16    yOff B16;
  74. } xShapeRectanglesReq;        /* followed by xRects */
  75. #define sz_xShapeRectanglesReq    16
  76.  
  77. typedef struct _ShapeMask {
  78.     CARD8    reqType;    /* always ShapeReqCode */
  79.     CARD8    shapeReqType;    /* always X_ShapeMask */
  80.     CARD16    length B16;
  81.  
  82.     CARD8    op;        /* Set, ... */
  83.     CARD8    destKind;    /* ShapeBounding or ShapeClip */
  84.     CARD16    junk B16;    /* not used */
  85.  
  86.     CARD32    dest B32;    /* Window */
  87.     INT16    xOff B16;
  88.     INT16    yOff B16;
  89.     CARD32    src B32;    /* 1 bit pixmap */
  90. } xShapeMaskReq;
  91. #define sz_xShapeMaskReq    20
  92.     
  93. typedef struct _ShapeCombine {
  94.     CARD8    reqType;    /* always ShapeReqCode */
  95.     CARD8    shapeReqType;    /* always X_ShapeCombine */
  96.     CARD16    length B16;
  97.     CARD8    op;        /* Set, ... */
  98.     CARD8    destKind;    /* ShapeBounding or ShapeClip */
  99.     CARD8    srcKind;    /* ShapeBounding or ShapeClip */
  100.     CARD8    junk;        /* not used */
  101.     CARD32    dest B32;    /* Window */
  102.     INT16    xOff B16;
  103.     INT16    yOff B16;
  104.     CARD32    src B32;    /* Window */
  105. } xShapeCombineReq;
  106. #define sz_xShapeCombineReq    20
  107.     
  108. typedef struct _ShapeOffset {
  109.     CARD8    reqType;    /* always ShapeReqCode */
  110.     CARD8    shapeReqType;    /* always X_ShapeOffset */
  111.     CARD16    length B16;
  112.     CARD8    destKind;    /* ShapeBounding or ShapeClip */
  113.     CARD8    junk1;        /* not used */
  114.     CARD16    junk2 B16;    /* not used */
  115.     CARD32    dest B32;    /* Window */
  116.     INT16    xOff B16;
  117.     INT16    yOff B16;
  118. } xShapeOffsetReq;
  119. #define sz_xShapeOffsetReq    16
  120.  
  121. typedef struct _ShapeQueryExtents {
  122.     CARD8    reqType;    /* always ShapeReqCode */
  123.     CARD8    shapeReqType;    /* always X_ShapeQueryExtents */
  124.     CARD16    length B16;
  125.     CARD32    window B32;        /* request destination id */
  126. } xShapeQueryExtentsReq;
  127. #define sz_xShapeQueryExtentsReq    8
  128.  
  129. typedef struct {
  130.     BYTE    type;            /* X_Reply */
  131.     CARD8    unused;            /* not used */
  132.     CARD16    sequenceNumber B16;
  133.     CARD32    length B32;        /* 0 */
  134.     CARD8    boundingShaped;        /* window has bounding shape */
  135.     CARD8    clipShaped;        /* window has clip shape */
  136.     CARD16    unused1 B16;
  137.     INT16    xBoundingShape B16;    /* extents of bounding shape */
  138.     INT16    yBoundingShape B16;
  139.     CARD16    widthBoundingShape B16;
  140.     CARD16    heightBoundingShape B16;
  141.     INT16    xClipShape B16;        /* extents of clip shape */
  142.     INT16    yClipShape B16;
  143.     CARD16    widthClipShape B16;
  144.     CARD16    heightClipShape B16;
  145.     CARD32    pad1 B32;
  146. } xShapeQueryExtentsReply;
  147. #define sz_xShapeQueryExtentsReply    32
  148.  
  149. typedef struct _ShapeSelectInput {
  150.     CARD8    reqType;    /* always ShapeReqCode */
  151.     CARD8    shapeReqType;    /* always X_ShapeSelectInput */
  152.     CARD16    length B16;
  153.     CARD32    window B32;     /* request destination id */
  154.     BYTE    enable;        /* xTrue -> send events */
  155.     BYTE    pad1;
  156.     CARD16    pad2 B16;
  157. } xShapeSelectInputReq;
  158. #define sz_xShapeSelectInputReq    12
  159.  
  160. typedef struct _ShapeNotify {
  161.     BYTE    type;        /* always eventBase + ShapeNotify */
  162.     BYTE    kind;        /* either ShapeBounding or ShapeClip */
  163.     CARD16    sequenceNumber B16;
  164.     Window    window B32;
  165.     INT16    x B16;
  166.     INT16    y B16;        /* extents of new shape */
  167.     CARD16    width B16;
  168.     CARD16    height B16;
  169.     Time    time B32;    /* time of change */
  170.     BYTE    shaped;        /* set when a shape actual exists */
  171.     BYTE    pad0;
  172.     CARD16    pad1 B16;
  173.     CARD32    pad2 B32;
  174.     CARD32    pad3 B32;
  175. } xShapeNotifyEvent;
  176. #define sz_xShapeNotifyEvent    32
  177.  
  178. typedef struct _ShapeInputSelected {
  179.     CARD8    reqType;    /* always ShapeReqCode */
  180.     CARD8    shapeReqType;    /* always X_ShapeInputSelected */
  181.     CARD16    length B16;
  182.     CARD32    window B32;    /* request destination id */
  183. } xShapeInputSelectedReq;
  184. #define sz_xShapeInputSelectedReq 8
  185.  
  186. typedef struct {
  187.     BYTE    type;            /* X_Reply */
  188.     CARD8    enabled;        /* current status */
  189.     CARD16    sequenceNumber B16;
  190.     CARD32    length B32;        /* 0 */
  191.     CARD32    pad1 B32;        /* unused */
  192.     CARD32    pad2 B32;
  193.     CARD32    pad3 B32;
  194.     CARD32    pad4 B32;
  195.     CARD32    pad5 B32;
  196.     CARD32    pad6 B32;
  197. } xShapeInputSelectedReply;
  198. #define sz_xShapeInputSelectedReply    32
  199.  
  200. typedef struct _ShapeGetRectangles {
  201.     CARD8   reqType;        /* always ShapeReqCode */
  202.     CARD8   shapeReqType;    /* always X_ShapeGetRectangles */
  203.     CARD16  length B16;
  204.     CARD32  window B32;        /* request destination id */
  205.     CARD8   kind;        /* ShapeBounding or ShapeClip */
  206.     CARD8   junk1;
  207.     CARD16  junk2 B16;
  208. } xShapeGetRectanglesReq;
  209. #define sz_xShapeGetRectanglesReq    12
  210.  
  211. typedef struct {
  212.     BYTE    type;            /* X_Reply */
  213.     CARD8    ordering;    /* UnSorted, YSorted, YXSorted, YXBanded */
  214.     CARD16    sequenceNumber B16;
  215.     CARD32    length B32;        /* not zero */
  216.     CARD32    nrects B32;        /* number of rectangles */
  217.     CARD32 pad1 B32;
  218.     CARD32 pad2 B32;
  219.     CARD32 pad3 B32;
  220.     CARD32 pad4 B32;
  221.     CARD32 pad5 B32;
  222. } xShapeGetRectanglesReply;        /* followed by xRectangles */
  223. #define sz_xShapeGetRectanglesReply 32
  224.