summaryrefslogtreecommitdiff
path: root/hw/xfree86/xf8_32bpp/cfb8_32.h
blob: 98a50f810b2d13d519169a23ed7e1eeddf578f44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/* $XFree86: xc/programs/Xserver/hw/xfree86/xf8_32bpp/cfb8_32.h,v 1.5 2000/03/02 02:32:52 mvojkovi Exp $ */

#ifndef _CFB8_32_H
#define _CFB8_32_H

#include "gcstruct.h"

typedef struct {
   GCOps		*Ops8bpp;
   GCOps 		*Ops32bpp;
   unsigned long	changes;	
   Bool			OpsAre8bpp;  
} cfb8_32GCRec, *cfb8_32GCPtr;

typedef struct {
   unsigned char	key;
   void                (*EnableDisableFBAccess)(int scrnIndex, Bool enable);
   pointer		visualData;
} cfb8_32ScreenRec, *cfb8_32ScreenPtr;


extern int cfb8_32GCPrivateIndex;
extern int cfb8_32ScreenPrivateIndex;

void
cfb8_32SaveAreas(
    PixmapPtr	  	pPixmap,
    RegionPtr	  	prgnSave, 
    int	    	  	xorg,
    int	    	  	yorg,
    WindowPtr		pWin
);

void
cfb8_32RestoreAreas(
    PixmapPtr	  	pPixmap, 
    RegionPtr	  	prgnRestore,
    int	    	  	xorg,
    int	    	  	yorg,
    WindowPtr		pWin
);

RegionPtr
cfb8_32CopyArea(
    DrawablePtr pSrcDraw,
    DrawablePtr pDstDraw,
    GC *pGC,
    int srcx, int srcy,
    int width, int height,
    int dstx, int dsty 
);

void 
cfbDoBitblt8To32(
    DrawablePtr pSrc, 
    DrawablePtr pDst, 
    int rop,
    RegionPtr prgnDst, 
    DDXPointPtr pptSrc,
    unsigned long planemask
);

void 
cfbDoBitblt32To8(
    DrawablePtr pSrc, 
    DrawablePtr pDst, 
    int rop,
    RegionPtr prgnDst, 
    DDXPointPtr pptSrc,
    unsigned long planemask
);


void
cfb8_32ValidateGC8(
    GCPtr  		pGC,
    unsigned long 	changes,
    DrawablePtr		pDrawable
);

void
cfb8_32ValidateGC32(
    GCPtr  		pGC,
    unsigned long 	changes,
    DrawablePtr		pDrawable
);

void
cfb32ValidateGC_Underlay(
    GCPtr  		pGC,
    unsigned long 	changes,
    DrawablePtr		pDrawable
);

Bool cfb8_32CreateGC(GCPtr pGC);

void
cfb8_32GetSpans(
   DrawablePtr pDraw,
   int wMax,
   DDXPointPtr ppt,
   int *pwidth,
   int nspans,
   char *pchardstStart
);

void
cfb8_32PutImage (
    DrawablePtr pDraw,
    GCPtr pGC,
    int depth, 
    int x, int y, int w, int h,
    int leftPad,
    int format,
    char *pImage
);

void
cfb8_32GetImage (
    DrawablePtr pDraw,
    int sx, int sy, int w, int h,
    unsigned int format,
    unsigned long planeMask,
    char *pdstLine
);

void
cfb8_32PaintWindow (
    WindowPtr   pWin,
    RegionPtr   pRegion,
    int         what
);

Bool
cfb8_32ScreenInit (
    ScreenPtr pScreen,
    pointer pbits,
    int xsize, int ysize,
    int dpix, int dpiy,	
    int width
);

void
cfb8_32FillBoxSolid8 (
   DrawablePtr pDraw,
   int nbox,
   BoxPtr pBox,
   unsigned long color
);


void
cfb8_32FillBoxSolid32 (
   DrawablePtr pDraw,
   int nbox,
   BoxPtr pBox,
   unsigned long color
);

RegionPtr 
cfb8_32CopyPlane(
    DrawablePtr pSrc,
    DrawablePtr pDst,
    GCPtr pGC,
    int srcx, int srcy,
    int width, int height,
    int dstx, int dsty,
    unsigned long bitPlane
);

void 
cfbDoBitblt8To8GXcopy(
    DrawablePtr pSrc, 
    DrawablePtr pDst, 
    int rop,
    RegionPtr prgnDst, 
    DDXPointPtr pptSrc,
    unsigned long pm
);

void 
cfbDoBitblt24To24GXcopy(
    DrawablePtr pSrc, 
    DrawablePtr pDst, 
    int rop,
    RegionPtr prgnDst, 
    DDXPointPtr pptSrc,
    unsigned long pm
);

Bool cfb8_32CreateWindow(WindowPtr pWin);
Bool cfb8_32DestroyWindow(WindowPtr pWin);

Bool
cfb8_32PositionWindow(
    WindowPtr pWin,
    int x, int y
);

void
cfb8_32CopyWindow(
    WindowPtr pWin,
    DDXPointRec ptOldOrg,
    RegionPtr prgnSrc
);

Bool
cfb8_32ChangeWindowAttributes(
    WindowPtr pWin,
    unsigned long mask
);


#define CFB8_32_GET_GC_PRIVATE(pGC)\
   (cfb8_32GCPtr)((pGC)->devPrivates[cfb8_32GCPrivateIndex].ptr)

#define CFB8_32_GET_SCREEN_PRIVATE(pScreen)\
   (cfb8_32ScreenPtr)((pScreen)->devPrivates[cfb8_32ScreenPrivateIndex].ptr)

Bool xf86Overlay8Plus32Init (ScreenPtr pScreen);

#endif /* _CFB8_32_H */