1 |
|
---|
2 | #ifndef __DGAPROC_H
|
---|
3 | #define __DGAPROC_H
|
---|
4 |
|
---|
5 | #include <X11/Xproto.h>
|
---|
6 | #include "pixmap.h"
|
---|
7 |
|
---|
8 | #define DGA_CONCURRENT_ACCESS 0x00000001
|
---|
9 | #define DGA_FILL_RECT 0x00000002
|
---|
10 | #define DGA_BLIT_RECT 0x00000004
|
---|
11 | #define DGA_BLIT_RECT_TRANS 0x00000008
|
---|
12 | #define DGA_PIXMAP_AVAILABLE 0x00000010
|
---|
13 |
|
---|
14 | #define DGA_INTERLACED 0x00010000
|
---|
15 | #define DGA_DOUBLESCAN 0x00020000
|
---|
16 |
|
---|
17 | #define DGA_FLIP_IMMEDIATE 0x00000001
|
---|
18 | #define DGA_FLIP_RETRACE 0x00000002
|
---|
19 |
|
---|
20 | #define DGA_COMPLETED 0x00000000
|
---|
21 | #define DGA_PENDING 0x00000001
|
---|
22 |
|
---|
23 | #define DGA_NEED_ROOT 0x00000001
|
---|
24 |
|
---|
25 | typedef struct {
|
---|
26 | int num; /* A unique identifier for the mode (num > 0) */
|
---|
27 | const char *name; /* name of mode given in the XF86Config */
|
---|
28 | int VSync_num;
|
---|
29 | int VSync_den;
|
---|
30 | int flags; /* DGA_CONCURRENT_ACCESS, etc... */
|
---|
31 | int imageWidth; /* linear accessible portion (pixels) */
|
---|
32 | int imageHeight;
|
---|
33 | int pixmapWidth; /* Xlib accessible portion (pixels) */
|
---|
34 | int pixmapHeight; /* both fields ignored if no concurrent access */
|
---|
35 | int bytesPerScanline;
|
---|
36 | int byteOrder; /* MSBFirst, LSBFirst */
|
---|
37 | int depth;
|
---|
38 | int bitsPerPixel;
|
---|
39 | unsigned long red_mask;
|
---|
40 | unsigned long green_mask;
|
---|
41 | unsigned long blue_mask;
|
---|
42 | short visualClass;
|
---|
43 | int viewportWidth;
|
---|
44 | int viewportHeight;
|
---|
45 | int xViewportStep; /* viewport position granularity */
|
---|
46 | int yViewportStep;
|
---|
47 | int maxViewportX; /* max viewport origin */
|
---|
48 | int maxViewportY;
|
---|
49 | int viewportFlags; /* types of page flipping possible */
|
---|
50 | int offset;
|
---|
51 | int reserved1;
|
---|
52 | int reserved2;
|
---|
53 | } XDGAModeRec, *XDGAModePtr;
|
---|
54 |
|
---|
55 | /* DDX interface */
|
---|
56 |
|
---|
57 | extern _X_EXPORT int
|
---|
58 | DGASetMode(int Index, int num, XDGAModePtr mode, PixmapPtr *pPix);
|
---|
59 |
|
---|
60 | extern _X_EXPORT void
|
---|
61 | DGASetInputMode(int Index, Bool keyboard, Bool mouse);
|
---|
62 |
|
---|
63 | extern _X_EXPORT void
|
---|
64 | DGASelectInput(int Index, ClientPtr client, long mask);
|
---|
65 |
|
---|
66 | extern _X_EXPORT Bool DGAAvailable(int Index);
|
---|
67 | extern _X_EXPORT Bool DGAScreenAvailable(ScreenPtr pScreen);
|
---|
68 | extern _X_EXPORT Bool DGAActive(int Index);
|
---|
69 | extern _X_EXPORT void DGAShutdown(void);
|
---|
70 | extern _X_EXPORT void DGAInstallCmap(ColormapPtr cmap);
|
---|
71 | extern _X_EXPORT int DGAGetViewportStatus(int Index);
|
---|
72 | extern _X_EXPORT int DGASync(int Index);
|
---|
73 |
|
---|
74 | extern _X_EXPORT int
|
---|
75 | DGAFillRect(int Index, int x, int y, int w, int h, unsigned long color);
|
---|
76 |
|
---|
77 | extern _X_EXPORT int
|
---|
78 | DGABlitRect(int Index, int srcx, int srcy, int w, int h, int dstx, int dsty);
|
---|
79 |
|
---|
80 | extern _X_EXPORT int
|
---|
81 |
|
---|
82 | DGABlitTransRect(int Index,
|
---|
83 | int srcx, int srcy,
|
---|
84 | int w, int h, int dstx, int dsty, unsigned long color);
|
---|
85 |
|
---|
86 | extern _X_EXPORT int
|
---|
87 | DGASetViewport(int Index, int x, int y, int mode);
|
---|
88 |
|
---|
89 | extern _X_EXPORT int DGAGetModes(int Index);
|
---|
90 | extern _X_EXPORT int DGAGetOldDGAMode(int Index);
|
---|
91 |
|
---|
92 | extern _X_EXPORT int DGAGetModeInfo(int Index, XDGAModePtr mode, int num);
|
---|
93 |
|
---|
94 | extern _X_EXPORT Bool DGAVTSwitch(void);
|
---|
95 | extern _X_EXPORT Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index,
|
---|
96 | int button, int is_down);
|
---|
97 | extern _X_EXPORT Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx,
|
---|
98 | int dy);
|
---|
99 | extern _X_EXPORT Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index,
|
---|
100 | int key_code, int is_down);
|
---|
101 |
|
---|
102 | extern _X_EXPORT Bool DGAOpenFramebuffer(int Index, char **name,
|
---|
103 | unsigned char **mem, int *size,
|
---|
104 | int *offset, int *flags);
|
---|
105 | extern _X_EXPORT void DGACloseFramebuffer(int Index);
|
---|
106 | extern _X_EXPORT Bool DGAChangePixmapMode(int Index, int *x, int *y, int mode);
|
---|
107 | extern _X_EXPORT int DGACreateColormap(int Index, ClientPtr client, int id,
|
---|
108 | int mode, int alloc);
|
---|
109 |
|
---|
110 | #endif /* __DGAPROC_H */
|
---|