VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/4.3/include/extensions/xf86dga.h@ 25452

Last change on this file since 25452 was 25452, checked in by vboxsync, 15 years ago

Additions/x11: added include files needed for building vboxmouse with XFree86 4.3 and equivalent X.Org versions

  • Property svn:eol-style set to native
File size: 5.0 KB
Line 
1/*
2 Copyright (c) 1999 XFree86 Inc
3*/
4/* $XFree86: xc/include/extensions/xf86dga.h,v 3.21 2001/08/01 00:44:36 tsi Exp $ */
5
6#ifndef _XF86DGA_H_
7#define _XF86DGA_H_
8
9#include <X11/Xfuncproto.h>
10#include <X11/extensions/xf86dga1.h>
11
12#define X_XDGAQueryVersion 0
13
14/* 1 through 9 are in xf86dga1.h */
15
16/* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */
17
18#define X_XDGAQueryModes 12
19#define X_XDGASetMode 13
20#define X_XDGASetViewport 14
21#define X_XDGAInstallColormap 15
22#define X_XDGASelectInput 16
23#define X_XDGAFillRectangle 17
24#define X_XDGACopyArea 18
25#define X_XDGACopyTransparentArea 19
26#define X_XDGAGetViewportStatus 20
27#define X_XDGASync 21
28#define X_XDGAOpenFramebuffer 22
29#define X_XDGACloseFramebuffer 23
30#define X_XDGASetClientVersion 24
31#define X_XDGAChangePixmapMode 25
32#define X_XDGACreateColormap 26
33
34
35#define XDGAConcurrentAccess 0x00000001
36#define XDGASolidFillRect 0x00000002
37#define XDGABlitRect 0x00000004
38#define XDGABlitTransRect 0x00000008
39#define XDGAPixmap 0x00000010
40
41#define XDGAInterlaced 0x00010000
42#define XDGADoublescan 0x00020000
43
44#define XDGAFlipImmediate 0x00000001
45#define XDGAFlipRetrace 0x00000002
46
47#define XDGANeedRoot 0x00000001
48
49#define XF86DGANumberEvents 7
50
51#define XDGAPixmapModeLarge 0
52#define XDGAPixmapModeSmall 1
53
54#define XF86DGAClientNotLocal 0
55#define XF86DGANoDirectVideoMode 1
56#define XF86DGAScreenNotActive 2
57#define XF86DGADirectNotActivated 3
58#define XF86DGAOperationNotSupported 4
59#define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1)
60
61
62typedef struct {
63 int num; /* A unique identifier for the mode (num > 0) */
64 char *name; /* name of mode given in the XF86Config */
65 float verticalRefresh;
66 int flags; /* DGA_CONCURRENT_ACCESS, etc... */
67 int imageWidth; /* linear accessible portion (pixels) */
68 int imageHeight;
69 int pixmapWidth; /* Xlib accessible portion (pixels) */
70 int pixmapHeight; /* both fields ignored if no concurrent access */
71 int bytesPerScanline;
72 int byteOrder; /* MSBFirst, LSBFirst */
73 int depth;
74 int bitsPerPixel;
75 unsigned long redMask;
76 unsigned long greenMask;
77 unsigned long blueMask;
78 short visualClass;
79 int viewportWidth;
80 int viewportHeight;
81 int xViewportStep; /* viewport position granularity */
82 int yViewportStep;
83 int maxViewportX; /* max viewport origin */
84 int maxViewportY;
85 int viewportFlags; /* types of page flipping possible */
86 int reserved1;
87 int reserved2;
88} XDGAMode;
89
90
91typedef struct {
92 XDGAMode mode;
93 unsigned char *data;
94 Pixmap pixmap;
95} XDGADevice;
96
97
98#ifndef _XF86DGA_SERVER_
99_XFUNCPROTOBEGIN
100
101typedef struct {
102 int type;
103 unsigned long serial;
104 Display *display;
105 int screen;
106 Time time;
107 unsigned int state;
108 unsigned int button;
109} XDGAButtonEvent;
110
111typedef struct {
112 int type;
113 unsigned long serial;
114 Display *display;
115 int screen;
116 Time time;
117 unsigned int state;
118 unsigned int keycode;
119} XDGAKeyEvent;
120
121typedef struct {
122 int type;
123 unsigned long serial;
124 Display *display;
125 int screen;
126 Time time;
127 unsigned int state;
128 int dx;
129 int dy;
130} XDGAMotionEvent;
131
132typedef union {
133 int type;
134 XDGAButtonEvent xbutton;
135 XDGAKeyEvent xkey;
136 XDGAMotionEvent xmotion;
137 long pad[24];
138} XDGAEvent;
139
140Bool XDGAQueryExtension(
141 Display *dpy,
142 int *eventBase,
143 int *erroBase
144);
145
146Bool XDGAQueryVersion(
147 Display *dpy,
148 int *majorVersion,
149 int *minorVersion
150);
151
152XDGAMode* XDGAQueryModes(
153 Display *dpy,
154 int screen,
155 int *num
156);
157
158XDGADevice* XDGASetMode(
159 Display *dpy,
160 int screen,
161 int mode
162);
163
164Bool XDGAOpenFramebuffer(
165 Display *dpy,
166 int screen
167);
168
169void XDGACloseFramebuffer(
170 Display *dpy,
171 int screen
172);
173
174void XDGASetViewport(
175 Display *dpy,
176 int screen,
177 int x,
178 int y,
179 int flags
180);
181
182void XDGAInstallColormap(
183 Display *dpy,
184 int screen,
185 Colormap cmap
186);
187
188Colormap XDGACreateColormap(
189 Display *dpy,
190 int screen,
191 XDGADevice *device,
192 int alloc
193);
194
195void XDGASelectInput(
196 Display *dpy,
197 int screen,
198 long event_mask
199);
200
201void XDGAFillRectangle(
202 Display *dpy,
203 int screen,
204 int x,
205 int y,
206 unsigned int width,
207 unsigned int height,
208 unsigned long color
209);
210
211
212void XDGACopyArea(
213 Display *dpy,
214 int screen,
215 int srcx,
216 int srcy,
217 unsigned int width,
218 unsigned int height,
219 int dstx,
220 int dsty
221);
222
223
224void XDGACopyTransparentArea(
225 Display *dpy,
226 int screen,
227 int srcx,
228 int srcy,
229 unsigned int width,
230 unsigned int height,
231 int dstx,
232 int dsty,
233 unsigned long key
234);
235
236int XDGAGetViewportStatus(
237 Display *dpy,
238 int screen
239);
240
241void XDGASync(
242 Display *dpy,
243 int screen
244);
245
246Bool XDGASetClientVersion(
247 Display *dpy
248);
249
250void XDGAChangePixmapMode(
251 Display *dpy,
252 int screen,
253 int *x,
254 int *y,
255 int mode
256);
257
258
259void XDGAKeyEventToXKeyEvent(XDGAKeyEvent* dk, XKeyEvent* xk);
260
261
262_XFUNCPROTOEND
263#endif /* _XF86DGA_SERVER_ */
264#endif /* _XF86DGA_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette