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 #define XSHM_PUT_IMAGE_ARGS \
50 DrawablePtr /* dst */, \
53 unsigned int /* format */, \
64 #define XSHM_CREATE_PIXMAP_ARGS \
65 ScreenPtr /* pScreen */, \
71 typedef struct _ShmFuncs
{
72 PixmapPtr (* CreatePixmap
)(XSHM_CREATE_PIXMAP_ARGS
);
73 void (* PutImage
)(XSHM_PUT_IMAGE_ARGS
);
74 } ShmFuncs
, *ShmFuncsPtr
;
77 typedef struct _ShmQueryVersion
{
78 CARD8 reqType
; /* always ShmReqCode */
79 CARD8 shmReqType
; /* always X_ShmQueryVersion */
81 } xShmQueryVersionReq
;
82 #define sz_xShmQueryVersionReq 4
85 BYTE type
; /* X_Reply */
87 CARD16 sequenceNumber B16
;
89 CARD16 majorVersion B16
; /* major version of SHM protocol */
90 CARD16 minorVersion B16
; /* minor version of SHM protocol */
99 } xShmQueryVersionReply
;
100 #define sz_xShmQueryVersionReply 32
102 typedef struct _ShmAttach
{
103 CARD8 reqType
; /* always ShmReqCode */
104 CARD8 shmReqType
; /* always X_ShmAttach */
112 #define sz_xShmAttachReq 16
114 typedef struct _ShmDetach
{
115 CARD8 reqType
; /* always ShmReqCode */
116 CARD8 shmReqType
; /* always X_ShmDetach */
120 #define sz_xShmDetachReq 8
122 typedef struct _ShmPutImage
{
123 CARD8 reqType
; /* always ShmReqCode */
124 CARD8 shmReqType
; /* always X_ShmPutImage */
126 Drawable drawable B32
;
128 CARD16 totalWidth B16
;
129 CARD16 totalHeight B16
;
133 CARD16 srcHeight B16
;
143 #define sz_xShmPutImageReq 40
145 typedef struct _ShmGetImage
{
146 CARD8 reqType
; /* always ShmReqCode */
147 CARD8 shmReqType
; /* always X_ShmGetImage */
149 Drawable drawable B32
;
154 CARD32 planeMask B32
;
162 #define sz_xShmGetImageReq 32
164 typedef struct _ShmGetImageReply
{
165 BYTE type
; /* X_Reply */
167 CARD16 sequenceNumber B16
;
176 #define sz_xShmGetImageReply 32
178 typedef struct _ShmCreatePixmap
{
179 CARD8 reqType
; /* always ShmReqCode */
180 CARD8 shmReqType
; /* always X_ShmCreatePixmap */
183 Drawable drawable B32
;
192 } xShmCreatePixmapReq
;
193 #define sz_xShmCreatePixmapReq 28
195 typedef struct _ShmCompletion
{
196 BYTE type
; /* always eventBase + ShmCompletion */
198 CARD16 sequenceNumber B16
;
199 Drawable drawable B32
;
200 CARD16 minorEvent B16
;
208 } xShmCompletionEvent
;
209 #define sz_xShmCompletionEvent 32
217 #endif /* _SHMSTR_H_ */