1 | /*
|
---|
2 | *
|
---|
3 | * Copyright © 1998 Keith Packard
|
---|
4 | *
|
---|
5 | * Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | * documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | * the above copyright notice appear in all copies and that both that
|
---|
8 | * copyright notice and this permission notice appear in supporting
|
---|
9 | * documentation, and that the name of Keith Packard not be used in
|
---|
10 | * advertising or publicity pertaining to distribution of the software without
|
---|
11 | * specific, written prior permission. Keith Packard makes no
|
---|
12 | * representations about the suitability of this software for any purpose. It
|
---|
13 | * is provided "as is" without express or implied warranty.
|
---|
14 | *
|
---|
15 | * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
---|
16 | * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
---|
17 | * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
---|
18 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
---|
19 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
---|
20 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
---|
21 | * PERFORMANCE OF THIS SOFTWARE.
|
---|
22 | */
|
---|
23 |
|
---|
24 |
|
---|
25 | #ifndef _FB_H_
|
---|
26 | #define _FB_H_
|
---|
27 |
|
---|
28 | #include <X11/X.h>
|
---|
29 | #include "scrnintstr.h"
|
---|
30 | #include "pixmap.h"
|
---|
31 | #include "pixmapstr.h"
|
---|
32 | #include "region.h"
|
---|
33 | #include "gcstruct.h"
|
---|
34 | #include "colormap.h"
|
---|
35 | #include "miscstruct.h"
|
---|
36 | #include "servermd.h"
|
---|
37 | #include "windowstr.h"
|
---|
38 | #include "mi.h"
|
---|
39 | #include "migc.h"
|
---|
40 | #include "mibstore.h"
|
---|
41 | #ifdef RENDER
|
---|
42 | #include "picturestr.h"
|
---|
43 | #else
|
---|
44 | #include "picture.h"
|
---|
45 | #endif
|
---|
46 |
|
---|
47 | /*
|
---|
48 | * This single define controls the basic size of data manipulated
|
---|
49 | * by this software; it must be log2(sizeof (FbBits) * 8)
|
---|
50 | */
|
---|
51 |
|
---|
52 | #ifndef FB_SHIFT
|
---|
53 | #define FB_SHIFT LOG2_BITMAP_PAD
|
---|
54 | #endif
|
---|
55 |
|
---|
56 | #if FB_SHIFT < LOG2_BITMAP_PAD
|
---|
57 | error FB_SHIFT must be >= LOG2_BITMAP_PAD
|
---|
58 | #endif
|
---|
59 |
|
---|
60 | #define FB_UNIT (1 << FB_SHIFT)
|
---|
61 | #define FB_HALFUNIT (1 << (FB_SHIFT-1))
|
---|
62 | #define FB_MASK (FB_UNIT - 1)
|
---|
63 | #define FB_ALLONES ((FbBits) -1)
|
---|
64 |
|
---|
65 | #if GLYPHPADBYTES != 4
|
---|
66 | #error "GLYPHPADBYTES must be 4"
|
---|
67 | #endif
|
---|
68 | #if GETLEFTBITS_ALIGNMENT != 1
|
---|
69 | #error "GETLEFTBITS_ALIGNMENT must be 1"
|
---|
70 | #endif
|
---|
71 | /* whether to bother to include 24bpp support */
|
---|
72 | #ifndef FBNO24BIT
|
---|
73 | #define FB_24BIT
|
---|
74 | #endif
|
---|
75 |
|
---|
76 | /*
|
---|
77 | * Unless otherwise instructed, fb includes code to advertise 24bpp
|
---|
78 | * windows with 32bpp image format for application compatibility
|
---|
79 | */
|
---|
80 |
|
---|
81 | #ifdef FB_24BIT
|
---|
82 | #ifndef FBNO24_32
|
---|
83 | #define FB_24_32BIT
|
---|
84 | #endif
|
---|
85 | #endif
|
---|
86 |
|
---|
87 | #define FB_STIP_SHIFT LOG2_BITMAP_PAD
|
---|
88 | #define FB_STIP_UNIT (1 << FB_STIP_SHIFT)
|
---|
89 | #define FB_STIP_MASK (FB_STIP_UNIT - 1)
|
---|
90 | #define FB_STIP_ALLONES ((FbStip) -1)
|
---|
91 |
|
---|
92 | #define FB_STIP_ODDSTRIDE(s) (((s) & (FB_MASK >> FB_STIP_SHIFT)) != 0)
|
---|
93 | #define FB_STIP_ODDPTR(p) ((((long) (p)) & (FB_MASK >> 3)) != 0)
|
---|
94 |
|
---|
95 | #define FbStipStrideToBitsStride(s) (((s) >> (FB_SHIFT - FB_STIP_SHIFT)))
|
---|
96 | #define FbBitsStrideToStipStride(s) (((s) << (FB_SHIFT - FB_STIP_SHIFT)))
|
---|
97 |
|
---|
98 | #define FbFullMask(n) ((n) == FB_UNIT ? FB_ALLONES : ((((FbBits) 1) << n) - 1))
|
---|
99 |
|
---|
100 | #if FB_SHIFT == 6
|
---|
101 | # ifdef WIN32
|
---|
102 | typedef unsigned __int64 FbBits;
|
---|
103 | # else
|
---|
104 | # if defined(__alpha__) || defined(__alpha) || \
|
---|
105 | defined(ia64) || defined(__ia64__) || \
|
---|
106 | defined(__sparc64__) || defined(_LP64) || \
|
---|
107 | defined(__s390x__) || \
|
---|
108 | defined(amd64) || defined (__amd64__) || \
|
---|
109 | defined (__powerpc64__) || \
|
---|
110 | (defined(sgi) && (_MIPS_SZLONG == 64))
|
---|
111 | typedef unsigned long FbBits;
|
---|
112 | # else
|
---|
113 | typedef unsigned long long FbBits;
|
---|
114 | # endif
|
---|
115 | # endif
|
---|
116 | #endif
|
---|
117 |
|
---|
118 | #if FB_SHIFT == 5
|
---|
119 | typedef CARD32 FbBits;
|
---|
120 | #endif
|
---|
121 |
|
---|
122 | #if FB_SHIFT == 4
|
---|
123 | typedef CARD16 FbBits;
|
---|
124 | #endif
|
---|
125 |
|
---|
126 | #if LOG2_BITMAP_PAD == FB_SHIFT
|
---|
127 | typedef FbBits FbStip;
|
---|
128 | #else
|
---|
129 | # if LOG2_BITMAP_PAD == 5
|
---|
130 | typedef CARD32 FbStip;
|
---|
131 | # endif
|
---|
132 | #endif
|
---|
133 |
|
---|
134 | typedef int FbStride;
|
---|
135 |
|
---|
136 |
|
---|
137 | #ifdef FB_DEBUG
|
---|
138 | extern void fbValidateDrawable(DrawablePtr d);
|
---|
139 | extern void fbInitializeDrawable(DrawablePtr d);
|
---|
140 | extern void fbSetBits (FbStip *bits, int stride, FbStip data);
|
---|
141 | #define FB_HEAD_BITS (FbStip) (0xbaadf00d)
|
---|
142 | #define FB_TAIL_BITS (FbStip) (0xbaddf0ad)
|
---|
143 | #else
|
---|
144 | #define fbValidateDrawable(d)
|
---|
145 | #define fdInitializeDrawable(d)
|
---|
146 | #endif
|
---|
147 |
|
---|
148 | #include "fbrop.h"
|
---|
149 |
|
---|
150 | #if BITMAP_BIT_ORDER == LSBFirst
|
---|
151 | #define FbScrLeft(x,n) ((x) >> (n))
|
---|
152 | #define FbScrRight(x,n) ((x) << (n))
|
---|
153 | /* #define FbLeftBits(x,n) ((x) & ((((FbBits) 1) << (n)) - 1)) */
|
---|
154 | #define FbLeftStipBits(x,n) ((x) & ((((FbStip) 1) << (n)) - 1))
|
---|
155 | #define FbStipMoveLsb(x,s,n) (FbStipRight (x,(s)-(n)))
|
---|
156 | #define FbPatternOffsetBits 0
|
---|
157 | #else
|
---|
158 | #define FbScrLeft(x,n) ((x) << (n))
|
---|
159 | #define FbScrRight(x,n) ((x) >> (n))
|
---|
160 | /* #define FbLeftBits(x,n) ((x) >> (FB_UNIT - (n))) */
|
---|
161 | #define FbLeftStipBits(x,n) ((x) >> (FB_STIP_UNIT - (n)))
|
---|
162 | #define FbStipMoveLsb(x,s,n) (x)
|
---|
163 | #define FbPatternOffsetBits (sizeof (FbBits) - 1)
|
---|
164 | #endif
|
---|
165 |
|
---|
166 | #include "micoord.h"
|
---|
167 |
|
---|
168 | #define FbStipLeft(x,n) FbScrLeft(x,n)
|
---|
169 | #define FbStipRight(x,n) FbScrRight(x,n)
|
---|
170 |
|
---|
171 | #define FbRotLeft(x,n) FbScrLeft(x,n) | (n ? FbScrRight(x,FB_UNIT-n) : 0)
|
---|
172 | #define FbRotRight(x,n) FbScrRight(x,n) | (n ? FbScrLeft(x,FB_UNIT-n) : 0)
|
---|
173 |
|
---|
174 | #define FbRotStipLeft(x,n) FbStipLeft(x,n) | (n ? FbStipRight(x,FB_STIP_UNIT-n) : 0)
|
---|
175 | #define FbRotStipRight(x,n) FbStipRight(x,n) | (n ? FbStipLeft(x,FB_STIP_UNIT-n) : 0)
|
---|
176 |
|
---|
177 | #define FbLeftMask(x) ( ((x) & FB_MASK) ? \
|
---|
178 | FbScrRight(FB_ALLONES,(x) & FB_MASK) : 0)
|
---|
179 | #define FbRightMask(x) ( ((FB_UNIT - (x)) & FB_MASK) ? \
|
---|
180 | FbScrLeft(FB_ALLONES,(FB_UNIT - (x)) & FB_MASK) : 0)
|
---|
181 |
|
---|
182 | #define FbLeftStipMask(x) ( ((x) & FB_STIP_MASK) ? \
|
---|
183 | FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) : 0)
|
---|
184 | #define FbRightStipMask(x) ( ((FB_STIP_UNIT - (x)) & FB_STIP_MASK) ? \
|
---|
185 | FbScrLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - (x)) & FB_STIP_MASK) : 0)
|
---|
186 |
|
---|
187 | #define FbBitsMask(x,w) (FbScrRight(FB_ALLONES,(x) & FB_MASK) & \
|
---|
188 | FbScrLeft(FB_ALLONES,(FB_UNIT - ((x) + (w))) & FB_MASK))
|
---|
189 |
|
---|
190 | #define FbStipMask(x,w) (FbStipRight(FB_STIP_ALLONES,(x) & FB_STIP_MASK) & \
|
---|
191 | FbStipLeft(FB_STIP_ALLONES,(FB_STIP_UNIT - ((x)+(w))) & FB_STIP_MASK))
|
---|
192 |
|
---|
193 |
|
---|
194 | #define FbMaskBits(x,w,l,n,r) { \
|
---|
195 | n = (w); \
|
---|
196 | r = FbRightMask((x)+n); \
|
---|
197 | l = FbLeftMask(x); \
|
---|
198 | if (l) { \
|
---|
199 | n -= FB_UNIT - ((x) & FB_MASK); \
|
---|
200 | if (n < 0) { \
|
---|
201 | n = 0; \
|
---|
202 | l &= r; \
|
---|
203 | r = 0; \
|
---|
204 | } \
|
---|
205 | } \
|
---|
206 | n >>= FB_SHIFT; \
|
---|
207 | }
|
---|
208 |
|
---|
209 | #ifdef FBNOPIXADDR
|
---|
210 | #define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) FbMaskBits(x,w,l,n,r)
|
---|
211 | #define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
|
---|
212 | *dst = FbDoMaskRRop(*dst,and,xor,l); \
|
---|
213 | }
|
---|
214 | #define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
|
---|
215 | *dst = FbDoMaskRRop(*dst,and,xor,r); \
|
---|
216 | }
|
---|
217 | #else
|
---|
218 |
|
---|
219 | #define FbByteMaskInvalid 0x10
|
---|
220 |
|
---|
221 | #define FbPatternOffset(o,t) ((o) ^ (FbPatternOffsetBits & ~(sizeof (t) - 1)))
|
---|
222 |
|
---|
223 | #define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o)))
|
---|
224 | #define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3))
|
---|
225 | #define FbStorePart(dst,off,t,xor) (*FbPtrOffset(dst,off,t) = \
|
---|
226 | FbSelectPart(xor,off,t))
|
---|
227 | #ifndef FbSelectPart
|
---|
228 | #define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t)
|
---|
229 | #endif
|
---|
230 |
|
---|
231 | #define FbMaskBitsBytes(x,w,copy,l,lb,n,r,rb) { \
|
---|
232 | n = (w); \
|
---|
233 | lb = 0; \
|
---|
234 | rb = 0; \
|
---|
235 | r = FbRightMask((x)+n); \
|
---|
236 | if (r) { \
|
---|
237 | /* compute right byte length */ \
|
---|
238 | if ((copy) && (((x) + n) & 7) == 0) { \
|
---|
239 | rb = (((x) + n) & FB_MASK) >> 3; \
|
---|
240 | } else { \
|
---|
241 | rb = FbByteMaskInvalid; \
|
---|
242 | } \
|
---|
243 | } \
|
---|
244 | l = FbLeftMask(x); \
|
---|
245 | if (l) { \
|
---|
246 | /* compute left byte length */ \
|
---|
247 | if ((copy) && ((x) & 7) == 0) { \
|
---|
248 | lb = ((x) & FB_MASK) >> 3; \
|
---|
249 | } else { \
|
---|
250 | lb = FbByteMaskInvalid; \
|
---|
251 | } \
|
---|
252 | /* subtract out the portion painted by leftMask */ \
|
---|
253 | n -= FB_UNIT - ((x) & FB_MASK); \
|
---|
254 | if (n < 0) { \
|
---|
255 | if (lb != FbByteMaskInvalid) { \
|
---|
256 | if (rb == FbByteMaskInvalid) { \
|
---|
257 | lb = FbByteMaskInvalid; \
|
---|
258 | } else if (rb) { \
|
---|
259 | lb |= (rb - lb) << (FB_SHIFT - 3); \
|
---|
260 | rb = 0; \
|
---|
261 | } \
|
---|
262 | } \
|
---|
263 | n = 0; \
|
---|
264 | l &= r; \
|
---|
265 | r = 0; \
|
---|
266 | }\
|
---|
267 | } \
|
---|
268 | n >>= FB_SHIFT; \
|
---|
269 | }
|
---|
270 |
|
---|
271 | #if FB_SHIFT == 6
|
---|
272 | #define FbDoLeftMaskByteRRop6Cases(dst,xor) \
|
---|
273 | case (sizeof (FbBits) - 7) | (1 << (FB_SHIFT - 3)): \
|
---|
274 | FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
|
---|
275 | break; \
|
---|
276 | case (sizeof (FbBits) - 7) | (2 << (FB_SHIFT - 3)): \
|
---|
277 | FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
|
---|
278 | FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
|
---|
279 | break; \
|
---|
280 | case (sizeof (FbBits) - 7) | (3 << (FB_SHIFT - 3)): \
|
---|
281 | FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
|
---|
282 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
283 | break; \
|
---|
284 | case (sizeof (FbBits) - 7) | (4 << (FB_SHIFT - 3)): \
|
---|
285 | FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
|
---|
286 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
287 | FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
|
---|
288 | break; \
|
---|
289 | case (sizeof (FbBits) - 7) | (5 << (FB_SHIFT - 3)): \
|
---|
290 | FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
|
---|
291 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
292 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
293 | break; \
|
---|
294 | case (sizeof (FbBits) - 7) | (6 << (FB_SHIFT - 3)): \
|
---|
295 | FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
|
---|
296 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
297 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
298 | FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
|
---|
299 | break; \
|
---|
300 | case (sizeof (FbBits) - 7): \
|
---|
301 | FbStorePart(dst,sizeof (FbBits) - 7,CARD8,xor); \
|
---|
302 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
303 | FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
|
---|
304 | break; \
|
---|
305 | case (sizeof (FbBits) - 6) | (1 << (FB_SHIFT - 3)): \
|
---|
306 | FbStorePart(dst,sizeof (FbBits) - 6,CARD8,xor); \
|
---|
307 | break; \
|
---|
308 | case (sizeof (FbBits) - 6) | (2 << (FB_SHIFT - 3)): \
|
---|
309 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
310 | break; \
|
---|
311 | case (sizeof (FbBits) - 6) | (3 << (FB_SHIFT - 3)): \
|
---|
312 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
313 | FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
|
---|
314 | break; \
|
---|
315 | case (sizeof (FbBits) - 6) | (4 << (FB_SHIFT - 3)): \
|
---|
316 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
317 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
318 | break; \
|
---|
319 | case (sizeof (FbBits) - 6) | (5 << (FB_SHIFT - 3)): \
|
---|
320 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
321 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
322 | FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
|
---|
323 | break; \
|
---|
324 | case (sizeof (FbBits) - 6): \
|
---|
325 | FbStorePart(dst,sizeof (FbBits) - 6,CARD16,xor); \
|
---|
326 | FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
|
---|
327 | break; \
|
---|
328 | case (sizeof (FbBits) - 5) | (1 << (FB_SHIFT - 3)): \
|
---|
329 | FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
|
---|
330 | break; \
|
---|
331 | case (sizeof (FbBits) - 5) | (2 << (FB_SHIFT - 3)): \
|
---|
332 | FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
|
---|
333 | FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
|
---|
334 | break; \
|
---|
335 | case (sizeof (FbBits) - 5) | (3 << (FB_SHIFT - 3)): \
|
---|
336 | FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
|
---|
337 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
338 | break; \
|
---|
339 | case (sizeof (FbBits) - 5) | (4 << (FB_SHIFT - 3)): \
|
---|
340 | FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
|
---|
341 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
342 | FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
|
---|
343 | break; \
|
---|
344 | case (sizeof (FbBits) - 5): \
|
---|
345 | FbStorePart(dst,sizeof (FbBits) - 5,CARD8,xor); \
|
---|
346 | FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
|
---|
347 | break; \
|
---|
348 | case (sizeof (FbBits) - 4) | (1 << (FB_SHIFT - 3)): \
|
---|
349 | FbStorePart(dst,sizeof (FbBits) - 4,CARD8,xor); \
|
---|
350 | break; \
|
---|
351 | case (sizeof (FbBits) - 4) | (2 << (FB_SHIFT - 3)): \
|
---|
352 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
353 | break; \
|
---|
354 | case (sizeof (FbBits) - 4) | (3 << (FB_SHIFT - 3)): \
|
---|
355 | FbStorePart(dst,sizeof (FbBits) - 4,CARD16,xor); \
|
---|
356 | FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
|
---|
357 | break; \
|
---|
358 | case (sizeof (FbBits) - 4): \
|
---|
359 | FbStorePart(dst,sizeof (FbBits) - 4,CARD32,xor); \
|
---|
360 | break;
|
---|
361 |
|
---|
362 | #define FbDoRightMaskByteRRop6Cases(dst,xor) \
|
---|
363 | case 4: \
|
---|
364 | FbStorePart(dst,0,CARD32,xor); \
|
---|
365 | break; \
|
---|
366 | case 5: \
|
---|
367 | FbStorePart(dst,0,CARD32,xor); \
|
---|
368 | FbStorePart(dst,4,CARD8,xor); \
|
---|
369 | break; \
|
---|
370 | case 6: \
|
---|
371 | FbStorePart(dst,0,CARD32,xor); \
|
---|
372 | FbStorePart(dst,4,CARD16,xor); \
|
---|
373 | break; \
|
---|
374 | case 7: \
|
---|
375 | FbStorePart(dst,0,CARD32,xor); \
|
---|
376 | FbStorePart(dst,4,CARD16,xor); \
|
---|
377 | FbStorePart(dst,6,CARD8,xor); \
|
---|
378 | break;
|
---|
379 | #else
|
---|
380 | #define FbDoLeftMaskByteRRop6Cases(dst,xor)
|
---|
381 | #define FbDoRightMaskByteRRop6Cases(dst,xor)
|
---|
382 | #endif
|
---|
383 |
|
---|
384 | #define FbDoLeftMaskByteRRop(dst,lb,l,and,xor) { \
|
---|
385 | switch (lb) { \
|
---|
386 | FbDoLeftMaskByteRRop6Cases(dst,xor) \
|
---|
387 | case (sizeof (FbBits) - 3) | (1 << (FB_SHIFT - 3)): \
|
---|
388 | FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
|
---|
389 | break; \
|
---|
390 | case (sizeof (FbBits) - 3) | (2 << (FB_SHIFT - 3)): \
|
---|
391 | FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
|
---|
392 | FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
|
---|
393 | break; \
|
---|
394 | case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
|
---|
395 | FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
|
---|
396 | break; \
|
---|
397 | case sizeof (FbBits) - 3: \
|
---|
398 | FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
|
---|
399 | case sizeof (FbBits) - 2: \
|
---|
400 | FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
|
---|
401 | break; \
|
---|
402 | case sizeof (FbBits) - 1: \
|
---|
403 | FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \
|
---|
404 | break; \
|
---|
405 | default: \
|
---|
406 | *dst = FbDoMaskRRop(*dst, and, xor, l); \
|
---|
407 | break; \
|
---|
408 | } \
|
---|
409 | }
|
---|
410 |
|
---|
411 |
|
---|
412 | #define FbDoRightMaskByteRRop(dst,rb,r,and,xor) { \
|
---|
413 | switch (rb) { \
|
---|
414 | case 1: \
|
---|
415 | FbStorePart(dst,0,CARD8,xor); \
|
---|
416 | break; \
|
---|
417 | case 2: \
|
---|
418 | FbStorePart(dst,0,CARD16,xor); \
|
---|
419 | break; \
|
---|
420 | case 3: \
|
---|
421 | FbStorePart(dst,0,CARD16,xor); \
|
---|
422 | FbStorePart(dst,2,CARD8,xor); \
|
---|
423 | break; \
|
---|
424 | FbDoRightMaskByteRRop6Cases(dst,xor) \
|
---|
425 | default: \
|
---|
426 | *dst = FbDoMaskRRop (*dst, and, xor, r); \
|
---|
427 | } \
|
---|
428 | }
|
---|
429 | #endif
|
---|
430 |
|
---|
431 | #define FbMaskStip(x,w,l,n,r) { \
|
---|
432 | n = (w); \
|
---|
433 | r = FbRightStipMask((x)+n); \
|
---|
434 | l = FbLeftStipMask(x); \
|
---|
435 | if (l) { \
|
---|
436 | n -= FB_STIP_UNIT - ((x) & FB_STIP_MASK); \
|
---|
437 | if (n < 0) { \
|
---|
438 | n = 0; \
|
---|
439 | l &= r; \
|
---|
440 | r = 0; \
|
---|
441 | } \
|
---|
442 | } \
|
---|
443 | n >>= FB_STIP_SHIFT; \
|
---|
444 | }
|
---|
445 |
|
---|
446 | /*
|
---|
447 | * These macros are used to transparently stipple
|
---|
448 | * in copy mode; the expected usage is with 'n' constant
|
---|
449 | * so all of the conditional parts collapse into a minimal
|
---|
450 | * sequence of partial word writes
|
---|
451 | *
|
---|
452 | * 'n' is the bytemask of which bytes to store, 'a' is the address
|
---|
453 | * of the FbBits base unit, 'o' is the offset within that unit
|
---|
454 | *
|
---|
455 | * The term "lane" comes from the hardware term "byte-lane" which
|
---|
456 | */
|
---|
457 |
|
---|
458 | #define FbLaneCase1(n,a,o) ((n) == 0x01 ? \
|
---|
459 | (*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \
|
---|
460 | fgxor) : 0)
|
---|
461 | #define FbLaneCase2(n,a,o) ((n) == 0x03 ? \
|
---|
462 | (*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \
|
---|
463 | fgxor) : \
|
---|
464 | ((void)FbLaneCase1((n)&1,a,o), \
|
---|
465 | FbLaneCase1((n)>>1,a,(o)+1)))
|
---|
466 | #define FbLaneCase4(n,a,o) ((n) == 0x0f ? \
|
---|
467 | (*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \
|
---|
468 | fgxor) : \
|
---|
469 | ((void)FbLaneCase2((n)&3,a,o), \
|
---|
470 | FbLaneCase2((n)>>2,a,(o)+2)))
|
---|
471 | #define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \
|
---|
472 | ((void)FbLaneCase4((n)&15,a,o), \
|
---|
473 | FbLaneCase4((n)>>4,a,(o)+4)))
|
---|
474 |
|
---|
475 | #if FB_SHIFT == 6
|
---|
476 | #define FbLaneCase(n,a) FbLaneCase8(n,(CARD8 *) (a),0)
|
---|
477 | #endif
|
---|
478 |
|
---|
479 | #if FB_SHIFT == 5
|
---|
480 | #define FbLaneCase(n,a) FbLaneCase4(n,(CARD8 *) (a),0)
|
---|
481 | #endif
|
---|
482 |
|
---|
483 | /* Rotate a filled pixel value to the specified alignement */
|
---|
484 | #define FbRot24(p,b) (FbScrRight(p,b) | FbScrLeft(p,24-(b)))
|
---|
485 | #define FbRot24Stip(p,b) (FbStipRight(p,b) | FbStipLeft(p,24-(b)))
|
---|
486 |
|
---|
487 | /* step a filled pixel value to the next/previous FB_UNIT alignment */
|
---|
488 | #define FbNext24Pix(p) (FbRot24(p,(24-FB_UNIT%24)))
|
---|
489 | #define FbPrev24Pix(p) (FbRot24(p,FB_UNIT%24))
|
---|
490 | #define FbNext24Stip(p) (FbRot24(p,(24-FB_STIP_UNIT%24)))
|
---|
491 | #define FbPrev24Stip(p) (FbRot24(p,FB_STIP_UNIT%24))
|
---|
492 |
|
---|
493 | /* step a rotation value to the next/previous rotation value */
|
---|
494 | #if FB_UNIT == 64
|
---|
495 | #define FbNext24Rot(r) ((r) == 16 ? 0 : (r) + 8)
|
---|
496 | #define FbPrev24Rot(r) ((r) == 0 ? 16 : (r) - 8)
|
---|
497 |
|
---|
498 | #if IMAGE_BYTE_ORDER == MSBFirst
|
---|
499 | #define FbFirst24Rot(x) (((x) + 8) % 24)
|
---|
500 | #else
|
---|
501 | #define FbFirst24Rot(x) ((x) % 24)
|
---|
502 | #endif
|
---|
503 |
|
---|
504 | #endif
|
---|
505 |
|
---|
506 | #if FB_UNIT == 32
|
---|
507 | #define FbNext24Rot(r) ((r) == 0 ? 16 : (r) - 8)
|
---|
508 | #define FbPrev24Rot(r) ((r) == 16 ? 0 : (r) + 8)
|
---|
509 |
|
---|
510 | #if IMAGE_BYTE_ORDER == MSBFirst
|
---|
511 | #define FbFirst24Rot(x) (((x) + 16) % 24)
|
---|
512 | #else
|
---|
513 | #define FbFirst24Rot(x) ((x) % 24)
|
---|
514 | #endif
|
---|
515 | #endif
|
---|
516 |
|
---|
517 | #define FbNext24RotStip(r) ((r) == 0 ? 16 : (r) - 8)
|
---|
518 | #define FbPrev24RotStip(r) ((r) == 16 ? 0 : (r) + 8)
|
---|
519 |
|
---|
520 | /* Whether 24-bit specific code is needed for this filled pixel value */
|
---|
521 | #define FbCheck24Pix(p) ((p) == FbNext24Pix(p))
|
---|
522 |
|
---|
523 | /* Macros for dealing with dashing */
|
---|
524 |
|
---|
525 | #define FbDashDeclare \
|
---|
526 | unsigned char *__dash, *__firstDash, *__lastDash
|
---|
527 |
|
---|
528 | #define FbDashInit(pGC,pPriv,dashOffset,dashlen,even) { \
|
---|
529 | (even) = TRUE; \
|
---|
530 | __firstDash = (pGC)->dash; \
|
---|
531 | __lastDash = __firstDash + (pGC)->numInDashList; \
|
---|
532 | (dashOffset) %= (pPriv)->dashLength; \
|
---|
533 | \
|
---|
534 | __dash = __firstDash; \
|
---|
535 | while ((dashOffset) >= ((dashlen) = *__dash)) \
|
---|
536 | { \
|
---|
537 | (dashOffset) -= (dashlen); \
|
---|
538 | (even) = 1-(even); \
|
---|
539 | if (++__dash == __lastDash) \
|
---|
540 | __dash = __firstDash; \
|
---|
541 | } \
|
---|
542 | (dashlen) -= (dashOffset); \
|
---|
543 | }
|
---|
544 |
|
---|
545 | #define FbDashNext(dashlen) { \
|
---|
546 | if (++__dash == __lastDash) \
|
---|
547 | __dash = __firstDash; \
|
---|
548 | (dashlen) = *__dash; \
|
---|
549 | }
|
---|
550 |
|
---|
551 | /* as numInDashList is always even, this case can skip a test */
|
---|
552 |
|
---|
553 | #define FbDashNextEven(dashlen) { \
|
---|
554 | (dashlen) = *++__dash; \
|
---|
555 | }
|
---|
556 |
|
---|
557 | #define FbDashNextOdd(dashlen) FbDashNext(dashlen)
|
---|
558 |
|
---|
559 | #define FbDashStep(dashlen,even) { \
|
---|
560 | if (!--(dashlen)) { \
|
---|
561 | FbDashNext(dashlen); \
|
---|
562 | (even) = 1-(even); \
|
---|
563 | } \
|
---|
564 | }
|
---|
565 |
|
---|
566 | /* XXX fb*PrivateIndex should be static, but it breaks the ABI */
|
---|
567 |
|
---|
568 | extern int fbGCPrivateIndex;
|
---|
569 | extern int fbGetGCPrivateIndex(void);
|
---|
570 | #ifndef FB_NO_WINDOW_PIXMAPS
|
---|
571 | extern int fbWinPrivateIndex;
|
---|
572 | extern int fbGetWinPrivateIndex(void);
|
---|
573 | #endif
|
---|
574 | extern const GCOps fbGCOps;
|
---|
575 | extern const GCFuncs fbGCFuncs;
|
---|
576 |
|
---|
577 | #ifdef TEKX11
|
---|
578 | #define FB_OLD_GC
|
---|
579 | #define FB_OLD_SCREEN
|
---|
580 | #endif
|
---|
581 |
|
---|
582 | #ifdef FB_OLD_SCREEN
|
---|
583 | # define FB_OLD_MISCREENINIT /* miScreenInit requires 14 args, not 13 */
|
---|
584 | extern WindowPtr *WindowTable;
|
---|
585 | #endif
|
---|
586 |
|
---|
587 | #ifdef FB_24_32BIT
|
---|
588 | #define FB_SCREEN_PRIVATE
|
---|
589 | #endif
|
---|
590 |
|
---|
591 | #ifdef FB_SCREEN_PRIVATE
|
---|
592 | extern int fbScreenPrivateIndex;
|
---|
593 | extern int fbGetScreenPrivateIndex(void);
|
---|
594 |
|
---|
595 | /* private field of a screen */
|
---|
596 | typedef struct {
|
---|
597 | unsigned char win32bpp; /* window bpp for 32-bpp images */
|
---|
598 | unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */
|
---|
599 | } FbScreenPrivRec, *FbScreenPrivPtr;
|
---|
600 |
|
---|
601 | #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \
|
---|
602 | (pScreen)->devPrivates[fbGetScreenPrivateIndex()].ptr)
|
---|
603 | #endif
|
---|
604 |
|
---|
605 | /* private field of GC */
|
---|
606 | typedef struct {
|
---|
607 | #ifdef FB_OLD_GC
|
---|
608 | unsigned char pad1;
|
---|
609 | unsigned char pad2;
|
---|
610 | unsigned char pad3;
|
---|
611 | unsigned fExpose:1;
|
---|
612 | unsigned freeCompClip:1;
|
---|
613 | PixmapPtr pRotatedPixmap;
|
---|
614 | RegionPtr pCompositeClip;
|
---|
615 | #endif
|
---|
616 | FbBits and, xor; /* reduced rop values */
|
---|
617 | FbBits bgand, bgxor; /* for stipples */
|
---|
618 | FbBits fg, bg, pm; /* expanded and filled */
|
---|
619 | unsigned int dashLength; /* total of all dash elements */
|
---|
620 | unsigned char oneRect; /* clip list is single rectangle */
|
---|
621 | unsigned char evenStipple; /* stipple is even */
|
---|
622 | unsigned char bpp; /* current drawable bpp */
|
---|
623 | } FbGCPrivRec, *FbGCPrivPtr;
|
---|
624 |
|
---|
625 | #define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\
|
---|
626 | (pGC)->devPrivates[fbGetGCPrivateIndex()].ptr)
|
---|
627 |
|
---|
628 | #ifdef FB_OLD_GC
|
---|
629 | #define fbGetCompositeClip(pGC) (fbGetGCPrivate(pGC)->pCompositeClip)
|
---|
630 | #define fbGetExpose(pGC) (fbGetGCPrivate(pGC)->fExpose)
|
---|
631 | #define fbGetFreeCompClip(pGC) (fbGetGCPrivate(pGC)->freeCompClip)
|
---|
632 | #define fbGetRotatedPixmap(pGC) (fbGetGCPrivate(pGC)->pRotatedPixmap)
|
---|
633 | #else
|
---|
634 | #define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
|
---|
635 | #define fbGetExpose(pGC) ((pGC)->fExpose)
|
---|
636 | #define fbGetFreeCompClip(pGC) ((pGC)->freeCompClip)
|
---|
637 | #define fbGetRotatedPixmap(pGC) ((pGC)->pRotatedPixmap)
|
---|
638 | #endif
|
---|
639 |
|
---|
640 | #define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate)
|
---|
641 | #ifdef FB_NO_WINDOW_PIXMAPS
|
---|
642 | #define fbGetWindowPixmap(d) fbGetScreenPixmap(((DrawablePtr) (d))->pScreen)
|
---|
643 | #else
|
---|
644 | #define fbGetWindowPixmap(pWin) ((PixmapPtr)\
|
---|
645 | ((WindowPtr) (pWin))->devPrivates[fbGetWinPrivateIndex()].ptr)
|
---|
646 | #endif
|
---|
647 |
|
---|
648 | #ifdef ROOTLESS
|
---|
649 | #define __fbPixDrawableX(pPix) ((pPix)->drawable.x)
|
---|
650 | #define __fbPixDrawableY(pPix) ((pPix)->drawable.y)
|
---|
651 | #else
|
---|
652 | #define __fbPixDrawableX(pPix) 0
|
---|
653 | #define __fbPixDrawableY(pPix) 0
|
---|
654 | #endif
|
---|
655 |
|
---|
656 | #ifdef COMPOSITE
|
---|
657 | #define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix) - (pPix)->screen_x)
|
---|
658 | #define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix) - (pPix)->screen_y)
|
---|
659 | #else
|
---|
660 | #define __fbPixOffXWin(pPix) (__fbPixDrawableX(pPix))
|
---|
661 | #define __fbPixOffYWin(pPix) (__fbPixDrawableY(pPix))
|
---|
662 | #endif
|
---|
663 | #define __fbPixOffXPix(pPix) (__fbPixDrawableX(pPix))
|
---|
664 | #define __fbPixOffYPix(pPix) (__fbPixDrawableY(pPix))
|
---|
665 |
|
---|
666 | #define fbGetDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
|
---|
667 | PixmapPtr _pPix; \
|
---|
668 | if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
|
---|
669 | _pPix = fbGetWindowPixmap(pDrawable); \
|
---|
670 | (xoff) = __fbPixOffXWin(_pPix); \
|
---|
671 | (yoff) = __fbPixOffYWin(_pPix); \
|
---|
672 | } else { \
|
---|
673 | _pPix = (PixmapPtr) (pDrawable); \
|
---|
674 | (xoff) = __fbPixOffXPix(_pPix); \
|
---|
675 | (yoff) = __fbPixOffYPix(_pPix); \
|
---|
676 | } \
|
---|
677 | (pointer) = (FbBits *) _pPix->devPrivate.ptr; \
|
---|
678 | (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \
|
---|
679 | (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
|
---|
680 | }
|
---|
681 |
|
---|
682 | #define fbGetStipDrawable(pDrawable, pointer, stride, bpp, xoff, yoff) { \
|
---|
683 | PixmapPtr _pPix; \
|
---|
684 | if ((pDrawable)->type != DRAWABLE_PIXMAP) { \
|
---|
685 | _pPix = fbGetWindowPixmap(pDrawable); \
|
---|
686 | (xoff) = __fbPixOffXWin(_pPix); \
|
---|
687 | (yoff) = __fbPixOffYWin(_pPix); \
|
---|
688 | } else { \
|
---|
689 | _pPix = (PixmapPtr) (pDrawable); \
|
---|
690 | (xoff) = __fbPixOffXPix(_pPix); \
|
---|
691 | (yoff) = __fbPixOffYPix(_pPix); \
|
---|
692 | } \
|
---|
693 | (pointer) = (FbStip *) _pPix->devPrivate.ptr; \
|
---|
694 | (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \
|
---|
695 | (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \
|
---|
696 | }
|
---|
697 |
|
---|
698 | /*
|
---|
699 | * XFree86 empties the root BorderClip when the VT is inactive,
|
---|
700 | * here's a macro which uses that to disable GetImage and GetSpans
|
---|
701 | */
|
---|
702 |
|
---|
703 | #define fbWindowEnabled(pWin) \
|
---|
704 | REGION_NOTEMPTY((pWin)->drawable.pScreen, \
|
---|
705 | &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
|
---|
706 |
|
---|
707 | #define fbDrawableEnabled(pDrawable) \
|
---|
708 | ((pDrawable)->type == DRAWABLE_PIXMAP ? \
|
---|
709 | TRUE : fbWindowEnabled((WindowPtr) pDrawable))
|
---|
710 |
|
---|
711 | #ifdef FB_OLD_SCREEN
|
---|
712 | #define BitsPerPixel(d) (\
|
---|
713 | ((1 << PixmapWidthPaddingInfo[d].padBytesLog2) * 8 / \
|
---|
714 | (PixmapWidthPaddingInfo[d].padRoundUp+1)))
|
---|
715 | #endif
|
---|
716 |
|
---|
717 | #define FbPowerOfTwo(w) (((w) & ((w) - 1)) == 0)
|
---|
718 | /*
|
---|
719 | * Accelerated tiles are power of 2 width <= FB_UNIT
|
---|
720 | */
|
---|
721 | #define FbEvenTile(w) ((w) <= FB_UNIT && FbPowerOfTwo(w))
|
---|
722 | /*
|
---|
723 | * Accelerated stipples are power of 2 width and <= FB_UNIT/dstBpp
|
---|
724 | * with dstBpp a power of 2 as well
|
---|
725 | */
|
---|
726 | #define FbEvenStip(w,bpp) ((w) * (bpp) <= FB_UNIT && FbPowerOfTwo(w) && FbPowerOfTwo(bpp))
|
---|
727 |
|
---|
728 | /*
|
---|
729 | * fb24_32.c
|
---|
730 | */
|
---|
731 | void
|
---|
732 | fb24_32GetSpans(DrawablePtr pDrawable,
|
---|
733 | int wMax,
|
---|
734 | DDXPointPtr ppt,
|
---|
735 | int *pwidth,
|
---|
736 | int nspans,
|
---|
737 | char *pchardstStart);
|
---|
738 |
|
---|
739 | void
|
---|
740 | fb24_32SetSpans (DrawablePtr pDrawable,
|
---|
741 | GCPtr pGC,
|
---|
742 | char *src,
|
---|
743 | DDXPointPtr ppt,
|
---|
744 | int *pwidth,
|
---|
745 | int nspans,
|
---|
746 | int fSorted);
|
---|
747 |
|
---|
748 | void
|
---|
749 | fb24_32PutZImage (DrawablePtr pDrawable,
|
---|
750 | RegionPtr pClip,
|
---|
751 | int alu,
|
---|
752 | FbBits pm,
|
---|
753 | int x,
|
---|
754 | int y,
|
---|
755 | int width,
|
---|
756 | int height,
|
---|
757 | CARD8 *src,
|
---|
758 | FbStride srcStride);
|
---|
759 |
|
---|
760 | void
|
---|
761 | fb24_32GetImage (DrawablePtr pDrawable,
|
---|
762 | int x,
|
---|
763 | int y,
|
---|
764 | int w,
|
---|
765 | int h,
|
---|
766 | unsigned int format,
|
---|
767 | unsigned long planeMask,
|
---|
768 | char *d);
|
---|
769 |
|
---|
770 | void
|
---|
771 | fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
|
---|
772 | DrawablePtr pDstDrawable,
|
---|
773 | GCPtr pGC,
|
---|
774 | BoxPtr pbox,
|
---|
775 | int nbox,
|
---|
776 | int dx,
|
---|
777 | int dy,
|
---|
778 | Bool reverse,
|
---|
779 | Bool upsidedown,
|
---|
780 | Pixel bitplane,
|
---|
781 | void *closure);
|
---|
782 |
|
---|
783 | PixmapPtr
|
---|
784 | fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel);
|
---|
785 |
|
---|
786 | Bool
|
---|
787 | fb24_32CreateScreenResources(ScreenPtr pScreen);
|
---|
788 |
|
---|
789 | Bool
|
---|
790 | fb24_32ModifyPixmapHeader (PixmapPtr pPixmap,
|
---|
791 | int width,
|
---|
792 | int height,
|
---|
793 | int depth,
|
---|
794 | int bitsPerPixel,
|
---|
795 | int devKind,
|
---|
796 | pointer pPixData);
|
---|
797 |
|
---|
798 | /*
|
---|
799 | * fballpriv.c
|
---|
800 | */
|
---|
801 | Bool
|
---|
802 | fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex);
|
---|
803 |
|
---|
804 | /*
|
---|
805 | * fbarc.c
|
---|
806 | */
|
---|
807 |
|
---|
808 | void
|
---|
809 | fbPolyArc (DrawablePtr pDrawable,
|
---|
810 | GCPtr pGC,
|
---|
811 | int narcs,
|
---|
812 | xArc *parcs);
|
---|
813 |
|
---|
814 | /*
|
---|
815 | * fbbits.c
|
---|
816 | */
|
---|
817 |
|
---|
818 | void
|
---|
819 | fbBresSolid8(DrawablePtr pDrawable,
|
---|
820 | GCPtr pGC,
|
---|
821 | int dashOffset,
|
---|
822 | int signdx,
|
---|
823 | int signdy,
|
---|
824 | int axis,
|
---|
825 | int x,
|
---|
826 | int y,
|
---|
827 | int e,
|
---|
828 | int e1,
|
---|
829 | int e3,
|
---|
830 | int len);
|
---|
831 |
|
---|
832 | void
|
---|
833 | fbBresDash8 (DrawablePtr pDrawable,
|
---|
834 | GCPtr pGC,
|
---|
835 | int dashOffset,
|
---|
836 | int signdx,
|
---|
837 | int signdy,
|
---|
838 | int axis,
|
---|
839 | int x,
|
---|
840 | int y,
|
---|
841 | int e,
|
---|
842 | int e1,
|
---|
843 | int e3,
|
---|
844 | int len);
|
---|
845 |
|
---|
846 | void
|
---|
847 | fbDots8 (FbBits *dst,
|
---|
848 | FbStride dstStride,
|
---|
849 | int dstBpp,
|
---|
850 | BoxPtr pBox,
|
---|
851 | xPoint *pts,
|
---|
852 | int npt,
|
---|
853 | int xorg,
|
---|
854 | int yorg,
|
---|
855 | int xoff,
|
---|
856 | int yoff,
|
---|
857 | FbBits and,
|
---|
858 | FbBits xor);
|
---|
859 |
|
---|
860 | void
|
---|
861 | fbArc8 (FbBits *dst,
|
---|
862 | FbStride dstStride,
|
---|
863 | int dstBpp,
|
---|
864 | xArc *arc,
|
---|
865 | int dx,
|
---|
866 | int dy,
|
---|
867 | FbBits and,
|
---|
868 | FbBits xor);
|
---|
869 |
|
---|
870 | void
|
---|
871 | fbGlyph8 (FbBits *dstLine,
|
---|
872 | FbStride dstStride,
|
---|
873 | int dstBpp,
|
---|
874 | FbStip *stipple,
|
---|
875 | FbBits fg,
|
---|
876 | int height,
|
---|
877 | int shift);
|
---|
878 |
|
---|
879 | void
|
---|
880 | fbPolyline8 (DrawablePtr pDrawable,
|
---|
881 | GCPtr pGC,
|
---|
882 | int mode,
|
---|
883 | int npt,
|
---|
884 | DDXPointPtr ptsOrig);
|
---|
885 |
|
---|
886 | void
|
---|
887 | fbPolySegment8 (DrawablePtr pDrawable,
|
---|
888 | GCPtr pGC,
|
---|
889 | int nseg,
|
---|
890 | xSegment *pseg);
|
---|
891 |
|
---|
892 | void
|
---|
893 | fbBresSolid16(DrawablePtr pDrawable,
|
---|
894 | GCPtr pGC,
|
---|
895 | int dashOffset,
|
---|
896 | int signdx,
|
---|
897 | int signdy,
|
---|
898 | int axis,
|
---|
899 | int x,
|
---|
900 | int y,
|
---|
901 | int e,
|
---|
902 | int e1,
|
---|
903 | int e3,
|
---|
904 | int len);
|
---|
905 |
|
---|
906 | void
|
---|
907 | fbBresDash16(DrawablePtr pDrawable,
|
---|
908 | GCPtr pGC,
|
---|
909 | int dashOffset,
|
---|
910 | int signdx,
|
---|
911 | int signdy,
|
---|
912 | int axis,
|
---|
913 | int x,
|
---|
914 | int y,
|
---|
915 | int e,
|
---|
916 | int e1,
|
---|
917 | int e3,
|
---|
918 | int len);
|
---|
919 |
|
---|
920 | void
|
---|
921 | fbDots16(FbBits *dst,
|
---|
922 | FbStride dstStride,
|
---|
923 | int dstBpp,
|
---|
924 | BoxPtr pBox,
|
---|
925 | xPoint *pts,
|
---|
926 | int npt,
|
---|
927 | int xorg,
|
---|
928 | int yorg,
|
---|
929 | int xoff,
|
---|
930 | int yoff,
|
---|
931 | FbBits and,
|
---|
932 | FbBits xor);
|
---|
933 |
|
---|
934 | void
|
---|
935 | fbArc16(FbBits *dst,
|
---|
936 | FbStride dstStride,
|
---|
937 | int dstBpp,
|
---|
938 | xArc *arc,
|
---|
939 | int dx,
|
---|
940 | int dy,
|
---|
941 | FbBits and,
|
---|
942 | FbBits xor);
|
---|
943 |
|
---|
944 | void
|
---|
945 | fbGlyph16(FbBits *dstLine,
|
---|
946 | FbStride dstStride,
|
---|
947 | int dstBpp,
|
---|
948 | FbStip *stipple,
|
---|
949 | FbBits fg,
|
---|
950 | int height,
|
---|
951 | int shift);
|
---|
952 |
|
---|
953 | void
|
---|
954 | fbPolyline16 (DrawablePtr pDrawable,
|
---|
955 | GCPtr pGC,
|
---|
956 | int mode,
|
---|
957 | int npt,
|
---|
958 | DDXPointPtr ptsOrig);
|
---|
959 |
|
---|
960 | void
|
---|
961 | fbPolySegment16 (DrawablePtr pDrawable,
|
---|
962 | GCPtr pGC,
|
---|
963 | int nseg,
|
---|
964 | xSegment *pseg);
|
---|
965 |
|
---|
966 |
|
---|
967 | void
|
---|
968 | fbBresSolid24(DrawablePtr pDrawable,
|
---|
969 | GCPtr pGC,
|
---|
970 | int dashOffset,
|
---|
971 | int signdx,
|
---|
972 | int signdy,
|
---|
973 | int axis,
|
---|
974 | int x,
|
---|
975 | int y,
|
---|
976 | int e,
|
---|
977 | int e1,
|
---|
978 | int e3,
|
---|
979 | int len);
|
---|
980 |
|
---|
981 | void
|
---|
982 | fbBresDash24(DrawablePtr pDrawable,
|
---|
983 | GCPtr pGC,
|
---|
984 | int dashOffset,
|
---|
985 | int signdx,
|
---|
986 | int signdy,
|
---|
987 | int axis,
|
---|
988 | int x,
|
---|
989 | int y,
|
---|
990 | int e,
|
---|
991 | int e1,
|
---|
992 | int e3,
|
---|
993 | int len);
|
---|
994 |
|
---|
995 | void
|
---|
996 | fbDots24(FbBits *dst,
|
---|
997 | FbStride dstStride,
|
---|
998 | int dstBpp,
|
---|
999 | BoxPtr pBox,
|
---|
1000 | xPoint *pts,
|
---|
1001 | int npt,
|
---|
1002 | int xorg,
|
---|
1003 | int yorg,
|
---|
1004 | int xoff,
|
---|
1005 | int yoff,
|
---|
1006 | FbBits and,
|
---|
1007 | FbBits xor);
|
---|
1008 |
|
---|
1009 | void
|
---|
1010 | fbArc24(FbBits *dst,
|
---|
1011 | FbStride dstStride,
|
---|
1012 | int dstBpp,
|
---|
1013 | xArc *arc,
|
---|
1014 | int dx,
|
---|
1015 | int dy,
|
---|
1016 | FbBits and,
|
---|
1017 | FbBits xor);
|
---|
1018 |
|
---|
1019 | void
|
---|
1020 | fbGlyph24(FbBits *dstLine,
|
---|
1021 | FbStride dstStride,
|
---|
1022 | int dstBpp,
|
---|
1023 | FbStip *stipple,
|
---|
1024 | FbBits fg,
|
---|
1025 | int height,
|
---|
1026 | int shift);
|
---|
1027 |
|
---|
1028 | void
|
---|
1029 | fbPolyline24 (DrawablePtr pDrawable,
|
---|
1030 | GCPtr pGC,
|
---|
1031 | int mode,
|
---|
1032 | int npt,
|
---|
1033 | DDXPointPtr ptsOrig);
|
---|
1034 |
|
---|
1035 | void
|
---|
1036 | fbPolySegment24 (DrawablePtr pDrawable,
|
---|
1037 | GCPtr pGC,
|
---|
1038 | int nseg,
|
---|
1039 | xSegment *pseg);
|
---|
1040 |
|
---|
1041 |
|
---|
1042 | void
|
---|
1043 | fbBresSolid32(DrawablePtr pDrawable,
|
---|
1044 | GCPtr pGC,
|
---|
1045 | int dashOffset,
|
---|
1046 | int signdx,
|
---|
1047 | int signdy,
|
---|
1048 | int axis,
|
---|
1049 | int x,
|
---|
1050 | int y,
|
---|
1051 | int e,
|
---|
1052 | int e1,
|
---|
1053 | int e3,
|
---|
1054 | int len);
|
---|
1055 |
|
---|
1056 | void
|
---|
1057 | fbBresDash32(DrawablePtr pDrawable,
|
---|
1058 | GCPtr pGC,
|
---|
1059 | int dashOffset,
|
---|
1060 | int signdx,
|
---|
1061 | int signdy,
|
---|
1062 | int axis,
|
---|
1063 | int x,
|
---|
1064 | int y,
|
---|
1065 | int e,
|
---|
1066 | int e1,
|
---|
1067 | int e3,
|
---|
1068 | int len);
|
---|
1069 |
|
---|
1070 | void
|
---|
1071 | fbDots32(FbBits *dst,
|
---|
1072 | FbStride dstStride,
|
---|
1073 | int dstBpp,
|
---|
1074 | BoxPtr pBox,
|
---|
1075 | xPoint *pts,
|
---|
1076 | int npt,
|
---|
1077 | int xorg,
|
---|
1078 | int yorg,
|
---|
1079 | int xoff,
|
---|
1080 | int yoff,
|
---|
1081 | FbBits and,
|
---|
1082 | FbBits xor);
|
---|
1083 |
|
---|
1084 | void
|
---|
1085 | fbArc32(FbBits *dst,
|
---|
1086 | FbStride dstStride,
|
---|
1087 | int dstBpp,
|
---|
1088 | xArc *arc,
|
---|
1089 | int dx,
|
---|
1090 | int dy,
|
---|
1091 | FbBits and,
|
---|
1092 | FbBits xor);
|
---|
1093 |
|
---|
1094 | void
|
---|
1095 | fbGlyph32(FbBits *dstLine,
|
---|
1096 | FbStride dstStride,
|
---|
1097 | int dstBpp,
|
---|
1098 | FbStip *stipple,
|
---|
1099 | FbBits fg,
|
---|
1100 | int height,
|
---|
1101 | int shift);
|
---|
1102 | void
|
---|
1103 | fbPolyline32 (DrawablePtr pDrawable,
|
---|
1104 | GCPtr pGC,
|
---|
1105 | int mode,
|
---|
1106 | int npt,
|
---|
1107 | DDXPointPtr ptsOrig);
|
---|
1108 |
|
---|
1109 | void
|
---|
1110 | fbPolySegment32 (DrawablePtr pDrawable,
|
---|
1111 | GCPtr pGC,
|
---|
1112 | int nseg,
|
---|
1113 | xSegment *pseg);
|
---|
1114 |
|
---|
1115 | /*
|
---|
1116 | * fbblt.c
|
---|
1117 | */
|
---|
1118 | void
|
---|
1119 | fbBlt (FbBits *src,
|
---|
1120 | FbStride srcStride,
|
---|
1121 | int srcX,
|
---|
1122 |
|
---|
1123 | FbBits *dst,
|
---|
1124 | FbStride dstStride,
|
---|
1125 | int dstX,
|
---|
1126 |
|
---|
1127 | int width,
|
---|
1128 | int height,
|
---|
1129 |
|
---|
1130 | int alu,
|
---|
1131 | FbBits pm,
|
---|
1132 | int bpp,
|
---|
1133 |
|
---|
1134 | Bool reverse,
|
---|
1135 | Bool upsidedown);
|
---|
1136 |
|
---|
1137 | void
|
---|
1138 | fbBlt24 (FbBits *srcLine,
|
---|
1139 | FbStride srcStride,
|
---|
1140 | int srcX,
|
---|
1141 |
|
---|
1142 | FbBits *dstLine,
|
---|
1143 | FbStride dstStride,
|
---|
1144 | int dstX,
|
---|
1145 |
|
---|
1146 | int width,
|
---|
1147 | int height,
|
---|
1148 |
|
---|
1149 | int alu,
|
---|
1150 | FbBits pm,
|
---|
1151 |
|
---|
1152 | Bool reverse,
|
---|
1153 | Bool upsidedown);
|
---|
1154 |
|
---|
1155 | void
|
---|
1156 | fbBltStip (FbStip *src,
|
---|
1157 | FbStride srcStride, /* in FbStip units, not FbBits units */
|
---|
1158 | int srcX,
|
---|
1159 |
|
---|
1160 | FbStip *dst,
|
---|
1161 | FbStride dstStride, /* in FbStip units, not FbBits units */
|
---|
1162 | int dstX,
|
---|
1163 |
|
---|
1164 | int width,
|
---|
1165 | int height,
|
---|
1166 |
|
---|
1167 | int alu,
|
---|
1168 | FbBits pm,
|
---|
1169 | int bpp);
|
---|
1170 |
|
---|
1171 | /*
|
---|
1172 | * fbbltone.c
|
---|
1173 | */
|
---|
1174 | void
|
---|
1175 | fbBltOne (FbStip *src,
|
---|
1176 | FbStride srcStride,
|
---|
1177 | int srcX,
|
---|
1178 | FbBits *dst,
|
---|
1179 | FbStride dstStride,
|
---|
1180 | int dstX,
|
---|
1181 | int dstBpp,
|
---|
1182 |
|
---|
1183 | int width,
|
---|
1184 | int height,
|
---|
1185 |
|
---|
1186 | FbBits fgand,
|
---|
1187 | FbBits fbxor,
|
---|
1188 | FbBits bgand,
|
---|
1189 | FbBits bgxor);
|
---|
1190 |
|
---|
1191 | #ifdef FB_24BIT
|
---|
1192 | void
|
---|
1193 | fbBltOne24 (FbStip *src,
|
---|
1194 | FbStride srcStride, /* FbStip units per scanline */
|
---|
1195 | int srcX, /* bit position of source */
|
---|
1196 | FbBits *dst,
|
---|
1197 | FbStride dstStride, /* FbBits units per scanline */
|
---|
1198 | int dstX, /* bit position of dest */
|
---|
1199 | int dstBpp, /* bits per destination unit */
|
---|
1200 |
|
---|
1201 | int width, /* width in bits of destination */
|
---|
1202 | int height, /* height in scanlines */
|
---|
1203 |
|
---|
1204 | FbBits fgand, /* rrop values */
|
---|
1205 | FbBits fgxor,
|
---|
1206 | FbBits bgand,
|
---|
1207 | FbBits bgxor);
|
---|
1208 | #endif
|
---|
1209 |
|
---|
1210 | void
|
---|
1211 | fbBltPlane (FbBits *src,
|
---|
1212 | FbStride srcStride,
|
---|
1213 | int srcX,
|
---|
1214 | int srcBpp,
|
---|
1215 |
|
---|
1216 | FbStip *dst,
|
---|
1217 | FbStride dstStride,
|
---|
1218 | int dstX,
|
---|
1219 |
|
---|
1220 | int width,
|
---|
1221 | int height,
|
---|
1222 |
|
---|
1223 | FbStip fgand,
|
---|
1224 | FbStip fgxor,
|
---|
1225 | FbStip bgand,
|
---|
1226 | FbStip bgxor,
|
---|
1227 | Pixel planeMask);
|
---|
1228 |
|
---|
1229 | /*
|
---|
1230 | * fbbstore.c
|
---|
1231 | */
|
---|
1232 | void
|
---|
1233 | fbSaveAreas(PixmapPtr pPixmap,
|
---|
1234 | RegionPtr prgnSave,
|
---|
1235 | int xorg,
|
---|
1236 | int yorg,
|
---|
1237 | WindowPtr pWin);
|
---|
1238 |
|
---|
1239 | void
|
---|
1240 | fbRestoreAreas(PixmapPtr pPixmap,
|
---|
1241 | RegionPtr prgnRestore,
|
---|
1242 | int xorg,
|
---|
1243 | int yorg,
|
---|
1244 | WindowPtr pWin);
|
---|
1245 |
|
---|
1246 | /*
|
---|
1247 | * fbcmap.c
|
---|
1248 | */
|
---|
1249 | int
|
---|
1250 | fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps);
|
---|
1251 |
|
---|
1252 | void
|
---|
1253 | fbInstallColormap(ColormapPtr pmap);
|
---|
1254 |
|
---|
1255 | void
|
---|
1256 | fbUninstallColormap(ColormapPtr pmap);
|
---|
1257 |
|
---|
1258 | void
|
---|
1259 | fbResolveColor(unsigned short *pred,
|
---|
1260 | unsigned short *pgreen,
|
---|
1261 | unsigned short *pblue,
|
---|
1262 | VisualPtr pVisual);
|
---|
1263 |
|
---|
1264 | Bool
|
---|
1265 | fbInitializeColormap(ColormapPtr pmap);
|
---|
1266 |
|
---|
1267 | int
|
---|
1268 | fbExpandDirectColors (ColormapPtr pmap,
|
---|
1269 | int ndef,
|
---|
1270 | xColorItem *indefs,
|
---|
1271 | xColorItem *outdefs);
|
---|
1272 |
|
---|
1273 | Bool
|
---|
1274 | fbCreateDefColormap(ScreenPtr pScreen);
|
---|
1275 |
|
---|
1276 | void
|
---|
1277 | fbClearVisualTypes(void);
|
---|
1278 |
|
---|
1279 | Bool
|
---|
1280 | fbSetVisualTypes (int depth, int visuals, int bitsPerRGB);
|
---|
1281 |
|
---|
1282 | Bool
|
---|
1283 | fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB,
|
---|
1284 | Pixel redMask, Pixel greenMask, Pixel blueMask);
|
---|
1285 |
|
---|
1286 | Bool
|
---|
1287 | fbInitVisuals (VisualPtr *visualp,
|
---|
1288 | DepthPtr *depthp,
|
---|
1289 | int *nvisualp,
|
---|
1290 | int *ndepthp,
|
---|
1291 | int *rootDepthp,
|
---|
1292 | VisualID *defaultVisp,
|
---|
1293 | unsigned long sizes,
|
---|
1294 | int bitsPerRGB);
|
---|
1295 |
|
---|
1296 | /*
|
---|
1297 | * fbcopy.c
|
---|
1298 | */
|
---|
1299 |
|
---|
1300 | typedef void (*fbCopyProc) (DrawablePtr pSrcDrawable,
|
---|
1301 | DrawablePtr pDstDrawable,
|
---|
1302 | GCPtr pGC,
|
---|
1303 | BoxPtr pDstBox,
|
---|
1304 | int nbox,
|
---|
1305 | int dx,
|
---|
1306 | int dy,
|
---|
1307 | Bool reverse,
|
---|
1308 | Bool upsidedown,
|
---|
1309 | Pixel bitplane,
|
---|
1310 | void *closure);
|
---|
1311 |
|
---|
1312 | void
|
---|
1313 | fbCopyNtoN (DrawablePtr pSrcDrawable,
|
---|
1314 | DrawablePtr pDstDrawable,
|
---|
1315 | GCPtr pGC,
|
---|
1316 | BoxPtr pbox,
|
---|
1317 | int nbox,
|
---|
1318 | int dx,
|
---|
1319 | int dy,
|
---|
1320 | Bool reverse,
|
---|
1321 | Bool upsidedown,
|
---|
1322 | Pixel bitplane,
|
---|
1323 | void *closure);
|
---|
1324 |
|
---|
1325 | void
|
---|
1326 | fbCopy1toN (DrawablePtr pSrcDrawable,
|
---|
1327 | DrawablePtr pDstDrawable,
|
---|
1328 | GCPtr pGC,
|
---|
1329 | BoxPtr pbox,
|
---|
1330 | int nbox,
|
---|
1331 | int dx,
|
---|
1332 | int dy,
|
---|
1333 | Bool reverse,
|
---|
1334 | Bool upsidedown,
|
---|
1335 | Pixel bitplane,
|
---|
1336 | void *closure);
|
---|
1337 |
|
---|
1338 | void
|
---|
1339 | fbCopyNto1 (DrawablePtr pSrcDrawable,
|
---|
1340 | DrawablePtr pDstDrawable,
|
---|
1341 | GCPtr pGC,
|
---|
1342 | BoxPtr pbox,
|
---|
1343 | int nbox,
|
---|
1344 | int dx,
|
---|
1345 | int dy,
|
---|
1346 | Bool reverse,
|
---|
1347 | Bool upsidedown,
|
---|
1348 | Pixel bitplane,
|
---|
1349 | void *closure);
|
---|
1350 |
|
---|
1351 | void
|
---|
1352 | fbCopyRegion (DrawablePtr pSrcDrawable,
|
---|
1353 | DrawablePtr pDstDrawable,
|
---|
1354 | GCPtr pGC,
|
---|
1355 | RegionPtr pDstRegion,
|
---|
1356 | int dx,
|
---|
1357 | int dy,
|
---|
1358 | fbCopyProc copyProc,
|
---|
1359 | Pixel bitPlane,
|
---|
1360 | void *closure);
|
---|
1361 |
|
---|
1362 | RegionPtr
|
---|
1363 | fbDoCopy (DrawablePtr pSrcDrawable,
|
---|
1364 | DrawablePtr pDstDrawable,
|
---|
1365 | GCPtr pGC,
|
---|
1366 | int xIn,
|
---|
1367 | int yIn,
|
---|
1368 | int widthSrc,
|
---|
1369 | int heightSrc,
|
---|
1370 | int xOut,
|
---|
1371 | int yOut,
|
---|
1372 | fbCopyProc copyProc,
|
---|
1373 | Pixel bitplane,
|
---|
1374 | void *closure);
|
---|
1375 |
|
---|
1376 | RegionPtr
|
---|
1377 | fbCopyArea (DrawablePtr pSrcDrawable,
|
---|
1378 | DrawablePtr pDstDrawable,
|
---|
1379 | GCPtr pGC,
|
---|
1380 | int xIn,
|
---|
1381 | int yIn,
|
---|
1382 | int widthSrc,
|
---|
1383 | int heightSrc,
|
---|
1384 | int xOut,
|
---|
1385 | int yOut);
|
---|
1386 |
|
---|
1387 | RegionPtr
|
---|
1388 | fbCopyPlane (DrawablePtr pSrcDrawable,
|
---|
1389 | DrawablePtr pDstDrawable,
|
---|
1390 | GCPtr pGC,
|
---|
1391 | int xIn,
|
---|
1392 | int yIn,
|
---|
1393 | int widthSrc,
|
---|
1394 | int heightSrc,
|
---|
1395 | int xOut,
|
---|
1396 | int yOut,
|
---|
1397 | unsigned long bitplane);
|
---|
1398 |
|
---|
1399 | /*
|
---|
1400 | * fbfill.c
|
---|
1401 | */
|
---|
1402 | void
|
---|
1403 | fbFill (DrawablePtr pDrawable,
|
---|
1404 | GCPtr pGC,
|
---|
1405 | int x,
|
---|
1406 | int y,
|
---|
1407 | int width,
|
---|
1408 | int height);
|
---|
1409 |
|
---|
1410 | void
|
---|
1411 | fbSolidBoxClipped (DrawablePtr pDrawable,
|
---|
1412 | RegionPtr pClip,
|
---|
1413 | int xa,
|
---|
1414 | int ya,
|
---|
1415 | int xb,
|
---|
1416 | int yb,
|
---|
1417 | FbBits and,
|
---|
1418 | FbBits xor);
|
---|
1419 |
|
---|
1420 | /*
|
---|
1421 | * fbfillrect.c
|
---|
1422 | */
|
---|
1423 | void
|
---|
1424 | fbPolyFillRect(DrawablePtr pDrawable,
|
---|
1425 | GCPtr pGC,
|
---|
1426 | int nrectInit,
|
---|
1427 | xRectangle *prectInit);
|
---|
1428 |
|
---|
1429 | #define fbPolyFillArc miPolyFillArc
|
---|
1430 |
|
---|
1431 | #define fbFillPolygon miFillPolygon
|
---|
1432 |
|
---|
1433 | /*
|
---|
1434 | * fbfillsp.c
|
---|
1435 | */
|
---|
1436 | void
|
---|
1437 | fbFillSpans (DrawablePtr pDrawable,
|
---|
1438 | GCPtr pGC,
|
---|
1439 | int nInit,
|
---|
1440 | DDXPointPtr pptInit,
|
---|
1441 | int *pwidthInit,
|
---|
1442 | int fSorted);
|
---|
1443 |
|
---|
1444 |
|
---|
1445 | /*
|
---|
1446 | * fbgc.c
|
---|
1447 | */
|
---|
1448 |
|
---|
1449 | Bool
|
---|
1450 | fbCreateGC(GCPtr pGC);
|
---|
1451 |
|
---|
1452 | void
|
---|
1453 | fbPadPixmap (PixmapPtr pPixmap);
|
---|
1454 |
|
---|
1455 | void
|
---|
1456 | fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable);
|
---|
1457 |
|
---|
1458 | /*
|
---|
1459 | * fbgetsp.c
|
---|
1460 | */
|
---|
1461 | void
|
---|
1462 | fbGetSpans(DrawablePtr pDrawable,
|
---|
1463 | int wMax,
|
---|
1464 | DDXPointPtr ppt,
|
---|
1465 | int *pwidth,
|
---|
1466 | int nspans,
|
---|
1467 | char *pchardstStart);
|
---|
1468 |
|
---|
1469 | /*
|
---|
1470 | * fbglyph.c
|
---|
1471 | */
|
---|
1472 |
|
---|
1473 | Bool
|
---|
1474 | fbGlyphIn (RegionPtr pRegion,
|
---|
1475 | int x,
|
---|
1476 | int y,
|
---|
1477 | int width,
|
---|
1478 | int height);
|
---|
1479 |
|
---|
1480 | void
|
---|
1481 | fbPolyGlyphBlt (DrawablePtr pDrawable,
|
---|
1482 | GCPtr pGC,
|
---|
1483 | int x,
|
---|
1484 | int y,
|
---|
1485 | unsigned int nglyph,
|
---|
1486 | CharInfoPtr *ppci,
|
---|
1487 | pointer pglyphBase);
|
---|
1488 |
|
---|
1489 | void
|
---|
1490 | fbImageGlyphBlt (DrawablePtr pDrawable,
|
---|
1491 | GCPtr pGC,
|
---|
1492 | int x,
|
---|
1493 | int y,
|
---|
1494 | unsigned int nglyph,
|
---|
1495 | CharInfoPtr *ppci,
|
---|
1496 | pointer pglyphBase);
|
---|
1497 |
|
---|
1498 | /*
|
---|
1499 | * fbimage.c
|
---|
1500 | */
|
---|
1501 |
|
---|
1502 | void
|
---|
1503 | fbPutImage (DrawablePtr pDrawable,
|
---|
1504 | GCPtr pGC,
|
---|
1505 | int depth,
|
---|
1506 | int x,
|
---|
1507 | int y,
|
---|
1508 | int w,
|
---|
1509 | int h,
|
---|
1510 | int leftPad,
|
---|
1511 | int format,
|
---|
1512 | char *pImage);
|
---|
1513 |
|
---|
1514 | void
|
---|
1515 | fbPutZImage (DrawablePtr pDrawable,
|
---|
1516 | RegionPtr pClip,
|
---|
1517 | int alu,
|
---|
1518 | FbBits pm,
|
---|
1519 | int x,
|
---|
1520 | int y,
|
---|
1521 | int width,
|
---|
1522 | int height,
|
---|
1523 | FbStip *src,
|
---|
1524 | FbStride srcStride);
|
---|
1525 |
|
---|
1526 | void
|
---|
1527 | fbPutXYImage (DrawablePtr pDrawable,
|
---|
1528 | RegionPtr pClip,
|
---|
1529 | FbBits fg,
|
---|
1530 | FbBits bg,
|
---|
1531 | FbBits pm,
|
---|
1532 | int alu,
|
---|
1533 | Bool opaque,
|
---|
1534 |
|
---|
1535 | int x,
|
---|
1536 | int y,
|
---|
1537 | int width,
|
---|
1538 | int height,
|
---|
1539 |
|
---|
1540 | FbStip *src,
|
---|
1541 | FbStride srcStride,
|
---|
1542 | int srcX);
|
---|
1543 |
|
---|
1544 | void
|
---|
1545 | fbGetImage (DrawablePtr pDrawable,
|
---|
1546 | int x,
|
---|
1547 | int y,
|
---|
1548 | int w,
|
---|
1549 | int h,
|
---|
1550 | unsigned int format,
|
---|
1551 | unsigned long planeMask,
|
---|
1552 | char *d);
|
---|
1553 | /*
|
---|
1554 | * fbline.c
|
---|
1555 | */
|
---|
1556 |
|
---|
1557 | void
|
---|
1558 | fbZeroLine (DrawablePtr pDrawable,
|
---|
1559 | GCPtr pGC,
|
---|
1560 | int mode,
|
---|
1561 | int npt,
|
---|
1562 | DDXPointPtr ppt);
|
---|
1563 |
|
---|
1564 | void
|
---|
1565 | fbZeroSegment (DrawablePtr pDrawable,
|
---|
1566 | GCPtr pGC,
|
---|
1567 | int nseg,
|
---|
1568 | xSegment *pSegs);
|
---|
1569 |
|
---|
1570 | void
|
---|
1571 | fbPolyLine (DrawablePtr pDrawable,
|
---|
1572 | GCPtr pGC,
|
---|
1573 | int mode,
|
---|
1574 | int npt,
|
---|
1575 | DDXPointPtr ppt);
|
---|
1576 |
|
---|
1577 | void
|
---|
1578 | fbFixCoordModePrevious (int npt,
|
---|
1579 | DDXPointPtr ppt);
|
---|
1580 |
|
---|
1581 | void
|
---|
1582 | fbPolySegment (DrawablePtr pDrawable,
|
---|
1583 | GCPtr pGC,
|
---|
1584 | int nseg,
|
---|
1585 | xSegment *pseg);
|
---|
1586 |
|
---|
1587 | #define fbPolyRectangle miPolyRectangle
|
---|
1588 |
|
---|
1589 | /*
|
---|
1590 | * fbpict.c
|
---|
1591 | */
|
---|
1592 |
|
---|
1593 | Bool
|
---|
1594 | fbPictureInit (ScreenPtr pScreen,
|
---|
1595 | PictFormatPtr formats,
|
---|
1596 | int nformats);
|
---|
1597 |
|
---|
1598 | /*
|
---|
1599 | * fbpixmap.c
|
---|
1600 | */
|
---|
1601 |
|
---|
1602 | PixmapPtr
|
---|
1603 | fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp);
|
---|
1604 |
|
---|
1605 | PixmapPtr
|
---|
1606 | fbCreatePixmap (ScreenPtr pScreen, int width, int height, int depth);
|
---|
1607 |
|
---|
1608 | Bool
|
---|
1609 | fbDestroyPixmap (PixmapPtr pPixmap);
|
---|
1610 |
|
---|
1611 | RegionPtr
|
---|
1612 | fbPixmapToRegion(PixmapPtr pPix);
|
---|
1613 |
|
---|
1614 | /*
|
---|
1615 | * fbpoint.c
|
---|
1616 | */
|
---|
1617 |
|
---|
1618 | void
|
---|
1619 | fbDots (FbBits *dstOrig,
|
---|
1620 | FbStride dstStride,
|
---|
1621 | int dstBpp,
|
---|
1622 | BoxPtr pBox,
|
---|
1623 | xPoint *pts,
|
---|
1624 | int npt,
|
---|
1625 | int xorg,
|
---|
1626 | int yorg,
|
---|
1627 | int xoff,
|
---|
1628 | int yoff,
|
---|
1629 | FbBits andOrig,
|
---|
1630 | FbBits xorOrig);
|
---|
1631 |
|
---|
1632 | void
|
---|
1633 | fbPolyPoint (DrawablePtr pDrawable,
|
---|
1634 | GCPtr pGC,
|
---|
1635 | int mode,
|
---|
1636 | int npt,
|
---|
1637 | xPoint *pptInit);
|
---|
1638 |
|
---|
1639 | /*
|
---|
1640 | * fbpush.c
|
---|
1641 | */
|
---|
1642 | void
|
---|
1643 | fbPushPattern (DrawablePtr pDrawable,
|
---|
1644 | GCPtr pGC,
|
---|
1645 |
|
---|
1646 | FbStip *src,
|
---|
1647 | FbStride srcStride,
|
---|
1648 | int srcX,
|
---|
1649 |
|
---|
1650 | int x,
|
---|
1651 | int y,
|
---|
1652 |
|
---|
1653 | int width,
|
---|
1654 | int height);
|
---|
1655 |
|
---|
1656 | void
|
---|
1657 | fbPushFill (DrawablePtr pDrawable,
|
---|
1658 | GCPtr pGC,
|
---|
1659 |
|
---|
1660 | FbStip *src,
|
---|
1661 | FbStride srcStride,
|
---|
1662 | int srcX,
|
---|
1663 |
|
---|
1664 | int x,
|
---|
1665 | int y,
|
---|
1666 | int width,
|
---|
1667 | int height);
|
---|
1668 |
|
---|
1669 | void
|
---|
1670 | fbPush1toN (DrawablePtr pSrcDrawable,
|
---|
1671 | DrawablePtr pDstDrawable,
|
---|
1672 | GCPtr pGC,
|
---|
1673 | BoxPtr pbox,
|
---|
1674 | int nbox,
|
---|
1675 | int dx,
|
---|
1676 | int dy,
|
---|
1677 | Bool reverse,
|
---|
1678 | Bool upsidedown,
|
---|
1679 | Pixel bitplane,
|
---|
1680 | void *closure);
|
---|
1681 |
|
---|
1682 | void
|
---|
1683 | fbPushImage (DrawablePtr pDrawable,
|
---|
1684 | GCPtr pGC,
|
---|
1685 |
|
---|
1686 | FbStip *src,
|
---|
1687 | FbStride srcStride,
|
---|
1688 | int srcX,
|
---|
1689 |
|
---|
1690 | int x,
|
---|
1691 | int y,
|
---|
1692 | int width,
|
---|
1693 | int height);
|
---|
1694 |
|
---|
1695 | void
|
---|
1696 | fbPushPixels (GCPtr pGC,
|
---|
1697 | PixmapPtr pBitmap,
|
---|
1698 | DrawablePtr pDrawable,
|
---|
1699 | int dx,
|
---|
1700 | int dy,
|
---|
1701 | int xOrg,
|
---|
1702 | int yOrg);
|
---|
1703 |
|
---|
1704 |
|
---|
1705 | /*
|
---|
1706 | * fbscreen.c
|
---|
1707 | */
|
---|
1708 |
|
---|
1709 | Bool
|
---|
1710 | fbCloseScreen (int indx, ScreenPtr pScreen);
|
---|
1711 |
|
---|
1712 | Bool
|
---|
1713 | fbRealizeFont(ScreenPtr pScreen, FontPtr pFont);
|
---|
1714 |
|
---|
1715 | Bool
|
---|
1716 | fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont);
|
---|
1717 |
|
---|
1718 | void
|
---|
1719 | fbQueryBestSize (int class,
|
---|
1720 | unsigned short *width, unsigned short *height,
|
---|
1721 | ScreenPtr pScreen);
|
---|
1722 |
|
---|
1723 | #ifndef FB_OLD_SCREEN
|
---|
1724 | PixmapPtr
|
---|
1725 | _fbGetWindowPixmap (WindowPtr pWindow);
|
---|
1726 |
|
---|
1727 | void
|
---|
1728 | _fbSetWindowPixmap (WindowPtr pWindow, PixmapPtr pPixmap);
|
---|
1729 | #endif
|
---|
1730 |
|
---|
1731 | Bool
|
---|
1732 | fbSetupScreen(ScreenPtr pScreen,
|
---|
1733 | pointer pbits, /* pointer to screen bitmap */
|
---|
1734 | int xsize, /* in pixels */
|
---|
1735 | int ysize,
|
---|
1736 | int dpix, /* dots per inch */
|
---|
1737 | int dpiy,
|
---|
1738 | int width, /* pixel width of frame buffer */
|
---|
1739 | int bpp); /* bits per pixel of frame buffer */
|
---|
1740 |
|
---|
1741 | Bool
|
---|
1742 | fbFinishScreenInit(ScreenPtr pScreen,
|
---|
1743 | pointer pbits,
|
---|
1744 | int xsize,
|
---|
1745 | int ysize,
|
---|
1746 | int dpix,
|
---|
1747 | int dpiy,
|
---|
1748 | int width,
|
---|
1749 | int bpp);
|
---|
1750 |
|
---|
1751 | Bool
|
---|
1752 | fbScreenInit(ScreenPtr pScreen,
|
---|
1753 | pointer pbits,
|
---|
1754 | int xsize,
|
---|
1755 | int ysize,
|
---|
1756 | int dpix,
|
---|
1757 | int dpiy,
|
---|
1758 | int width,
|
---|
1759 | int bpp);
|
---|
1760 |
|
---|
1761 | void
|
---|
1762 | fbInitializeBackingStore (ScreenPtr pScreen);
|
---|
1763 |
|
---|
1764 | /*
|
---|
1765 | * fbseg.c
|
---|
1766 | */
|
---|
1767 | typedef void FbBres (DrawablePtr pDrawable,
|
---|
1768 | GCPtr pGC,
|
---|
1769 | int dashOffset,
|
---|
1770 | int signdx,
|
---|
1771 | int signdy,
|
---|
1772 | int axis,
|
---|
1773 | int x,
|
---|
1774 | int y,
|
---|
1775 | int e,
|
---|
1776 | int e1,
|
---|
1777 | int e3,
|
---|
1778 | int len);
|
---|
1779 |
|
---|
1780 | FbBres fbBresSolid, fbBresDash, fbBresFill, fbBresFillDash;
|
---|
1781 | /*
|
---|
1782 | * fbsetsp.c
|
---|
1783 | */
|
---|
1784 |
|
---|
1785 | void
|
---|
1786 | fbSetSpans (DrawablePtr pDrawable,
|
---|
1787 | GCPtr pGC,
|
---|
1788 | char *src,
|
---|
1789 | DDXPointPtr ppt,
|
---|
1790 | int *pwidth,
|
---|
1791 | int nspans,
|
---|
1792 | int fSorted);
|
---|
1793 |
|
---|
1794 | FbBres *
|
---|
1795 | fbSelectBres (DrawablePtr pDrawable,
|
---|
1796 | GCPtr pGC);
|
---|
1797 |
|
---|
1798 | void
|
---|
1799 | fbBres (DrawablePtr pDrawable,
|
---|
1800 | GCPtr pGC,
|
---|
1801 | int dashOffset,
|
---|
1802 | int signdx,
|
---|
1803 | int signdy,
|
---|
1804 | int axis,
|
---|
1805 | int x,
|
---|
1806 | int y,
|
---|
1807 | int e,
|
---|
1808 | int e1,
|
---|
1809 | int e3,
|
---|
1810 | int len);
|
---|
1811 |
|
---|
1812 | void
|
---|
1813 | fbSegment (DrawablePtr pDrawable,
|
---|
1814 | GCPtr pGC,
|
---|
1815 | int xa,
|
---|
1816 | int ya,
|
---|
1817 | int xb,
|
---|
1818 | int yb,
|
---|
1819 | Bool drawLast,
|
---|
1820 | int *dashOffset);
|
---|
1821 |
|
---|
1822 |
|
---|
1823 | /*
|
---|
1824 | * fbsolid.c
|
---|
1825 | */
|
---|
1826 |
|
---|
1827 | void
|
---|
1828 | fbSolid (FbBits *dst,
|
---|
1829 | FbStride dstStride,
|
---|
1830 | int dstX,
|
---|
1831 | int bpp,
|
---|
1832 |
|
---|
1833 | int width,
|
---|
1834 | int height,
|
---|
1835 |
|
---|
1836 | FbBits and,
|
---|
1837 | FbBits xor);
|
---|
1838 |
|
---|
1839 | #ifdef FB_24BIT
|
---|
1840 | void
|
---|
1841 | fbSolid24 (FbBits *dst,
|
---|
1842 | FbStride dstStride,
|
---|
1843 | int dstX,
|
---|
1844 |
|
---|
1845 | int width,
|
---|
1846 | int height,
|
---|
1847 |
|
---|
1848 | FbBits and,
|
---|
1849 | FbBits xor);
|
---|
1850 | #endif
|
---|
1851 |
|
---|
1852 | /*
|
---|
1853 | * fbstipple.c
|
---|
1854 | */
|
---|
1855 |
|
---|
1856 | void
|
---|
1857 | fbTransparentSpan (FbBits *dst,
|
---|
1858 | FbBits stip,
|
---|
1859 | FbBits fgxor,
|
---|
1860 | int n);
|
---|
1861 |
|
---|
1862 | void
|
---|
1863 | fbEvenStipple (FbBits *dst,
|
---|
1864 | FbStride dstStride,
|
---|
1865 | int dstX,
|
---|
1866 | int dstBpp,
|
---|
1867 |
|
---|
1868 | int width,
|
---|
1869 | int height,
|
---|
1870 |
|
---|
1871 | FbStip *stip,
|
---|
1872 | FbStride stipStride,
|
---|
1873 | int stipHeight,
|
---|
1874 |
|
---|
1875 | FbBits fgand,
|
---|
1876 | FbBits fgxor,
|
---|
1877 | FbBits bgand,
|
---|
1878 | FbBits bgxor,
|
---|
1879 |
|
---|
1880 | int xRot,
|
---|
1881 | int yRot);
|
---|
1882 |
|
---|
1883 | void
|
---|
1884 | fbOddStipple (FbBits *dst,
|
---|
1885 | FbStride dstStride,
|
---|
1886 | int dstX,
|
---|
1887 | int dstBpp,
|
---|
1888 |
|
---|
1889 | int width,
|
---|
1890 | int height,
|
---|
1891 |
|
---|
1892 | FbStip *stip,
|
---|
1893 | FbStride stipStride,
|
---|
1894 | int stipWidth,
|
---|
1895 | int stipHeight,
|
---|
1896 |
|
---|
1897 | FbBits fgand,
|
---|
1898 | FbBits fgxor,
|
---|
1899 | FbBits bgand,
|
---|
1900 | FbBits bgxor,
|
---|
1901 |
|
---|
1902 | int xRot,
|
---|
1903 | int yRot);
|
---|
1904 |
|
---|
1905 | void
|
---|
1906 | fbStipple (FbBits *dst,
|
---|
1907 | FbStride dstStride,
|
---|
1908 | int dstX,
|
---|
1909 | int dstBpp,
|
---|
1910 |
|
---|
1911 | int width,
|
---|
1912 | int height,
|
---|
1913 |
|
---|
1914 | FbStip *stip,
|
---|
1915 | FbStride stipStride,
|
---|
1916 | int stipWidth,
|
---|
1917 | int stipHeight,
|
---|
1918 | Bool even,
|
---|
1919 |
|
---|
1920 | FbBits fgand,
|
---|
1921 | FbBits fgxor,
|
---|
1922 | FbBits bgand,
|
---|
1923 | FbBits bgxor,
|
---|
1924 |
|
---|
1925 | int xRot,
|
---|
1926 | int yRot);
|
---|
1927 |
|
---|
1928 | /*
|
---|
1929 | * fbtile.c
|
---|
1930 | */
|
---|
1931 |
|
---|
1932 | void
|
---|
1933 | fbEvenTile (FbBits *dst,
|
---|
1934 | FbStride dstStride,
|
---|
1935 | int dstX,
|
---|
1936 |
|
---|
1937 | int width,
|
---|
1938 | int height,
|
---|
1939 |
|
---|
1940 | FbBits *tile,
|
---|
1941 | int tileHeight,
|
---|
1942 |
|
---|
1943 | int alu,
|
---|
1944 | FbBits pm,
|
---|
1945 | int xRot,
|
---|
1946 | int yRot);
|
---|
1947 |
|
---|
1948 | void
|
---|
1949 | fbOddTile (FbBits *dst,
|
---|
1950 | FbStride dstStride,
|
---|
1951 | int dstX,
|
---|
1952 |
|
---|
1953 | int width,
|
---|
1954 | int height,
|
---|
1955 |
|
---|
1956 | FbBits *tile,
|
---|
1957 | FbStride tileStride,
|
---|
1958 | int tileWidth,
|
---|
1959 | int tileHeight,
|
---|
1960 |
|
---|
1961 | int alu,
|
---|
1962 | FbBits pm,
|
---|
1963 | int bpp,
|
---|
1964 |
|
---|
1965 | int xRot,
|
---|
1966 | int yRot);
|
---|
1967 |
|
---|
1968 | void
|
---|
1969 | fbTile (FbBits *dst,
|
---|
1970 | FbStride dstStride,
|
---|
1971 | int dstX,
|
---|
1972 |
|
---|
1973 | int width,
|
---|
1974 | int height,
|
---|
1975 |
|
---|
1976 | FbBits *tile,
|
---|
1977 | FbStride tileStride,
|
---|
1978 | int tileWidth,
|
---|
1979 | int tileHeight,
|
---|
1980 |
|
---|
1981 | int alu,
|
---|
1982 | FbBits pm,
|
---|
1983 | int bpp,
|
---|
1984 |
|
---|
1985 | int xRot,
|
---|
1986 | int yRot);
|
---|
1987 |
|
---|
1988 | /*
|
---|
1989 | * fbutil.c
|
---|
1990 | */
|
---|
1991 | FbBits
|
---|
1992 | fbReplicatePixel (Pixel p, int bpp);
|
---|
1993 |
|
---|
1994 | void
|
---|
1995 | fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp);
|
---|
1996 |
|
---|
1997 | /*
|
---|
1998 | * fbwindow.c
|
---|
1999 | */
|
---|
2000 |
|
---|
2001 | Bool
|
---|
2002 | fbCreateWindow(WindowPtr pWin);
|
---|
2003 |
|
---|
2004 | Bool
|
---|
2005 | fbDestroyWindow(WindowPtr pWin);
|
---|
2006 |
|
---|
2007 | Bool
|
---|
2008 | fbMapWindow(WindowPtr pWindow);
|
---|
2009 |
|
---|
2010 | Bool
|
---|
2011 | fbPositionWindow(WindowPtr pWin, int x, int y);
|
---|
2012 |
|
---|
2013 | Bool
|
---|
2014 | fbUnmapWindow(WindowPtr pWindow);
|
---|
2015 |
|
---|
2016 | void
|
---|
2017 | fbCopyWindowProc (DrawablePtr pSrcDrawable,
|
---|
2018 | DrawablePtr pDstDrawable,
|
---|
2019 | GCPtr pGC,
|
---|
2020 | BoxPtr pbox,
|
---|
2021 | int nbox,
|
---|
2022 | int dx,
|
---|
2023 | int dy,
|
---|
2024 | Bool reverse,
|
---|
2025 | Bool upsidedown,
|
---|
2026 | Pixel bitplane,
|
---|
2027 | void *closure);
|
---|
2028 |
|
---|
2029 | void
|
---|
2030 | fbCopyWindow(WindowPtr pWin,
|
---|
2031 | DDXPointRec ptOldOrg,
|
---|
2032 | RegionPtr prgnSrc);
|
---|
2033 |
|
---|
2034 | Bool
|
---|
2035 | fbChangeWindowAttributes(WindowPtr pWin, unsigned long mask);
|
---|
2036 |
|
---|
2037 | void
|
---|
2038 | fbFillRegionSolid (DrawablePtr pDrawable,
|
---|
2039 | RegionPtr pRegion,
|
---|
2040 | FbBits and,
|
---|
2041 | FbBits xor);
|
---|
2042 |
|
---|
2043 | void
|
---|
2044 | fbFillRegionTiled (DrawablePtr pDrawable,
|
---|
2045 | RegionPtr pRegion,
|
---|
2046 | PixmapPtr pTile);
|
---|
2047 |
|
---|
2048 | void
|
---|
2049 | fbPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what);
|
---|
2050 |
|
---|
2051 |
|
---|
2052 | #endif /* _FB_H_ */
|
---|