117ca54c3Smrg/* 217ca54c3Smrg 317ca54c3SmrgCopyright (c) 1995 Jon Tombs 417ca54c3SmrgCopyright (c) 1995 XFree86 Inc. 517ca54c3Smrg 617ca54c3Smrg*/ 717ca54c3Smrg 817ca54c3Smrg#ifndef _XF86DGAPROTO_H_ 917ca54c3Smrg#define _XF86DGAPROTO_H_ 1017ca54c3Smrg 1117ca54c3Smrg#include <X11/extensions/xf86dga1proto.h> 1217ca54c3Smrg#include <X11/extensions/xf86dgaconst.h> 1317ca54c3Smrg 1417ca54c3Smrg#define XF86DGANAME "XFree86-DGA" 1517ca54c3Smrg 1617ca54c3Smrg#define XDGA_MAJOR_VERSION 2 /* current version numbers */ 1717ca54c3Smrg#define XDGA_MINOR_VERSION 0 1817ca54c3Smrg 1917ca54c3Smrg 2017ca54c3Smrgtypedef struct _XDGAQueryVersion { 2117ca54c3Smrg CARD8 reqType; /* always DGAReqCode */ 2217ca54c3Smrg CARD8 dgaReqType; /* always X_DGAQueryVersion */ 23ea1d6981Smrg CARD16 length; 2417ca54c3Smrg} xXDGAQueryVersionReq; 2517ca54c3Smrg#define sz_xXDGAQueryVersionReq 4 2617ca54c3Smrg 2717ca54c3Smrgtypedef struct { 2817ca54c3Smrg BYTE type; /* X_Reply */ 2917ca54c3Smrg BOOL pad1; 30ea1d6981Smrg CARD16 sequenceNumber; 31ea1d6981Smrg CARD32 length; 32ea1d6981Smrg CARD16 majorVersion; /* major version of DGA protocol */ 33ea1d6981Smrg CARD16 minorVersion; /* minor version of DGA protocol */ 34ea1d6981Smrg CARD32 pad2; 35ea1d6981Smrg CARD32 pad3; 36ea1d6981Smrg CARD32 pad4; 37ea1d6981Smrg CARD32 pad5; 38ea1d6981Smrg CARD32 pad6; 3917ca54c3Smrg} xXDGAQueryVersionReply; 4017ca54c3Smrg#define sz_xXDGAQueryVersionReply 32 4117ca54c3Smrg 4217ca54c3Smrgtypedef struct _XDGAQueryModes { 4317ca54c3Smrg CARD8 reqType; 4417ca54c3Smrg CARD8 dgaReqType; 45ea1d6981Smrg CARD16 length; 46ea1d6981Smrg CARD32 screen; 4717ca54c3Smrg} xXDGAQueryModesReq; 4817ca54c3Smrg#define sz_xXDGAQueryModesReq 8 4917ca54c3Smrg 5017ca54c3Smrgtypedef struct { 5117ca54c3Smrg BYTE type; /* X_Reply */ 5217ca54c3Smrg BOOL pad1; 53ea1d6981Smrg CARD16 sequenceNumber; 54ea1d6981Smrg CARD32 length; 55ea1d6981Smrg CARD32 number; /* number of modes available */ 56ea1d6981Smrg CARD32 pad2; 57ea1d6981Smrg CARD32 pad3; 58ea1d6981Smrg CARD32 pad4; 59ea1d6981Smrg CARD32 pad5; 60ea1d6981Smrg CARD32 pad6; 6117ca54c3Smrg} xXDGAQueryModesReply; 6217ca54c3Smrg#define sz_xXDGAQueryModesReply 32 6317ca54c3Smrg 6417ca54c3Smrg 6517ca54c3Smrgtypedef struct _XDGASetMode { 6617ca54c3Smrg CARD8 reqType; 6717ca54c3Smrg CARD8 dgaReqType; 68ea1d6981Smrg CARD16 length; 69ea1d6981Smrg CARD32 screen; 70ea1d6981Smrg CARD32 mode; /* mode number to init */ 71ea1d6981Smrg CARD32 pid; /* Pixmap descriptor */ 7217ca54c3Smrg} xXDGASetModeReq; 7317ca54c3Smrg#define sz_xXDGASetModeReq 16 7417ca54c3Smrg 7517ca54c3Smrgtypedef struct { 7617ca54c3Smrg BYTE type; /* X_Reply */ 7717ca54c3Smrg BOOL pad1; 78ea1d6981Smrg CARD16 sequenceNumber; 79ea1d6981Smrg CARD32 length; 80ea1d6981Smrg CARD32 offset; /* offset into framebuffer map */ 81ea1d6981Smrg CARD32 flags; 82ea1d6981Smrg CARD32 pad2; 83ea1d6981Smrg CARD32 pad3; 84ea1d6981Smrg CARD32 pad4; 85ea1d6981Smrg CARD32 pad5; 8617ca54c3Smrg} xXDGASetModeReply; 8717ca54c3Smrg#define sz_xXDGASetModeReply 32 8817ca54c3Smrg 8917ca54c3Smrgtypedef struct { 9017ca54c3Smrg CARD8 byte_order; 9117ca54c3Smrg CARD8 depth; 92ea1d6981Smrg CARD16 num; 93ea1d6981Smrg CARD16 bpp; 94ea1d6981Smrg CARD16 name_size; 95ea1d6981Smrg CARD32 vsync_num; 96ea1d6981Smrg CARD32 vsync_den; 97ea1d6981Smrg CARD32 flags; 98ea1d6981Smrg CARD16 image_width; 99ea1d6981Smrg CARD16 image_height; 100ea1d6981Smrg CARD16 pixmap_width; 101ea1d6981Smrg CARD16 pixmap_height; 102ea1d6981Smrg CARD32 bytes_per_scanline; 103ea1d6981Smrg CARD32 red_mask; 104ea1d6981Smrg CARD32 green_mask; 105ea1d6981Smrg CARD32 blue_mask; 106ea1d6981Smrg CARD16 visual_class; 107ea1d6981Smrg CARD16 pad1; 108ea1d6981Smrg CARD16 viewport_width; 109ea1d6981Smrg CARD16 viewport_height; 110ea1d6981Smrg CARD16 viewport_xstep; 111ea1d6981Smrg CARD16 viewport_ystep; 112ea1d6981Smrg CARD16 viewport_xmax; 113ea1d6981Smrg CARD16 viewport_ymax; 114ea1d6981Smrg CARD32 viewport_flags; 115ea1d6981Smrg CARD32 reserved1; 116ea1d6981Smrg CARD32 reserved2; 11717ca54c3Smrg} xXDGAModeInfo; 11817ca54c3Smrg#define sz_xXDGAModeInfo 72 11917ca54c3Smrg 12017ca54c3Smrgtypedef struct _XDGAOpenFramebuffer { 12117ca54c3Smrg CARD8 reqType; 12217ca54c3Smrg CARD8 dgaReqType; 123ea1d6981Smrg CARD16 length; 124ea1d6981Smrg CARD32 screen; 12517ca54c3Smrg} xXDGAOpenFramebufferReq; 12617ca54c3Smrg#define sz_xXDGAOpenFramebufferReq 8 12717ca54c3Smrg 12817ca54c3Smrgtypedef struct { 12917ca54c3Smrg BYTE type; /* X_Reply */ 13017ca54c3Smrg BOOL pad1; 131ea1d6981Smrg CARD16 sequenceNumber; 132ea1d6981Smrg CARD32 length; /* device name size if there is one */ 133ea1d6981Smrg CARD32 mem1; /* physical memory */ 134ea1d6981Smrg CARD32 mem2; /* spillover for _alpha_ */ 135ea1d6981Smrg CARD32 size; /* size of map in bytes */ 136ea1d6981Smrg CARD32 offset; /* optional offset into device */ 137ea1d6981Smrg CARD32 extra; /* extra info associated with the map */ 138ea1d6981Smrg CARD32 pad2; 13917ca54c3Smrg} xXDGAOpenFramebufferReply; 14017ca54c3Smrg#define sz_xXDGAOpenFramebufferReply 32 14117ca54c3Smrg 14217ca54c3Smrg 14317ca54c3Smrgtypedef struct _XDGACloseFramebuffer { 14417ca54c3Smrg CARD8 reqType; 14517ca54c3Smrg CARD8 dgaReqType; 146ea1d6981Smrg CARD16 length; 147ea1d6981Smrg CARD32 screen; 14817ca54c3Smrg} xXDGACloseFramebufferReq; 14917ca54c3Smrg#define sz_xXDGACloseFramebufferReq 8 15017ca54c3Smrg 15117ca54c3Smrg 15217ca54c3Smrgtypedef struct _XDGASetViewport { 15317ca54c3Smrg CARD8 reqType; 15417ca54c3Smrg CARD8 dgaReqType; 155ea1d6981Smrg CARD16 length; 156ea1d6981Smrg CARD32 screen; 157ea1d6981Smrg CARD16 x; 158ea1d6981Smrg CARD16 y; 159ea1d6981Smrg CARD32 flags; 16017ca54c3Smrg} xXDGASetViewportReq; 16117ca54c3Smrg#define sz_xXDGASetViewportReq 16 16217ca54c3Smrg 16317ca54c3Smrg 16417ca54c3Smrgtypedef struct _XDGAInstallColormap { 16517ca54c3Smrg CARD8 reqType; 16617ca54c3Smrg CARD8 dgaReqType; 167ea1d6981Smrg CARD16 length; 168ea1d6981Smrg CARD32 screen; 169ea1d6981Smrg CARD32 cmap; 17017ca54c3Smrg} xXDGAInstallColormapReq; 17117ca54c3Smrg#define sz_xXDGAInstallColormapReq 12 17217ca54c3Smrg 17317ca54c3Smrgtypedef struct _XDGASelectInput { 17417ca54c3Smrg CARD8 reqType; 17517ca54c3Smrg CARD8 dgaReqType; 176ea1d6981Smrg CARD16 length; 177ea1d6981Smrg CARD32 screen; 178ea1d6981Smrg CARD32 mask; 17917ca54c3Smrg} xXDGASelectInputReq; 18017ca54c3Smrg#define sz_xXDGASelectInputReq 12 18117ca54c3Smrg 18217ca54c3Smrgtypedef struct _XDGAFillRectangle { 18317ca54c3Smrg CARD8 reqType; 18417ca54c3Smrg CARD8 dgaReqType; 185ea1d6981Smrg CARD16 length; 186ea1d6981Smrg CARD32 screen; 187ea1d6981Smrg CARD16 x; 188ea1d6981Smrg CARD16 y; 189ea1d6981Smrg CARD16 width; 190ea1d6981Smrg CARD16 height; 191ea1d6981Smrg CARD32 color; 19217ca54c3Smrg} xXDGAFillRectangleReq; 19317ca54c3Smrg#define sz_xXDGAFillRectangleReq 20 19417ca54c3Smrg 19517ca54c3Smrg 19617ca54c3Smrgtypedef struct _XDGACopyArea { 19717ca54c3Smrg CARD8 reqType; 19817ca54c3Smrg CARD8 dgaReqType; 199ea1d6981Smrg CARD16 length; 200ea1d6981Smrg CARD32 screen; 201ea1d6981Smrg CARD16 srcx; 202ea1d6981Smrg CARD16 srcy; 203ea1d6981Smrg CARD16 width; 204ea1d6981Smrg CARD16 height; 205ea1d6981Smrg CARD16 dstx; 206ea1d6981Smrg CARD16 dsty; 20717ca54c3Smrg} xXDGACopyAreaReq; 20817ca54c3Smrg#define sz_xXDGACopyAreaReq 20 20917ca54c3Smrg 21017ca54c3Smrgtypedef struct _XDGACopyTransparentArea { 21117ca54c3Smrg CARD8 reqType; 21217ca54c3Smrg CARD8 dgaReqType; 213ea1d6981Smrg CARD16 length; 214ea1d6981Smrg CARD32 screen; 215ea1d6981Smrg CARD16 srcx; 216ea1d6981Smrg CARD16 srcy; 217ea1d6981Smrg CARD16 width; 218ea1d6981Smrg CARD16 height; 219ea1d6981Smrg CARD16 dstx; 220ea1d6981Smrg CARD16 dsty; 221ea1d6981Smrg CARD32 key; 22217ca54c3Smrg} xXDGACopyTransparentAreaReq; 22317ca54c3Smrg#define sz_xXDGACopyTransparentAreaReq 24 22417ca54c3Smrg 22517ca54c3Smrg 22617ca54c3Smrgtypedef struct _XDGAGetViewportStatus { 22717ca54c3Smrg CARD8 reqType; 22817ca54c3Smrg CARD8 dgaReqType; 229ea1d6981Smrg CARD16 length; 230ea1d6981Smrg CARD32 screen; 23117ca54c3Smrg} xXDGAGetViewportStatusReq; 23217ca54c3Smrg#define sz_xXDGAGetViewportStatusReq 8 23317ca54c3Smrg 23417ca54c3Smrgtypedef struct { 235ea1d6981Smrg BYTE type; 236ea1d6981Smrg BOOL pad1; 237ea1d6981Smrg CARD16 sequenceNumber; 238ea1d6981Smrg CARD32 length; 239ea1d6981Smrg CARD32 status; 240ea1d6981Smrg CARD32 pad2; 241ea1d6981Smrg CARD32 pad3; 242ea1d6981Smrg CARD32 pad4; 243ea1d6981Smrg CARD32 pad5; 244ea1d6981Smrg CARD32 pad6; 24517ca54c3Smrg} xXDGAGetViewportStatusReply; 24617ca54c3Smrg#define sz_xXDGAGetViewportStatusReply 32 24717ca54c3Smrg 24817ca54c3Smrgtypedef struct _XDGASync { 24917ca54c3Smrg CARD8 reqType; 25017ca54c3Smrg CARD8 dgaReqType; 251ea1d6981Smrg CARD16 length; 252ea1d6981Smrg CARD32 screen; 25317ca54c3Smrg} xXDGASyncReq; 25417ca54c3Smrg#define sz_xXDGASyncReq 8 25517ca54c3Smrg 25617ca54c3Smrgtypedef struct { 257ea1d6981Smrg BYTE type; 258ea1d6981Smrg BOOL pad1; 259ea1d6981Smrg CARD16 sequenceNumber; 260ea1d6981Smrg CARD32 length; 261ea1d6981Smrg CARD32 pad2; 262ea1d6981Smrg CARD32 pad3; 263ea1d6981Smrg CARD32 pad4; 264ea1d6981Smrg CARD32 pad5; 265ea1d6981Smrg CARD32 pad6; 266ea1d6981Smrg CARD32 pad7; 26717ca54c3Smrg} xXDGASyncReply; 26817ca54c3Smrg#define sz_xXDGASyncReply 32 26917ca54c3Smrg 27017ca54c3Smrgtypedef struct _XDGASetClientVersion { 27117ca54c3Smrg CARD8 reqType; 27217ca54c3Smrg CARD8 dgaReqType; 273ea1d6981Smrg CARD16 length; 274ea1d6981Smrg CARD16 major; 275ea1d6981Smrg CARD16 minor; 27617ca54c3Smrg} xXDGASetClientVersionReq; 27717ca54c3Smrg#define sz_xXDGASetClientVersionReq 8 27817ca54c3Smrg 27917ca54c3Smrg 28017ca54c3Smrgtypedef struct { 28117ca54c3Smrg CARD8 reqType; 28217ca54c3Smrg CARD8 dgaReqType; 283ea1d6981Smrg CARD16 length; 284ea1d6981Smrg CARD32 screen; 285ea1d6981Smrg CARD16 x; 286ea1d6981Smrg CARD16 y; 287ea1d6981Smrg CARD32 flags; 28817ca54c3Smrg} xXDGAChangePixmapModeReq; 28917ca54c3Smrg#define sz_xXDGAChangePixmapModeReq 16 29017ca54c3Smrg 29117ca54c3Smrgtypedef struct { 292ea1d6981Smrg BYTE type; 293ea1d6981Smrg BOOL pad1; 294ea1d6981Smrg CARD16 sequenceNumber; 295ea1d6981Smrg CARD32 length; 296ea1d6981Smrg CARD16 x; 297ea1d6981Smrg CARD16 y; 298ea1d6981Smrg CARD32 pad3; 299ea1d6981Smrg CARD32 pad4; 300ea1d6981Smrg CARD32 pad5; 301ea1d6981Smrg CARD32 pad6; 302ea1d6981Smrg CARD32 pad7; 30317ca54c3Smrg} xXDGAChangePixmapModeReply; 30417ca54c3Smrg#define sz_xXDGAChangePixmapModeReply 32 30517ca54c3Smrg 30617ca54c3Smrgtypedef struct _XDGACreateColormap { 30717ca54c3Smrg CARD8 reqType; 30817ca54c3Smrg CARD8 dgaReqType; 309ea1d6981Smrg CARD16 length; 310ea1d6981Smrg CARD32 screen; 311ea1d6981Smrg CARD32 id; 312ea1d6981Smrg CARD32 mode; 31317ca54c3Smrg CARD8 alloc; 31417ca54c3Smrg CARD8 pad1; 31517ca54c3Smrg CARD16 pad2; 31617ca54c3Smrg} xXDGACreateColormapReq; 31717ca54c3Smrg#define sz_xXDGACreateColormapReq 20 31817ca54c3Smrg 31917ca54c3Smrg 32017ca54c3Smrgtypedef struct { 32117ca54c3Smrg union { 32217ca54c3Smrg struct { 32317ca54c3Smrg BYTE type; 32417ca54c3Smrg BYTE detail; 325ea1d6981Smrg CARD16 sequenceNumber; 32617ca54c3Smrg } u; 32717ca54c3Smrg struct { 328ea1d6981Smrg CARD32 pad0; 329ea1d6981Smrg CARD32 time; 330ea1d6981Smrg INT16 dx; 331ea1d6981Smrg INT16 dy; 332ea1d6981Smrg INT16 screen; 333ea1d6981Smrg CARD16 state; 334ea1d6981Smrg CARD32 pad1; 335ea1d6981Smrg CARD32 pad2; 336ea1d6981Smrg CARD32 pad3; 337ea1d6981Smrg CARD32 pad4; 33817ca54c3Smrg } event; 33917ca54c3Smrg } u; 34017ca54c3Smrg} dgaEvent; 34117ca54c3Smrg 34217ca54c3Smrg 34317ca54c3Smrg#endif /* _XF86DGAPROTO_H_ */ 34417ca54c3Smrg 345