github.com/rajveermalviya/gamen@v0.1.2-0.20220930195403-9be15877c1aa/internal/xcb/include/X11/extensions/xf86dgaproto.h (about) 1 /* 2 3 Copyright (c) 1995 Jon Tombs 4 Copyright (c) 1995 XFree86 Inc. 5 6 */ 7 8 #ifndef _XF86DGAPROTO_H_ 9 #define _XF86DGAPROTO_H_ 10 11 #include <X11/extensions/xf86dga1proto.h> 12 #include <X11/extensions/xf86dgaconst.h> 13 14 #define XF86DGANAME "XFree86-DGA" 15 16 #define XDGA_MAJOR_VERSION 2 /* current version numbers */ 17 #define XDGA_MINOR_VERSION 0 18 19 20 typedef struct _XDGAQueryVersion { 21 CARD8 reqType; /* always DGAReqCode */ 22 CARD8 dgaReqType; /* always X_DGAQueryVersion */ 23 CARD16 length; 24 } xXDGAQueryVersionReq; 25 #define sz_xXDGAQueryVersionReq 4 26 27 typedef struct { 28 BYTE type; /* X_Reply */ 29 BOOL pad1; 30 CARD16 sequenceNumber; 31 CARD32 length; 32 CARD16 majorVersion; /* major version of DGA protocol */ 33 CARD16 minorVersion; /* minor version of DGA protocol */ 34 CARD32 pad2; 35 CARD32 pad3; 36 CARD32 pad4; 37 CARD32 pad5; 38 CARD32 pad6; 39 } xXDGAQueryVersionReply; 40 #define sz_xXDGAQueryVersionReply 32 41 42 typedef struct _XDGAQueryModes { 43 CARD8 reqType; 44 CARD8 dgaReqType; 45 CARD16 length; 46 CARD32 screen; 47 } xXDGAQueryModesReq; 48 #define sz_xXDGAQueryModesReq 8 49 50 typedef struct { 51 BYTE type; /* X_Reply */ 52 BOOL pad1; 53 CARD16 sequenceNumber; 54 CARD32 length; 55 CARD32 number; /* number of modes available */ 56 CARD32 pad2; 57 CARD32 pad3; 58 CARD32 pad4; 59 CARD32 pad5; 60 CARD32 pad6; 61 } xXDGAQueryModesReply; 62 #define sz_xXDGAQueryModesReply 32 63 64 65 typedef struct _XDGASetMode { 66 CARD8 reqType; 67 CARD8 dgaReqType; 68 CARD16 length; 69 CARD32 screen; 70 CARD32 mode; /* mode number to init */ 71 CARD32 pid; /* Pixmap descriptor */ 72 } xXDGASetModeReq; 73 #define sz_xXDGASetModeReq 16 74 75 typedef struct { 76 BYTE type; /* X_Reply */ 77 BOOL pad1; 78 CARD16 sequenceNumber; 79 CARD32 length; 80 CARD32 offset; /* offset into framebuffer map */ 81 CARD32 flags; 82 CARD32 pad2; 83 CARD32 pad3; 84 CARD32 pad4; 85 CARD32 pad5; 86 } xXDGASetModeReply; 87 #define sz_xXDGASetModeReply 32 88 89 typedef struct { 90 CARD8 byte_order; 91 CARD8 depth; 92 CARD16 num; 93 CARD16 bpp; 94 CARD16 name_size; 95 CARD32 vsync_num; 96 CARD32 vsync_den; 97 CARD32 flags; 98 CARD16 image_width; 99 CARD16 image_height; 100 CARD16 pixmap_width; 101 CARD16 pixmap_height; 102 CARD32 bytes_per_scanline; 103 CARD32 red_mask; 104 CARD32 green_mask; 105 CARD32 blue_mask; 106 CARD16 visual_class; 107 CARD16 pad1; 108 CARD16 viewport_width; 109 CARD16 viewport_height; 110 CARD16 viewport_xstep; 111 CARD16 viewport_ystep; 112 CARD16 viewport_xmax; 113 CARD16 viewport_ymax; 114 CARD32 viewport_flags; 115 CARD32 reserved1; 116 CARD32 reserved2; 117 } xXDGAModeInfo; 118 #define sz_xXDGAModeInfo 72 119 120 typedef struct _XDGAOpenFramebuffer { 121 CARD8 reqType; 122 CARD8 dgaReqType; 123 CARD16 length; 124 CARD32 screen; 125 } xXDGAOpenFramebufferReq; 126 #define sz_xXDGAOpenFramebufferReq 8 127 128 typedef struct { 129 BYTE type; /* X_Reply */ 130 BOOL pad1; 131 CARD16 sequenceNumber; 132 CARD32 length; /* device name size if there is one */ 133 CARD32 mem1; /* physical memory */ 134 CARD32 mem2; /* spillover for _alpha_ */ 135 CARD32 size; /* size of map in bytes */ 136 CARD32 offset; /* optional offset into device */ 137 CARD32 extra; /* extra info associated with the map */ 138 CARD32 pad2; 139 } xXDGAOpenFramebufferReply; 140 #define sz_xXDGAOpenFramebufferReply 32 141 142 143 typedef struct _XDGACloseFramebuffer { 144 CARD8 reqType; 145 CARD8 dgaReqType; 146 CARD16 length; 147 CARD32 screen; 148 } xXDGACloseFramebufferReq; 149 #define sz_xXDGACloseFramebufferReq 8 150 151 152 typedef struct _XDGASetViewport { 153 CARD8 reqType; 154 CARD8 dgaReqType; 155 CARD16 length; 156 CARD32 screen; 157 CARD16 x; 158 CARD16 y; 159 CARD32 flags; 160 } xXDGASetViewportReq; 161 #define sz_xXDGASetViewportReq 16 162 163 164 typedef struct _XDGAInstallColormap { 165 CARD8 reqType; 166 CARD8 dgaReqType; 167 CARD16 length; 168 CARD32 screen; 169 CARD32 cmap; 170 } xXDGAInstallColormapReq; 171 #define sz_xXDGAInstallColormapReq 12 172 173 typedef struct _XDGASelectInput { 174 CARD8 reqType; 175 CARD8 dgaReqType; 176 CARD16 length; 177 CARD32 screen; 178 CARD32 mask; 179 } xXDGASelectInputReq; 180 #define sz_xXDGASelectInputReq 12 181 182 typedef struct _XDGAFillRectangle { 183 CARD8 reqType; 184 CARD8 dgaReqType; 185 CARD16 length; 186 CARD32 screen; 187 CARD16 x; 188 CARD16 y; 189 CARD16 width; 190 CARD16 height; 191 CARD32 color; 192 } xXDGAFillRectangleReq; 193 #define sz_xXDGAFillRectangleReq 20 194 195 196 typedef struct _XDGACopyArea { 197 CARD8 reqType; 198 CARD8 dgaReqType; 199 CARD16 length; 200 CARD32 screen; 201 CARD16 srcx; 202 CARD16 srcy; 203 CARD16 width; 204 CARD16 height; 205 CARD16 dstx; 206 CARD16 dsty; 207 } xXDGACopyAreaReq; 208 #define sz_xXDGACopyAreaReq 20 209 210 typedef struct _XDGACopyTransparentArea { 211 CARD8 reqType; 212 CARD8 dgaReqType; 213 CARD16 length; 214 CARD32 screen; 215 CARD16 srcx; 216 CARD16 srcy; 217 CARD16 width; 218 CARD16 height; 219 CARD16 dstx; 220 CARD16 dsty; 221 CARD32 key; 222 } xXDGACopyTransparentAreaReq; 223 #define sz_xXDGACopyTransparentAreaReq 24 224 225 226 typedef struct _XDGAGetViewportStatus { 227 CARD8 reqType; 228 CARD8 dgaReqType; 229 CARD16 length; 230 CARD32 screen; 231 } xXDGAGetViewportStatusReq; 232 #define sz_xXDGAGetViewportStatusReq 8 233 234 typedef struct { 235 BYTE type; 236 BOOL pad1; 237 CARD16 sequenceNumber; 238 CARD32 length; 239 CARD32 status; 240 CARD32 pad2; 241 CARD32 pad3; 242 CARD32 pad4; 243 CARD32 pad5; 244 CARD32 pad6; 245 } xXDGAGetViewportStatusReply; 246 #define sz_xXDGAGetViewportStatusReply 32 247 248 typedef struct _XDGASync { 249 CARD8 reqType; 250 CARD8 dgaReqType; 251 CARD16 length; 252 CARD32 screen; 253 } xXDGASyncReq; 254 #define sz_xXDGASyncReq 8 255 256 typedef struct { 257 BYTE type; 258 BOOL pad1; 259 CARD16 sequenceNumber; 260 CARD32 length; 261 CARD32 pad2; 262 CARD32 pad3; 263 CARD32 pad4; 264 CARD32 pad5; 265 CARD32 pad6; 266 CARD32 pad7; 267 } xXDGASyncReply; 268 #define sz_xXDGASyncReply 32 269 270 typedef struct _XDGASetClientVersion { 271 CARD8 reqType; 272 CARD8 dgaReqType; 273 CARD16 length; 274 CARD16 major; 275 CARD16 minor; 276 } xXDGASetClientVersionReq; 277 #define sz_xXDGASetClientVersionReq 8 278 279 280 typedef struct { 281 CARD8 reqType; 282 CARD8 dgaReqType; 283 CARD16 length; 284 CARD32 screen; 285 CARD16 x; 286 CARD16 y; 287 CARD32 flags; 288 } xXDGAChangePixmapModeReq; 289 #define sz_xXDGAChangePixmapModeReq 16 290 291 typedef struct { 292 BYTE type; 293 BOOL pad1; 294 CARD16 sequenceNumber; 295 CARD32 length; 296 CARD16 x; 297 CARD16 y; 298 CARD32 pad3; 299 CARD32 pad4; 300 CARD32 pad5; 301 CARD32 pad6; 302 CARD32 pad7; 303 } xXDGAChangePixmapModeReply; 304 #define sz_xXDGAChangePixmapModeReply 32 305 306 typedef struct _XDGACreateColormap { 307 CARD8 reqType; 308 CARD8 dgaReqType; 309 CARD16 length; 310 CARD32 screen; 311 CARD32 id; 312 CARD32 mode; 313 CARD8 alloc; 314 CARD8 pad1; 315 CARD16 pad2; 316 } xXDGACreateColormapReq; 317 #define sz_xXDGACreateColormapReq 20 318 319 320 typedef struct { 321 union { 322 struct { 323 BYTE type; 324 BYTE detail; 325 CARD16 sequenceNumber; 326 } u; 327 struct { 328 CARD32 pad0; 329 CARD32 time; 330 INT16 dx; 331 INT16 dy; 332 INT16 screen; 333 CARD16 state; 334 CARD32 pad1; 335 CARD32 pad2; 336 CARD32 pad3; 337 CARD32 pad4; 338 } event; 339 } u; 340 } dgaEvent; 341 342 343 #endif /* _XF86DGAPROTO_H_ */ 344