VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/mfb.h@ 78293

Last change on this file since 78293 was 69098, checked in by vboxsync, 7 years ago

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • Property svn:eol-style set to native
File size: 28.8 KB
Line 
1/* $XFree86: xc/programs/Xserver/mfb/mfb.h,v 1.19 2003/02/18 21:30:01 tsi Exp $ */
2/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
3/***********************************************************
4
5Copyright 1987, 1998 The Open Group
6
7Permission to use, copy, modify, distribute, and sell this software and its
8documentation for any purpose is hereby granted without fee, provided that
9the above copyright notice appear in all copies and that both that
10copyright notice and this permission notice appear in supporting
11documentation.
12
13The above copyright notice and this permission notice shall be included in
14all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
23Except as contained in this notice, the name of The Open Group shall not be
24used in advertising or otherwise to promote the sale, use or other dealings
25in this Software without prior written authorization from The Open Group.
26
27
28Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
29
30 All Rights Reserved
31
32Permission to use, copy, modify, and distribute this software and its
33documentation for any purpose and without fee is hereby granted,
34provided that the above copyright notice appear in all copies and that
35both that copyright notice and this permission notice appear in
36supporting documentation, and that the name of Digital not be
37used in advertising or publicity pertaining to distribution of the
38software without specific, written prior permission.
39
40DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
42DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
43ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
44WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
46SOFTWARE.
47
48******************************************************************/
49/* $Xorg: mfb.h,v 1.4 2001/02/09 02:05:18 xorgcvs Exp $ */
50
51#if !defined(_MFB_H_) || defined(MFB_PROTOTYPES_ONLY)
52#ifndef MFB_PROTOTYPES_ONLY
53#define _MFB_H_
54#endif
55
56/* Monochrome Frame Buffer definitions
57 written by drewry, september 1986
58*/
59#include "pixmap.h"
60#include "region.h"
61#include "gc.h"
62#include "colormap.h"
63#include "miscstruct.h"
64#include "mibstore.h"
65
66extern int InverseAlu[];
67
68
69/* warning: PixelType definition duplicated in maskbits.h */
70#ifndef PixelType
71#define PixelType CARD32
72#endif /* PixelType */
73#ifndef MfbBits
74#define MfbBits CARD32
75#endif
76
77/* mfbbitblt.c */
78
79extern void mfbDoBitblt(
80#if NeedFunctionPrototypes
81 DrawablePtr /*pSrc*/,
82 DrawablePtr /*pDst*/,
83 int /*alu*/,
84 RegionPtr /*prgnDst*/,
85 DDXPointPtr /*pptSrc*/
86#endif
87);
88
89extern RegionPtr mfbCopyArea(
90#if NeedFunctionPrototypes
91 DrawablePtr /*pSrcDrawable*/,
92 DrawablePtr /*pDstDrawable*/,
93 GCPtr/*pGC*/,
94 int /*srcx*/,
95 int /*srcy*/,
96 int /*width*/,
97 int /*height*/,
98 int /*dstx*/,
99 int /*dsty*/
100#endif
101);
102
103extern Bool mfbRegisterCopyPlaneProc(
104#if NeedFunctionPrototypes
105 ScreenPtr /*pScreen*/,
106 RegionPtr (* /*proc*/)(
107#if NeedNestedPrototypes
108 DrawablePtr /* pSrcDrawable */,
109 DrawablePtr /* pDstDrawable */,
110 GCPtr /* pGC */,
111 int /* srcx */,
112 int /* srcy */,
113 int /* width */,
114 int /* height */,
115 int /* dstx */,
116 int /* dsty */,
117 unsigned long /* bitPlane */
118#endif
119 )
120#endif
121);
122
123extern RegionPtr mfbCopyPlane(
124#if NeedFunctionPrototypes
125 DrawablePtr /*pSrcDrawable*/,
126 DrawablePtr /*pDstDrawable*/,
127 GCPtr/*pGC*/,
128 int /*srcx*/,
129 int /*srcy*/,
130 int /*width*/,
131 int /*height*/,
132 int /*dstx*/,
133 int /*dsty*/,
134 unsigned long /*plane*/
135#endif
136);
137/* mfbbltC.c */
138
139extern void mfbDoBitbltCopy(
140#if NeedFunctionPrototypes
141 DrawablePtr /*pSrc*/,
142 DrawablePtr /*pDst*/,
143 int /*alu*/,
144 RegionPtr /*prgnDst*/,
145 DDXPointPtr /*pptSrc*/
146#endif
147);
148/* mfbbltCI.c */
149
150extern void mfbDoBitbltCopyInverted(
151#if NeedFunctionPrototypes
152 DrawablePtr /*pSrc*/,
153 DrawablePtr /*pDst*/,
154 int /*alu*/,
155 RegionPtr /*prgnDst*/,
156 DDXPointPtr /*pptSrc*/
157#endif
158);
159/* mfbbltG.c */
160
161extern void mfbDoBitbltGeneral(
162#if NeedFunctionPrototypes
163 DrawablePtr /*pSrc*/,
164 DrawablePtr /*pDst*/,
165 int /*alu*/,
166 RegionPtr /*prgnDst*/,
167 DDXPointPtr /*pptSrc*/
168#endif
169);
170/* mfbbltO.c */
171
172extern void mfbDoBitbltOr(
173#if NeedFunctionPrototypes
174 DrawablePtr /*pSrc*/,
175 DrawablePtr /*pDst*/,
176 int /*alu*/,
177 RegionPtr /*prgnDst*/,
178 DDXPointPtr /*pptSrc*/
179#endif
180);
181/* mfbbltX.c */
182
183extern void mfbDoBitbltXor(
184#if NeedFunctionPrototypes
185 DrawablePtr /*pSrc*/,
186 DrawablePtr /*pDst*/,
187 int /*alu*/,
188 RegionPtr /*prgnDst*/,
189 DDXPointPtr /*pptSrc*/
190#endif
191);
192/* mfbbres.c */
193
194extern void mfbBresS(
195#if NeedFunctionPrototypes
196 int /*rop*/,
197 PixelType * /*addrl*/,
198 int /*nlwidth*/,
199 int /*signdx*/,
200 int /*signdy*/,
201 int /*axis*/,
202 int /*x1*/,
203 int /*y1*/,
204 int /*e*/,
205 int /*e1*/,
206 int /*e2*/,
207 int /*len*/
208#endif
209);
210/* mfbbresd.c */
211
212extern void mfbBresD(
213#if NeedFunctionPrototypes
214 int /*fgrop*/,
215 int /*bgrop*/,
216 int * /*pdashIndex*/,
217 unsigned char * /*pDash*/,
218 int /*numInDashList*/,
219 int * /*pdashOffset*/,
220 int /*isDoubleDash*/,
221 PixelType * /*addrl*/,
222 int /*nlwidth*/,
223 int /*signdx*/,
224 int /*signdy*/,
225 int /*axis*/,
226 int /*x1*/,
227 int /*y1*/,
228 int /*e*/,
229 int /*e1*/,
230 int /*e2*/,
231 int /*len*/
232#endif
233);
234/* mfbbstore.c */
235
236extern void mfbSaveAreas(
237#if NeedFunctionPrototypes
238 PixmapPtr /*pPixmap*/,
239 RegionPtr /*prgnSave*/,
240 int /*xorg*/,
241 int /*yorg*/,
242 WindowPtr /*pWin*/
243#endif
244);
245
246extern void mfbRestoreAreas(
247#if NeedFunctionPrototypes
248 PixmapPtr /*pPixmap*/,
249 RegionPtr /*prgnRestore*/,
250 int /*xorg*/,
251 int /*yorg*/,
252 WindowPtr /*pWin*/
253#endif
254);
255/* mfbclip.c */
256
257extern RegionPtr mfbPixmapToRegion(
258#if NeedFunctionPrototypes
259 PixmapPtr /*pPix*/
260#endif
261);
262/* mfbcmap.c */
263
264extern int mfbListInstalledColormaps(
265#if NeedFunctionPrototypes
266 ScreenPtr /*pScreen*/,
267 Colormap * /*pmaps*/
268#endif
269);
270
271extern void mfbInstallColormap(
272#if NeedFunctionPrototypes
273 ColormapPtr /*pmap*/
274#endif
275);
276
277extern void mfbUninstallColormap(
278#if NeedFunctionPrototypes
279 ColormapPtr /*pmap*/
280#endif
281);
282
283extern void mfbResolveColor(
284#if NeedFunctionPrototypes
285 unsigned short * /*pred*/,
286 unsigned short * /*pgreen*/,
287 unsigned short * /*pblue*/,
288 VisualPtr /*pVisual*/
289#endif
290);
291
292extern Bool mfbCreateColormap(
293#if NeedFunctionPrototypes
294 ColormapPtr /*pMap*/
295#endif
296);
297
298extern void mfbDestroyColormap(
299#if NeedFunctionPrototypes
300 ColormapPtr /*pMap*/
301#endif
302);
303
304extern Bool mfbCreateDefColormap(
305#if NeedFunctionPrototypes
306 ScreenPtr /*pScreen*/
307#endif
308);
309/* mfbfillarc.c */
310
311extern void mfbPolyFillArcSolid(
312#if NeedFunctionPrototypes
313 DrawablePtr /*pDraw*/,
314 GCPtr /*pGC*/,
315 int /*narcs*/,
316 xArc * /*parcs*/
317#endif
318);
319/* mfbfillrct.c */
320
321extern void mfbPolyFillRect(
322#if NeedFunctionPrototypes
323 DrawablePtr /*pDrawable*/,
324 GCPtr /*pGC*/,
325 int /*nrectFill*/,
326 xRectangle * /*prectInit*/
327#endif
328);
329/* mfbfillsp.c */
330
331extern void mfbBlackSolidFS(
332#if NeedFunctionPrototypes
333 DrawablePtr /*pDrawable*/,
334 GCPtr /*pGC*/,
335 int /*nInit*/,
336 DDXPointPtr /*pptInit*/,
337 int * /*pwidthInit*/,
338 int /*fSorted*/
339#endif
340);
341
342extern void mfbWhiteSolidFS(
343#if NeedFunctionPrototypes
344 DrawablePtr /*pDrawable*/,
345 GCPtr /*pGC*/,
346 int /*nInit*/,
347 DDXPointPtr /*pptInit*/,
348 int * /*pwidthInit*/,
349 int /*fSorted*/
350#endif
351);
352
353extern void mfbInvertSolidFS(
354#if NeedFunctionPrototypes
355 DrawablePtr /*pDrawable*/,
356 GCPtr /*pGC*/,
357 int /*nInit*/,
358 DDXPointPtr /*pptInit*/,
359 int * /*pwidthInit*/,
360 int /*fSorted*/
361#endif
362);
363
364extern void mfbWhiteStippleFS(
365#if NeedFunctionPrototypes
366 DrawablePtr /*pDrawable*/,
367 GCPtr/*pGC*/,
368 int /*nInit*/,
369 DDXPointPtr /*pptInit*/,
370 int * /*pwidthInit*/,
371 int /*fSorted*/
372#endif
373);
374
375extern void mfbBlackStippleFS(
376#if NeedFunctionPrototypes
377 DrawablePtr /*pDrawable*/,
378 GCPtr/*pGC*/,
379 int /*nInit*/,
380 DDXPointPtr /*pptInit*/,
381 int * /*pwidthInit*/,
382 int /*fSorted*/
383#endif
384);
385
386extern void mfbInvertStippleFS(
387#if NeedFunctionPrototypes
388 DrawablePtr /*pDrawable*/,
389 GCPtr/*pGC*/,
390 int /*nInit*/,
391 DDXPointPtr /*pptInit*/,
392 int * /*pwidthInit*/,
393 int /*fSorted*/
394#endif
395);
396
397extern void mfbTileFS(
398#if NeedFunctionPrototypes
399 DrawablePtr /*pDrawable*/,
400 GCPtr/*pGC*/,
401 int /*nInit*/,
402 DDXPointPtr /*pptInit*/,
403 int * /*pwidthInit*/,
404 int /*fSorted*/
405#endif
406);
407
408extern void mfbUnnaturalTileFS(
409#if NeedFunctionPrototypes
410 DrawablePtr /*pDrawable*/,
411 GCPtr/*pGC*/,
412 int /*nInit*/,
413 DDXPointPtr /*pptInit*/,
414 int * /*pwidthInit*/,
415 int /*fSorted*/
416#endif
417);
418
419extern void mfbUnnaturalStippleFS(
420#if NeedFunctionPrototypes
421 DrawablePtr /*pDrawable*/,
422 GCPtr/*pGC*/,
423 int /*nInit*/,
424 DDXPointPtr /*pptInit*/,
425 int * /*pwidthInit*/,
426 int /*fSorted*/
427#endif
428);
429/* mfbfont.c */
430
431extern Bool mfbRealizeFont(
432#if NeedFunctionPrototypes
433 ScreenPtr /*pscr*/,
434 FontPtr /*pFont*/
435#endif
436);
437
438extern Bool mfbUnrealizeFont(
439#if NeedFunctionPrototypes
440 ScreenPtr /*pscr*/,
441 FontPtr /*pFont*/
442#endif
443);
444/* mfbgc.c */
445
446extern Bool mfbCreateGC(
447#if NeedFunctionPrototypes
448 GCPtr /*pGC*/
449#endif
450);
451
452extern void mfbValidateGC(
453#if NeedFunctionPrototypes
454 GCPtr /*pGC*/,
455 unsigned long /*changes*/,
456 DrawablePtr /*pDrawable*/
457#endif
458);
459
460extern int mfbReduceRop(
461#if NeedFunctionPrototypes
462 int /*alu*/,
463 Pixel /*src*/
464#endif
465);
466
467/* mfbgetsp.c */
468
469extern void mfbGetSpans(
470#if NeedFunctionPrototypes
471 DrawablePtr /*pDrawable*/,
472 int /*wMax*/,
473 DDXPointPtr /*ppt*/,
474 int * /*pwidth*/,
475 int /*nspans*/,
476 char * /*pdstStart*/
477#endif
478);
479/* mfbhrzvert.c */
480
481extern void mfbHorzS(
482#if NeedFunctionPrototypes
483 int /*rop*/,
484 PixelType * /*addrl*/,
485 int /*nlwidth*/,
486 int /*x1*/,
487 int /*y1*/,
488 int /*len*/
489#endif
490);
491
492extern void mfbVertS(
493#if NeedFunctionPrototypes
494 int /*rop*/,
495 PixelType * /*addrl*/,
496 int /*nlwidth*/,
497 int /*x1*/,
498 int /*y1*/,
499 int /*len*/
500#endif
501);
502/* mfbigbblak.c */
503
504extern void mfbImageGlyphBltBlack(
505#if NeedFunctionPrototypes
506 DrawablePtr /*pDrawable*/,
507 GCPtr/*pGC*/,
508 int /*x*/,
509 int /*y*/,
510 unsigned int /*nglyph*/,
511 CharInfoPtr * /*ppci*/,
512 pointer /*pglyphBase*/
513#endif
514);
515/* mfbigbwht.c */
516
517extern void mfbImageGlyphBltWhite(
518#if NeedFunctionPrototypes
519 DrawablePtr /*pDrawable*/,
520 GCPtr/*pGC*/,
521 int /*x*/,
522 int /*y*/,
523 unsigned int /*nglyph*/,
524 CharInfoPtr * /*ppci*/,
525 pointer /*pglyphBase*/
526#endif
527);
528/* mfbimage.c */
529
530extern void mfbPutImage(
531#if NeedFunctionPrototypes
532 DrawablePtr /*dst*/,
533 GCPtr /*pGC*/,
534 int /*depth*/,
535 int /*x*/,
536 int /*y*/,
537 int /*w*/,
538 int /*h*/,
539 int /*leftPad*/,
540 int /*format*/,
541 char * /*pImage*/
542#endif
543);
544
545extern void mfbGetImage(
546#if NeedFunctionPrototypes
547 DrawablePtr /*pDrawable*/,
548 int /*sx*/,
549 int /*sy*/,
550 int /*w*/,
551 int /*h*/,
552 unsigned int /*format*/,
553 unsigned long /*planeMask*/,
554 char * /*pdstLine*/
555#endif
556);
557/* mfbline.c */
558
559extern void mfbLineSS(
560#if NeedFunctionPrototypes
561 DrawablePtr /*pDrawable*/,
562 GCPtr /*pGC*/,
563 int /*mode*/,
564 int /*npt*/,
565 DDXPointPtr /*pptInit*/
566#endif
567);
568
569extern void mfbLineSD(
570#if NeedFunctionPrototypes
571 DrawablePtr /*pDrawable*/,
572 GCPtr /*pGC*/,
573 int /*mode*/,
574 int /*npt*/,
575 DDXPointPtr /*pptInit*/
576#endif
577);
578
579/* mfbmisc.c */
580
581extern void mfbQueryBestSize(
582#if NeedFunctionPrototypes
583 int /*class*/,
584 unsigned short * /*pwidth*/,
585 unsigned short * /*pheight*/,
586 ScreenPtr /*pScreen*/
587#endif
588);
589/* mfbpablack.c */
590
591extern void mfbSolidBlackArea(
592#if NeedFunctionPrototypes
593 DrawablePtr /*pDraw*/,
594 int /*nbox*/,
595 BoxPtr /*pbox*/,
596 int /*alu*/,
597 PixmapPtr /*nop*/
598#endif
599);
600
601extern void mfbStippleBlackArea(
602#if NeedFunctionPrototypes
603 DrawablePtr /*pDraw*/,
604 int /*nbox*/,
605 BoxPtr /*pbox*/,
606 int /*alu*/,
607 PixmapPtr /*pstipple*/
608#endif
609);
610/* mfbpainv.c */
611
612extern void mfbSolidInvertArea(
613#if NeedFunctionPrototypes
614 DrawablePtr /*pDraw*/,
615 int /*nbox*/,
616 BoxPtr /*pbox*/,
617 int /*alu*/,
618 PixmapPtr /*nop*/
619#endif
620);
621
622extern void mfbStippleInvertArea(
623#if NeedFunctionPrototypes
624 DrawablePtr /*pDraw*/,
625 int /*nbox*/,
626 BoxPtr /*pbox*/,
627 int /*alu*/,
628 PixmapPtr /*pstipple*/
629#endif
630);
631/* mfbpawhite.c */
632
633extern void mfbSolidWhiteArea(
634#if NeedFunctionPrototypes
635 DrawablePtr /*pDraw*/,
636 int /*nbox*/,
637 BoxPtr /*pbox*/,
638 int /*alu*/,
639 PixmapPtr /*nop*/
640#endif
641);
642
643extern void mfbStippleWhiteArea(
644#if NeedFunctionPrototypes
645 DrawablePtr /*pDraw*/,
646 int /*nbox*/,
647 BoxPtr /*pbox*/,
648 int /*alu*/,
649 PixmapPtr /*pstipple*/
650#endif
651);
652/* mfbpgbblak.c */
653
654extern void mfbPolyGlyphBltBlack(
655#if NeedFunctionPrototypes
656 DrawablePtr /*pDrawable*/,
657 GCPtr /*pGC*/,
658 int /*x*/,
659 int /*y*/,
660 unsigned int /*nglyph*/,
661 CharInfoPtr * /*ppci*/,
662 pointer /*pglyphBase*/
663#endif
664);
665/* mfbpgbinv.c */
666
667extern void mfbPolyGlyphBltInvert(
668#if NeedFunctionPrototypes
669 DrawablePtr /*pDrawable*/,
670 GCPtr /*pGC*/,
671 int /*x*/,
672 int /*y*/,
673 unsigned int /*nglyph*/,
674 CharInfoPtr * /*ppci*/,
675 pointer /*pglyphBase*/
676#endif
677);
678/* mfbpgbwht.c */
679
680extern void mfbPolyGlyphBltWhite(
681#if NeedFunctionPrototypes
682 DrawablePtr /*pDrawable*/,
683 GCPtr /*pGC*/,
684 int /*x*/,
685 int /*y*/,
686 unsigned int /*nglyph*/,
687 CharInfoPtr * /*ppci*/,
688 pointer /*pglyphBase*/
689#endif
690);
691/* mfbpixmap.c */
692
693extern PixmapPtr mfbCreatePixmap(
694#if NeedFunctionPrototypes
695 ScreenPtr /*pScreen*/,
696 int /*width*/,
697 int /*height*/,
698 int /*depth*/
699#endif
700);
701
702extern Bool mfbDestroyPixmap(
703#if NeedFunctionPrototypes
704 PixmapPtr /*pPixmap*/
705#endif
706);
707
708extern PixmapPtr mfbCopyPixmap(
709#if NeedFunctionPrototypes
710 PixmapPtr /*pSrc*/
711#endif
712);
713
714extern void mfbPadPixmap(
715#if NeedFunctionPrototypes
716 PixmapPtr /*pPixmap*/
717#endif
718);
719
720extern void mfbXRotatePixmap(
721#if NeedFunctionPrototypes
722 PixmapPtr /*pPix*/,
723 int /*rw*/
724#endif
725);
726
727extern void mfbYRotatePixmap(
728#if NeedFunctionPrototypes
729 PixmapPtr /*pPix*/,
730 int /*rh*/
731#endif
732);
733
734extern void mfbCopyRotatePixmap(
735#if NeedFunctionPrototypes
736 PixmapPtr /*psrcPix*/,
737 PixmapPtr * /*ppdstPix*/,
738 int /*xrot*/,
739 int /*yrot*/
740#endif
741);
742/* mfbplyblack.c */
743
744extern void mfbFillPolyBlack(
745#if NeedFunctionPrototypes
746 DrawablePtr /*pDrawable*/,
747 GCPtr /*pGC*/,
748 int /*shape*/,
749 int /*mode*/,
750 int /*count*/,
751 DDXPointPtr /*ptsIn*/
752#endif
753);
754/* mfbplyinv.c */
755
756extern void mfbFillPolyInvert(
757#if NeedFunctionPrototypes
758 DrawablePtr /*pDrawable*/,
759 GCPtr /*pGC*/,
760 int /*shape*/,
761 int /*mode*/,
762 int /*count*/,
763 DDXPointPtr /*ptsIn*/
764#endif
765);
766/* mfbplywhite.c */
767
768extern void mfbFillPolyWhite(
769#if NeedFunctionPrototypes
770 DrawablePtr /*pDrawable*/,
771 GCPtr /*pGC*/,
772 int /*shape*/,
773 int /*mode*/,
774 int /*count*/,
775 DDXPointPtr /*ptsIn*/
776#endif
777);
778/* mfbpntwin.c */
779
780extern void mfbPaintWindow(
781#if NeedFunctionPrototypes
782 WindowPtr /*pWin*/,
783 RegionPtr /*pRegion*/,
784 int /*what*/
785#endif
786);
787/* mfbpolypnt.c */
788
789extern void mfbPolyPoint(
790#if NeedFunctionPrototypes
791 DrawablePtr /*pDrawable*/,
792 GCPtr /*pGC*/,
793 int /*mode*/,
794 int /*npt*/,
795 xPoint * /*pptInit*/
796#endif
797);
798/* mfbpushpxl.c */
799
800extern void mfbSolidPP(
801#if NeedFunctionPrototypes
802 GCPtr /*pGC*/,
803 PixmapPtr /*pBitMap*/,
804 DrawablePtr /*pDrawable*/,
805 int /*dx*/,
806 int /*dy*/,
807 int /*xOrg*/,
808 int /*yOrg*/
809#endif
810);
811
812extern void mfbPushPixels(
813#if NeedFunctionPrototypes
814 GCPtr /*pGC*/,
815 PixmapPtr /*pBitMap*/,
816 DrawablePtr /*pDrawable*/,
817 int /*dx*/,
818 int /*dy*/,
819 int /*xOrg*/,
820 int /*yOrg*/
821#endif
822);
823/* mfbscrclse.c */
824
825extern Bool mfbCloseScreen(
826#if NeedFunctionPrototypes
827 int /*index*/,
828 ScreenPtr /*pScreen*/
829#endif
830);
831/* mfbscrinit.c */
832
833extern Bool mfbAllocatePrivates(
834#if NeedFunctionPrototypes
835 ScreenPtr /*pScreen*/,
836 int * /*pWinIndex*/,
837 int * /*pGCIndex*/
838#endif
839);
840
841extern Bool mfbScreenInit(
842#if NeedFunctionPrototypes
843 ScreenPtr /*pScreen*/,
844 pointer /*pbits*/,
845 int /*xsize*/,
846 int /*ysize*/,
847 int /*dpix*/,
848 int /*dpiy*/,
849 int /*width*/
850#endif
851);
852
853extern PixmapPtr mfbGetWindowPixmap(
854#if NeedFunctionPrototypes
855 WindowPtr /*pWin*/
856#endif
857);
858
859extern void mfbSetWindowPixmap(
860#if NeedFunctionPrototypes
861 WindowPtr /*pWin*/,
862 PixmapPtr /*pPix*/
863#endif
864);
865
866/* mfbseg.c */
867
868extern void mfbSegmentSS(
869#if NeedFunctionPrototypes
870 DrawablePtr /*pDrawable*/,
871 GCPtr /*pGC*/,
872 int /*nseg*/,
873 xSegment * /*pSeg*/
874#endif
875);
876
877extern void mfbSegmentSD(
878#if NeedFunctionPrototypes
879 DrawablePtr /*pDrawable*/,
880 GCPtr /*pGC*/,
881 int /*nseg*/,
882 xSegment * /*pSeg*/
883#endif
884);
885/* mfbsetsp.c */
886
887extern void mfbSetScanline(
888#if NeedFunctionPrototypes
889 int /*y*/,
890 int /*xOrigin*/,
891 int /*xStart*/,
892 int /*xEnd*/,
893 PixelType * /*psrc*/,
894 int /*alu*/,
895 PixelType * /*pdstBase*/,
896 int /*widthDst*/
897#endif
898);
899
900extern void mfbSetSpans(
901#if NeedFunctionPrototypes
902 DrawablePtr /*pDrawable*/,
903 GCPtr /*pGC*/,
904 char * /*psrc*/,
905 DDXPointPtr /*ppt*/,
906 int * /*pwidth*/,
907 int /*nspans*/,
908 int /*fSorted*/
909#endif
910);
911/* mfbteblack.c */
912
913extern void mfbTEGlyphBltBlack(
914#if NeedFunctionPrototypes
915 DrawablePtr /*pDrawable*/,
916 GCPtr/*pGC*/,
917 int /*x*/,
918 int /*y*/,
919 unsigned int /*nglyph*/,
920 CharInfoPtr * /*ppci*/,
921 pointer /*pglyphBase*/
922#endif
923);
924/* mfbtewhite.c */
925
926extern void mfbTEGlyphBltWhite(
927#if NeedFunctionPrototypes
928 DrawablePtr /*pDrawable*/,
929 GCPtr/*pGC*/,
930 int /*x*/,
931 int /*y*/,
932 unsigned int /*nglyph*/,
933 CharInfoPtr * /*ppci*/,
934 pointer /*pglyphBase*/
935#endif
936);
937/* mfbtileC.c */
938
939extern void mfbTileAreaPPWCopy(
940#if NeedFunctionPrototypes
941 DrawablePtr /*pDraw*/,
942 int /*nbox*/,
943 BoxPtr /*pbox*/,
944 int /*alu*/,
945 PixmapPtr /*ptile*/
946#endif
947);
948/* mfbtileG.c */
949
950extern void mfbTileAreaPPWGeneral(
951#if NeedFunctionPrototypes
952 DrawablePtr /*pDraw*/,
953 int /*nbox*/,
954 BoxPtr /*pbox*/,
955 int /*alu*/,
956 PixmapPtr /*ptile*/
957#endif
958);
959
960extern void mfbTileAreaPPW(
961#if NeedFunctionPrototypes
962 DrawablePtr /*pDraw*/,
963 int /*nbox*/,
964 BoxPtr /*pbox*/,
965 int /*alu*/,
966 PixmapPtr /*ptile*/
967#endif
968);
969/* mfbwindow.c */
970
971extern Bool mfbCreateWindow(
972#if NeedFunctionPrototypes
973 WindowPtr /*pWin*/
974#endif
975);
976
977extern Bool mfbDestroyWindow(
978#if NeedFunctionPrototypes
979 WindowPtr /*pWin*/
980#endif
981);
982
983extern Bool mfbMapWindow(
984#if NeedFunctionPrototypes
985 WindowPtr /*pWindow*/
986#endif
987);
988
989extern Bool mfbPositionWindow(
990#if NeedFunctionPrototypes
991 WindowPtr /*pWin*/,
992 int /*x*/,
993 int /*y*/
994#endif
995);
996
997extern Bool mfbUnmapWindow(
998#if NeedFunctionPrototypes
999 WindowPtr /*pWindow*/
1000#endif
1001);
1002
1003extern void mfbCopyWindow(
1004#if NeedFunctionPrototypes
1005 WindowPtr /*pWin*/,
1006 DDXPointRec /*ptOldOrg*/,
1007 RegionPtr /*prgnSrc*/
1008#endif
1009);
1010
1011extern Bool mfbChangeWindowAttributes(
1012#if NeedFunctionPrototypes
1013 WindowPtr /*pWin*/,
1014 unsigned long /*mask*/
1015#endif
1016);
1017/* mfbzerarc.c */
1018
1019extern void mfbZeroPolyArcSS(
1020#if NeedFunctionPrototypes
1021 DrawablePtr /*pDraw*/,
1022 GCPtr /*pGC*/,
1023 int /*narcs*/,
1024 xArc * /*parcs*/
1025#endif
1026);
1027
1028#ifndef MFB_PROTOTYPES_ONLY
1029/*
1030 private filed of pixmap
1031 pixmap.devPrivate = (PixelType *)pointer_to_bits
1032 pixmap.devKind = width_of_pixmap_in_bytes
1033
1034 private field of screen
1035 a pixmap, for which we allocate storage. devPrivate is a pointer to
1036the bits in the hardware framebuffer. note that devKind can be poked to
1037make the code work for framebuffers that are wider than their
1038displayable screen (e.g. the early vsII, which displayed 960 pixels
1039across, but was 1024 in the hardware.)
1040
1041 private field of GC
1042*/
1043typedef void (*mfbFillAreaProcPtr)(
1044#if NeedNestedPrototypes
1045 DrawablePtr /*pDraw*/,
1046 int /*nbox*/,
1047 BoxPtr /*pbox*/,
1048 int /*alu*/,
1049 PixmapPtr /*nop*/
1050#endif
1051 );
1052
1053typedef struct {
1054 unsigned char rop; /* reduction of rasterop to 1 of 3 */
1055 unsigned char ropOpStip; /* rop for opaque stipple */
1056 unsigned char ropFillArea; /* == alu, rop, or ropOpStip */
1057 unsigned char unused1[sizeof(long) - 3]; /* Alignment */
1058 mfbFillAreaProcPtr FillArea; /* fills regions; look at the code */
1059 } mfbPrivGC;
1060typedef mfbPrivGC *mfbPrivGCPtr;
1061#endif
1062
1063extern int mfbGCPrivateIndex; /* index into GC private array */
1064extern int mfbWindowPrivateIndex; /* index into Window private array */
1065#ifdef PIXMAP_PER_WINDOW
1066extern int frameWindowPrivateIndex; /* index into Window private array */
1067#endif
1068
1069#ifndef MFB_PROTOTYPES_ONLY
1070/* private field of window */
1071typedef struct {
1072 unsigned char fastBorder; /* non-zero if border tile is 32 bits wide */
1073 unsigned char fastBackground;
1074 unsigned short unused; /* pad for alignment with Sun compiler */
1075 DDXPointRec oldRotate;
1076 PixmapPtr pRotatedBackground;
1077 PixmapPtr pRotatedBorder;
1078 } mfbPrivWin;
1079
1080/* Common macros for extracting drawing information */
1081
1082#define mfbGetTypedWidth(pDrawable,wtype) (\
1083 (((pDrawable)->type == DRAWABLE_WINDOW) ? \
1084 (int) (((PixmapPtr)((pDrawable)->pScreen->devPrivate))->devKind) : \
1085 (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype))
1086
1087#define mfbGetByteWidth(pDrawable) mfbGetTypedWidth(pDrawable, unsigned char)
1088
1089#define mfbGetPixelWidth(pDrawable) mfbGetTypedWidth(pDrawable, PixelType)
1090
1091#define mfbGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\
1092 PixmapPtr _pPix; \
1093 if ((pDrawable)->type == DRAWABLE_WINDOW) \
1094 _pPix = (PixmapPtr) (pDrawable)->pScreen->devPrivate; \
1095 else \
1096 _pPix = (PixmapPtr) (pDrawable); \
1097 (pointer) = (ptype *) _pPix->devPrivate.ptr; \
1098 (width) = ((int) _pPix->devKind) / sizeof (wtype); \
1099}
1100
1101#define mfbGetByteWidthAndPointer(pDrawable, width, pointer) \
1102 mfbGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char)
1103
1104#define mfbGetPixelWidthAndPointer(pDrawable, width, pointer) \
1105 mfbGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
1106
1107#define mfbGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\
1108 PixmapPtr _pPix = (PixmapPtr) (pWin)->drawable.pScreen->devPrivate; \
1109 (pointer) = (ptype *) _pPix->devPrivate.ptr; \
1110 (width) = ((int) _pPix->devKind) / sizeof (wtype); \
1111}
1112
1113#define mfbGetWindowPixelWidthAndPointer(pWin, width, pointer) \
1114 mfbGetWindowTypedWidthAndPointer(pWin, width, pointer, PixelType, PixelType)
1115
1116#define mfbGetWindowByteWidthAndPointer(pWin, width, pointer) \
1117 mfbGetWindowTypedWidthAndPointer(pWin, width, pointer, char, char)
1118
1119/* mfb uses the following macros to calculate addresses in drawables.
1120 * To support banked framebuffers, the macros come in four flavors.
1121 * All four collapse into the same definition on unbanked devices.
1122 *
1123 * mfbScanlineFoo - calculate address and do bank switching
1124 * mfbScanlineFooNoBankSwitch - calculate address, don't bank switch
1125 * mfbScanlineFooSrc - calculate address, switch source bank
1126 * mfbScanlineFooDst - calculate address, switch destination bank
1127 */
1128
1129/* The NoBankSwitch versions are the same for banked and unbanked cases */
1130
1131#define mfbScanlineIncNoBankSwitch(_ptr, _off) _ptr += (_off)
1132#define mfbScanlineOffsetNoBankSwitch(_ptr, _off) ((_ptr) + (_off))
1133#define mfbScanlineDeltaNoBankSwitch(_ptr, _y, _w) \
1134 mfbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w))
1135#define mfbScanlineNoBankSwitch(_ptr, _x, _y, _w) \
1136 mfbScanlineOffsetNoBankSwitch(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
1137
1138#ifdef MFB_LINE_BANK
1139
1140#include "mfblinebank.h" /* get macro definitions from this file */
1141
1142#else /* !MFB_LINE_BANK - unbanked case */
1143
1144#define mfbScanlineInc(_ptr, _off) mfbScanlineIncNoBankSwitch(_ptr, _off)
1145#define mfbScanlineIncSrc(_ptr, _off) mfbScanlineInc(_ptr, _off)
1146#define mfbScanlineIncDst(_ptr, _off) mfbScanlineInc(_ptr, _off)
1147
1148#define mfbScanlineOffset(_ptr, _off) mfbScanlineOffsetNoBankSwitch(_ptr, _off)
1149#define mfbScanlineOffsetSrc(_ptr, _off) mfbScanlineOffset(_ptr, _off)
1150#define mfbScanlineOffsetDst(_ptr, _off) mfbScanlineOffset(_ptr, _off)
1151
1152#define mfbScanlineSrc(_ptr, _x, _y, _w) mfbScanline(_ptr, _x, _y, _w)
1153#define mfbScanlineDst(_ptr, _x, _y, _w) mfbScanline(_ptr, _x, _y, _w)
1154
1155#define mfbScanlineDeltaSrc(_ptr, _y, _w) mfbScanlineDelta(_ptr, _y, _w)
1156#define mfbScanlineDeltaDst(_ptr, _y, _w) mfbScanlineDelta(_ptr, _y, _w)
1157
1158#endif /* MFB_LINE_BANK */
1159
1160#define mfbScanlineDelta(_ptr, _y, _w) \
1161 mfbScanlineOffset(_ptr, (_y) * (_w))
1162
1163#define mfbScanline(_ptr, _x, _y, _w) \
1164 mfbScanlineOffset(_ptr, (_y) * (_w) + ((_x) >> MFB_PWSH))
1165
1166
1167/* precomputed information about each glyph for GlyphBlt code.
1168 this saves recalculating the per glyph information for each box.
1169*/
1170typedef struct _pos{
1171 int xpos; /* xposition of glyph's origin */
1172 int xchar; /* x position mod 32 */
1173 int leftEdge;
1174 int rightEdge;
1175 int topEdge;
1176 int bottomEdge;
1177 PixelType *pdstBase; /* longword with character origin */
1178 int widthGlyph; /* width in bytes of this glyph */
1179} TEXTPOS;
1180
1181/* reduced raster ops for mfb */
1182#define RROP_BLACK GXclear
1183#define RROP_WHITE GXset
1184#define RROP_NOP GXnoop
1185#define RROP_INVERT GXinvert
1186
1187/* macros for mfbbitblt.c, mfbfillsp.c
1188 these let the code do one switch on the rop per call, rather
1189than a switch on the rop per item (span or rectangle.)
1190*/
1191
1192#define fnCLEAR(src, dst) (0)
1193#define fnAND(src, dst) (src & dst)
1194#define fnANDREVERSE(src, dst) (src & ~dst)
1195#define fnCOPY(src, dst) (src)
1196#define fnANDINVERTED(src, dst) (~src & dst)
1197#define fnNOOP(src, dst) (dst)
1198#define fnXOR(src, dst) (src ^ dst)
1199#define fnOR(src, dst) (src | dst)
1200#define fnNOR(src, dst) (~(src | dst))
1201#define fnEQUIV(src, dst) (~src ^ dst)
1202#define fnINVERT(src, dst) (~dst)
1203#define fnORREVERSE(src, dst) (src | ~dst)
1204#define fnCOPYINVERTED(src, dst)(~src)
1205#define fnORINVERTED(src, dst) (~src | dst)
1206#define fnNAND(src, dst) (~(src & dst))
1207#undef fnSET
1208#define fnSET(src, dst) (MfbBits)(~0)
1209
1210/* Using a "switch" statement is much faster in most cases
1211 * since the compiler can do a look-up table or multi-way branch
1212 * instruction, depending on the architecture. The result on
1213 * A Sun 3/50 is at least 2.5 times faster, assuming a uniform
1214 * distribution of RasterOp operation types.
1215 *
1216 * However, doing some profiling on a running system reveals
1217 * GXcopy is the operation over 99.5% of the time and
1218 * GXxor is the next most frequent (about .4%), so we make special
1219 * checks for those first.
1220 *
1221 * Note that this requires a change to the "calling sequence"
1222 * since we can't engineer a "switch" statement to have an lvalue.
1223 */
1224#undef DoRop
1225#define DoRop(result, alu, src, dst) \
1226{ \
1227 if (alu == GXcopy) \
1228 result = fnCOPY (src, dst); \
1229 else if (alu == GXxor) \
1230 result = fnXOR (src, dst); \
1231 else \
1232 switch (alu) \
1233 { \
1234 case GXclear: \
1235 result = fnCLEAR (src, dst); \
1236 break; \
1237 case GXand: \
1238 result = fnAND (src, dst); \
1239 break; \
1240 case GXandReverse: \
1241 result = fnANDREVERSE (src, dst); \
1242 break; \
1243 case GXandInverted: \
1244 result = fnANDINVERTED (src, dst); \
1245 break; \
1246 default: \
1247 case GXnoop: \
1248 result = fnNOOP (src, dst); \
1249 break; \
1250 case GXor: \
1251 result = fnOR (src, dst); \
1252 break; \
1253 case GXnor: \
1254 result = fnNOR (src, dst); \
1255 break; \
1256 case GXequiv: \
1257 result = fnEQUIV (src, dst); \
1258 break; \
1259 case GXinvert: \
1260 result = fnINVERT (src, dst); \
1261 break; \
1262 case GXorReverse: \
1263 result = fnORREVERSE (src, dst); \
1264 break; \
1265 case GXcopyInverted: \
1266 result = fnCOPYINVERTED (src, dst); \
1267 break; \
1268 case GXorInverted: \
1269 result = fnORINVERTED (src, dst); \
1270 break; \
1271 case GXnand: \
1272 result = fnNAND (src, dst); \
1273 break; \
1274 case GXset: \
1275 result = fnSET (src, dst); \
1276 break; \
1277 } \
1278}
1279
1280
1281/* C expression fragments for various operations. These get passed in
1282 * as -D's on the compile command line. See mfb/Imakefile. This
1283 * fixes XBUG 6319.
1284 *
1285 * This seems like a good place to point out that mfb's use of the
1286 * words black and white is an unfortunate misnomer. In mfb code, black
1287 * means zero, and white means one.
1288 */
1289#define MFB_OPEQ_WHITE |=
1290#define MFB_OPEQ_BLACK &=~
1291#define MFB_OPEQ_INVERT ^=
1292#define MFB_EQWHOLEWORD_WHITE =~0
1293#define MFB_EQWHOLEWORD_BLACK =0
1294#define MFB_EQWHOLEWORD_INVERT ^=~0
1295#define MFB_OP_WHITE /* nothing */
1296#define MFB_OP_BLACK ~
1297
1298/*
1299 * if MFB is built as a module, it shouldn't call libc functions.
1300 */
1301#ifdef XFree86LOADER
1302#include "xf86_ansic.h"
1303#endif
1304
1305#endif /* MFB_PROTOTYPES_ONLY */
1306#endif /* _MFB_H_ */
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