1 /* $XFree86: xc/lib/GL/dri/xf86dristr.h,v 1.9 2001/03/21 16:01:08 dawes Exp $ */
2 /**************************************************************************
4 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
5 Copyright 2000 VA Linux Systems, Inc.
6 Copyright (c) 2002 Apple Computer, Inc.
9 Permission is hereby granted, free of charge, to any person obtaining a
10 copy of this software and associated documentation files (the
11 "Software"), to deal in the Software without restriction, including
12 without limitation the rights to use, copy, modify, merge, publish,
13 distribute, sub license, and/or sell copies of the Software, and to
14 permit persons to whom the Software is furnished to do so, subject to
15 the following conditions:
17 The above copyright notice and this permission notice (including the
18 next paragraph) shall be included in all copies or substantial portions
21 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
24 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
25 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 **************************************************************************/
33 * Kevin E. Martin <martin@valinux.com>
34 * Jens Owen <jens@valinux.com>
35 * Rickard E. (Rik) Fiath <faith@valinux.com>
39 #ifndef _APPLEWMSTR_H_
40 #define _APPLEWMSTR_H_
44 #define APPLEWMNAME "Apple-WM"
46 #define APPLE_WM_MAJOR_VERSION 1 /* current version numbers */
47 #define APPLE_WM_MINOR_VERSION 0
48 #define APPLE_WM_PATCH_VERSION 0
50 typedef struct _AppleWMQueryVersion {
51 CARD8 reqType; /* always WMReqCode */
52 CARD8 wmReqType; /* always X_WMQueryVersion */
54 } xAppleWMQueryVersionReq;
55 #define sz_xAppleWMQueryVersionReq 4
58 BYTE type; /* X_Reply */
60 CARD16 sequenceNumber B16;
62 CARD16 majorVersion B16; /* major version of WM protocol */
63 CARD16 minorVersion B16; /* minor version of WM protocol */
64 CARD32 patchVersion B32; /* patch version of WM protocol */
69 } xAppleWMQueryVersionReply;
70 #define sz_xAppleWMQueryVersionReply 32
72 typedef struct _AppleWMQueryDirectRenderingCapable {
73 CARD8 reqType; /* always WMReqCode */
74 CARD8 wmReqType; /* X_WMQueryDirectRenderingCapable */
77 } xAppleWMQueryDirectRenderingCapableReq;
78 #define sz_xAppleWMQueryDirectRenderingCapableReq 8
81 BYTE type; /* X_Reply */
83 CARD16 sequenceNumber B16;
94 } xAppleDRIQueryDirectRenderingCapableReply;
95 #define sz_xAppleWMQueryDirectRenderingCapableReply 32
97 typedef struct _AppleWMAuthConnection {
98 CARD8 reqType; /* always WMReqCode */
99 CARD8 wmReqType; /* always X_WMCloseConnection */
103 } xAppleWMAuthConnectionReq;
104 #define sz_xAppleWMAuthConnectionReq 12
109 CARD16 sequenceNumber B16;
111 CARD32 authenticated B32;
117 } xAppleWMAuthConnectionReply;
118 #define zx_xAppleWMAuthConnectionReply 32
120 typedef struct _AppleWMCreateSurface {
121 CARD8 reqType; /* always WMReqCode */
122 CARD8 wmReqType; /* always X_WMCreateSurface */
126 CARD32 client_id B32;
127 } xAppleWMCreateSurfaceReq;
128 #define sz_xAppleWMCreateSurfaceReq 16
131 BYTE type; /* X_Reply */
133 CARD16 sequenceNumber B16;
141 } xAppleWMCreateSurfaceReply;
142 #define sz_xAppleWMCreateSurfaceReply 32
144 typedef struct _AppleWMDestroySurface {
145 CARD8 reqType; /* always WMReqCode */
146 CARD8 wmReqType; /* always X_WMDestroySurface */
150 } xAppleWMDestroySurfaceReq;
151 #define sz_xAppleWMDestroySurfaceReq 12
153 typedef struct _AppleWMDisableUpdate {
154 CARD8 reqType; /* always WMReqCode */
155 CARD8 wmReqType; /* always X_WMDisableUpdate */
158 } xAppleWMDisableUpdateReq;
159 #define sz_xAppleWMDisableUpdateReq 8
161 typedef struct _AppleWMReenableUpdate {
162 CARD8 reqType; /* always WMReqCode */
163 CARD8 wmReqType; /* always X_WMReenableUpdate */
166 } xAppleWMReenableUpdateReq;
167 #define sz_xAppleWMReenableUpdateReq 8
169 typedef struct _AppleWMSelectInput {
170 CARD8 reqType; /* always WMReqCode */
171 CARD8 wmReqType; /* always X_WMSelectInput */
174 } xAppleWMSelectInputReq;
175 #define sz_xAppleWMSelectInputReq 8
177 typedef struct _AppleWMNotify {
178 BYTE type; /* always eventBase + event type */
180 CARD16 sequenceNumber B16;
181 Time time B32; /* time of change */
185 } xAppleWMNotifyEvent;
186 #define sz_xAppleWMNotifyEvent 20
188 typedef struct _AppleWMSetWindowMenu {
189 CARD8 reqType; /* always WMReqCode */
190 CARD8 wmReqType; /* always X_WMSetWindowMenu */
194 } xAppleWMSetWindowMenuReq;
195 #define sz_xAppleWMSetWindowMenuReq 8
197 typedef struct _AppleWMSetWindowMenuCheck {
198 CARD8 reqType; /* always WMReqCode */
199 CARD8 wmReqType; /* always X_WMSetWindowMenuCheck */
202 } xAppleWMSetWindowMenuCheckReq;
203 #define sz_xAppleWMSetWindowMenuCheckReq 8
205 typedef struct _AppleWMSetFrontProcess {
206 CARD8 reqType; /* always WMReqCode */
207 CARD8 wmReqType; /* always X_WMSetFrontProcess */
209 } xAppleWMSetFrontProcessReq;
210 #define sz_xAppleWMSetFrontProcessReq 4
212 typedef struct _AppleWMSetWindowLevel {
213 CARD8 reqType; /* always WMReqCode */
214 CARD8 wmReqType; /* always X_WMSetWindowLevel */
218 } xAppleWMSetWindowLevelReq;
219 #define sz_xAppleWMSetWindowLevelReq 12
221 typedef struct _AppleWMSetCanQuit {
222 CARD8 reqType; /* always WMReqCode */
223 CARD8 wmReqType; /* always X_WMSetCanQuit */
226 } xAppleWMSetCanQuitReq;
227 #define sz_xAppleWMSetCanQuitReq 8
229 typedef struct _AppleWMFrameGetRect {
230 CARD8 reqType; /* always WMReqCode */
231 CARD8 wmReqType; /* always X_WMFrameGetRect */
233 CARD16 frame_class B16;
234 CARD16 frame_rect B16;
243 } xAppleWMFrameGetRectReq;
244 #define sz_xAppleWMFrameGetRectReq 24
247 BYTE type; /* X_Reply */
249 CARD16 sequenceNumber B16;
259 } xAppleWMFrameGetRectReply;
260 #define sz_xAppleWMFrameGetRectReply 32
262 typedef struct _AppleWMFrameHitTest {
263 CARD8 reqType; /* always WMReqCode */
264 CARD8 wmReqType; /* always X_WMFrameHitTest */
266 CARD16 frame_class B16;
278 } xAppleWMFrameHitTestReq;
279 #define sz_xAppleWMFrameHitTestReq 28
282 BYTE type; /* X_Reply */
284 CARD16 sequenceNumber B16;
292 } xAppleWMFrameHitTestReply;
293 #define sz_xAppleWMFrameHitTestReply 32
295 typedef struct _AppleWMFrameDraw {
296 CARD8 reqType; /* always WMReqCode */
297 CARD8 wmReqType; /* always X_WMFrameDraw */
301 CARD16 frame_class B16;
302 CARD16 frame_attr B16;
311 CARD32 title_length B32;
312 } xAppleWMFrameDrawReq;
313 #define sz_xAppleWMFrameDrawReq 36
315 #ifdef _APPLEWM_SERVER_
317 void AppleWMSendEvent (
318 #if NeedFunctionPrototypes
320 unsigned int /* mask */,
326 unsigned int AppleWMSelectedEvents (
327 #if NeedFunctionPrototypes
332 #endif /* _APPLEWM_SERVER_ */
333 #endif /* _APPLEWMSTR_H_ */