home *** CD-ROM | disk | FTP | other *** search
/ PC Shareware 1999 March / PCShareware-3-99.iso / IMPLE / DJGPP.RAR / DJGPP2 / XLIB-SR0.ZIP / SRC / EXTENSIO / SHMSTR.H < prev    next >
C/C++ Source or Header  |  1991-07-12  |  4KB  |  169 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. ********************************************************/
  17.  
  18. /* THIS IS NOT AN X CONSORTIUM STANDARD */
  19.  
  20. /* $XConsortium: shmstr.h,v 1.6 91/07/12 09:18:52 rws Exp $ */
  21.  
  22. #include "XShm.h"
  23.  
  24. #define SHMNAME "MIT-SHM"
  25.  
  26. #define SHM_MAJOR_VERSION    1    /* current version numbers */
  27. #define SHM_MINOR_VERSION    1
  28.  
  29. #ifdef _XSHM_SERVER_
  30. typedef struct _ShmFuncs {
  31.     PixmapPtr    (* CreatePixmap)();
  32.     void    (* PutImage)();
  33. } ShmFuncs, *ShmFuncsPtr;
  34. #endif
  35.  
  36. typedef struct _ShmQueryVersion {
  37.     CARD8    reqType;        /* always ShmReqCode */
  38.     CARD8    shmReqType;        /* always X_ShmQueryVersion */
  39.     CARD16    length B16;
  40. } xShmQueryVersionReq;
  41. #define sz_xShmQueryVersionReq    4
  42.  
  43. typedef struct {
  44.     BYTE    type;            /* X_Reply */
  45.     BOOL    sharedPixmaps;
  46.     CARD16    sequenceNumber B16;
  47.     CARD32    length B32;
  48.     CARD16    majorVersion B16;    /* major version of SHM protocol */
  49.     CARD16    minorVersion B16;    /* minor version of SHM protocol */
  50.     CARD16    uid B16;
  51.     CARD16    gid B16;
  52.     CARD8    pixmapFormat;
  53.     CARD8    pad0;
  54.     CARD16    pad1 B16;
  55.     CARD32    pad2 B32;
  56.     CARD32    pad3 B32;
  57.     CARD32    pad4 B32;
  58. } xShmQueryVersionReply;
  59. #define sz_xShmQueryVersionReply    32
  60.  
  61. typedef struct _ShmAttach {
  62.     CARD8    reqType;    /* always ShmReqCode */
  63.     CARD8    shmReqType;    /* always X_ShmAttach */
  64.     CARD16    length B16;
  65.     ShmSeg    shmseg;
  66.     CARD32    shmid;
  67.     BOOL    readOnly;
  68.     BYTE    pad0;
  69.     CARD16    pad1;
  70. } xShmAttachReq;
  71. #define sz_xShmAttachReq    16
  72.  
  73. typedef struct _ShmDetach {
  74.     CARD8    reqType;    /* always ShmReqCode */
  75.     CARD8    shmReqType;    /* always X_ShmDetach */
  76.     CARD16    length B16;
  77.     ShmSeg    shmseg;
  78. } xShmDetachReq;
  79. #define sz_xShmDetachReq    8
  80.  
  81. typedef struct _ShmPutImage {
  82.     CARD8    reqType;    /* always ShmReqCode */
  83.     CARD8    shmReqType;    /* always X_ShmPutImage */
  84.     CARD16    length B16;
  85.     Drawable    drawable B32;
  86.     GContext    gc B32;
  87.     CARD16    totalWidth B16;
  88.     CARD16    totalHeight B16;
  89.     CARD16    srcX B16;
  90.     CARD16    srcY B16;
  91.     CARD16    srcWidth B16;
  92.     CARD16    srcHeight B16;
  93.     INT16    dstX B16;
  94.     INT16    dstY B16;
  95.     CARD8    depth;
  96.     CARD8    format;
  97.     CARD8    sendEvent;
  98.     CARD8    bpad;
  99.     ShmSeg    shmseg B32;
  100.     CARD32    offset B32;
  101. } xShmPutImageReq;    
  102. #define sz_xShmPutImageReq    40
  103.  
  104. typedef struct _ShmGetImage {
  105.     CARD8    reqType;    /* always ShmReqCode */
  106.     CARD8    shmReqType;    /* always X_ShmGetImage */
  107.     CARD16    length B16;
  108.     Drawable    drawable B32;
  109.     INT16    x B16;
  110.     INT16    y B16;
  111.     CARD16    width B16;
  112.     CARD16    height B16;
  113.     CARD32    planeMask B32;
  114.     CARD8    format;
  115.     CARD8    pad0;
  116.     CARD8    pad1;
  117.     CARD8    pad2;
  118.     ShmSeg    shmseg B32;
  119.     CARD32    offset B32;
  120. } xShmGetImageReq;    
  121. #define sz_xShmGetImageReq    32
  122.  
  123. typedef struct _ShmGetImageReply {
  124.     BYTE    type;  /* X_Reply */
  125.     CARD8    depth;
  126.     CARD16    sequenceNumber B16;
  127.     CARD32    length B32;
  128.     VisualID    visual B32;
  129.     CARD32    size B32;
  130.     CARD32    pad0 B32;
  131.     CARD32    pad1 B32;
  132.     CARD32    pad2 B32;
  133.     CARD32    pad3 B32;
  134. } xShmGetImageReply;
  135. #define sz_xShmGetImageReply    32
  136.  
  137. typedef struct _ShmCreatePixmap {
  138.     CARD8    reqType;    /* always ShmReqCode */
  139.     CARD8    shmReqType;    /* always X_ShmCreatePixmap */
  140.     CARD16    length B16;
  141.     Pixmap    pid B32;
  142.     Drawable    drawable B32;
  143.     CARD16    width B16;
  144.     CARD16    height B16;
  145.     CARD8    depth;
  146.     CARD8    pad0;
  147.     CARD8    pad1;
  148.     CARD8    pad2;
  149.     ShmSeg    shmseg B32;
  150.     CARD32    offset B32;
  151. } xShmCreatePixmapReq;
  152. #define sz_xShmCreatePixmapReq 28
  153.  
  154. typedef struct _ShmCompletion {
  155.     BYTE    type;        /* always eventBase + ShmCompletion */
  156.     BYTE    bpad0;
  157.     CARD16    sequenceNumber B16;
  158.     Drawable    drawable B32;
  159.     CARD16    minorEvent B16;
  160.     BYTE    majorEvent;
  161.     BYTE    bpad1;
  162.     ShmSeg    shmseg B32;
  163.     CARD32    offset B32;
  164.     CARD32    pad0 B32;
  165.     CARD32    pad1 B32;
  166.     CARD32    pad2 B32;
  167. } xShmCompletionEvent;
  168. #define sz_xShmCompletionEvent    32
  169.