2 Copyright (c) 1999 XFree86 Inc
4 /* $XFree86: xc/include/extensions/xf86dga.h,v 3.21 2001/08/01 00:44:36 tsi Exp $ */
9 #include <X11/Xfuncproto.h>
13 #define X_XDGAQueryVersion 0
15 /* 1 through 9 are in xf86dga1.h */
17 /* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */
19 #define X_XDGAQueryModes 12
20 #define X_XDGASetMode 13
21 #define X_XDGASetViewport 14
22 #define X_XDGAInstallColormap 15
23 #define X_XDGASelectInput 16
24 #define X_XDGAFillRectangle 17
25 #define X_XDGACopyArea 18
26 #define X_XDGACopyTransparentArea 19
27 #define X_XDGAGetViewportStatus 20
29 #define X_XDGAOpenFramebuffer 22
30 #define X_XDGACloseFramebuffer 23
31 #define X_XDGASetClientVersion 24
32 #define X_XDGAChangePixmapMode 25
33 #define X_XDGACreateColormap 26
36 #define XDGAConcurrentAccess 0x00000001
37 #define XDGASolidFillRect 0x00000002
38 #define XDGABlitRect 0x00000004
39 #define XDGABlitTransRect 0x00000008
40 #define XDGAPixmap 0x00000010
42 #define XDGAInterlaced 0x00010000
43 #define XDGADoublescan 0x00020000
45 #define XDGAFlipImmediate 0x00000001
46 #define XDGAFlipRetrace 0x00000002
48 #define XDGANeedRoot 0x00000001
50 #define XF86DGANumberEvents 7
52 #define XDGAPixmapModeLarge 0
53 #define XDGAPixmapModeSmall 1
55 #define XF86DGAClientNotLocal 0
56 #define XF86DGANoDirectVideoMode 1
57 #define XF86DGAScreenNotActive 2
58 #define XF86DGADirectNotActivated 3
59 #define XF86DGAOperationNotSupported 4
60 #define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1)
64 int num; /* A unique identifier for the mode (num > 0) */
65 char *name; /* name of mode given in the XF86Config */
66 float verticalRefresh;
67 int flags; /* DGA_CONCURRENT_ACCESS, etc... */
68 int imageWidth; /* linear accessible portion (pixels) */
70 int pixmapWidth; /* Xlib accessible portion (pixels) */
71 int pixmapHeight; /* both fields ignored if no concurrent access */
73 int byteOrder; /* MSBFirst, LSBFirst */
76 unsigned long redMask;
77 unsigned long greenMask;
78 unsigned long blueMask;
82 int xViewportStep; /* viewport position granularity */
84 int maxViewportX; /* max viewport origin */
86 int viewportFlags; /* types of page flipping possible */
93 SDL_NAME(XDGAMode) mode;
96 } SDL_NAME(XDGADevice);
99 #ifndef _XF86DGA_SERVER_
104 unsigned long serial;
110 } SDL_NAME(XDGAButtonEvent);
114 unsigned long serial;
119 unsigned int keycode;
120 } SDL_NAME(XDGAKeyEvent);
124 unsigned long serial;
131 } SDL_NAME(XDGAMotionEvent);
135 SDL_NAME(XDGAButtonEvent) xbutton;
136 SDL_NAME(XDGAKeyEvent) xkey;
137 SDL_NAME(XDGAMotionEvent) xmotion;
139 } SDL_NAME(XDGAEvent);
141 Bool SDL_NAME(XDGAQueryExtension)(
147 Bool SDL_NAME(XDGAQueryVersion)(
153 SDL_NAME(XDGAMode)* SDL_NAME(XDGAQueryModes)(
159 SDL_NAME(XDGADevice)* SDL_NAME(XDGASetMode)(
165 Bool SDL_NAME(XDGAOpenFramebuffer)(
170 void SDL_NAME(XDGACloseFramebuffer)(
175 void SDL_NAME(XDGASetViewport)(
183 void SDL_NAME(XDGAInstallColormap)(
189 Colormap SDL_NAME(XDGACreateColormap)(
192 SDL_NAME(XDGADevice) *device,
196 void SDL_NAME(XDGASelectInput)(
202 void SDL_NAME(XDGAFillRectangle)(
213 void SDL_NAME(XDGACopyArea)(
225 void SDL_NAME(XDGACopyTransparentArea)(
237 int SDL_NAME(XDGAGetViewportStatus)(
242 void SDL_NAME(XDGASync)(
247 Bool SDL_NAME(XDGASetClientVersion)(
251 void SDL_NAME(XDGAChangePixmapMode)(
260 void SDL_NAME(XDGAKeyEventToXKeyEvent)(SDL_NAME(XDGAKeyEvent)* dk, XKeyEvent* xk);
264 #endif /* _XF86DGA_SERVER_ */
265 #endif /* _XF86DGA_H_ */