1 /**************************************************************************
3 Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
4 Copyright 2000 VA Linux Systems, Inc.
5 Copyright (c) 2002-2012 Apple Computer, Inc.
8 Permission is hereby granted, free of charge, to any person obtaining a
9 copy of this software and associated documentation files (the
10 "Software"), to deal in the Software without restriction, including
11 without limitation the rights to use, copy, modify, merge, publish,
12 distribute, sub license, and/or sell copies of the Software, and to
13 permit persons to whom the Software is furnished to do so, subject to
14 the following conditions:
16 The above copyright notice and this permission notice (including the
17 next paragraph) shall be included in all copies or substantial portions
20 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
23 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
24 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 **************************************************************************/
32 * Kevin E. Martin <martin@valinux.com>
33 * Jens Owen <jens@valinux.com>
34 * Rickard E. (Rik) Fiath <faith@valinux.com>
35 * Jeremy Huddleston <jeremyhu@apple.com>
39 #ifndef _APPLEDRISTR_H_
40 #define _APPLEDRISTR_H_
44 #define APPLEDRINAME "Apple-DRI"
46 #define APPLE_DRI_MAJOR_VERSION 1 /* current version numbers */
47 #define APPLE_DRI_MINOR_VERSION 0
48 #define APPLE_DRI_PATCH_VERSION 0
50 typedef struct _AppleDRIQueryVersion
{
51 CARD8 reqType
; /* always DRIReqCode */
52 CARD8 driReqType
; /* always X_DRIQueryVersion */
54 } xAppleDRIQueryVersionReq
;
55 #define sz_xAppleDRIQueryVersionReq 4
58 BYTE type
; /* X_Reply */
60 CARD16 sequenceNumber B16
;
62 CARD16 majorVersion B16
; /* major version of DRI protocol */
63 CARD16 minorVersion B16
; /* minor version of DRI protocol */
64 CARD32 patchVersion B32
; /* patch version of DRI protocol */
69 } xAppleDRIQueryVersionReply
;
70 #define sz_xAppleDRIQueryVersionReply 32
72 typedef struct _AppleDRIQueryDirectRenderingCapable
{
73 CARD8 reqType
; /* always DRIReqCode */
74 CARD8 driReqType
; /* X_DRIQueryDirectRenderingCapable */
77 } xAppleDRIQueryDirectRenderingCapableReq
;
78 #define sz_xAppleDRIQueryDirectRenderingCapableReq 8
81 BYTE type
; /* X_Reply */
83 CARD16 sequenceNumber B16
;
94 } xAppleDRIQueryDirectRenderingCapableReply
;
95 #define sz_xAppleDRIQueryDirectRenderingCapableReply 32
97 typedef struct _AppleDRIAuthConnection
{
98 CARD8 reqType
; /* always DRIReqCode */
99 CARD8 driReqType
; /* always X_DRICloseConnection */
103 } xAppleDRIAuthConnectionReq
;
104 #define sz_xAppleDRIAuthConnectionReq 12
109 CARD16 sequenceNumber B16
;
111 CARD32 authenticated B32
;
117 } xAppleDRIAuthConnectionReply
;
118 #define zx_xAppleDRIAuthConnectionReply 32
120 typedef struct _AppleDRICreateSurface
{
121 CARD8 reqType
; /* always DRIReqCode */
122 CARD8 driReqType
; /* always X_DRICreateSurface */
126 CARD32 client_id B32
;
127 } xAppleDRICreateSurfaceReq
;
128 #define sz_xAppleDRICreateSurfaceReq 16
131 BYTE type
; /* X_Reply */
133 CARD16 sequenceNumber B16
;
141 } xAppleDRICreateSurfaceReply
;
142 #define sz_xAppleDRICreateSurfaceReply 32
144 typedef struct _AppleDRIDestroySurface
{
145 CARD8 reqType
; /* always DRIReqCode */
146 CARD8 driReqType
; /* always X_DRIDestroySurface */
150 } xAppleDRIDestroySurfaceReq
;
151 #define sz_xAppleDRIDestroySurfaceReq 12
153 typedef struct _AppleDRINotify
{
154 BYTE type
; /* always eventBase + event type */
156 CARD16 sequenceNumber B16
;
157 CARD32 time B32
; /* time of change */
164 } xAppleDRINotifyEvent
;
165 #define sz_xAppleDRINotifyEvent 32
174 CARD8 pad1
, pad2
, pad3
;
175 } xAppleDRICreateSharedBufferReq
;
177 #define sz_xAppleDRICreateSharedBufferReq 16
182 CARD16 sequenceNumber B16
;
184 CARD32 stringLength B32
; /* 0 on error */
190 } xAppleDRICreateSharedBufferReply
;
192 #define sz_xAppleDRICreateSharedBufferReply 32
200 } xAppleDRISwapBuffersReq
;
202 #define sz_xAppleDRISwapBuffersReq 12
205 CARD8 reqType
; /*1 */
206 CARD8 driReqType
; /*2 */
207 CARD16 length B16
; /*4 */
208 CARD32 screen B32
; /*8 */
209 CARD32 drawable B32
; /*12 */
210 } xAppleDRICreatePixmapReq
;
212 #define sz_xAppleDRICreatePixmapReq 12
217 CARD16 sequenceNumber B16
; /*4 */
218 CARD32 length B32
; /*8 */
219 CARD32 width B32
; /*12 */
220 CARD32 height B32
; /*16 */
221 CARD32 pitch B32
; /*20 */
222 CARD32 bpp B32
; /*24 */
223 CARD32 size B32
; /*28 */
224 CARD32 stringLength B32
; /*32 */
225 } xAppleDRICreatePixmapReply
;
227 #define sz_xAppleDRICreatePixmapReply 32
230 CARD8 reqType
; /*1 */
231 CARD8 driReqType
; /*2 */
232 CARD16 length B16
; /*4 */
233 CARD32 drawable B32
; /*8 */
234 } xAppleDRIDestroyPixmapReq
;
236 #define sz_xAppleDRIDestroyPixmapReq 8
238 #ifdef _APPLEDRI_SERVER_
240 void AppleDRISendEvent(
241 #if NeedFunctionPrototypes
243 unsigned int /* mask */,
249 #endif /* _APPLEDRI_SERVER_ */
250 #endif /* _APPLEDRISTR_H_ */