1 /************************************************************
3 Copyright (c) 1989 X Consortium
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 Except as contained in this notice, the name of the X Consortium shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from the X Consortium.
26 ********************************************************/
28 /* THIS IS NOT AN X CONSORTIUM STANDARD */
33 /* $XConsortium: shmstr.h,v 1.9 94/04/17 20:11:25 rws Exp $ */
34 /* $XFree86: xc/include/extensions/shmstr.h,v 3.0 1996/05/06 05:52:42 dawes Exp $ */
39 #define Drawable CARD32
40 #define VisualID CARD32
41 #define GContext CARD32
44 #define SHMNAME "MIT-SHM"
46 #define SHM_MAJOR_VERSION 1 /* current version numbers */
47 #define SHM_MINOR_VERSION 1
50 #if NeedFunctionPrototypes
51 #define XSHM_PUT_IMAGE_ARGS \
52 DrawablePtr /* dst */, \
55 unsigned int /* format */, \
66 #define XSHM_PUT_IMAGE_ARGS /* nothing */
69 #if NeedFunctionPrototypes
70 #define XSHM_CREATE_PIXMAP_ARGS \
71 ScreenPtr /* pScreen */, \
77 #define XSHM_CREATE_PIXMAP_ARGS /* nothing */
80 typedef struct _ShmFuncs {
81 PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
82 void (* PutImage)(XSHM_PUT_IMAGE_ARGS);
83 } ShmFuncs, *ShmFuncsPtr;
86 typedef struct _ShmQueryVersion {
87 CARD8 reqType; /* always ShmReqCode */
88 CARD8 shmReqType; /* always X_ShmQueryVersion */
90 } xShmQueryVersionReq;
91 #define sz_xShmQueryVersionReq 4
94 BYTE type; /* X_Reply */
96 CARD16 sequenceNumber B16;
98 CARD16 majorVersion B16; /* major version of SHM protocol */
99 CARD16 minorVersion B16; /* minor version of SHM protocol */
108 } xShmQueryVersionReply;
109 #define sz_xShmQueryVersionReply 32
111 typedef struct _ShmAttach {
112 CARD8 reqType; /* always ShmReqCode */
113 CARD8 shmReqType; /* always X_ShmAttach */
121 #define sz_xShmAttachReq 16
123 typedef struct _ShmDetach {
124 CARD8 reqType; /* always ShmReqCode */
125 CARD8 shmReqType; /* always X_ShmDetach */
129 #define sz_xShmDetachReq 8
131 typedef struct _ShmPutImage {
132 CARD8 reqType; /* always ShmReqCode */
133 CARD8 shmReqType; /* always X_ShmPutImage */
135 Drawable drawable B32;
137 CARD16 totalWidth B16;
138 CARD16 totalHeight B16;
142 CARD16 srcHeight B16;
152 #define sz_xShmPutImageReq 40
154 typedef struct _ShmGetImage {
155 CARD8 reqType; /* always ShmReqCode */
156 CARD8 shmReqType; /* always X_ShmGetImage */
158 Drawable drawable B32;
163 CARD32 planeMask B32;
171 #define sz_xShmGetImageReq 32
173 typedef struct _ShmGetImageReply {
174 BYTE type; /* X_Reply */
176 CARD16 sequenceNumber B16;
185 #define sz_xShmGetImageReply 32
187 typedef struct _ShmCreatePixmap {
188 CARD8 reqType; /* always ShmReqCode */
189 CARD8 shmReqType; /* always X_ShmCreatePixmap */
192 Drawable drawable B32;
201 } xShmCreatePixmapReq;
202 #define sz_xShmCreatePixmapReq 28
204 typedef struct _ShmCompletion {
205 BYTE type; /* always eventBase + ShmCompletion */
207 CARD16 sequenceNumber B16;
208 Drawable drawable B32;
209 CARD16 minorEvent B16;
217 } xShmCompletionEvent;
218 #define sz_xShmCompletionEvent 32
226 #endif /* _SHMSTR_H_ */