VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/X11/extensions/shmstr.h@ 99743

Last change on this file since 99743 was 69098, checked in by vboxsync, 7 years ago

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • Property svn:eol-style set to native
File size: 5.9 KB
Line 
1/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */
2/************************************************************
3
4Copyright 1989, 1998 The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26********************************************************/
27
28/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
29
30#ifndef _SHMSTR_H_
31#define _SHMSTR_H_
32
33/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
34
35#include "XShm.h"
36
37#define ShmSeg CARD32
38#define Drawable CARD32
39#define VisualID CARD32
40#define GContext CARD32
41#define Pixmap CARD32
42
43#define SHMNAME "MIT-SHM"
44
45#define SHM_MAJOR_VERSION 1 /* current version numbers */
46#define SHM_MINOR_VERSION 1
47
48#ifdef _XSHM_SERVER_
49#if NeedFunctionPrototypes
50#define XSHM_PUT_IMAGE_ARGS \
51 DrawablePtr /* dst */, \
52 GCPtr /* pGC */, \
53 int /* depth */, \
54 unsigned int /* format */, \
55 int /* w */, \
56 int /* h */, \
57 int /* sx */, \
58 int /* sy */, \
59 int /* sw */, \
60 int /* sh */, \
61 int /* dx */, \
62 int /* dy */, \
63 char * /* data */
64#else
65#define XSHM_PUT_IMAGE_ARGS /* nothing */
66#endif
67
68#if NeedFunctionPrototypes
69#define XSHM_CREATE_PIXMAP_ARGS \
70 ScreenPtr /* pScreen */, \
71 int /* width */, \
72 int /* height */, \
73 int /* depth */, \
74 char * /* addr */
75#else
76#define XSHM_CREATE_PIXMAP_ARGS /* nothing */
77#endif
78
79typedef struct _ShmFuncs {
80 PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
81 void (* PutImage)(XSHM_PUT_IMAGE_ARGS);
82} ShmFuncs, *ShmFuncsPtr;
83#endif
84
85typedef struct _ShmQueryVersion {
86 CARD8 reqType; /* always ShmReqCode */
87 CARD8 shmReqType; /* always X_ShmQueryVersion */
88 CARD16 length B16;
89} xShmQueryVersionReq;
90#define sz_xShmQueryVersionReq 4
91
92typedef struct {
93 BYTE type; /* X_Reply */
94 BOOL sharedPixmaps;
95 CARD16 sequenceNumber B16;
96 CARD32 length B32;
97 CARD16 majorVersion B16; /* major version of SHM protocol */
98 CARD16 minorVersion B16; /* minor version of SHM protocol */
99 CARD16 uid B16;
100 CARD16 gid B16;
101 CARD8 pixmapFormat;
102 CARD8 pad0;
103 CARD16 pad1 B16;
104 CARD32 pad2 B32;
105 CARD32 pad3 B32;
106 CARD32 pad4 B32;
107} xShmQueryVersionReply;
108#define sz_xShmQueryVersionReply 32
109
110typedef struct _ShmAttach {
111 CARD8 reqType; /* always ShmReqCode */
112 CARD8 shmReqType; /* always X_ShmAttach */
113 CARD16 length B16;
114 ShmSeg shmseg B32;
115 CARD32 shmid B32;
116 BOOL readOnly;
117 BYTE pad0;
118 CARD16 pad1 B16;
119} xShmAttachReq;
120#define sz_xShmAttachReq 16
121
122typedef struct _ShmDetach {
123 CARD8 reqType; /* always ShmReqCode */
124 CARD8 shmReqType; /* always X_ShmDetach */
125 CARD16 length B16;
126 ShmSeg shmseg B32;
127} xShmDetachReq;
128#define sz_xShmDetachReq 8
129
130typedef struct _ShmPutImage {
131 CARD8 reqType; /* always ShmReqCode */
132 CARD8 shmReqType; /* always X_ShmPutImage */
133 CARD16 length B16;
134 Drawable drawable B32;
135 GContext gc B32;
136 CARD16 totalWidth B16;
137 CARD16 totalHeight B16;
138 CARD16 srcX B16;
139 CARD16 srcY B16;
140 CARD16 srcWidth B16;
141 CARD16 srcHeight B16;
142 INT16 dstX B16;
143 INT16 dstY B16;
144 CARD8 depth;
145 CARD8 format;
146 CARD8 sendEvent;
147 CARD8 bpad;
148 ShmSeg shmseg B32;
149 CARD32 offset B32;
150} xShmPutImageReq;
151#define sz_xShmPutImageReq 40
152
153typedef struct _ShmGetImage {
154 CARD8 reqType; /* always ShmReqCode */
155 CARD8 shmReqType; /* always X_ShmGetImage */
156 CARD16 length B16;
157 Drawable drawable B32;
158 INT16 x B16;
159 INT16 y B16;
160 CARD16 width B16;
161 CARD16 height B16;
162 CARD32 planeMask B32;
163 CARD8 format;
164 CARD8 pad0;
165 CARD8 pad1;
166 CARD8 pad2;
167 ShmSeg shmseg B32;
168 CARD32 offset B32;
169} xShmGetImageReq;
170#define sz_xShmGetImageReq 32
171
172typedef struct _ShmGetImageReply {
173 BYTE type; /* X_Reply */
174 CARD8 depth;
175 CARD16 sequenceNumber B16;
176 CARD32 length B32;
177 VisualID visual B32;
178 CARD32 size B32;
179 CARD32 pad0 B32;
180 CARD32 pad1 B32;
181 CARD32 pad2 B32;
182 CARD32 pad3 B32;
183} xShmGetImageReply;
184#define sz_xShmGetImageReply 32
185
186typedef struct _ShmCreatePixmap {
187 CARD8 reqType; /* always ShmReqCode */
188 CARD8 shmReqType; /* always X_ShmCreatePixmap */
189 CARD16 length B16;
190 Pixmap pid B32;
191 Drawable drawable B32;
192 CARD16 width B16;
193 CARD16 height B16;
194 CARD8 depth;
195 CARD8 pad0;
196 CARD8 pad1;
197 CARD8 pad2;
198 ShmSeg shmseg B32;
199 CARD32 offset B32;
200} xShmCreatePixmapReq;
201#define sz_xShmCreatePixmapReq 28
202
203typedef struct _ShmCompletion {
204 BYTE type; /* always eventBase + ShmCompletion */
205 BYTE bpad0;
206 CARD16 sequenceNumber B16;
207 Drawable drawable B32;
208 CARD16 minorEvent B16;
209 BYTE majorEvent;
210 BYTE bpad1;
211 ShmSeg shmseg B32;
212 CARD32 offset B32;
213 CARD32 pad0 B32;
214 CARD32 pad1 B32;
215 CARD32 pad2 B32;
216} xShmCompletionEvent;
217#define sz_xShmCompletionEvent 32
218
219#undef ShmSeg
220#undef Drawable
221#undef VisualID
222#undef GContext
223#undef Pixmap
224
225#endif /* _SHMSTR_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette