~ubuntu-branches/ubuntu/karmic/virtualbox-ose/karmic-updates

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/x11include/4.2/programs/Xserver/hw/xfree86/ramdac/xf86RamDac.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2009-09-14 18:25:07 UTC
  • mfrom: (0.4.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090914182507-c98g07mq16hjmn6d
Tags: 3.0.6-dfsg-1ubuntu1
* Merge from debian unstable (LP: #429697), remaining changes:
  - Enable DKMS support on virtualbox host and guest modules (LP: #267097)
    - Drop virtualbox-ose{-guest,}-modules-* package templates
    - Recommend *-source instead of *-modules packages
    - Replace error messages related to missing/mismatched
      kernel module accordingly
  - Autoload kernel module
    - LOAD_VBOXDRV_MODULE=1 in virtualbox-ose.default
  - Disable update action
    - patches/u01-disable-update-action.dpatch
  - Virtualbox should go in Accessories, not in System tools (LP: #288590)
    - virtualbox-ose-qt.files/virtualbox-ose.desktop
  - Add apport hook
    - virtualbox-ose.files/source_virtualbox-ose.py
    - virtualbox-ose.install
  - Add launchpad integration
    - control
    - lpi-bug.xpm
    - patches/u02-lp-integration.dpatch
  - virtualbox, virtualbox-* (names of the upstream proprietary packages)
    conflict with virtualbox-ose (LP: #379878)
* Make debug package depend on normal or guest utils package
* Drop patches/22-pulseaudio-stubs.dpatch (applied upstream)
* Rename Ubuntu specific patches to uXX-*.dpatch
* Fix lintian warnings in maintainer scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XFree86: xc/programs/Xserver/hw/xfree86/ramdac/xf86RamDac.h,v 1.11 2000/03/21 21:15:28 alanh 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
 
 
14
 
typedef 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
 
 
25
 
typedef struct _RamDacHWRegRec {
26
 
    RamDacRegRec        SavedReg;
27
 
    RamDacRegRec        ModeReg;
28
 
} RamDacHWRec, *RamDacHWRecPtr;
29
 
 
30
 
typedef 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
 
 
73
 
typedef 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
 
 
100
 
typedef struct _RamdacScreenRec {
101
 
    RamDacRecPtr        RamDacRec;
102
 
} RamDacScreenRec, *RamDacScreenRecPtr;
103
 
#define RAMDACSCRPTR(p) ((RamDacScreenRecPtr)((p)->privates[RamDacGetScreenIndex()].ptr))->RamDacRec
104
 
 
105
 
extern int RamDacHWPrivateIndex;
106
 
extern int RamDacScreenPrivateIndex;
107
 
 
108
 
typedef struct {
109
 
    int         token;
110
 
} RamDacSupportedInfoRec, *RamDacSupportedInfoRecPtr;
111
 
 
112
 
RamDacRecPtr RamDacCreateInfoRec(void);
113
 
RamDacHelperRecPtr RamDacHelperCreateInfoRec(void);
114
 
void RamDacDestroyInfoRec(RamDacRecPtr RamDacRec);
115
 
void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr RamDacRec);
116
 
Bool RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr RamDacRec);
117
 
void RamDacSetGamma(ScrnInfoPtr pScrn, Bool Real8BitDac);
118
 
void RamDacRestoreDACValues(ScrnInfoPtr pScrn);
119
 
Bool RamDacHandleColormaps(ScreenPtr pScreen, int maxColors, int sigRGBbits,
120
 
                           unsigned int flags);
121
 
void RamDacFreeRec(ScrnInfoPtr pScrn);
122
 
int  RamDacGetHWIndex(void);
123
 
 
124
 
#endif /* _XF86RAMDAC_H */