VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.0.1/ilbm.h@ 67129

最後變更 在這個檔案從67129是 51223,由 vboxsync 提交於 11 年 前

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

  • 屬性 svn:eol-style 設為 native
檔案大小: 22.9 KB
 
1/* $XFree86: xc/programs/Xserver/ilbm/ilbm.h,v 3.2 1998/04/05 16:42:23 robin Exp $ */
2/* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */
3/***********************************************************
4
5Copyright (c) 1987 X Consortium
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software and associated documentation files (the "Software"), to deal
9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in
15all copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24Except as contained in this notice, the name of the X Consortium shall not be
25used in advertising or otherwise to promote the sale, use or other dealings
26in this Software without prior written authorization from the X Consortium.
27
28
29Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
30
31 All Rights Reserved
32
33Permission to use, copy, modify, and distribute this software and its
34documentation for any purpose and without fee is hereby granted,
35provided that the above copyright notice appear in all copies and that
36both that copyright notice and this permission notice appear in
37supporting documentation, and that the name of Digital not be
38used in advertising or publicity pertaining to distribution of the
39software without specific, written prior permission.
40
41DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
42ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
43DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
44ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
46ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
47SOFTWARE.
48
49******************************************************************/
50/* $XConsortium: ilbm.h,v 5.31 94/04/17 20:28:15 dpw Exp $ */
51/* Monochrome Frame Buffer definitions
52 written by drewry, september 1986
53*/
54
55/* Modified jun 95 by Geert Uytterhoeven ([email protected])
56 to use interleaved bitplanes instead of normal bitplanes */
57
58#ifdef HAVE_DIX_CONFIG_H
59#include <dix-config.h>
60#endif
61
62#include "pixmap.h"
63#include "region.h"
64#include "gc.h"
65#include "colormap.h"
66#include "miscstruct.h"
67#include "mibstore.h"
68
69extern int ilbmInverseAlu[];
70extern int ilbmScreenPrivateIndex;
71/* warning: PixelType definition duplicated in maskbits.h */
72#ifndef PixelType
73#define PixelType unsigned long
74#endif /* PixelType */
75
76#define AFB_MAX_DEPTH 8
77
78/* ilbmbitblt.c */
79
80extern void ilbmDoBitblt(
81 DrawablePtr /*pSrc*/,
82 DrawablePtr /*pDst*/,
83 int /*alu*/,
84 RegionPtr /*prgnDst*/,
85 DDXPointPtr /*pptSrc*/,
86 unsigned long /*planemask*/
87);
88
89extern RegionPtr ilbmBitBlt(
90 DrawablePtr /*pSrc*/,
91 DrawablePtr /*pDst*/,
92 GCPtr /*pGC*/,
93 int /*srcx*/,
94 int /*srcy*/,
95 int /*width*/,
96 int /*height*/,
97 int /*dstx*/,
98 int /*dsty*/,
99 void (*doBitBlt)(),
100 unsigned long /*planemask*/
101);
102
103extern RegionPtr ilbmCopyArea(
104 DrawablePtr /*pSrcDrawable*/,
105 DrawablePtr /*pDstDrawable*/,
106 GCPtr/*pGC*/,
107 int /*srcx*/,
108 int /*srcy*/,
109 int /*width*/,
110 int /*height*/,
111 int /*dstx*/,
112 int /*dsty*/
113);
114
115extern RegionPtr ilbmCopyPlane(
116 DrawablePtr /*pSrcDrawable*/,
117 DrawablePtr /*pDstDrawable*/,
118 GCPtr/*pGC*/,
119 int /*srcx*/,
120 int /*srcy*/,
121 int /*width*/,
122 int /*height*/,
123 int /*dstx*/,
124 int /*dsty*/,
125 unsigned long /*plane*/
126);
127
128extern void ilbmCopy1ToN(
129 DrawablePtr /*pSrc*/,
130 DrawablePtr /*pDst*/,
131 int /*alu*/,
132 RegionPtr /*prgnDst*/,
133 DDXPointPtr /*pptSrc*/,
134 unsigned long /*planemask*/
135);
136/* ilbmbltC.c */
137
138extern void ilbmDoBitbltCopy(
139 DrawablePtr /*pSrc*/,
140 DrawablePtr /*pDst*/,
141 int /*alu*/,
142 RegionPtr /*prgnDst*/,
143 DDXPointPtr /*pptSrc*/,
144 unsigned long /*planemask*/
145);
146/* ilbmbltCI.c */
147
148extern void ilbmDoBitbltCopyInverted(
149 DrawablePtr /*pSrc*/,
150 DrawablePtr /*pDst*/,
151 int /*alu*/,
152 RegionPtr /*prgnDst*/,
153 DDXPointPtr /*pptSrc*/,
154 unsigned long /*planemask*/
155);
156/* ilbmbltG.c */
157
158extern void ilbmDoBitbltGeneral(
159 DrawablePtr /*pSrc*/,
160 DrawablePtr /*pDst*/,
161 int /*alu*/,
162 RegionPtr /*prgnDst*/,
163 DDXPointPtr /*pptSrc*/,
164 unsigned long /*planemask*/
165);
166/* ilbmbltO.c */
167
168extern void ilbmDoBitbltOr(
169 DrawablePtr /*pSrc*/,
170 DrawablePtr /*pDst*/,
171 int /*alu*/,
172 RegionPtr /*prgnDst*/,
173 DDXPointPtr /*pptSrc*/,
174 unsigned long /*planemask*/
175);
176/* ilbmbltX.c */
177
178extern void ilbmDoBitbltXor(
179 DrawablePtr /*pSrc*/,
180 DrawablePtr /*pDst*/,
181 int /*alu*/,
182 RegionPtr /*prgnDst*/,
183 DDXPointPtr /*pptSrc*/,
184 unsigned long /*planemask*/
185);
186/* ilbmbres.c */
187
188extern void ilbmBresS(
189 PixelType * /*addrl*/,
190 int /*nlwidth*/,
191 int /*sizeDst*/,
192 int /*depthDst*/,
193 int /*signdx*/,
194 int /*signdy*/,
195 int /*axis*/,
196 int /*x1*/,
197 int /*y1*/,
198 int /*e*/,
199 int /*e1*/,
200 int /*e2*/,
201 int /*len*/,
202 unsigned char * /*rrops*/
203);
204/* ilbmbresd.c */
205
206extern void ilbmBresD(
207 int * /*pdashIndex*/,
208 unsigned char * /*pDash*/,
209 int /*numInDashList*/,
210 int * /*pdashOffset*/,
211 int /*isDoubleDash*/,
212 PixelType * /*addrl*/,
213 int /*nlwidth*/,
214 int /*sizeDst*/,
215 int /*depthDst*/,
216 int /*signdx*/,
217 int /*signdy*/,
218 int /*axis*/,
219 int /*x1*/,
220 int /*y1*/,
221 int /*e*/,
222 int /*e1*/,
223 int /*e2*/,
224 int /*len*/,
225 unsigned char * /*rrops*/,
226 unsigned char * /*bgrrops*/
227);
228/* ilbmbstore.c */
229
230extern void ilbmSaveAreas(
231 PixmapPtr /*pPixmap*/,
232 RegionPtr /*prgnSave*/,
233 int /*xorg*/,
234 int /*yorg*/,
235 WindowPtr /*pWin*/
236);
237
238extern void ilbmRestoreAreas(
239 PixmapPtr /*pPixmap*/,
240 RegionPtr /*prgnRestore*/,
241 int /*xorg*/,
242 int /*yorg*/,
243 WindowPtr /*pWin*/
244);
245/* ilbmclip.c */
246
247extern RegionPtr ilbmPixmapToRegion(
248 PixmapPtr /*pPix*/
249);
250
251/* ilbmcmap.c */
252
253extern Bool ilbmInitializeColormap(
254 ColormapPtr /*pmap*/
255);
256
257extern void ilbmResolveColor(
258 unsigned short * /*pred*/,
259 unsigned short * /*pgreen*/,
260 unsigned short * /*pblue*/,
261 VisualPtr /*pVisual*/
262);
263
264extern Bool ilbmSetVisualTypes(
265 int /*depth*/,
266 int /*visuals*/,
267 int /*bitsPerRGB*/
268);
269
270/* ilbmfillarc.c */
271
272extern void ilbmPolyFillArcSolid(
273 DrawablePtr /*pDraw*/,
274 GCPtr /*pGC*/,
275 int /*narcs*/,
276 xArc * /*parcs*/
277);
278/* ilbmfillrct.c */
279
280extern void ilbmPolyFillRect(
281 DrawablePtr /*pDrawable*/,
282 GCPtr /*pGC*/,
283 int /*nrectFill*/,
284 xRectangle * /*prectInit*/
285);
286
287/* ilbmply1rct.c */
288extern void ilbmFillPolygonSolid(
289 DrawablePtr /*pDrawable*/,
290 GCPtr /*pGC*/,
291 int /*mode*/,
292 int /*shape*/,
293 int /*count*/,
294 DDXPointPtr /*ptsIn*/
295);
296
297/* ilbmfillsp.c */
298
299extern void ilbmSolidFS(
300 DrawablePtr /*pDrawable*/,
301 GCPtr /*pGC*/,
302 int /*nInit*/,
303 DDXPointPtr /*pptInit*/,
304 int * /*pwidthInit*/,
305 int /*fSorted*/
306);
307
308extern void ilbmStippleFS(
309 DrawablePtr /*pDrawable*/,
310 GCPtr/*pGC*/,
311 int /*nInit*/,
312 DDXPointPtr /*pptInit*/,
313 int * /*pwidthInit*/,
314 int /*fSorted*/
315);
316
317extern void ilbmTileFS(
318 DrawablePtr /*pDrawable*/,
319 GCPtr/*pGC*/,
320 int /*nInit*/,
321 DDXPointPtr /*pptInit*/,
322 int * /*pwidthInit*/,
323 int /*fSorted*/
324);
325
326extern void ilbmUnnaturalTileFS(
327 DrawablePtr /*pDrawable*/,
328 GCPtr/*pGC*/,
329 int /*nInit*/,
330 DDXPointPtr /*pptInit*/,
331 int * /*pwidthInit*/,
332 int /*fSorted*/
333);
334
335extern void ilbmUnnaturalStippleFS(
336 DrawablePtr /*pDrawable*/,
337 GCPtr/*pGC*/,
338 int /*nInit*/,
339 DDXPointPtr /*pptInit*/,
340 int * /*pwidthInit*/,
341 int /*fSorted*/
342);
343
344extern void ilbmOpaqueStippleFS(
345 DrawablePtr /*pDrawable*/,
346 GCPtr/*pGC*/,
347 int /*nInit*/,
348 DDXPointPtr /*pptInit*/,
349 int * /*pwidthInit*/,
350 int /*fSorted*/
351);
352
353extern void ilbmUnnaturalOpaqueStippleFS(
354 DrawablePtr /*pDrawable*/,
355 GCPtr/*pGC*/,
356 int /*nInit*/,
357 DDXPointPtr /*pptInit*/,
358 int * /*pwidthInit*/,
359 int /*fSorted*/
360);
361
362/* ilbmfont.c */
363
364extern Bool ilbmRealizeFont(
365 ScreenPtr /*pscr*/,
366 FontPtr /*pFont*/
367);
368
369extern Bool ilbmUnrealizeFont(
370 ScreenPtr /*pscr*/,
371 FontPtr /*pFont*/
372);
373/* ilbmgc.c */
374
375extern Bool ilbmCreateGC(
376 GCPtr /*pGC*/
377);
378
379extern void ilbmValidateGC(
380 GCPtr /*pGC*/,
381 unsigned long /*changes*/,
382 DrawablePtr /*pDrawable*/
383);
384
385extern void ilbmDestroyGC(
386 GCPtr /*pGC*/
387);
388
389extern void ilbmReduceRop(
390 int /*alu*/,
391 Pixel /*src*/,
392 unsigned long /*planemask*/,
393 int /*depth*/,
394 unsigned char * /*rrops*/
395);
396
397extern void ilbmReduceOpaqueStipple (
398 Pixel /*fg*/,
399 Pixel /*bg*/,
400 unsigned long /*planemask*/,
401 int /*depth*/,
402 unsigned char * /*rrops*/
403);
404
405extern void ilbmComputeCompositeClip(
406 GCPtr /*pGC*/,
407 DrawablePtr /*pDrawable*/
408);
409
410/* ilbmgetsp.c */
411
412extern void ilbmGetSpans(
413 DrawablePtr /*pDrawable*/,
414 int /*wMax*/,
415 DDXPointPtr /*ppt*/,
416 int * /*pwidth*/,
417 int /*nspans*/,
418 char * /*pdstStart*/
419);
420/* ilbmhrzvert.c */
421
422extern int ilbmHorzS(
423 PixelType * /*addrl*/,
424 int /*nlwidth*/,
425 int /*sizeDst*/,
426 int /*depthDst*/,
427 int /*x1*/,
428 int /*y1*/,
429 int /*len*/,
430 unsigned char * /*rrops*/
431);
432
433extern int ilbmVertS(
434 PixelType * /*addrl*/,
435 int /*nlwidth*/,
436 int /*sizeDst*/,
437 int /*depthDst*/,
438 int /*x1*/,
439 int /*y1*/,
440 int /*len*/,
441 unsigned char * /*rrops*/
442);
443/* ilbmigbblak.c */
444
445extern void ilbmImageGlyphBlt (
446 DrawablePtr /*pDrawable*/,
447 GCPtr/*pGC*/,
448 int /*x*/,
449 int /*y*/,
450 unsigned int /*nglyph*/,
451 CharInfoPtr * /*ppci*/,
452 pointer /*pglyphBase*/
453);
454/* ilbmigbwht.c */
455
456/* ilbmimage.c */
457
458extern void ilbmPutImage(
459 DrawablePtr /*dst*/,
460 GCPtr /*pGC*/,
461 int /*depth*/,
462 int /*x*/,
463 int /*y*/,
464 int /*w*/,
465 int /*h*/,
466 int /*leftPad*/,
467 int /*format*/,
468 char * /*pImage*/
469);
470
471extern void ilbmGetImage(
472 DrawablePtr /*pDrawable*/,
473 int /*sx*/,
474 int /*sy*/,
475 int /*w*/,
476 int /*h*/,
477 unsigned int /*format*/,
478 unsigned long /*planeMask*/,
479 char * /*pdstLine*/
480);
481/* ilbmline.c */
482
483extern void ilbmLineSS(
484 DrawablePtr /*pDrawable*/,
485 GCPtr /*pGC*/,
486 int /*mode*/,
487 int /*npt*/,
488 DDXPointPtr /*pptInit*/
489);
490
491extern void ilbmLineSD(
492 DrawablePtr /*pDrawable*/,
493 GCPtr /*pGC*/,
494 int /*mode*/,
495 int /*npt*/,
496 DDXPointPtr /*pptInit*/
497);
498
499/* ilbmmisc.c */
500
501extern void ilbmQueryBestSize(
502 int /*class*/,
503 unsigned short * /*pwidth*/,
504 unsigned short * /*pheight*/,
505 ScreenPtr /*pScreen*/
506);
507/* ilbmpntarea.c */
508
509extern void ilbmSolidFillArea(
510 DrawablePtr /*pDraw*/,
511 int /*nbox*/,
512 BoxPtr /*pbox*/,
513 unsigned char * /*rrops*/
514);
515
516extern void ilbmStippleAreaPPW(
517 DrawablePtr /*pDraw*/,
518 int /*nbox*/,
519 BoxPtr /*pbox*/,
520 PixmapPtr /*pstipple*/,
521 unsigned char * /*rrops*/
522);
523extern void ilbmStippleArea(
524 DrawablePtr /*pDraw*/,
525 int /*nbox*/,
526 BoxPtr /*pbox*/,
527 PixmapPtr /*pstipple*/,
528 int /*xOff*/,
529 int /*yOff*/,
530 unsigned char * /*rrops*/
531);
532/* ilbmplygblt.c */
533
534extern void ilbmPolyGlyphBlt(
535 DrawablePtr /*pDrawable*/,
536 GCPtr /*pGC*/,
537 int /*x*/,
538 int /*y*/,
539 unsigned int /*nglyph*/,
540 CharInfoPtr * /*ppci*/,
541 pointer /*pglyphBase*/
542);
543
544/* ilbmpixmap.c */
545
546extern PixmapPtr ilbmCreatePixmap(
547 ScreenPtr /*pScreen*/,
548 int /*width*/,
549 int /*height*/,
550 int /*depth*/
551);
552
553extern Bool ilbmDestroyPixmap(
554 PixmapPtr /*pPixmap*/
555);
556
557extern PixmapPtr ilbmCopyPixmap(
558 PixmapPtr /*pSrc*/
559);
560
561extern void ilbmPadPixmap(
562 PixmapPtr /*pPixmap*/
563);
564
565extern void ilbmXRotatePixmap(
566 PixmapPtr /*pPix*/,
567 int /*rw*/
568);
569
570extern void ilbmYRotatePixmap(
571 PixmapPtr /*pPix*/,
572 int /*rh*/
573);
574
575extern void ilbmCopyRotatePixmap(
576 PixmapPtr /*psrcPix*/,
577 PixmapPtr * /*ppdstPix*/,
578 int /*xrot*/,
579 int /*yrot*/
580);
581extern void ilbmPaintWindow(
582 WindowPtr /*pWin*/,
583 RegionPtr /*pRegion*/,
584 int /*what*/
585);
586/* ilbmpolypnt.c */
587
588extern void ilbmPolyPoint(
589 DrawablePtr /*pDrawable*/,
590 GCPtr /*pGC*/,
591 int /*mode*/,
592 int /*npt*/,
593 xPoint * /*pptInit*/
594);
595/* ilbmpushpxl.c */
596
597extern void ilbmPushPixels(
598 GCPtr /*pGC*/,
599 PixmapPtr /*pBitMap*/,
600 DrawablePtr /*pDrawable*/,
601 int /*dx*/,
602 int /*dy*/,
603 int /*xOrg*/,
604 int /*yOrg*/
605);
606/* ilbmscrclse.c */
607
608extern Bool ilbmCloseScreen(
609 int /*index*/,
610 ScreenPtr /*pScreen*/
611);
612/* ilbmscrinit.c */
613
614extern Bool ilbmAllocatePrivates(
615 ScreenPtr /*pScreen*/,
616 int * /*pWinIndex*/,
617 int * /*pGCIndex*/
618);
619
620extern Bool ilbmScreenInit(
621 ScreenPtr /*pScreen*/,
622 pointer /*pbits*/,
623 int /*xsize*/,
624 int /*ysize*/,
625 int /*dpix*/,
626 int /*dpiy*/,
627 int /*width*/
628);
629
630extern PixmapPtr ilbmGetWindowPixmap(
631 WindowPtr /*pWin*/
632);
633
634extern void ilbmSetWindowPixmap(
635 WindowPtr /*pWin*/,
636 PixmapPtr /*pPix*/
637);
638
639/* ilbmseg.c */
640
641extern void ilbmSegmentSS(
642 DrawablePtr /*pDrawable*/,
643 GCPtr /*pGC*/,
644 int /*nseg*/,
645 xSegment * /*pSeg*/
646);
647
648extern void ilbmSegmentSD(
649 DrawablePtr /*pDrawable*/,
650 GCPtr /*pGC*/,
651 int /*nseg*/,
652 xSegment * /*pSeg*/
653);
654/* ilbmsetsp.c */
655
656extern int ilbmSetScanline(
657 int /*y*/,
658 int /*xOrigin*/,
659 int /*xStart*/,
660 int /*xEnd*/,
661 PixelType * /*psrc*/,
662 int /*alu*/,
663 PixelType * /*pdstBase*/,
664 int /*widthDst*/,
665 int /*sizeDst*/,
666 int /*depthDst*/,
667 int /*sizeSrc*/
668);
669
670extern void ilbmSetSpans(
671 DrawablePtr /*pDrawable*/,
672 GCPtr /*pGC*/,
673 char * /*psrc*/,
674 DDXPointPtr /*ppt*/,
675 int * /*pwidth*/,
676 int /*nspans*/,
677 int /*fSorted*/
678);
679/* ilbmtegblt.c */
680
681extern void ilbmTEGlyphBlt(
682 DrawablePtr /*pDrawable*/,
683 GCPtr/*pGC*/,
684 int /*x*/,
685 int /*y*/,
686 unsigned int /*nglyph*/,
687 CharInfoPtr * /*ppci*/,
688 pointer /*pglyphBase*/
689);
690/* ilbmtileC.c */
691
692extern void ilbmTileAreaPPWCopy(
693 DrawablePtr /*pDraw*/,
694 int /*nbox*/,
695 BoxPtr /*pbox*/,
696 int /*alu*/,
697 PixmapPtr /*ptile*/,
698 unsigned long /*planemask*/
699);
700/* ilbmtileG.c */
701
702extern void ilbmTileAreaPPWGeneral(
703 DrawablePtr /*pDraw*/,
704 int /*nbox*/,
705 BoxPtr /*pbox*/,
706 int /*alu*/,
707 PixmapPtr /*ptile*/,
708 unsigned long /*planemask*/
709);
710
711extern void ilbmTileAreaCopy(
712 DrawablePtr /*pDraw*/,
713 int /*nbox*/,
714 BoxPtr /*pbox*/,
715 int /*alu*/,
716 PixmapPtr /*ptile*/,
717 int /*xOff*/,
718 int /*yOff*/,
719 unsigned long /*planemask*/
720);
721/* ilbmtileG.c */
722
723extern void ilbmTileAreaGeneral(
724 DrawablePtr /*pDraw*/,
725 int /*nbox*/,
726 BoxPtr /*pbox*/,
727 int /*alu*/,
728 PixmapPtr /*ptile*/,
729 int /*xOff*/,
730 int /*yOff*/,
731 unsigned long /*planemask*/
732);
733
734extern void ilbmOpaqueStippleAreaPPWCopy(
735 DrawablePtr /*pDraw*/,
736 int /*nbox*/,
737 BoxPtr /*pbox*/,
738 int /*alu*/,
739 PixmapPtr /*ptile*/,
740 unsigned char */*rropsOS*/,
741 unsigned long /*planemask*/
742);
743/* ilbmtileG.c */
744
745extern void ilbmOpaqueStippleAreaPPWGeneral(
746 DrawablePtr /*pDraw*/,
747 int /*nbox*/,
748 BoxPtr /*pbox*/,
749 int /*alu*/,
750 PixmapPtr /*ptile*/,
751 unsigned char */*rropsOS*/,
752 unsigned long /*planemask*/
753);
754
755extern void ilbmOpaqueStippleAreaCopy(
756 DrawablePtr /*pDraw*/,
757 int /*nbox*/,
758 BoxPtr /*pbox*/,
759 int /*alu*/,
760 PixmapPtr /*ptile*/,
761 int /*xOff*/,
762 int /*yOff*/,
763 unsigned char */*rropsOS*/,
764 unsigned long /*planemask*/
765);
766/* ilbmtileG.c */
767
768extern void ilbmOpaqueStippleAreaGeneral(
769 DrawablePtr /*pDraw*/,
770 int /*nbox*/,
771 BoxPtr /*pbox*/,
772 int /*alu*/,
773 PixmapPtr /*ptile*/,
774 int /*xOff*/,
775 int /*yOff*/,
776 unsigned char */*rropsOS*/,
777 unsigned long /*planemask*/
778);
779
780/* ilbmwindow.c */
781
782extern Bool ilbmCreateWindow(
783 WindowPtr /*pWin*/
784);
785
786extern Bool ilbmDestroyWindow(
787 WindowPtr /*pWin*/
788);
789
790extern Bool ilbmMapWindow(
791 WindowPtr /*pWindow*/
792);
793
794extern Bool ilbmPositionWindow(
795 WindowPtr /*pWin*/,
796 int /*x*/,
797 int /*y*/
798);
799
800extern Bool ilbmUnmapWindow(
801 WindowPtr /*pWindow*/
802);
803
804extern void ilbmCopyWindow(
805 WindowPtr /*pWin*/,
806 DDXPointRec /*ptOldOrg*/,
807 RegionPtr /*prgnSrc*/
808);
809
810extern Bool ilbmChangeWindowAttributes(
811 WindowPtr /*pWin*/,
812 unsigned long /*mask*/
813);
814/* ilbmzerarc.c */
815
816extern void ilbmZeroPolyArcSS(
817 DrawablePtr /*pDraw*/,
818 GCPtr /*pGC*/,
819 int /*narcs*/,
820 xArc * /*parcs*/
821);
822
823/*
824 private field of pixmap
825 pixmap.devPrivate = (PixelType *)pointer_to_bits
826 pixmap.devKind = width_of_pixmap_in_bytes
827
828 private field of screen
829 a pixmap, for which we allocate storage. devPrivate is a pointer to
830the bits in the hardware framebuffer. note that devKind can be poked to
831make the code work for framebuffers that are wider than their
832displayable screen (e.g. the early vsII, which displayed 960 pixels
833across, but was 1024 in the hardware.)
834
835 private field of GC
836*/
837
838typedef struct {
839 unsigned char rrops[AFB_MAX_DEPTH]; /* reduction of rasterop to 1 of 3 */
840 unsigned char rropOS[AFB_MAX_DEPTH]; /* rop for opaque stipple */
841} ilbmPrivGC;
842typedef ilbmPrivGC *ilbmPrivGCPtr;
843
844extern int ilbmGCPrivateIndex; /* index into GC private array */
845extern int ilbmWindowPrivateIndex; /* index into Window private array */
846#ifdef PIXMAP_PER_WINDOW
847extern int frameWindowPrivateIndex; /* index into Window private array */
848#endif
849
850#define ilbmGetGCPrivate(pGC) \
851 ((ilbmPrivGC *)((pGC)->devPrivates[ilbmGCPrivateIndex].ptr))
852
853/* private field of window */
854typedef struct {
855 unsigned char fastBorder; /* non-zero if border tile is 32 bits wide */
856 unsigned char fastBackground;
857 unsigned short unused; /* pad for alignment with Sun compiler */
858 DDXPointRec oldRotate;
859 PixmapPtr pRotatedBackground;
860 PixmapPtr pRotatedBorder;
861} ilbmPrivWin;
862
863/* Common macros for extracting drawing information */
864
865#define ilbmGetPixelWidthAuxDepthAndPointer(pDrawable, width, aux, dep, pointer) {\
866 PixmapPtr _pPix; \
867 if ((pDrawable)->type == DRAWABLE_WINDOW) \
868 _pPix = (PixmapPtr)(pDrawable)->pScreen->devPrivates[ilbmScreenPrivateIndex].ptr; \
869 else \
870 _pPix = (PixmapPtr)(pDrawable); \
871 (pointer) = (PixelType *)_pPix->devPrivate.ptr; \
872 (width) = ((int)_pPix->devKind)/sizeof(PixelType); \
873 (dep) = _pPix->drawable.depth; \
874 (aux) = (width)*(dep); \
875}
876
877/* ilbm uses the following macros to calculate addresses in drawables.
878 * To support banked framebuffers, the macros come in four flavors.
879 * All four collapse into the same definition on unbanked devices.
880 *
881 * ilbmScanlineFoo - calculate address and do bank switching
882 * ilbmScanlineFooNoBankSwitch - calculate address, don't bank switch
883 * ilbmScanlineFooSrc - calculate address, switch source bank
884 * ilbmScanlineFooDst - calculate address, switch destination bank
885 */
886
887/* The NoBankSwitch versions are the same for banked and unbanked cases */
888
889#define ilbmScanlineIncNoBankSwitch(_ptr, _off) _ptr += (_off)
890#define ilbmScanlineOffsetNoBankSwitch(_ptr, _off) ((_ptr)+(_off))
891#define ilbmScanlineDeltaNoBankSwitch(_ptr, _y, _w) \
892 ilbmScanlineOffsetNoBankSwitch(_ptr, (_y)*(_w))
893#define ilbmScanlineNoBankSwitch(_ptr, _x, _y, _w) \
894 ilbmScanlineOffsetNoBankSwitch(_ptr, (_y)*(_w)+((_x)>>MFB_PWSH))
895
896#ifdef MFB_LINE_BANK
897
898#include "ilbmlinebank.h" /* get macro definitions from this file */
899
900#else /* !MFB_LINE_BANK - unbanked case */
901
902#define ilbmScanlineInc(_ptr, _off) ilbmScanlineIncNoBankSwitch(_ptr, _off)
903#define ilbmScanlineIncSrc(_ptr, _off) ilbmScanlineInc(_ptr, _off)
904#define ilbmScanlineIncDst(_ptr, _off) ilbmScanlineInc(_ptr, _off)
905
906#define ilbmScanlineOffset(_ptr, _off) ilbmScanlineOffsetNoBankSwitch(_ptr, _off)
907#define ilbmScanlineOffsetSrc(_ptr, _off) ilbmScanlineOffset(_ptr, _off)
908#define ilbmScanlineOffsetDst(_ptr, _off) ilbmScanlineOffset(_ptr, _off)
909
910#define ilbmScanlineSrc(_ptr, _x, _y, _w) ilbmScanline(_ptr, _x, _y, _w)
911#define ilbmScanlineDst(_ptr, _x, _y, _w) ilbmScanline(_ptr, _x, _y, _w)
912
913#define ilbmScanlineDeltaSrc(_ptr, _y, _w) ilbmScanlineDelta(_ptr, _y, _w)
914#define ilbmScanlineDeltaDst(_ptr, _y, _w) ilbmScanlineDelta(_ptr, _y, _w)
915
916#endif /* MFB_LINE_BANK */
917
918#define ilbmScanlineDelta(_ptr, _y, _w) \
919 ilbmScanlineOffset(_ptr, (_y)*(_w))
920
921#define ilbmScanline(_ptr, _x, _y, _w) \
922 ilbmScanlineOffset(_ptr, (_y)*(_w)+((_x)>>MFB_PWSH))
923
924/* precomputed information about each glyph for GlyphBlt code.
925 this saves recalculating the per glyph information for each box.
926*/
927
928typedef struct _ilbmpos{
929 int xpos; /* xposition of glyph's origin */
930 int xchar; /* x position mod 32 */
931 int leftEdge;
932 int rightEdge;
933 int topEdge;
934 int bottomEdge;
935 PixelType *pdstBase; /* longword with character origin */
936 int widthGlyph; /* width in bytes of this glyph */
937} ilbmTEXTPOS;
938
939/* reduced raster ops for ilbm */
940#define RROP_BLACK GXclear
941#define RROP_WHITE GXset
942#define RROP_NOP GXnoop
943#define RROP_INVERT GXinvert
944#define RROP_COPY GXcopy
945
946/* macros for ilbmbitblt.c, ilbmfillsp.c
947 these let the code do one switch on the rop per call, rather
948 than a switch on the rop per item (span or rectangle.)
949*/
950
951#define fnCLEAR(src, dst) (0)
952#define fnAND(src, dst) (src & dst)
953#define fnANDREVERSE(src, dst) (src & ~dst)
954#define fnCOPY(src, dst) (src)
955#define fnANDINVERTED(src, dst) (~src & dst)
956#define fnNOOP(src, dst) (dst)
957#define fnXOR(src, dst) (src ^ dst)
958#define fnOR(src, dst) (src | dst)
959#define fnNOR(src, dst) (~(src | dst))
960#define fnEQUIV(src, dst) (~src ^ dst)
961#define fnINVERT(src, dst) (~dst)
962#define fnORREVERSE(src, dst) (src | ~dst)
963#define fnCOPYINVERTED(src, dst) (~src)
964#define fnORINVERTED(src, dst) (~src | dst)
965#define fnNAND(src, dst) (~(src & dst))
966#define fnSET(src, dst) (~0)
967
968/* Using a "switch" statement is much faster in most cases
969 * since the compiler can do a look-up table or multi-way branch
970 * instruction, depending on the architecture. The result on
971 * A Sun 3/50 is at least 2.5 times faster, assuming a uniform
972 * distribution of RasterOp operation types.
973 *
974 * However, doing some profiling on a running system reveals
975 * GXcopy is the operation over 99.5% of the time and
976 * GXxor is the next most frequent (about .4%), so we make special
977 * checks for those first.
978 *
979 * Note that this requires a change to the "calling sequence"
980 * since we can't engineer a "switch" statement to have an lvalue.
981 */
982#define DoRop(result, alu, src, dst) \
983{ \
984 if (alu == GXcopy) \
985 result = fnCOPY (src, dst); \
986 else if (alu == GXxor) \
987 result = fnXOR (src, dst); \
988 else \
989 switch (alu) { \
990 case GXclear: \
991 result = fnCLEAR (src, dst); \
992 break; \
993 case GXand: \
994 result = fnAND (src, dst); \
995 break; \
996 case GXandReverse: \
997 result = fnANDREVERSE (src, dst); \
998 break; \
999 case GXandInverted: \
1000 result = fnANDINVERTED (src, dst); \
1001 break; \
1002 case GXnoop: \
1003 result = fnNOOP (src, dst); \
1004 break; \
1005 case GXor: \
1006 result = fnOR (src, dst); \
1007 break; \
1008 case GXnor: \
1009 result = fnNOR (src, dst); \
1010 break; \
1011 case GXequiv: \
1012 result = fnEQUIV (src, dst); \
1013 break; \
1014 case GXinvert: \
1015 result = fnINVERT (src, dst); \
1016 break; \
1017 case GXorReverse: \
1018 result = fnORREVERSE (src, dst); \
1019 break; \
1020 case GXcopyInverted: \
1021 result = fnCOPYINVERTED (src, dst); \
1022 break; \
1023 case GXorInverted: \
1024 result = fnORINVERTED (src, dst); \
1025 break; \
1026 case GXnand: \
1027 result = fnNAND (src, dst); \
1028 break; \
1029 case GXset: \
1030 result = fnSET (src, dst); \
1031 break; \
1032 } \
1033}
1034
1035
1036/* C expression fragments for various operations. These get passed in
1037 * as -D's on the compile command line. See ilbm/Imakefile. This
1038 * fixes XBUG 6319.
1039 *
1040 * This seems like a good place to point out that ilbm's use of the
1041 * words black and white is an unfortunate misnomer. In ilbm code, black
1042 * means zero, and white means one.
1043 */
1044#define MFB_OPEQ_WHITE |=
1045#define MFB_OPEQ_BLACK &=~
1046#define MFB_OPEQ_INVERT ^=
1047#define MFB_EQWHOLEWORD_WHITE =~0
1048#define MFB_EQWHOLEWORD_BLACK =0
1049#define MFB_EQWHOLEWORD_INVERT ^=~0
1050#define MFB_OP_WHITE /* nothing */
1051#define MFB_OP_BLACK ~
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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