VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.3.0.0/cfb.h@ 86603

Last change on this file since 86603 was 25078, checked in by vboxsync, 15 years ago

Additions/x11/x11include: exported and set eol-style on new headers

  • Property svn:eol-style set to native
File size: 26.9 KB
Line 
1/************************************************************
2Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
3
4 All Rights Reserved
5
6Permission to use, copy, modify, and distribute this
7software and its documentation for any purpose and without
8fee is hereby granted, provided that the above copyright no-
9tice appear in all copies and that both that copyright no-
10tice and this permission notice appear in supporting docu-
11mentation, and that the names of Sun or The Open Group
12not be used in advertising or publicity pertaining to
13distribution of the software without specific prior
14written permission. Sun and The Open Group make no
15representations about the suitability of this software for
16any purpose. It is provided "as is" without any express or
17implied warranty.
18
19SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
20INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
21NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI-
22ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
23ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
24PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
25OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
26THE USE OR PERFORMANCE OF THIS SOFTWARE.
27
28********************************************************/
29
30#if !defined(__CFB_H__) || defined(CFB_PROTOTYPES_ONLY)
31
32#include <X11/X.h>
33#include "globals.h"
34#include "pixmap.h"
35#include "region.h"
36#include "gc.h"
37#include "colormap.h"
38#include "miscstruct.h"
39#include "servermd.h"
40#include "windowstr.h"
41#include "mfb.h"
42#undef PixelType
43
44#include "cfbmap.h"
45
46#ifndef CfbBits
47#define CfbBits CARD32
48#endif
49
50#ifndef CFB_PROTOTYPES_ONLY
51#define __CFB_H__
52/*
53 private filed of pixmap
54 pixmap.devPrivate = (unsigned int *)pointer_to_bits
55 pixmap.devKind = width_of_pixmap_in_bytes
56*/
57
58extern int cfbGCPrivateIndex;
59extern int cfbWindowPrivateIndex;
60
61/* private field of GC */
62typedef struct {
63 unsigned char rop; /* special case rop values */
64 /* next two values unused in cfb, included for compatibility with mfb */
65 unsigned char ropOpStip; /* rop for opaque stipple */
66 /* this value is ropFillArea in mfb, usurped for cfb */
67 unsigned char oneRect; /* drawable has one clip rect */
68 CfbBits xor, and; /* reduced rop values */
69 } cfbPrivGC;
70
71typedef cfbPrivGC *cfbPrivGCPtr;
72
73#define cfbGetGCPrivate(pGC) ((cfbPrivGCPtr)\
74 (pGC)->devPrivates[cfbGCPrivateIndex].ptr)
75
76#define cfbGetCompositeClip(pGC) ((pGC)->pCompositeClip)
77
78/* way to carry RROP info around */
79typedef struct {
80 unsigned char rop;
81 CfbBits xor, and;
82} cfbRRopRec, *cfbRRopPtr;
83
84/* private field of window */
85typedef struct {
86 unsigned char fastBorder; /* non-zero if border is 32 bits wide */
87 unsigned char fastBackground;
88 unsigned short unused; /* pad for alignment with Sun compiler */
89 DDXPointRec oldRotate;
90 PixmapPtr pRotatedBackground;
91 PixmapPtr pRotatedBorder;
92 } cfbPrivWin;
93
94#define cfbGetWindowPrivate(_pWin) ((cfbPrivWin *)\
95 (_pWin)->devPrivates[cfbWindowPrivateIndex].ptr)
96
97
98/* cfb8bit.c */
99
100extern int cfbSetStipple(
101 int /*alu*/,
102 CfbBits /*fg*/,
103 CfbBits /*planemask*/
104);
105
106extern int cfbSetOpaqueStipple(
107 int /*alu*/,
108 CfbBits /*fg*/,
109 CfbBits /*bg*/,
110 CfbBits /*planemask*/
111);
112
113extern int cfbComputeClipMasks32(
114 BoxPtr /*pBox*/,
115 int /*numRects*/,
116 int /*x*/,
117 int /*y*/,
118 int /*w*/,
119 int /*h*/,
120 CARD32 * /*clips*/
121);
122#endif /* !CFB_PROTOTYPES_ONLY */
123/* cfb8cppl.c */
124
125extern void cfbCopyImagePlane(
126 DrawablePtr /*pSrcDrawable*/,
127 DrawablePtr /*pDstDrawable*/,
128 int /*rop*/,
129 RegionPtr /*prgnDst*/,
130 DDXPointPtr /*pptSrc*/,
131 unsigned long /*planemask*/
132);
133
134#ifndef CFB_PROTOTYPES_ONLY
135extern void cfbCopyPlane8to1(
136 DrawablePtr /*pSrcDrawable*/,
137 DrawablePtr /*pDstDrawable*/,
138 int /*rop*/,
139 RegionPtr /*prgnDst*/,
140 DDXPointPtr /*pptSrc*/,
141 unsigned long /*planemask*/,
142 unsigned long /*bitPlane*/
143);
144
145extern void cfbCopyPlane16to1(
146 DrawablePtr /*pSrcDrawable*/,
147 DrawablePtr /*pDstDrawable*/,
148 int /*rop*/,
149 RegionPtr /*prgnDst*/,
150 DDXPointPtr /*pptSrc*/,
151 unsigned long /*planemask*/,
152 unsigned long /*bitPlane*/
153);
154
155extern void cfbCopyPlane24to1(
156 DrawablePtr /*pSrcDrawable*/,
157 DrawablePtr /*pDstDrawable*/,
158 int /*rop*/,
159 RegionPtr /*prgnDst*/,
160 DDXPointPtr /*pptSrc*/,
161 unsigned long /*planemask*/,
162 unsigned long /*bitPlane*/
163);
164
165extern void cfbCopyPlane32to1(
166 DrawablePtr /*pSrcDrawable*/,
167 DrawablePtr /*pDstDrawable*/,
168 int /*rop*/,
169 RegionPtr /*prgnDst*/,
170 DDXPointPtr /*pptSrc*/,
171 unsigned long /*planemask*/,
172 unsigned long /*bitPlane*/
173);
174#endif
175
176/* cfb8lineCO.c */
177
178extern int cfb8LineSS1RectCopy(
179 DrawablePtr /*pDrawable*/,
180 GCPtr /*pGC*/,
181 int /*mode*/,
182 int /*npt*/,
183 DDXPointPtr /*pptInit*/,
184 DDXPointPtr /*pptInitOrig*/,
185 int * /*x1p*/,
186 int * /*y1p*/,
187 int * /*x2p*/,
188 int * /*y2p*/
189);
190
191extern void cfb8LineSS1Rect(
192 DrawablePtr /*pDrawable*/,
193 GCPtr /*pGC*/,
194 int /*mode*/,
195 int /*npt*/,
196 DDXPointPtr /*pptInit*/
197);
198
199extern void cfb8ClippedLineCopy(
200 DrawablePtr /*pDrawable*/,
201 GCPtr /*pGC*/,
202 int /*x1*/,
203 int /*y1*/,
204 int /*x2*/,
205 int /*y2*/,
206 BoxPtr /*boxp*/,
207 Bool /*shorten*/
208);
209/* cfb8lineCP.c */
210
211extern int cfb8LineSS1RectPreviousCopy(
212 DrawablePtr /*pDrawable*/,
213 GCPtr /*pGC*/,
214 int /*mode*/,
215 int /*npt*/,
216 DDXPointPtr /*pptInit*/,
217 DDXPointPtr /*pptInitOrig*/,
218 int * /*x1p*/,
219 int * /*y1p*/,
220 int * /*x2p*/,
221 int * /*y2p*/
222);
223/* cfb8lineG.c */
224
225extern int cfb8LineSS1RectGeneral(
226 DrawablePtr /*pDrawable*/,
227 GCPtr /*pGC*/,
228 int /*mode*/,
229 int /*npt*/,
230 DDXPointPtr /*pptInit*/,
231 DDXPointPtr /*pptInitOrig*/,
232 int * /*x1p*/,
233 int * /*y1p*/,
234 int * /*x2p*/,
235 int * /*y2p*/
236);
237
238extern void cfb8ClippedLineGeneral(
239 DrawablePtr /*pDrawable*/,
240 GCPtr /*pGC*/,
241 int /*x1*/,
242 int /*y1*/,
243 int /*x2*/,
244 int /*y2*/,
245 BoxPtr /*boxp*/,
246 Bool /*shorten*/
247);
248/* cfb8lineX.c */
249
250extern int cfb8LineSS1RectXor(
251 DrawablePtr /*pDrawable*/,
252 GCPtr /*pGC*/,
253 int /*mode*/,
254 int /*npt*/,
255 DDXPointPtr /*pptInit*/,
256 DDXPointPtr /*pptInitOrig*/,
257 int * /*x1p*/,
258 int * /*y1p*/,
259 int * /*x2p*/,
260 int * /*y2p*/
261);
262
263extern void cfb8ClippedLineXor(
264 DrawablePtr /*pDrawable*/,
265 GCPtr /*pGC*/,
266 int /*x1*/,
267 int /*y1*/,
268 int /*x2*/,
269 int /*y2*/,
270 BoxPtr /*boxp*/,
271 Bool /*shorten*/
272);
273/* cfb8segC.c */
274
275extern int cfb8SegmentSS1RectCopy(
276 DrawablePtr /*pDrawable*/,
277 GCPtr /*pGC*/,
278 int /*nseg*/,
279 xSegment * /*pSegInit*/
280);
281/* cfb8segCS.c */
282
283extern int cfb8SegmentSS1RectShiftCopy(
284 DrawablePtr /*pDrawable*/,
285 GCPtr /*pGC*/,
286 int /*nseg*/,
287 xSegment * /*pSegInit*/
288);
289
290extern void cfb8SegmentSS1Rect(
291 DrawablePtr /*pDrawable*/,
292 GCPtr /*pGC*/,
293 int /*nseg*/,
294 xSegment * /*pSegInit*/
295);
296/* cfb8segG.c */
297
298extern int cfb8SegmentSS1RectGeneral(
299 DrawablePtr /*pDrawable*/,
300 GCPtr /*pGC*/,
301 int /*nseg*/,
302 xSegment * /*pSegInit*/
303);
304/* cfbsegX.c */
305
306extern int cfb8SegmentSS1RectXor(
307 DrawablePtr /*pDrawable*/,
308 GCPtr /*pGC*/,
309 int /*nseg*/,
310 xSegment * /*pSegInit*/
311);
312/* cfballpriv.c */
313
314extern Bool cfbAllocatePrivates(
315 ScreenPtr /*pScreen*/,
316 int * /*window_index*/,
317 int * /*gc_index*/
318);
319/* cfbbitblt.c */
320
321extern RegionPtr cfbBitBlt(
322 DrawablePtr /*pSrcDrawable*/,
323 DrawablePtr /*pDstDrawable*/,
324 GCPtr/*pGC*/,
325 int /*srcx*/,
326 int /*srcy*/,
327 int /*width*/,
328 int /*height*/,
329 int /*dstx*/,
330 int /*dsty*/,
331 void (* /*doBitBlt*/)(
332 DrawablePtr /*pSrc*/,
333 DrawablePtr /*pDst*/,
334 int /*alu*/,
335 RegionPtr /*prgnDst*/,
336 DDXPointPtr /*pptSrc*/,
337 unsigned long /*planemask*/
338 ),
339 unsigned long /*bitPlane*/
340);
341
342#define cfbCopyPlaneExpand cfbBitBlt
343
344extern RegionPtr cfbCopyPlaneReduce(
345 DrawablePtr /*pSrcDrawable*/,
346 DrawablePtr /*pDstDrawable*/,
347 GCPtr /*pGC*/,
348 int /*srcx*/,
349 int /*srcy*/,
350 int /*width*/,
351 int /*height*/,
352 int /*dstx*/,
353 int /*dsty*/,
354 void (* /*doCopyPlane*/)(
355 DrawablePtr /*pSrc*/,
356 DrawablePtr /*pDst*/,
357 int /*alu*/,
358 RegionPtr /*prgnDst*/,
359 DDXPointPtr /*pptSrc*/,
360 unsigned long /*planemask*/,
361 unsigned long /*bitPlane*/ /* We must know which plane to reduce! */
362 ),
363 unsigned long /*bitPlane*/
364);
365
366extern void cfbDoBitblt(
367 DrawablePtr /*pSrc*/,
368 DrawablePtr /*pDst*/,
369 int /*alu*/,
370 RegionPtr /*prgnDst*/,
371 DDXPointPtr /*pptSrc*/,
372 unsigned long /*planemask*/
373);
374
375extern RegionPtr cfbCopyArea(
376 DrawablePtr /*pSrcDrawable*/,
377 DrawablePtr /*pDstDrawable*/,
378 GCPtr/*pGC*/,
379 int /*srcx*/,
380 int /*srcy*/,
381 int /*width*/,
382 int /*height*/,
383 int /*dstx*/,
384 int /*dsty*/
385);
386
387#ifndef CFB_PROTOTYPES_ONLY
388extern void cfbCopyPlane1to8(
389 DrawablePtr /*pSrcDrawable*/,
390 DrawablePtr /*pDstDrawable*/,
391 int /*rop*/,
392 RegionPtr /*prgnDst*/,
393 DDXPointPtr /*pptSrc*/,
394 unsigned long /*planemask*/
395);
396#endif
397
398extern RegionPtr cfbCopyPlane(
399 DrawablePtr /*pSrcDrawable*/,
400 DrawablePtr /*pDstDrawable*/,
401 GCPtr /*pGC*/,
402 int /*srcx*/,
403 int /*srcy*/,
404 int /*width*/,
405 int /*height*/,
406 int /*dstx*/,
407 int /*dsty*/,
408 unsigned long /*bitPlane*/
409);
410/* cfbbltC.c */
411
412extern void cfbDoBitbltCopy(
413 DrawablePtr /*pSrc*/,
414 DrawablePtr /*pDst*/,
415 int /*alu*/,
416 RegionPtr /*prgnDst*/,
417 DDXPointPtr /*pptSrc*/,
418 unsigned long /*planemask*/
419);
420/* cfbbltG.c */
421
422extern void cfbDoBitbltGeneral(
423 DrawablePtr /*pSrc*/,
424 DrawablePtr /*pDst*/,
425 int /*alu*/,
426 RegionPtr /*prgnDst*/,
427 DDXPointPtr /*pptSrc*/,
428 unsigned long /*planemask*/
429);
430/* cfbbltO.c */
431
432extern void cfbDoBitbltOr(
433 DrawablePtr /*pSrc*/,
434 DrawablePtr /*pDst*/,
435 int /*alu*/,
436 RegionPtr /*prgnDst*/,
437 DDXPointPtr /*pptSrc*/,
438 unsigned long /*planemask*/
439);
440/* cfbbltX.c */
441
442extern void cfbDoBitbltXor(
443 DrawablePtr /*pSrc*/,
444 DrawablePtr /*pDst*/,
445 int /*alu*/,
446 RegionPtr /*prgnDst*/,
447 DDXPointPtr /*pptSrc*/,
448 unsigned long /*planemask*/
449);
450/* cfbbres.c */
451
452extern void cfbBresS(
453 int /*rop*/,
454 CfbBits /*and*/,
455 CfbBits /*xor*/,
456 CfbBits * /*addrl*/,
457 int /*nlwidth*/,
458 int /*signdx*/,
459 int /*signdy*/,
460 int /*axis*/,
461 int /*x1*/,
462 int /*y1*/,
463 int /*e*/,
464 int /*e1*/,
465 int /*e2*/,
466 int /*len*/
467);
468/* cfbbresd.c */
469
470extern void cfbBresD(
471 cfbRRopPtr /*rrops*/,
472 int * /*pdashIndex*/,
473 unsigned char * /*pDash*/,
474 int /*numInDashList*/,
475 int * /*pdashOffset*/,
476 int /*isDoubleDash*/,
477 CfbBits * /*addrl*/,
478 int /*nlwidth*/,
479 int /*signdx*/,
480 int /*signdy*/,
481 int /*axis*/,
482 int /*x1*/,
483 int /*y1*/,
484 int /*e*/,
485 int /*e1*/,
486 int /*e2*/,
487 int /*len*/
488);
489/* cfbbstore.c */
490
491extern void cfbSaveAreas(
492 PixmapPtr /*pPixmap*/,
493 RegionPtr /*prgnSave*/,
494 int /*xorg*/,
495 int /*yorg*/,
496 WindowPtr /*pWin*/
497);
498
499extern void cfbRestoreAreas(
500 PixmapPtr /*pPixmap*/,
501 RegionPtr /*prgnRestore*/,
502 int /*xorg*/,
503 int /*yorg*/,
504 WindowPtr /*pWin*/
505);
506/* cfbcmap.c */
507
508#ifndef CFB_PROTOTYPES_ONLY
509extern int cfbListInstalledColormaps(
510 ScreenPtr /*pScreen*/,
511 Colormap * /*pmaps*/
512);
513
514extern void cfbInstallColormap(
515 ColormapPtr /*pmap*/
516);
517
518extern void cfbUninstallColormap(
519 ColormapPtr /*pmap*/
520);
521
522extern void cfbResolveColor(
523 unsigned short * /*pred*/,
524 unsigned short * /*pgreen*/,
525 unsigned short * /*pblue*/,
526 VisualPtr /*pVisual*/
527);
528
529extern Bool cfbInitializeColormap(
530 ColormapPtr /*pmap*/
531);
532
533extern int cfbExpandDirectColors(
534 ColormapPtr /*pmap*/,
535 int /*ndef*/,
536 xColorItem * /*indefs*/,
537 xColorItem * /*outdefs*/
538);
539
540extern Bool cfbCreateDefColormap(
541 ScreenPtr /*pScreen*/
542);
543
544extern Bool cfbSetVisualTypes(
545 int /*depth*/,
546 int /*visuals*/,
547 int /*bitsPerRGB*/
548);
549
550extern void cfbClearVisualTypes(void);
551
552extern Bool cfbInitVisuals(
553 VisualPtr * /*visualp*/,
554 DepthPtr * /*depthp*/,
555 int * /*nvisualp*/,
556 int * /*ndepthp*/,
557 int * /*rootDepthp*/,
558 VisualID * /*defaultVisp*/,
559 unsigned long /*sizes*/,
560 int /*bitsPerRGB*/
561);
562#endif
563/* cfbfillarcC.c */
564
565extern void cfbPolyFillArcSolidCopy(
566 DrawablePtr /*pDraw*/,
567 GCPtr /*pGC*/,
568 int /*narcs*/,
569 xArc * /*parcs*/
570);
571/* cfbfillarcG.c */
572
573extern void cfbPolyFillArcSolidGeneral(
574 DrawablePtr /*pDraw*/,
575 GCPtr /*pGC*/,
576 int /*narcs*/,
577 xArc * /*parcs*/
578);
579/* cfbfillrct.c */
580
581extern void cfbFillBoxTileOdd(
582 DrawablePtr /*pDrawable*/,
583 int /*n*/,
584 BoxPtr /*rects*/,
585 PixmapPtr /*tile*/,
586 int /*xrot*/,
587 int /*yrot*/
588);
589
590extern void cfbFillRectTileOdd(
591 DrawablePtr /*pDrawable*/,
592 GCPtr /*pGC*/,
593 int /*nBox*/,
594 BoxPtr /*pBox*/
595);
596
597extern void cfbPolyFillRect(
598 DrawablePtr /*pDrawable*/,
599 GCPtr /*pGC*/,
600 int /*nrectFill*/,
601 xRectangle * /*prectInit*/
602);
603/* cfbfillsp.c */
604
605extern void cfbUnnaturalTileFS(
606 DrawablePtr /*pDrawable*/,
607 GCPtr/*pGC*/,
608 int /*nInit*/,
609 DDXPointPtr /*pptInit*/,
610 int * /*pwidthInit*/,
611 int /*fSorted*/
612);
613
614extern void cfbUnnaturalStippleFS(
615 DrawablePtr /*pDrawable*/,
616 GCPtr/*pGC*/,
617 int /*nInit*/,
618 DDXPointPtr /*pptInit*/,
619 int * /*pwidthInit*/,
620 int /*fSorted*/
621);
622
623#ifndef CFB_PROTOTYPES_ONLY
624extern void cfb8Stipple32FS(
625 DrawablePtr /*pDrawable*/,
626 GCPtr /*pGC*/,
627 int /*nInit*/,
628 DDXPointPtr /*pptInit*/,
629 int * /*pwidthInit*/,
630 int /*fSorted*/
631);
632
633extern void cfb8OpaqueStipple32FS(
634 DrawablePtr /*pDrawable*/,
635 GCPtr /*pGC*/,
636 int /*nInit*/,
637 DDXPointPtr /*pptInit*/,
638 int * /*pwidthInit*/,
639 int /*fSorted*/
640);
641#endif
642/* cfbgc.c */
643
644extern GCOpsPtr cfbMatchCommon(
645 GCPtr /*pGC*/,
646 cfbPrivGCPtr /*devPriv*/
647);
648
649extern Bool cfbCreateGC(
650 GCPtr /*pGC*/
651);
652
653extern void cfbValidateGC(
654 GCPtr /*pGC*/,
655 unsigned long /*changes*/,
656 DrawablePtr /*pDrawable*/
657);
658
659/* cfbgetsp.c */
660
661extern void cfbGetSpans(
662 DrawablePtr /*pDrawable*/,
663 int /*wMax*/,
664 DDXPointPtr /*ppt*/,
665 int * /*pwidth*/,
666 int /*nspans*/,
667 char * /*pdstStart*/
668);
669/* cfbglblt8.c */
670
671extern void cfbPolyGlyphBlt8(
672 DrawablePtr /*pDrawable*/,
673 GCPtr /*pGC*/,
674 int /*x*/,
675 int /*y*/,
676 unsigned int /*nglyph*/,
677 CharInfoPtr * /*ppci*/,
678 pointer /*pglyphBase*/
679);
680/* cfbglrop8.c */
681
682extern void cfbPolyGlyphRop8(
683 DrawablePtr /*pDrawable*/,
684 GCPtr /*pGC*/,
685 int /*x*/,
686 int /*y*/,
687 unsigned int /*nglyph*/,
688 CharInfoPtr * /*ppci*/,
689 pointer /*pglyphBase*/
690);
691/* cfbhrzvert.c */
692
693extern void cfbHorzS(
694 int /*rop*/,
695 CfbBits /*and*/,
696 CfbBits /*xor*/,
697 CfbBits * /*addrl*/,
698 int /*nlwidth*/,
699 int /*x1*/,
700 int /*y1*/,
701 int /*len*/
702);
703
704extern void cfbVertS(
705 int /*rop*/,
706 CfbBits /*and*/,
707 CfbBits /*xor*/,
708 CfbBits * /*addrl*/,
709 int /*nlwidth*/,
710 int /*x1*/,
711 int /*y1*/,
712 int /*len*/
713);
714/* cfbigblt8.c */
715
716extern void cfbImageGlyphBlt8(
717 DrawablePtr /*pDrawable*/,
718 GCPtr /*pGC*/,
719 int /*x*/,
720 int /*y*/,
721 unsigned int /*nglyph*/,
722 CharInfoPtr * /*ppci*/,
723 pointer /*pglyphBase*/
724);
725/* cfbimage.c */
726
727extern void cfbPutImage(
728 DrawablePtr /*pDraw*/,
729 GCPtr /*pGC*/,
730 int /*depth*/,
731 int /*x*/,
732 int /*y*/,
733 int /*w*/,
734 int /*h*/,
735 int /*leftPad*/,
736 int /*format*/,
737 char * /*pImage*/
738);
739
740extern void cfbGetImage(
741 DrawablePtr /*pDrawable*/,
742 int /*sx*/,
743 int /*sy*/,
744 int /*w*/,
745 int /*h*/,
746 unsigned int /*format*/,
747 unsigned long /*planeMask*/,
748 char * /*pdstLine*/
749);
750/* cfbline.c */
751
752extern void cfbLineSS(
753 DrawablePtr /*pDrawable*/,
754 GCPtr /*pGC*/,
755 int /*mode*/,
756 int /*npt*/,
757 DDXPointPtr /*pptInit*/
758);
759
760extern void cfbLineSD(
761 DrawablePtr /*pDrawable*/,
762 GCPtr /*pGC*/,
763 int /*mode*/,
764 int /*npt*/,
765 DDXPointPtr /*pptInit*/
766);
767/* cfbmskbits.c */
768/* cfbpixmap.c */
769
770extern PixmapPtr cfbCreatePixmap(
771 ScreenPtr /*pScreen*/,
772 int /*width*/,
773 int /*height*/,
774 int /*depth*/
775);
776
777extern Bool cfbDestroyPixmap(
778 PixmapPtr /*pPixmap*/
779);
780
781extern PixmapPtr cfbCopyPixmap(
782 PixmapPtr /*pSrc*/
783);
784
785extern void cfbPadPixmap(
786 PixmapPtr /*pPixmap*/
787);
788
789extern void cfbXRotatePixmap(
790 PixmapPtr /*pPix*/,
791 int /*rw*/
792);
793
794extern void cfbYRotatePixmap(
795 PixmapPtr /*pPix*/,
796 int /*rh*/
797);
798
799extern void cfbCopyRotatePixmap(
800 PixmapPtr /*psrcPix*/,
801 PixmapPtr * /*ppdstPix*/,
802 int /*xrot*/,
803 int /*yrot*/
804);
805/* cfbply1rctC.c */
806
807extern void cfbFillPoly1RectCopy(
808 DrawablePtr /*pDrawable*/,
809 GCPtr /*pGC*/,
810 int /*shape*/,
811 int /*mode*/,
812 int /*count*/,
813 DDXPointPtr /*ptsIn*/
814);
815/* cfbply1rctG.c */
816
817extern void cfbFillPoly1RectGeneral(
818 DrawablePtr /*pDrawable*/,
819 GCPtr /*pGC*/,
820 int /*shape*/,
821 int /*mode*/,
822 int /*count*/,
823 DDXPointPtr /*ptsIn*/
824);
825/* cfbpntwin.c */
826
827extern void cfbPaintWindow(
828 WindowPtr /*pWin*/,
829 RegionPtr /*pRegion*/,
830 int /*what*/
831);
832
833extern void cfbFillBoxSolid(
834 DrawablePtr /*pDrawable*/,
835 int /*nBox*/,
836 BoxPtr /*pBox*/,
837 unsigned long /*pixel*/
838);
839
840extern void cfbFillBoxTile32(
841 DrawablePtr /*pDrawable*/,
842 int /*nBox*/,
843 BoxPtr /*pBox*/,
844 PixmapPtr /*tile*/
845);
846/* cfbpolypnt.c */
847
848extern void cfbPolyPoint(
849 DrawablePtr /*pDrawable*/,
850 GCPtr /*pGC*/,
851 int /*mode*/,
852 int /*npt*/,
853 xPoint * /*pptInit*/
854);
855/* cfbpush8.c */
856
857#ifndef CFB_PROTOTYPES_ONLY
858extern void cfbPushPixels8(
859 GCPtr /*pGC*/,
860 PixmapPtr /*pBitmap*/,
861 DrawablePtr /*pDrawable*/,
862 int /*dx*/,
863 int /*dy*/,
864 int /*xOrg*/,
865 int /*yOrg*/
866);
867/* cfbrctstp8.c */
868
869extern void cfb8FillRectOpaqueStippled32(
870 DrawablePtr /*pDrawable*/,
871 GCPtr /*pGC*/,
872 int /*nBox*/,
873 BoxPtr /*pBox*/
874);
875
876extern void cfb8FillRectTransparentStippled32(
877 DrawablePtr /*pDrawable*/,
878 GCPtr /*pGC*/,
879 int /*nBox*/,
880 BoxPtr /*pBox*/
881);
882
883extern void cfb8FillRectStippledUnnatural(
884 DrawablePtr /*pDrawable*/,
885 GCPtr /*pGC*/,
886 int /*nBox*/,
887 BoxPtr /*pBox*/
888);
889#endif
890/* cfbrrop.c */
891
892extern int cfbReduceRasterOp(
893 int /*rop*/,
894 CfbBits /*fg*/,
895 CfbBits /*pm*/,
896 CfbBits * /*andp*/,
897 CfbBits * /*xorp*/
898);
899/* cfbscrinit.c */
900
901extern Bool cfbCloseScreen(
902 int /*index*/,
903 ScreenPtr /*pScreen*/
904);
905
906extern Bool cfbSetupScreen(
907 ScreenPtr /*pScreen*/,
908 pointer /*pbits*/,
909 int /*xsize*/,
910 int /*ysize*/,
911 int /*dpix*/,
912 int /*dpiy*/,
913 int /*width*/
914);
915
916extern Bool cfbFinishScreenInit(
917 ScreenPtr /*pScreen*/,
918 pointer /*pbits*/,
919 int /*xsize*/,
920 int /*ysize*/,
921 int /*dpix*/,
922 int /*dpiy*/,
923 int /*width*/
924);
925
926extern Bool cfbScreenInit(
927 ScreenPtr /*pScreen*/,
928 pointer /*pbits*/,
929 int /*xsize*/,
930 int /*ysize*/,
931 int /*dpix*/,
932 int /*dpiy*/,
933 int /*width*/
934);
935
936extern PixmapPtr cfbGetScreenPixmap(
937 ScreenPtr /*pScreen*/
938);
939
940extern void cfbSetScreenPixmap(
941 PixmapPtr /*pPix*/
942);
943
944/* cfbseg.c */
945
946extern void cfbSegmentSS(
947 DrawablePtr /*pDrawable*/,
948 GCPtr /*pGC*/,
949 int /*nseg*/,
950 xSegment * /*pSeg*/
951);
952
953extern void cfbSegmentSD(
954 DrawablePtr /*pDrawable*/,
955 GCPtr /*pGC*/,
956 int /*nseg*/,
957 xSegment * /*pSeg*/
958);
959/* cfbsetsp.c */
960
961extern void cfbSetScanline(
962 int /*y*/,
963 int /*xOrigin*/,
964 int /*xStart*/,
965 int /*xEnd*/,
966 unsigned int * /*psrc*/,
967 int /*alu*/,
968 int * /*pdstBase*/,
969 int /*widthDst*/,
970 unsigned long /*planemask*/
971);
972
973extern void cfbSetSpans(
974 DrawablePtr /*pDrawable*/,
975 GCPtr /*pGC*/,
976 char * /*psrc*/,
977 DDXPointPtr /*ppt*/,
978 int * /*pwidth*/,
979 int /*nspans*/,
980 int /*fSorted*/
981);
982/* cfbsolidC.c */
983
984extern void cfbFillRectSolidCopy(
985 DrawablePtr /*pDrawable*/,
986 GCPtr /*pGC*/,
987 int /*nBox*/,
988 BoxPtr /*pBox*/
989);
990
991extern void cfbSolidSpansCopy(
992 DrawablePtr /*pDrawable*/,
993 GCPtr /*pGC*/,
994 int /*nInit*/,
995 DDXPointPtr /*pptInit*/,
996 int * /*pwidthInit*/,
997 int /*fSorted*/
998);
999/* cfbsolidG.c */
1000
1001extern void cfbFillRectSolidGeneral(
1002 DrawablePtr /*pDrawable*/,
1003 GCPtr /*pGC*/,
1004 int /*nBox*/,
1005 BoxPtr /*pBox*/
1006);
1007
1008extern void cfbSolidSpansGeneral(
1009 DrawablePtr /*pDrawable*/,
1010 GCPtr /*pGC*/,
1011 int /*nInit*/,
1012 DDXPointPtr /*pptInit*/,
1013 int * /*pwidthInit*/,
1014 int /*fSorted*/
1015);
1016/* cfbsolidX.c */
1017
1018extern void cfbFillRectSolidXor(
1019 DrawablePtr /*pDrawable*/,
1020 GCPtr /*pGC*/,
1021 int /*nBox*/,
1022 BoxPtr /*pBox*/
1023);
1024
1025extern void cfbSolidSpansXor(
1026 DrawablePtr /*pDrawable*/,
1027 GCPtr /*pGC*/,
1028 int /*nInit*/,
1029 DDXPointPtr /*pptInit*/,
1030 int * /*pwidthInit*/,
1031 int /*fSorted*/
1032);
1033/* cfbteblt8.c */
1034
1035#ifndef CFB_PROTOTYPES_ONLY
1036extern void cfbTEGlyphBlt8(
1037 DrawablePtr /*pDrawable*/,
1038 GCPtr/*pGC*/,
1039 int /*xInit*/,
1040 int /*yInit*/,
1041 unsigned int /*nglyph*/,
1042 CharInfoPtr * /*ppci*/,
1043 pointer /*pglyphBase*/
1044);
1045#endif
1046/* cfbtegblt.c */
1047
1048extern void cfbTEGlyphBlt(
1049 DrawablePtr /*pDrawable*/,
1050 GCPtr/*pGC*/,
1051 int /*x*/,
1052 int /*y*/,
1053 unsigned int /*nglyph*/,
1054 CharInfoPtr * /*ppci*/,
1055 pointer /*pglyphBase*/
1056);
1057/* cfbtile32C.c */
1058
1059extern void cfbFillRectTile32Copy(
1060 DrawablePtr /*pDrawable*/,
1061 GCPtr /*pGC*/,
1062 int /*nBox*/,
1063 BoxPtr /*pBox*/
1064);
1065
1066extern void cfbTile32FSCopy(
1067 DrawablePtr /*pDrawable*/,
1068 GCPtr /*pGC*/,
1069 int /*nInit*/,
1070 DDXPointPtr /*pptInit*/,
1071 int * /*pwidthInit*/,
1072 int /*fSorted*/
1073);
1074/* cfbtile32G.c */
1075
1076extern void cfbFillRectTile32General(
1077 DrawablePtr /*pDrawable*/,
1078 GCPtr /*pGC*/,
1079 int /*nBox*/,
1080 BoxPtr /*pBox*/
1081);
1082
1083extern void cfbTile32FSGeneral(
1084 DrawablePtr /*pDrawable*/,
1085 GCPtr /*pGC*/,
1086 int /*nInit*/,
1087 DDXPointPtr /*pptInit*/,
1088 int * /*pwidthInit*/,
1089 int /*fSorted*/
1090);
1091/* cfbtileoddC.c */
1092
1093extern void cfbFillBoxTileOddCopy(
1094 DrawablePtr /*pDrawable*/,
1095 int /*nBox*/,
1096 BoxPtr /*pBox*/,
1097 PixmapPtr /*tile*/,
1098 int /*xrot*/,
1099 int /*yrot*/,
1100 int /*alu*/,
1101 unsigned long /*planemask*/
1102);
1103
1104extern void cfbFillSpanTileOddCopy(
1105 DrawablePtr /*pDrawable*/,
1106 int /*n*/,
1107 DDXPointPtr /*ppt*/,
1108 int * /*pwidth*/,
1109 PixmapPtr /*tile*/,
1110 int /*xrot*/,
1111 int /*yrot*/,
1112 int /*alu*/,
1113 unsigned long /*planemask*/
1114);
1115
1116extern void cfbFillBoxTile32sCopy(
1117 DrawablePtr /*pDrawable*/,
1118 int /*nBox*/,
1119 BoxPtr /*pBox*/,
1120 PixmapPtr /*tile*/,
1121 int /*xrot*/,
1122 int /*yrot*/,
1123 int /*alu*/,
1124 unsigned long /*planemask*/
1125);
1126
1127extern void cfbFillSpanTile32sCopy(
1128 DrawablePtr /*pDrawable*/,
1129 int /*n*/,
1130 DDXPointPtr /*ppt*/,
1131 int * /*pwidth*/,
1132 PixmapPtr /*tile*/,
1133 int /*xrot*/,
1134 int /*yrot*/,
1135 int /*alu*/,
1136 unsigned long /*planemask*/
1137);
1138/* cfbtileoddG.c */
1139
1140extern void cfbFillBoxTileOddGeneral(
1141 DrawablePtr /*pDrawable*/,
1142 int /*nBox*/,
1143 BoxPtr /*pBox*/,
1144 PixmapPtr /*tile*/,
1145 int /*xrot*/,
1146 int /*yrot*/,
1147 int /*alu*/,
1148 unsigned long /*planemask*/
1149);
1150
1151extern void cfbFillSpanTileOddGeneral(
1152 DrawablePtr /*pDrawable*/,
1153 int /*n*/,
1154 DDXPointPtr /*ppt*/,
1155 int * /*pwidth*/,
1156 PixmapPtr /*tile*/,
1157 int /*xrot*/,
1158 int /*yrot*/,
1159 int /*alu*/,
1160 unsigned long /*planemask*/
1161);
1162
1163extern void cfbFillBoxTile32sGeneral(
1164 DrawablePtr /*pDrawable*/,
1165 int /*nBox*/,
1166 BoxPtr /*pBox*/,
1167 PixmapPtr /*tile*/,
1168 int /*xrot*/,
1169 int /*yrot*/,
1170 int /*alu*/,
1171 unsigned long /*planemask*/
1172);
1173
1174extern void cfbFillSpanTile32sGeneral(
1175 DrawablePtr /*pDrawable*/,
1176 int /*n*/,
1177 DDXPointPtr /*ppt*/,
1178 int * /*pwidth*/,
1179 PixmapPtr /*tile*/,
1180 int /*xrot*/,
1181 int /*yrot*/,
1182 int /*alu*/,
1183 unsigned long /*planemask*/
1184);
1185/* cfbwindow.c */
1186
1187extern Bool cfbCreateWindow(
1188 WindowPtr /*pWin*/
1189);
1190
1191extern Bool cfbDestroyWindow(
1192 WindowPtr /*pWin*/
1193);
1194
1195extern Bool cfbMapWindow(
1196 WindowPtr /*pWindow*/
1197);
1198
1199extern Bool cfbPositionWindow(
1200 WindowPtr /*pWin*/,
1201 int /*x*/,
1202 int /*y*/
1203);
1204
1205extern Bool cfbUnmapWindow(
1206 WindowPtr /*pWindow*/
1207);
1208
1209extern void cfbCopyWindow(
1210 WindowPtr /*pWin*/,
1211 DDXPointRec /*ptOldOrg*/,
1212 RegionPtr /*prgnSrc*/
1213);
1214
1215extern Bool cfbChangeWindowAttributes(
1216 WindowPtr /*pWin*/,
1217 unsigned long /*mask*/
1218);
1219/* cfbzerarcC.c */
1220
1221extern void cfbZeroPolyArcSS8Copy(
1222 DrawablePtr /*pDraw*/,
1223 GCPtr /*pGC*/,
1224 int /*narcs*/,
1225 xArc * /*parcs*/
1226);
1227/* cfbzerarcG.c */
1228
1229extern void cfbZeroPolyArcSS8General(
1230 DrawablePtr /*pDraw*/,
1231 GCPtr /*pGC*/,
1232 int /*narcs*/,
1233 xArc * /*parcs*/
1234);
1235/* cfbzerarcX.c */
1236
1237extern void cfbZeroPolyArcSS8Xor(
1238 DrawablePtr /*pDraw*/,
1239 GCPtr /*pGC*/,
1240 int /*narcs*/,
1241 xArc * /*parcs*/
1242);
1243
1244#if (!defined(SINGLEDEPTH) && PSZ != 8) || defined(FORCE_SEPARATE_PRIVATE)
1245
1246#define CFB_NEED_SCREEN_PRIVATE
1247
1248extern int cfbScreenPrivateIndex;
1249#endif
1250
1251#ifndef CFB_PROTOTYPES_ONLY
1252
1253/* Common macros for extracting drawing information */
1254
1255#define cfbGetWindowPixmap(d) \
1256 ((* ((DrawablePtr)(d))->pScreen->GetWindowPixmap)((WindowPtr)(d)))
1257
1258#define cfbGetTypedWidth(pDrawable,wtype) (\
1259 (((pDrawable)->type != DRAWABLE_PIXMAP) ? \
1260 (int) (cfbGetWindowPixmap(pDrawable)->devKind) : \
1261 (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype))
1262
1263#define cfbGetByteWidth(pDrawable) cfbGetTypedWidth(pDrawable, unsigned char)
1264
1265#define cfbGetPixelWidth(pDrawable) cfbGetTypedWidth(pDrawable, PixelType)
1266
1267#define cfbGetLongWidth(pDrawable) cfbGetTypedWidth(pDrawable, CfbBits)
1268
1269#define cfbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\
1270 PixmapPtr _pPix; \
1271 if ((pDrawable)->type != DRAWABLE_PIXMAP) \
1272 _pPix = cfbGetWindowPixmap(pDrawable); \
1273 else \
1274 _pPix = (PixmapPtr) (pDrawable); \
1275 (pointer) = (ptype *) _pPix->devPrivate.ptr; \
1276 (width) = ((int) _pPix->devKind) / sizeof (wtype); \
1277}
1278
1279#define cfbGetByteWidthAndPointer(pDrawable, width, pointer) \
1280 cfbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char)
1281
1282#define cfbGetLongWidthAndPointer(pDrawable, width, pointer) \
1283 cfbGetTypedWidthAndPointer(pDrawable, width, pointer, CfbBits, CfbBits)
1284
1285#define cfbGetPixelWidthAndPointer(pDrawable, width, pointer) \
1286 cfbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
1287
1288#define cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\
1289 PixmapPtr _pPix = cfbGetWindowPixmap((DrawablePtr) (pWin)); \
1290 (pointer) = (ptype *) _pPix->devPrivate.ptr; \
1291 (width) = ((int) _pPix->devKind) / sizeof (wtype); \
1292}
1293
1294#define cfbGetWindowLongWidthAndPointer(pWin, width, pointer) \
1295 cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, CfbBits, CfbBits)
1296
1297#define cfbGetWindowByteWidthAndPointer(pWin, width, pointer) \
1298 cfbGetWindowTypedWidthAndPointer(pWin, width, pointer, unsigned char, unsigned char)
1299
1300#define cfbGetWindowPixelWidthAndPointer(pDrawable, width, pointer) \
1301 cfbGetWindowTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
1302
1303/*
1304 * XFree86 empties the root BorderClip when the VT is inactive,
1305 * here's a macro which uses that to disable GetImage and GetSpans
1306 */
1307#define cfbWindowEnabled(pWin) \
1308 REGION_NOTEMPTY((pWin)->drawable.pScreen, \
1309 &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip)
1310
1311#define cfbDrawableEnabled(pDrawable) \
1312 ((pDrawable)->type == DRAWABLE_PIXMAP ? \
1313 TRUE : cfbWindowEnabled((WindowPtr) pDrawable))
1314
1315#include "micoord.h"
1316
1317#endif /* !CFB_PROTOTYPES_ONLY */
1318
1319#endif
Note: See TracBrowser for help on using the repository browser.

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