Mercurial > sdl-ios-xcode
comparison src/video/Xext/extensions/xf86dga.h @ 292:eadc0746dfaf
Added SDL_LockRect() and SDL_UnlockRect()
Incorporated XFree86 extension libraries into the source
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 05 Mar 2002 19:55:32 +0000 |
parents | |
children | 585a7e1285ae |
comparison
equal
deleted
inserted
replaced
291:68a8a8237c09 | 292:eadc0746dfaf |
---|---|
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 <XFree86/extensions/xf86dga1.h> | |
11 #include "SDLname.h" | |
12 | |
13 #define X_XDGAQueryVersion 0 | |
14 | |
15 /* 1 through 9 are in xf86dga1.h */ | |
16 | |
17 /* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */ | |
18 | |
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 | |
28 #define X_XDGASync 21 | |
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 | |
34 | |
35 | |
36 #define XDGAConcurrentAccess 0x00000001 | |
37 #define XDGASolidFillRect 0x00000002 | |
38 #define XDGABlitRect 0x00000004 | |
39 #define XDGABlitTransRect 0x00000008 | |
40 #define XDGAPixmap 0x00000010 | |
41 | |
42 #define XDGAInterlaced 0x00010000 | |
43 #define XDGADoublescan 0x00020000 | |
44 | |
45 #define XDGAFlipImmediate 0x00000001 | |
46 #define XDGAFlipRetrace 0x00000002 | |
47 | |
48 #define XDGANeedRoot 0x00000001 | |
49 | |
50 #define XF86DGANumberEvents 7 | |
51 | |
52 #define XDGAPixmapModeLarge 0 | |
53 #define XDGAPixmapModeSmall 1 | |
54 | |
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) | |
61 | |
62 | |
63 typedef struct { | |
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) */ | |
69 int imageHeight; | |
70 int pixmapWidth; /* Xlib accessible portion (pixels) */ | |
71 int pixmapHeight; /* both fields ignored if no concurrent access */ | |
72 int bytesPerScanline; | |
73 int byteOrder; /* MSBFirst, LSBFirst */ | |
74 int depth; | |
75 int bitsPerPixel; | |
76 unsigned long redMask; | |
77 unsigned long greenMask; | |
78 unsigned long blueMask; | |
79 short visualClass; | |
80 int viewportWidth; | |
81 int viewportHeight; | |
82 int xViewportStep; /* viewport position granularity */ | |
83 int yViewportStep; | |
84 int maxViewportX; /* max viewport origin */ | |
85 int maxViewportY; | |
86 int viewportFlags; /* types of page flipping possible */ | |
87 int reserved1; | |
88 int reserved2; | |
89 } SDL_NAME(XDGAMode); | |
90 | |
91 | |
92 typedef struct { | |
93 SDL_NAME(XDGAMode) mode; | |
94 unsigned char *data; | |
95 Pixmap pixmap; | |
96 } SDL_NAME(XDGADevice); | |
97 | |
98 | |
99 #ifndef _XF86DGA_SERVER_ | |
100 _XFUNCPROTOBEGIN | |
101 | |
102 typedef struct { | |
103 int type; | |
104 unsigned long serial; | |
105 Display *display; | |
106 int screen; | |
107 Time time; | |
108 unsigned int state; | |
109 unsigned int button; | |
110 } SDL_NAME(XDGAButtonEvent); | |
111 | |
112 typedef struct { | |
113 int type; | |
114 unsigned long serial; | |
115 Display *display; | |
116 int screen; | |
117 Time time; | |
118 unsigned int state; | |
119 unsigned int keycode; | |
120 } SDL_NAME(XDGAKeyEvent); | |
121 | |
122 typedef struct { | |
123 int type; | |
124 unsigned long serial; | |
125 Display *display; | |
126 int screen; | |
127 Time time; | |
128 unsigned int state; | |
129 int dx; | |
130 int dy; | |
131 } SDL_NAME(XDGAMotionEvent); | |
132 | |
133 typedef union { | |
134 int type; | |
135 SDL_NAME(XDGAButtonEvent) xbutton; | |
136 SDL_NAME(XDGAKeyEvent) xkey; | |
137 SDL_NAME(XDGAMotionEvent) xmotion; | |
138 long pad[24]; | |
139 } SDL_NAME(XDGAEvent); | |
140 | |
141 Bool SDL_NAME(XDGAQueryExtension)( | |
142 Display *dpy, | |
143 int *eventBase, | |
144 int *erroBase | |
145 ); | |
146 | |
147 Bool SDL_NAME(XDGAQueryVersion)( | |
148 Display *dpy, | |
149 int *majorVersion, | |
150 int *minorVersion | |
151 ); | |
152 | |
153 SDL_NAME(XDGAMode)* SDL_NAME(XDGAQueryModes)( | |
154 Display *dpy, | |
155 int screen, | |
156 int *num | |
157 ); | |
158 | |
159 SDL_NAME(XDGADevice)* SDL_NAME(XDGASetMode)( | |
160 Display *dpy, | |
161 int screen, | |
162 int mode | |
163 ); | |
164 | |
165 Bool SDL_NAME(XDGAOpenFramebuffer)( | |
166 Display *dpy, | |
167 int screen | |
168 ); | |
169 | |
170 void SDL_NAME(XDGACloseFramebuffer)( | |
171 Display *dpy, | |
172 int screen | |
173 ); | |
174 | |
175 void SDL_NAME(XDGASetViewport)( | |
176 Display *dpy, | |
177 int screen, | |
178 int x, | |
179 int y, | |
180 int flags | |
181 ); | |
182 | |
183 void SDL_NAME(XDGAInstallColormap)( | |
184 Display *dpy, | |
185 int screen, | |
186 Colormap cmap | |
187 ); | |
188 | |
189 Colormap SDL_NAME(XDGACreateColormap)( | |
190 Display *dpy, | |
191 int screen, | |
192 SDL_NAME(XDGADevice) *device, | |
193 int alloc | |
194 ); | |
195 | |
196 void SDL_NAME(XDGASelectInput)( | |
197 Display *dpy, | |
198 int screen, | |
199 long event_mask | |
200 ); | |
201 | |
202 void SDL_NAME(XDGAFillRectangle)( | |
203 Display *dpy, | |
204 int screen, | |
205 int x, | |
206 int y, | |
207 unsigned int width, | |
208 unsigned int height, | |
209 unsigned long color | |
210 ); | |
211 | |
212 | |
213 void SDL_NAME(XDGACopyArea)( | |
214 Display *dpy, | |
215 int screen, | |
216 int srcx, | |
217 int srcy, | |
218 unsigned int width, | |
219 unsigned int height, | |
220 int dstx, | |
221 int dsty | |
222 ); | |
223 | |
224 | |
225 void SDL_NAME(XDGACopyTransparentArea)( | |
226 Display *dpy, | |
227 int screen, | |
228 int srcx, | |
229 int srcy, | |
230 unsigned int width, | |
231 unsigned int height, | |
232 int dstx, | |
233 int dsty, | |
234 unsigned long key | |
235 ); | |
236 | |
237 int SDL_NAME(XDGAGetViewportStatus)( | |
238 Display *dpy, | |
239 int screen | |
240 ); | |
241 | |
242 void SDL_NAME(XDGASync)( | |
243 Display *dpy, | |
244 int screen | |
245 ); | |
246 | |
247 Bool SDL_NAME(XDGASetClientVersion)( | |
248 Display *dpy | |
249 ); | |
250 | |
251 void SDL_NAME(XDGAChangePixmapMode)( | |
252 Display *dpy, | |
253 int screen, | |
254 int *x, | |
255 int *y, | |
256 int mode | |
257 ); | |
258 | |
259 | |
260 void SDL_NAME(XDGAKeyEventToXKeyEvent)(SDL_NAME(XDGAKeyEvent)* dk, XKeyEvent* xk); | |
261 | |
262 | |
263 _XFUNCPROTOEND | |
264 #endif /* _XF86DGA_SERVER_ */ | |
265 #endif /* _XF86DGA_H_ */ |