1bf215546Sopenharmony_ci/*
2bf215546Sopenharmony_ci * Copyright © 2014 Jon Turney
3bf215546Sopenharmony_ci *
4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
5bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
6bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation
7bf215546Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8bf215546Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the
9bf215546Sopenharmony_ci * Software is furnished to do so, subject to the following conditions:
10bf215546Sopenharmony_ci *
11bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next
12bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the
13bf215546Sopenharmony_ci * Software.
14bf215546Sopenharmony_ci *
15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18bf215546Sopenharmony_ci * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19bf215546Sopenharmony_ci * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20bf215546Sopenharmony_ci * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
21bf215546Sopenharmony_ci * IN THE SOFTWARE.
22bf215546Sopenharmony_ci */
23bf215546Sopenharmony_ci
24bf215546Sopenharmony_ci#ifndef WINDOWSDRISTR_H
25bf215546Sopenharmony_ci#define WINDOWSDRISTR_H
26bf215546Sopenharmony_ci
27bf215546Sopenharmony_ci#include "windowsdriconst.h"
28bf215546Sopenharmony_ci
29bf215546Sopenharmony_ci#define WINDOWSDRINAME "Windows-DRI"
30bf215546Sopenharmony_ci
31bf215546Sopenharmony_ci#define WINDOWS_DRI_MAJOR_VERSION	1       /* current version numbers */
32bf215546Sopenharmony_ci#define WINDOWS_DRI_MINOR_VERSION	0
33bf215546Sopenharmony_ci#define WINDOWS_DRI_PATCH_VERSION	0
34bf215546Sopenharmony_ci
35bf215546Sopenharmony_citypedef struct _WindowsDRIQueryVersion
36bf215546Sopenharmony_ci{
37bf215546Sopenharmony_ci   CARD8 reqType;               /* always DRIReqCode */
38bf215546Sopenharmony_ci   CARD8 driReqType;            /* always X_DRIQueryVersion */
39bf215546Sopenharmony_ci   CARD16 length B16;
40bf215546Sopenharmony_ci} xWindowsDRIQueryVersionReq;
41bf215546Sopenharmony_ci#define sz_xWindowsDRIQueryVersionReq	4
42bf215546Sopenharmony_ci
43bf215546Sopenharmony_citypedef struct
44bf215546Sopenharmony_ci{
45bf215546Sopenharmony_ci   BYTE type;                   /* X_Reply */
46bf215546Sopenharmony_ci   BOOL pad1;
47bf215546Sopenharmony_ci   CARD16 sequenceNumber B16;
48bf215546Sopenharmony_ci   CARD32 length B32;
49bf215546Sopenharmony_ci   CARD16 majorVersion B16;     /* major version of DRI protocol */
50bf215546Sopenharmony_ci   CARD16 minorVersion B16;     /* minor version of DRI protocol */
51bf215546Sopenharmony_ci   CARD32 patchVersion B32;     /* patch version of DRI protocol */
52bf215546Sopenharmony_ci   CARD32 pad3 B32;
53bf215546Sopenharmony_ci   CARD32 pad4 B32;
54bf215546Sopenharmony_ci   CARD32 pad5 B32;
55bf215546Sopenharmony_ci   CARD32 pad6 B32;
56bf215546Sopenharmony_ci} xWindowsDRIQueryVersionReply;
57bf215546Sopenharmony_ci#define sz_xWindowsDRIQueryVersionReply	32
58bf215546Sopenharmony_ci
59bf215546Sopenharmony_citypedef struct _WindowsDRIQueryDirectRenderingCapable
60bf215546Sopenharmony_ci{
61bf215546Sopenharmony_ci   CARD8 reqType;               /* always DRIReqCode */
62bf215546Sopenharmony_ci   CARD8 driReqType;            /* X_DRIQueryDirectRenderingCapable */
63bf215546Sopenharmony_ci   CARD16 length B16;
64bf215546Sopenharmony_ci   CARD32 screen B32;
65bf215546Sopenharmony_ci} xWindowsDRIQueryDirectRenderingCapableReq;
66bf215546Sopenharmony_ci#define sz_xWindowsDRIQueryDirectRenderingCapableReq	8
67bf215546Sopenharmony_ci
68bf215546Sopenharmony_citypedef struct
69bf215546Sopenharmony_ci{
70bf215546Sopenharmony_ci   BYTE type;                   /* X_Reply */
71bf215546Sopenharmony_ci   BOOL pad1;
72bf215546Sopenharmony_ci   CARD16 sequenceNumber B16;
73bf215546Sopenharmony_ci   CARD32 length B32;
74bf215546Sopenharmony_ci   BOOL isCapable;
75bf215546Sopenharmony_ci   BOOL pad2;
76bf215546Sopenharmony_ci   BOOL pad3;
77bf215546Sopenharmony_ci   BOOL pad4;
78bf215546Sopenharmony_ci   CARD32 pad5 B32;
79bf215546Sopenharmony_ci   CARD32 pad6 B32;
80bf215546Sopenharmony_ci   CARD32 pad7 B32;
81bf215546Sopenharmony_ci   CARD32 pad8 B32;
82bf215546Sopenharmony_ci   CARD32 pad9 B32;
83bf215546Sopenharmony_ci} xWindowsDRIQueryDirectRenderingCapableReply;
84bf215546Sopenharmony_ci#define sz_xWindowsDRIQueryDirectRenderingCapableReply	32
85bf215546Sopenharmony_ci
86bf215546Sopenharmony_citypedef struct _WindowsDRINotify
87bf215546Sopenharmony_ci{
88bf215546Sopenharmony_ci   BYTE type;                   /* always eventBase + event type */
89bf215546Sopenharmony_ci   BYTE kind;
90bf215546Sopenharmony_ci   CARD16 sequenceNumber B16;
91bf215546Sopenharmony_ci   CARD32 time B32;             /* time of change */
92bf215546Sopenharmony_ci   CARD32 pad1 B32;
93bf215546Sopenharmony_ci   CARD32 pad2 B32;
94bf215546Sopenharmony_ci   CARD32 pad3 B32;
95bf215546Sopenharmony_ci   CARD32 pad4 B32;
96bf215546Sopenharmony_ci   CARD32 pad5 B32;
97bf215546Sopenharmony_ci   CARD32 pad6 B32;
98bf215546Sopenharmony_ci} xWindowsDRINotifyEvent;
99bf215546Sopenharmony_ci#define sz_xWindowsDRINotifyEvent	32
100bf215546Sopenharmony_ci
101bf215546Sopenharmony_citypedef struct _WindowsDRIQueryDrawable
102bf215546Sopenharmony_ci{
103bf215546Sopenharmony_ci   CARD8 reqType;               /* always DRIReqCode */
104bf215546Sopenharmony_ci   CARD8 driReqType;            /* always X_DRIQueryDrawable */
105bf215546Sopenharmony_ci   CARD16 length B16;
106bf215546Sopenharmony_ci   CARD32 screen B32;
107bf215546Sopenharmony_ci   CARD32 drawable B32;
108bf215546Sopenharmony_ci} xWindowsDRIQueryDrawableReq;
109bf215546Sopenharmony_ci#define sz_xWindowsDRIQueryDrawableReq 12
110bf215546Sopenharmony_ci
111bf215546Sopenharmony_citypedef struct
112bf215546Sopenharmony_ci{
113bf215546Sopenharmony_ci   BYTE type;                   /* X_Reply */
114bf215546Sopenharmony_ci   BOOL pad1;
115bf215546Sopenharmony_ci   CARD16 sequenceNumber B16;
116bf215546Sopenharmony_ci   CARD32 length B32;
117bf215546Sopenharmony_ci   CARD32 drawable_type B32;
118bf215546Sopenharmony_ci   CARD32 handle B32;
119bf215546Sopenharmony_ci   CARD32 pad3 B32;
120bf215546Sopenharmony_ci   CARD32 pad4 B32;
121bf215546Sopenharmony_ci   CARD32 pad5 B32;
122bf215546Sopenharmony_ci   CARD32 pad6 B32;
123bf215546Sopenharmony_ci} xWindowsDRIQueryDrawableReply;
124bf215546Sopenharmony_ci#define sz_xWindowsDRIQueryDrawableReply 32
125bf215546Sopenharmony_ci
126bf215546Sopenharmony_citypedef struct _WindowsDRIFBConfigToPixelFormat
127bf215546Sopenharmony_ci{
128bf215546Sopenharmony_ci   CARD8 reqType;               /* always DRIReqCode */
129bf215546Sopenharmony_ci   CARD8 driReqType;            /* always X_DRIFBConfigToPixelFormat */
130bf215546Sopenharmony_ci   CARD16 length B16;
131bf215546Sopenharmony_ci   CARD32 screen B32;
132bf215546Sopenharmony_ci   CARD32 fbConfigID B32;
133bf215546Sopenharmony_ci} xWindowsDRIFBConfigToPixelFormatReq;
134bf215546Sopenharmony_ci
135bf215546Sopenharmony_ci#define sz_xWindowsDRIFBConfigToPixelFormatReq 12
136bf215546Sopenharmony_ci
137bf215546Sopenharmony_citypedef struct
138bf215546Sopenharmony_ci{
139bf215546Sopenharmony_ci   BYTE type;                   /* X_Reply */
140bf215546Sopenharmony_ci   BOOL pad1;
141bf215546Sopenharmony_ci   CARD16 sequenceNumber B16;
142bf215546Sopenharmony_ci   CARD32 length B32;
143bf215546Sopenharmony_ci   CARD32 pixelFormatIndex B32;
144bf215546Sopenharmony_ci   CARD32 pad2 B32;
145bf215546Sopenharmony_ci   CARD32 pad3 B32;
146bf215546Sopenharmony_ci   CARD32 pad4 B32;
147bf215546Sopenharmony_ci   CARD32 pad5 B32;
148bf215546Sopenharmony_ci   CARD32 pad6 B32;
149bf215546Sopenharmony_ci} xWindowsDRIFBConfigToPixelFormatReply;
150bf215546Sopenharmony_ci#define sz_xWindowsDRIFBConfigToPixelFormatReply 32
151bf215546Sopenharmony_ci
152bf215546Sopenharmony_ci#endif /* WINDOWSDRISTR_H */
153