VirtualBox

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

最後變更 在這個檔案從62425是 51223,由 vboxsync 提交於 11 年 前

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • 屬性 svn:eol-style 設為 native
檔案大小: 2.9 KB
 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86RamDac.h,v 1.9 1999/03/28 15:33:02 dawes Exp $ */
2
3#ifndef _XF86RAMDAC_H
4#define _XF86RAMDAC_H 1
5
6#include "colormapst.h"
7#include "xf86Cursor.h"
8
9/* Define unique vendor codes for RAMDAC's */
10#define VENDOR_IBM 0x0000
11#define VENDOR_BT 0x0001
12#define VENDOR_TI 0x0002
13
14typedef struct _RamDacRegRec {
15/* This is probably the nastiest assumption, we allocate 1024 slots for
16 * ramdac registers, should be enough. I've checked IBM and TVP series
17 * and they seem o.k
18 * Then we allocate 768 entries for the DAC too. IBM640 needs 1024 -FIXME
19 */
20 unsigned short DacRegs[0x400]; /* register set */
21 unsigned char DAC[0x300]; /* colour map */
22 Bool Overlay;
23} RamDacRegRec, *RamDacRegRecPtr;
24
25typedef struct _RamDacHWRegRec {
26 RamDacRegRec SavedReg;
27 RamDacRegRec ModeReg;
28} RamDacHWRec, *RamDacHWRecPtr;
29
30typedef struct _RamDacRec {
31 CARD32 RamDacType;
32
33 void (*LoadPalette)(
34 ScrnInfoPtr pScrn,
35 int numColors,
36 int *indices,
37 LOCO *colors,
38 VisualPtr pVisual
39 );
40
41 unsigned char (*ReadDAC)(
42 ScrnInfoPtr pScrn,
43 CARD32
44 );
45
46 void (*WriteDAC)(
47 ScrnInfoPtr pScrn,
48 CARD32,
49 unsigned char,
50 unsigned char
51 );
52
53 void (*WriteAddress)(
54 ScrnInfoPtr pScrn,
55 CARD32
56 );
57
58 void (*WriteData)(
59 ScrnInfoPtr pScrn,
60 unsigned char
61 );
62
63 void (*ReadAddress)(
64 ScrnInfoPtr pScrn,
65 CARD32
66 );
67
68 unsigned char (*ReadData)(
69 ScrnInfoPtr pScrn
70 );
71} RamDacRec, *RamDacRecPtr;
72
73typedef struct _RamDacHelperRec {
74 CARD32 RamDacType;
75
76 void (*Restore)(
77 ScrnInfoPtr pScrn,
78 RamDacRecPtr ramdacPtr,
79 RamDacRegRecPtr ramdacReg
80 );
81
82 void (*Save)(
83 ScrnInfoPtr pScrn,
84 RamDacRecPtr ramdacPtr,
85 RamDacRegRecPtr ramdacReg
86 );
87
88 void (*SetBpp)(
89 ScrnInfoPtr pScrn,
90 RamDacRegRecPtr ramdacReg
91 );
92
93 void (*HWCursorInit)(
94 xf86CursorInfoPtr infoPtr
95 );
96} RamDacHelperRec, *RamDacHelperRecPtr;
97
98#define RAMDACHWPTR(p) ((RamDacHWRecPtr)((p)->privates[RamDacGetHWIndex()].ptr))
99
100typedef struct _RamdacScreenRec {
101 RamDacRecPtr RamDacRec;
102} RamDacScreenRec, *RamDacScreenRecPtr;
103#define RAMDACSCRPTR(p) ((RamDacScreenRecPtr)((p)->privates[RamDacGetScreenIndex()].ptr))->RamDacRec
104
105extern int RamDacHWPrivateIndex;
106extern int RamDacScreenPrivateIndex;
107
108typedef struct {
109 int token;
110} RamDacSupportedInfoRec, *RamDacSupportedInfoRecPtr;
111
112RamDacRecPtr RamDacCreateInfoRec(void);
113RamDacHelperRecPtr RamDacHelperCreateInfoRec(void);
114void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec);
115void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec);
116Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec);
117void RamDacSetGamma(ScrnInfoPtr pScrn, Bool Real8BitDac);
118void RamDacRestoreDACValues(ScrnInfoPtr pScrn);
119Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits,
120 unsigned int flags);
121void RamDacFreeRec(ScrnInfoPtr pScrn);
122int RamDacGetHWIndex(void);
123
124#endif /* _XF86RAMDAC_H */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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