1
/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */
2
/************************************************************
4
Copyright 1989, 1998 The Open Group
6
Permission to use, copy, modify, distribute, and sell this software and its
7
documentation for any purpose is hereby granted without fee, provided that
8
the above copyright notice appear in all copies and that both that
9
copyright notice and this permission notice appear in supporting
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
OPEN GROUP 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 Open Group 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 Open Group.
26
********************************************************/
28
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
33
/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
38
#define Drawable CARD32
39
#define VisualID CARD32
40
#define GContext CARD32
43
#define SHMNAME "MIT-SHM"
45
#define SHM_MAJOR_VERSION 1 /* current version numbers */
46
#define SHM_MINOR_VERSION 1
49
#if NeedFunctionPrototypes
50
#define XSHM_PUT_IMAGE_ARGS \
51
DrawablePtr /* dst */, \
54
unsigned int /* format */, \
65
#define XSHM_PUT_IMAGE_ARGS /* nothing */
68
#if NeedFunctionPrototypes
69
#define XSHM_CREATE_PIXMAP_ARGS \
70
ScreenPtr /* pScreen */, \
76
#define XSHM_CREATE_PIXMAP_ARGS /* nothing */
79
typedef struct _ShmFuncs {
80
PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
81
void (* PutImage)(XSHM_PUT_IMAGE_ARGS);
82
} ShmFuncs, *ShmFuncsPtr;
85
typedef struct _ShmQueryVersion {
86
CARD8 reqType; /* always ShmReqCode */
87
CARD8 shmReqType; /* always X_ShmQueryVersion */
89
} xShmQueryVersionReq;
90
#define sz_xShmQueryVersionReq 4
93
BYTE type; /* X_Reply */
95
CARD16 sequenceNumber B16;
97
CARD16 majorVersion B16; /* major version of SHM protocol */
98
CARD16 minorVersion B16; /* minor version of SHM protocol */
107
} xShmQueryVersionReply;
108
#define sz_xShmQueryVersionReply 32
110
typedef struct _ShmAttach {
111
CARD8 reqType; /* always ShmReqCode */
112
CARD8 shmReqType; /* always X_ShmAttach */
120
#define sz_xShmAttachReq 16
122
typedef struct _ShmDetach {
123
CARD8 reqType; /* always ShmReqCode */
124
CARD8 shmReqType; /* always X_ShmDetach */
128
#define sz_xShmDetachReq 8
130
typedef struct _ShmPutImage {
131
CARD8 reqType; /* always ShmReqCode */
132
CARD8 shmReqType; /* always X_ShmPutImage */
134
Drawable drawable B32;
136
CARD16 totalWidth B16;
137
CARD16 totalHeight B16;
141
CARD16 srcHeight B16;
151
#define sz_xShmPutImageReq 40
153
typedef struct _ShmGetImage {
154
CARD8 reqType; /* always ShmReqCode */
155
CARD8 shmReqType; /* always X_ShmGetImage */
157
Drawable drawable B32;
162
CARD32 planeMask B32;
170
#define sz_xShmGetImageReq 32
172
typedef struct _ShmGetImageReply {
173
BYTE type; /* X_Reply */
175
CARD16 sequenceNumber B16;
184
#define sz_xShmGetImageReply 32
186
typedef struct _ShmCreatePixmap {
187
CARD8 reqType; /* always ShmReqCode */
188
CARD8 shmReqType; /* always X_ShmCreatePixmap */
191
Drawable drawable B32;
200
} xShmCreatePixmapReq;
201
#define sz_xShmCreatePixmapReq 28
203
typedef struct _ShmCompletion {
204
BYTE type; /* always eventBase + ShmCompletion */
206
CARD16 sequenceNumber B16;
207
Drawable drawable B32;
208
CARD16 minorEvent B16;
216
} xShmCompletionEvent;
217
#define sz_xShmCompletionEvent 32
225
#endif /* _SHMSTR_H_ */