comparison src/video/Xext/extensions/xf86dga.h @ 1662:782fd950bd46 SDL-1.3

Revamp of the video system in progress - adding support for multiple displays, multiple windows, and a full video mode selection API. WARNING: None of the video drivers have been updated for the new API yet! The API is still under design and very fluid. The code is now run through a consistent indent format: indent -i4 -nut -nsc -br -ce The headers are being converted to automatically generate doxygen documentation.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 28 May 2006 13:04:16 +0000
parents 19418e4422cb
children 4da1ee79c9af
comparison
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
58 #define XF86DGADirectNotActivated 3 58 #define XF86DGADirectNotActivated 3
59 #define XF86DGAOperationNotSupported 4 59 #define XF86DGAOperationNotSupported 4
60 #define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1) 60 #define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1)
61 61
62 62
63 typedef struct { 63 typedef struct
64 int num; /* A unique identifier for the mode (num > 0) */ 64 {
65 char *name; /* name of mode given in the XF86Config */ 65 int num; /* A unique identifier for the mode (num > 0) */
66 float verticalRefresh; 66 char *name; /* name of mode given in the XF86Config */
67 int flags; /* DGA_CONCURRENT_ACCESS, etc... */ 67 float verticalRefresh;
68 int imageWidth; /* linear accessible portion (pixels) */ 68 int flags; /* DGA_CONCURRENT_ACCESS, etc... */
69 int imageHeight; 69 int imageWidth; /* linear accessible portion (pixels) */
70 int pixmapWidth; /* Xlib accessible portion (pixels) */ 70 int imageHeight;
71 int pixmapHeight; /* both fields ignored if no concurrent access */ 71 int pixmapWidth; /* Xlib accessible portion (pixels) */
72 int bytesPerScanline; 72 int pixmapHeight; /* both fields ignored if no concurrent access */
73 int byteOrder; /* MSBFirst, LSBFirst */ 73 int bytesPerScanline;
74 int depth; 74 int byteOrder; /* MSBFirst, LSBFirst */
75 int bitsPerPixel; 75 int depth;
76 unsigned long redMask; 76 int bitsPerPixel;
77 unsigned long greenMask; 77 unsigned long redMask;
78 unsigned long blueMask; 78 unsigned long greenMask;
79 short visualClass; 79 unsigned long blueMask;
80 int viewportWidth; 80 short visualClass;
81 int viewportHeight; 81 int viewportWidth;
82 int xViewportStep; /* viewport position granularity */ 82 int viewportHeight;
83 int yViewportStep; 83 int xViewportStep; /* viewport position granularity */
84 int maxViewportX; /* max viewport origin */ 84 int yViewportStep;
85 int maxViewportY; 85 int maxViewportX; /* max viewport origin */
86 int viewportFlags; /* types of page flipping possible */ 86 int maxViewportY;
87 int reserved1; 87 int viewportFlags; /* types of page flipping possible */
88 int reserved2; 88 int reserved1;
89 } SDL_NAME(XDGAMode); 89 int reserved2;
90 90 } SDL_NAME (XDGAMode);
91 91
92 typedef struct { 92
93 SDL_NAME(XDGAMode) mode; 93 typedef struct
94 unsigned char *data; 94 {
95 Pixmap pixmap; 95 SDL_NAME (XDGAMode) mode;
96 } SDL_NAME(XDGADevice); 96 unsigned char *data;
97 Pixmap pixmap;
98 } SDL_NAME (XDGADevice);
97 99
98 100
99 #ifndef _XF86DGA_SERVER_ 101 #ifndef _XF86DGA_SERVER_
100 _XFUNCPROTOBEGIN 102 _XFUNCPROTOBEGIN typedef struct
101 103 {
102 typedef struct { 104 int type;
103 int type; 105 unsigned long serial;
104 unsigned long serial; 106 Display *display;
105 Display *display; 107 int screen;
106 int screen; 108 Time time;
107 Time time; 109 unsigned int state;
108 unsigned int state; 110 unsigned int button;
109 unsigned int button; 111 } SDL_NAME (XDGAButtonEvent);
110 } SDL_NAME(XDGAButtonEvent); 112
111 113 typedef struct
112 typedef struct { 114 {
113 int type; 115 int type;
114 unsigned long serial; 116 unsigned long serial;
115 Display *display; 117 Display *display;
116 int screen; 118 int screen;
117 Time time; 119 Time time;
118 unsigned int state; 120 unsigned int state;
119 unsigned int keycode; 121 unsigned int keycode;
120 } SDL_NAME(XDGAKeyEvent); 122 } SDL_NAME (XDGAKeyEvent);
121 123
122 typedef struct { 124 typedef struct
123 int type; 125 {
124 unsigned long serial; 126 int type;
125 Display *display; 127 unsigned long serial;
126 int screen; 128 Display *display;
127 Time time; 129 int screen;
128 unsigned int state; 130 Time time;
129 int dx; 131 unsigned int state;
130 int dy; 132 int dx;
131 } SDL_NAME(XDGAMotionEvent); 133 int dy;
132 134 } SDL_NAME (XDGAMotionEvent);
133 typedef union { 135
134 int type; 136 typedef union
135 SDL_NAME(XDGAButtonEvent) xbutton; 137 {
136 SDL_NAME(XDGAKeyEvent) xkey; 138 int type;
137 SDL_NAME(XDGAMotionEvent) xmotion; 139 SDL_NAME (XDGAButtonEvent) xbutton;
138 long pad[24]; 140 SDL_NAME (XDGAKeyEvent) xkey;
139 } SDL_NAME(XDGAEvent); 141 SDL_NAME (XDGAMotionEvent) xmotion;
140 142 long pad[24];
141 Bool SDL_NAME(XDGAQueryExtension)( 143 } SDL_NAME (XDGAEvent);
142 Display *dpy, 144
143 int *eventBase, 145 Bool SDL_NAME (XDGAQueryExtension) (Display * dpy,
144 int *erroBase 146 int *eventBase, int *erroBase);
145 ); 147
146 148 Bool SDL_NAME (XDGAQueryVersion) (Display * dpy,
147 Bool SDL_NAME(XDGAQueryVersion)( 149 int *majorVersion, int *minorVersion);
148 Display *dpy, 150
149 int *majorVersion, 151 SDL_NAME (XDGAMode) * SDL_NAME (XDGAQueryModes) (Display * dpy,
150 int *minorVersion 152 int screen, int *num);
151 ); 153
152 154 SDL_NAME (XDGADevice) * SDL_NAME (XDGASetMode) (Display * dpy,
153 SDL_NAME(XDGAMode)* SDL_NAME(XDGAQueryModes)( 155 int screen, int mode);
154 Display *dpy, 156
155 int screen, 157 Bool
156 int *num 158 SDL_NAME (XDGAOpenFramebuffer) (Display * dpy, int screen);
157 ); 159
158 160 void SDL_NAME (XDGACloseFramebuffer) (Display * dpy, int screen);
159 SDL_NAME(XDGADevice)* SDL_NAME(XDGASetMode)( 161
160 Display *dpy, 162 void SDL_NAME (XDGASetViewport) (Display * dpy,
161 int screen, 163 int screen, int x, int y, int flags);
162 int mode 164
163 ); 165 void SDL_NAME (XDGAInstallColormap) (Display * dpy,
164 166 int screen, Colormap cmap);
165 Bool SDL_NAME(XDGAOpenFramebuffer)( 167
166 Display *dpy, 168 Colormap
167 int screen 169 SDL_NAME (XDGACreateColormap) (Display * dpy,
168 ); 170 int screen,
169 171 SDL_NAME (XDGADevice) * device, int alloc);
170 void SDL_NAME(XDGACloseFramebuffer)( 172
171 Display *dpy, 173 void SDL_NAME (XDGASelectInput) (Display * dpy, int screen,
172 int screen 174 long event_mask);
173 ); 175
174 176 void SDL_NAME (XDGAFillRectangle) (Display * dpy,
175 void SDL_NAME(XDGASetViewport)( 177 int screen,
176 Display *dpy, 178 int x,
177 int screen, 179 int y,
178 int x, 180 unsigned int width,
179 int y, 181 unsigned int height,
180 int flags 182 unsigned long color);
181 ); 183
182 184
183 void SDL_NAME(XDGAInstallColormap)( 185 void SDL_NAME (XDGACopyArea) (Display * dpy,
184 Display *dpy, 186 int screen,
185 int screen, 187 int srcx,
186 Colormap cmap 188 int srcy,
187 ); 189 unsigned int width,
188 190 unsigned int height, int dstx, int dsty);
189 Colormap SDL_NAME(XDGACreateColormap)( 191
190 Display *dpy, 192
191 int screen, 193 void SDL_NAME (XDGACopyTransparentArea) (Display * dpy,
192 SDL_NAME(XDGADevice) *device, 194 int screen,
193 int alloc 195 int srcx,
194 ); 196 int srcy,
195 197 unsigned int width,
196 void SDL_NAME(XDGASelectInput)( 198 unsigned int height,
197 Display *dpy, 199 int dstx,
198 int screen, 200 int dsty, unsigned long key);
199 long event_mask 201
200 ); 202 int SDL_NAME (XDGAGetViewportStatus) (Display * dpy, int screen);
201 203
202 void SDL_NAME(XDGAFillRectangle)( 204 void SDL_NAME (XDGASync) (Display * dpy, int screen);
203 Display *dpy, 205
204 int screen, 206 Bool
205 int x, 207 SDL_NAME (XDGASetClientVersion) (Display * dpy);
206 int y, 208
207 unsigned int width, 209 void SDL_NAME (XDGAChangePixmapMode) (Display * dpy,
208 unsigned int height, 210 int screen, int *x, int *y,
209 unsigned long color 211 int mode);
210 ); 212
211 213
212 214 void SDL_NAME (XDGAKeyEventToXKeyEvent) (SDL_NAME (XDGAKeyEvent) * dk,
213 void SDL_NAME(XDGACopyArea)( 215 XKeyEvent * xk);
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 216
262 217
263 _XFUNCPROTOEND 218 _XFUNCPROTOEND
264 #endif /* _XF86DGA_SERVER_ */ 219 #endif /* _XF86DGA_SERVER_ */
265 #endif /* _XF86DGA_H_ */ 220 #endif /* _XF86DGA_H_ */
221 /* vi: set ts=4 sw=4 expandtab: */