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