add some NEON 32bpp blitters
[sdl_omap.git] / src / video / Xext / extensions / xf86dga.h
CommitLineData
e14743d1 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 "xf86dga1.h"
11#include "SDL_name.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
63typedef 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
92typedef 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
102typedef 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
112typedef 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
122typedef 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
133typedef 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
141Bool SDL_NAME(XDGAQueryExtension)(
142 Display *dpy,
143 int *eventBase,
144 int *erroBase
145);
146
147Bool SDL_NAME(XDGAQueryVersion)(
148 Display *dpy,
149 int *majorVersion,
150 int *minorVersion
151);
152
153SDL_NAME(XDGAMode)* SDL_NAME(XDGAQueryModes)(
154 Display *dpy,
155 int screen,
156 int *num
157);
158
159SDL_NAME(XDGADevice)* SDL_NAME(XDGASetMode)(
160 Display *dpy,
161 int screen,
162 int mode
163);
164
165Bool SDL_NAME(XDGAOpenFramebuffer)(
166 Display *dpy,
167 int screen
168);
169
170void SDL_NAME(XDGACloseFramebuffer)(
171 Display *dpy,
172 int screen
173);
174
175void SDL_NAME(XDGASetViewport)(
176 Display *dpy,
177 int screen,
178 int x,
179 int y,
180 int flags
181);
182
183void SDL_NAME(XDGAInstallColormap)(
184 Display *dpy,
185 int screen,
186 Colormap cmap
187);
188
189Colormap SDL_NAME(XDGACreateColormap)(
190 Display *dpy,
191 int screen,
192 SDL_NAME(XDGADevice) *device,
193 int alloc
194);
195
196void SDL_NAME(XDGASelectInput)(
197 Display *dpy,
198 int screen,
199 long event_mask
200);
201
202void 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
213void 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
225void 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
237int SDL_NAME(XDGAGetViewportStatus)(
238 Display *dpy,
239 int screen
240);
241
242void SDL_NAME(XDGASync)(
243 Display *dpy,
244 int screen
245);
246
247Bool SDL_NAME(XDGASetClientVersion)(
248 Display *dpy
249);
250
251void SDL_NAME(XDGAChangePixmapMode)(
252 Display *dpy,
253 int screen,
254 int *x,
255 int *y,
256 int mode
257);
258
259
260void SDL_NAME(XDGAKeyEventToXKeyEvent)(SDL_NAME(XDGAKeyEvent)* dk, XKeyEvent* xk);
261
262
263_XFUNCPROTOEND
264#endif /* _XF86DGA_SERVER_ */
265#endif /* _XF86DGA_H_ */