VirtualBox

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

最後變更 在這個檔案是 54163,由 vboxsync 提交於 10 年 前

Additions/x11/vboxvideo: support X.Org Server 1.17 (still untested).

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.9 KB
 
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 */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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