VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.13.0/xf86RamDac.h@ 107044

Last change on this file since 107044 was 43251, checked in by vboxsync, 12 years ago

Additions/x11: added headers for X.Org Server 1.13.

  • Property svn:eol-style set to native
File size: 2.9 KB
Line 
1
2#ifndef _XF86RAMDAC_H
3#define _XF86RAMDAC_H 1
4
5#include "colormapst.h"
6#include "xf86Cursor.h"
7
8/* Define unique vendor codes for RAMDAC's */
9#define VENDOR_IBM 0x0000
10#define VENDOR_BT 0x0001
11#define VENDOR_TI 0x0002
12
13typedef struct _RamDacRegRec {
14/* This is probably the nastiest assumption, we allocate 1024 slots for
15 * ramdac registers, should be enough. I've checked IBM and TVP series
16 * and they seem o.k
17 * Then we allocate 768 entries for the DAC too. IBM640 needs 1024 -FIXME
18 */
19 unsigned short DacRegs[0x400]; /* register set */
20 unsigned char DAC[0x300]; /* colour map */
21 Bool Overlay;
22} RamDacRegRec, *RamDacRegRecPtr;
23
24typedef struct _RamDacHWRegRec {
25 RamDacRegRec SavedReg;
26 RamDacRegRec ModeReg;
27} RamDacHWRec, *RamDacHWRecPtr;
28
29typedef struct _RamDacRec {
30 CARD32 RamDacType;
31
32 void (*LoadPalette) (ScrnInfoPtr pScrn,
33 int numColors,
34 int *indices, LOCO * colors, VisualPtr pVisual);
35
36 unsigned char (*ReadDAC) (ScrnInfoPtr pScrn, CARD32);
37
38 void (*WriteDAC) (ScrnInfoPtr pScrn, CARD32, unsigned char, unsigned char);
39
40 void (*WriteAddress) (ScrnInfoPtr pScrn, CARD32);
41
42 void (*WriteData) (ScrnInfoPtr pScrn, unsigned char);
43
44 void (*ReadAddress) (ScrnInfoPtr pScrn, CARD32);
45
46 unsigned char (*ReadData) (ScrnInfoPtr pScrn);
47} RamDacRec, *RamDacRecPtr;
48
49typedef struct _RamDacHelperRec {
50 CARD32 RamDacType;
51
52 void (*Restore) (ScrnInfoPtr pScrn,
53 RamDacRecPtr ramdacPtr, RamDacRegRecPtr ramdacReg);
54
55 void (*Save) (ScrnInfoPtr pScrn,
56 RamDacRecPtr ramdacPtr, RamDacRegRecPtr ramdacReg);
57
58 void (*SetBpp) (ScrnInfoPtr pScrn, RamDacRegRecPtr ramdacReg);
59
60 void (*HWCursorInit) (xf86CursorInfoPtr infoPtr);
61} RamDacHelperRec, *RamDacHelperRecPtr;
62
63#define RAMDACHWPTR(p) ((RamDacHWRecPtr)((p)->privates[RamDacGetHWIndex()].ptr))
64
65typedef struct _RamdacScreenRec {
66 RamDacRecPtr RamDacRec;
67} RamDacScreenRec, *RamDacScreenRecPtr;
68
69#define RAMDACSCRPTR(p) ((RamDacScreenRecPtr)((p)->privates[RamDacGetScreenIndex()].ptr))->RamDacRec
70
71extern _X_EXPORT int RamDacHWPrivateIndex;
72extern _X_EXPORT int RamDacScreenPrivateIndex;
73
74typedef struct {
75 int token;
76} RamDacSupportedInfoRec, *RamDacSupportedInfoRecPtr;
77
78extern _X_EXPORT RamDacRecPtr RamDacCreateInfoRec(void);
79extern _X_EXPORT RamDacHelperRecPtr RamDacHelperCreateInfoRec(void);
80extern _X_EXPORT void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec);
81extern _X_EXPORT void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec);
82extern _X_EXPORT Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec);
83extern _X_EXPORT Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors,
84 int sigRGBbits, unsigned int flags);
85extern _X_EXPORT void RamDacFreeRec(ScrnInfoPtr pScrn);
86extern _X_EXPORT int RamDacGetHWIndex(void);
87
88#endif /* _XF86RAMDAC_H */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette