135c4bbdfSmrg
235c4bbdfSmrg#ifndef __DGAPROC_H
335c4bbdfSmrg#define __DGAPROC_H
435c4bbdfSmrg
535c4bbdfSmrg#include <X11/Xproto.h>
635c4bbdfSmrg#include "pixmap.h"
735c4bbdfSmrg
835c4bbdfSmrg#define DGA_CONCURRENT_ACCESS	0x00000001
935c4bbdfSmrg#define DGA_FILL_RECT		0x00000002
1035c4bbdfSmrg#define DGA_BLIT_RECT		0x00000004
1135c4bbdfSmrg#define DGA_BLIT_RECT_TRANS	0x00000008
1235c4bbdfSmrg#define DGA_PIXMAP_AVAILABLE	0x00000010
1335c4bbdfSmrg
1435c4bbdfSmrg#define DGA_INTERLACED		0x00010000
1535c4bbdfSmrg#define DGA_DOUBLESCAN		0x00020000
1635c4bbdfSmrg
1735c4bbdfSmrg#define DGA_FLIP_IMMEDIATE	0x00000001
1835c4bbdfSmrg#define DGA_FLIP_RETRACE	0x00000002
1935c4bbdfSmrg
2035c4bbdfSmrg#define DGA_COMPLETED		0x00000000
2135c4bbdfSmrg#define DGA_PENDING		0x00000001
2235c4bbdfSmrg
2335c4bbdfSmrg#define DGA_NEED_ROOT		0x00000001
2435c4bbdfSmrg
2535c4bbdfSmrgtypedef struct {
2635c4bbdfSmrg    int num;                    /* A unique identifier for the mode (num > 0) */
2735c4bbdfSmrg    const char *name;           /* name of mode given in the XF86Config */
2835c4bbdfSmrg    int VSync_num;
2935c4bbdfSmrg    int VSync_den;
3035c4bbdfSmrg    int flags;                  /* DGA_CONCURRENT_ACCESS, etc... */
3135c4bbdfSmrg    int imageWidth;             /* linear accessible portion (pixels) */
3235c4bbdfSmrg    int imageHeight;
3335c4bbdfSmrg    int pixmapWidth;            /* Xlib accessible portion (pixels) */
3435c4bbdfSmrg    int pixmapHeight;           /* both fields ignored if no concurrent access */
3535c4bbdfSmrg    int bytesPerScanline;
3635c4bbdfSmrg    int byteOrder;              /* MSBFirst, LSBFirst */
3735c4bbdfSmrg    int depth;
3835c4bbdfSmrg    int bitsPerPixel;
3935c4bbdfSmrg    unsigned long red_mask;
4035c4bbdfSmrg    unsigned long green_mask;
4135c4bbdfSmrg    unsigned long blue_mask;
4235c4bbdfSmrg    short visualClass;
4335c4bbdfSmrg    int viewportWidth;
4435c4bbdfSmrg    int viewportHeight;
4535c4bbdfSmrg    int xViewportStep;          /* viewport position granularity */
4635c4bbdfSmrg    int yViewportStep;
4735c4bbdfSmrg    int maxViewportX;           /* max viewport origin */
4835c4bbdfSmrg    int maxViewportY;
4935c4bbdfSmrg    int viewportFlags;          /* types of page flipping possible */
5035c4bbdfSmrg    int offset;
5135c4bbdfSmrg    int reserved1;
5235c4bbdfSmrg    int reserved2;
5335c4bbdfSmrg} XDGAModeRec, *XDGAModePtr;
5435c4bbdfSmrg
5535c4bbdfSmrg/* DDX interface */
5635c4bbdfSmrg
5735c4bbdfSmrgextern Bool DGAScreenAvailable(ScreenPtr pScreen);
5835c4bbdfSmrgextern Bool DGAActive(int Index);
5935c4bbdfSmrg
6035c4bbdfSmrgextern Bool DGAVTSwitch(void);
6135c4bbdfSmrgextern Bool DGAStealButtonEvent(DeviceIntPtr dev, int Index,
6235c4bbdfSmrg                                int button, int is_down);
6335c4bbdfSmrgextern Bool DGAStealMotionEvent(DeviceIntPtr dev, int Index, int dx, int dy);
6435c4bbdfSmrgextern Bool DGAStealKeyEvent(DeviceIntPtr dev, int Index,
6535c4bbdfSmrg                             int key_code, int is_down);
6635c4bbdfSmrg
6735c4bbdfSmrg#endif                          /* __DGAPROC_H */
68