VirtualBox

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

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

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

  • 屬性 svn:eol-style 設為 native
檔案大小: 26.2 KB
 
1/* $XFree86: xc/programs/Xserver/iplan2p4/ipl.h,v 3.5 2001/01/30 22:06:21 tsi Exp $ */
2/* $XConsortium: ipl.h,v 5.37 94/04/17 20:28:38 dpw Exp $ */
3/************************************************************
4Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
5
6 All Rights Reserved
7
8Permission to use, copy, modify, and distribute this
9software and its documentation for any purpose and without
10fee is hereby granted, provided that the above copyright no-
11tice appear in all copies and that both that copyright no-
12tice and this permission notice appear in supporting docu-
13mentation, and that the names of Sun or X Consortium
14not be used in advertising or publicity pertaining to
15distribution of the software without specific prior
16written permission. Sun and X Consortium make no
17representations about the suitability of this software for
18any purpose. It is provided "as is" without any express or
19implied warranty.
20
21SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
22INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
23NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE LI-
24ABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
25ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
26PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
27OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
28THE USE OR PERFORMANCE OF THIS SOFTWARE.
29
30********************************************************/
31
32/* Modified nov 94 by Martin Schaller ([email protected]) for use with
33interleaved planes */
34
35#ifdef HAVE_DIX_CONFIG_H
36#include <dix-config.h>
37#endif
38
39#include <X11/X.h>
40#include "pixmap.h"
41#include "region.h"
42#include "gc.h"
43#include "colormap.h"
44#include "miscstruct.h"
45#include "servermd.h"
46#include "windowstr.h"
47#include "mfb.h"
48#undef PixelType
49
50#include "iplmap.h"
51
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 iplGCPrivateIndex;
59extern int iplWindowPrivateIndex;
60
61/* private field of GC */
62typedef struct {
63 unsigned char rop; /* special case rop values */
64 /* next two values unused in ipl, included for compatibility with mfb */
65 unsigned char ropOpStip; /* rop for opaque stipple */
66 /* this value is ropFillArea in mfb, usurped for ipl */
67 unsigned char oneRect; /* drawable has one clip rect */
68 unsigned long xor, and; /* reduced rop values */
69 unsigned short xorg[INTER_PLANES],andg[INTER_PLANES];
70 } iplPrivGC;
71
72typedef iplPrivGC *iplPrivGCPtr;
73
74#define iplGetGCPrivate(pGC) ((iplPrivGCPtr)\
75 (pGC)->devPrivates[iplGCPrivateIndex].ptr)
76
77#define iplGetCompositeClip(pGC) ((pGC)->pCompositeClip)
78
79/* way to carry RROP info around */
80typedef struct {
81 unsigned char rop;
82 unsigned long xor, and;
83 unsigned short xorg[INTER_PLANES],andg[INTER_PLANES];
84} iplRRopRec, *iplRRopPtr;
85
86/* private field of window */
87typedef struct {
88 unsigned char fastBorder; /* non-zero if border is 32 bits wide */
89 unsigned char fastBackground;
90 unsigned short unused; /* pad for alignment with Sun compiler */
91 DDXPointRec oldRotate;
92 PixmapPtr pRotatedBackground;
93 PixmapPtr pRotatedBorder;
94 } iplPrivWin;
95
96#define iplGetWindowPrivate(_pWin) ((iplPrivWin *)\
97 (_pWin)->devPrivates[iplWindowPrivateIndex].ptr)
98
99
100/* ipl8bit.c */
101
102extern int iplSetStipple(
103 int /*alu*/,
104 unsigned long /*fg*/,
105 unsigned long /*planemask*/
106);
107
108extern int iplSetOpaqueStipple(
109 int /*alu*/,
110 unsigned long /*fg*/,
111 unsigned long /*bg*/,
112 unsigned long /*planemask*/
113);
114
115extern int iplComputeClipMasks32(
116 BoxPtr /*pBox*/,
117 int /*numRects*/,
118 int /*x*/,
119 int /*y*/,
120 int /*w*/,
121 int /*h*/,
122 CARD32 * /*clips*/
123);
124/* ipl8cppl.c */
125
126extern void iplCopyImagePlane(
127 DrawablePtr /*pSrcDrawable*/,
128 DrawablePtr /*pDstDrawable*/,
129 int /*rop*/,
130 RegionPtr /*prgnDst*/,
131 DDXPointPtr /*pptSrc*/,
132 unsigned long /*planemask*/
133);
134
135extern void iplCopyPlane8to1(
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/* ipl8lineCO.c */
145
146extern int ipl8LineSS1RectCopy(
147 DrawablePtr /*pDrawable*/,
148 GCPtr /*pGC*/,
149 int /*mode*/,
150 int /*npt*/,
151 DDXPointPtr /*pptInit*/,
152 DDXPointPtr /*pptInitOrig*/,
153 int * /*x1p*/,
154 int * /*y1p*/,
155 int * /*x2p*/,
156 int * /*y2p*/
157);
158
159extern void ipl8LineSS1Rect(
160 DrawablePtr /*pDrawable*/,
161 GCPtr /*pGC*/,
162 int /*mode*/,
163 int /*npt*/,
164 DDXPointPtr /*pptInit*/
165);
166
167extern void ipl8ClippedLineCopy(
168 DrawablePtr /*pDrawable*/,
169 GCPtr /*pGC*/,
170 int /*x1*/,
171 int /*y1*/,
172 int /*x2*/,
173 int /*y2*/,
174 BoxPtr /*boxp*/,
175 Bool /*shorten*/
176);
177/* ipl8lineCP.c */
178
179extern int ipl8LineSS1RectPreviousCopy(
180 DrawablePtr /*pDrawable*/,
181 GCPtr /*pGC*/,
182 int /*mode*/,
183 int /*npt*/,
184 DDXPointPtr /*pptInit*/,
185 DDXPointPtr /*pptInitOrig*/,
186 int * /*x1p*/,
187 int * /*y1p*/,
188 int * /*x2p*/,
189 int * /*y2p*/
190);
191/* ipl8lineG.c */
192
193extern int ipl8LineSS1RectGeneral(
194 DrawablePtr /*pDrawable*/,
195 GCPtr /*pGC*/,
196 int /*mode*/,
197 int /*npt*/,
198 DDXPointPtr /*pptInit*/,
199 DDXPointPtr /*pptInitOrig*/,
200 int * /*x1p*/,
201 int * /*y1p*/,
202 int * /*x2p*/,
203 int * /*y2p*/
204);
205
206extern void ipl8ClippedLineGeneral(
207 DrawablePtr /*pDrawable*/,
208 GCPtr /*pGC*/,
209 int /*x1*/,
210 int /*y1*/,
211 int /*x2*/,
212 int /*y2*/,
213 BoxPtr /*boxp*/,
214 Bool /*shorten*/
215);
216/* ipl8lineX.c */
217
218extern int ipl8LineSS1RectXor(
219 DrawablePtr /*pDrawable*/,
220 GCPtr /*pGC*/,
221 int /*mode*/,
222 int /*npt*/,
223 DDXPointPtr /*pptInit*/,
224 DDXPointPtr /*pptInitOrig*/,
225 int * /*x1p*/,
226 int * /*y1p*/,
227 int * /*x2p*/,
228 int * /*y2p*/
229);
230
231extern void ipl8ClippedLineXor(
232 DrawablePtr /*pDrawable*/,
233 GCPtr /*pGC*/,
234 int /*x1*/,
235 int /*y1*/,
236 int /*x2*/,
237 int /*y2*/,
238 BoxPtr /*boxp*/,
239 Bool /*shorten*/
240);
241/* ipl8segC.c */
242
243extern int ipl8SegmentSS1RectCopy(
244 DrawablePtr /*pDrawable*/,
245 GCPtr /*pGC*/,
246 int /*nseg*/,
247 xSegment * /*pSegInit*/
248);
249/* ipl8segCS.c */
250
251extern int ipl8SegmentSS1RectShiftCopy(
252 DrawablePtr /*pDrawable*/,
253 GCPtr /*pGC*/,
254 int /*nseg*/,
255 xSegment * /*pSegInit*/
256);
257
258extern void ipl8SegmentSS1Rect(
259 DrawablePtr /*pDrawable*/,
260 GCPtr /*pGC*/,
261 int /*nseg*/,
262 xSegment * /*pSegInit*/
263);
264/* ipl8segG.c */
265
266extern int ipl8SegmentSS1RectGeneral(
267 DrawablePtr /*pDrawable*/,
268 GCPtr /*pGC*/,
269 int /*nseg*/,
270 xSegment * /*pSegInit*/
271);
272/* iplsegX.c */
273
274extern int ipl8SegmentSS1RectXor(
275 DrawablePtr /*pDrawable*/,
276 GCPtr /*pGC*/,
277 int /*nseg*/,
278 xSegment * /*pSegInit*/
279);
280/* iplallpriv.c */
281
282extern Bool iplAllocatePrivates(
283 ScreenPtr /*pScreen*/,
284 int * /*window_index*/,
285 int * /*gc_index*/
286);
287/* iplbitblt.c */
288
289extern RegionPtr iplBitBlt(
290 DrawablePtr /*pSrcDrawable*/,
291 DrawablePtr /*pDstDrawable*/,
292 GCPtr/*pGC*/,
293 int /*srcx*/,
294 int /*srcy*/,
295 int /*width*/,
296 int /*height*/,
297 int /*dstx*/,
298 int /*dsty*/,
299 void (* /*doBitBlt*/)(),
300 unsigned long /*bitPlane*/
301);
302
303extern void iplDoBitblt(
304 DrawablePtr /*pSrc*/,
305 DrawablePtr /*pDst*/,
306 int /*alu*/,
307 RegionPtr /*prgnDst*/,
308 DDXPointPtr /*pptSrc*/,
309 unsigned long /*planemask*/
310);
311
312extern RegionPtr iplCopyArea(
313 DrawablePtr /*pSrcDrawable*/,
314 DrawablePtr /*pDstDrawable*/,
315 GCPtr/*pGC*/,
316 int /*srcx*/,
317 int /*srcy*/,
318 int /*width*/,
319 int /*height*/,
320 int /*dstx*/,
321 int /*dsty*/
322);
323
324extern void iplCopyPlane1to8(
325 DrawablePtr /*pSrcDrawable*/,
326 DrawablePtr /*pDstDrawable*/,
327 int /*rop*/,
328 RegionPtr /*prgnDst*/,
329 DDXPointPtr /*pptSrc*/,
330 unsigned long /*planemask*/,
331 unsigned long /*bitPlane*/
332);
333
334extern RegionPtr iplCopyPlane(
335 DrawablePtr /*pSrcDrawable*/,
336 DrawablePtr /*pDstDrawable*/,
337 GCPtr /*pGC*/,
338 int /*srcx*/,
339 int /*srcy*/,
340 int /*width*/,
341 int /*height*/,
342 int /*dstx*/,
343 int /*dsty*/,
344 unsigned long /*bitPlane*/
345);
346/* iplbltC.c */
347
348extern void iplDoBitbltCopy(
349 DrawablePtr /*pSrc*/,
350 DrawablePtr /*pDst*/,
351 int /*alu*/,
352 RegionPtr /*prgnDst*/,
353 DDXPointPtr /*pptSrc*/,
354 unsigned long /*planemask*/
355);
356/* iplbltG.c */
357
358extern void iplDoBitbltGeneral(
359 DrawablePtr /*pSrc*/,
360 DrawablePtr /*pDst*/,
361 int /*alu*/,
362 RegionPtr /*prgnDst*/,
363 DDXPointPtr /*pptSrc*/,
364 unsigned long /*planemask*/
365);
366/* iplbltO.c */
367
368extern void iplDoBitbltOr(
369 DrawablePtr /*pSrc*/,
370 DrawablePtr /*pDst*/,
371 int /*alu*/,
372 RegionPtr /*prgnDst*/,
373 DDXPointPtr /*pptSrc*/,
374 unsigned long /*planemask*/
375);
376/* iplbltX.c */
377
378extern void iplDoBitbltXor(
379 DrawablePtr /*pSrc*/,
380 DrawablePtr /*pDst*/,
381 int /*alu*/,
382 RegionPtr /*prgnDst*/,
383 DDXPointPtr /*pptSrc*/,
384 unsigned long /*planemask*/
385);
386/* iplbres.c */
387
388extern void iplBresS(
389 int /*rop*/,
390 unsigned short * /*and*/,
391 unsigned short * /*xor*/,
392 unsigned short * /*addrl*/,
393 int /*nlwidth*/,
394 int /*signdx*/,
395 int /*signdy*/,
396 int /*axis*/,
397 int /*x1*/,
398 int /*y1*/,
399 int /*e*/,
400 int /*e1*/,
401 int /*e2*/,
402 int /*len*/
403);
404/* iplbresd.c */
405
406extern void iplBresD(
407 iplRRopPtr /*rrops*/,
408 int * /*pdashIndex*/,
409 unsigned char * /*pDash*/,
410 int /*numInDashList*/,
411 int * /*pdashOffset*/,
412 int /*isDoubleDash*/,
413 unsigned short * /*addrl*/,
414 int /*nlwidth*/,
415 int /*signdx*/,
416 int /*signdy*/,
417 int /*axis*/,
418 int /*x1*/,
419 int /*y1*/,
420 int /*e*/,
421 int /*e1*/,
422 int /*e2*/,
423 int /*len*/
424);
425/* iplbstore.c */
426
427extern void iplSaveAreas(
428 PixmapPtr /*pPixmap*/,
429 RegionPtr /*prgnSave*/,
430 int /*xorg*/,
431 int /*yorg*/,
432 WindowPtr /*pWin*/
433);
434
435extern void iplRestoreAreas(
436 PixmapPtr /*pPixmap*/,
437 RegionPtr /*prgnRestore*/,
438 int /*xorg*/,
439 int /*yorg*/,
440 WindowPtr /*pWin*/
441);
442/* iplcmap.c */
443
444extern int iplListInstalledColormaps(
445 ScreenPtr /*pScreen*/,
446 Colormap * /*pmaps*/
447);
448
449extern void iplInstallColormap(
450 ColormapPtr /*pmap*/
451);
452
453extern void iplUninstallColormap(
454 ColormapPtr /*pmap*/
455);
456
457extern void iplResolveColor(
458 unsigned short * /*pred*/,
459 unsigned short * /*pgreen*/,
460 unsigned short * /*pblue*/,
461 VisualPtr /*pVisual*/
462);
463
464extern Bool iplInitializeColormap(
465 ColormapPtr /*pmap*/
466);
467
468extern int iplExpandDirectColors(
469 ColormapPtr /*pmap*/,
470 int /*ndef*/,
471 xColorItem * /*indefs*/,
472 xColorItem * /*outdefs*/
473);
474
475extern Bool iplCreateDefColormap(
476 ScreenPtr /*pScreen*/
477);
478
479extern Bool iplSetVisualTypes(
480 int /*depth*/,
481 int /*visuals*/,
482 int /*bitsPerRGB*/
483);
484
485extern Bool iplInitVisuals(
486 VisualPtr * /*visualp*/,
487 DepthPtr * /*depthp*/,
488 int * /*nvisualp*/,
489 int * /*ndepthp*/,
490 int * /*rootDepthp*/,
491 VisualID * /*defaultVisp*/,
492 unsigned long /*sizes*/,
493 int /*bitsPerRGB*/
494);
495/* iplfillarcC.c */
496
497extern void iplPolyFillArcSolidCopy(
498 DrawablePtr /*pDraw*/,
499 GCPtr /*pGC*/,
500 int /*narcs*/,
501 xArc * /*parcs*/
502);
503/* iplfillarcG.c */
504
505extern void iplPolyFillArcSolidGeneral(
506 DrawablePtr /*pDraw*/,
507 GCPtr /*pGC*/,
508 int /*narcs*/,
509 xArc * /*parcs*/
510);
511/* iplfillrct.c */
512
513extern void iplFillBoxTileOdd(
514 DrawablePtr /*pDrawable*/,
515 int /*n*/,
516 BoxPtr /*rects*/,
517 PixmapPtr /*tile*/,
518 int /*xrot*/,
519 int /*yrot*/
520);
521
522extern void iplFillRectTileOdd(
523 DrawablePtr /*pDrawable*/,
524 GCPtr /*pGC*/,
525 int /*nBox*/,
526 BoxPtr /*pBox*/
527);
528
529extern void iplPolyFillRect(
530 DrawablePtr /*pDrawable*/,
531 GCPtr /*pGC*/,
532 int /*nrectFill*/,
533 xRectangle * /*prectInit*/
534);
535/* iplfillsp.c */
536
537extern void iplUnnaturalTileFS(
538 DrawablePtr /*pDrawable*/,
539 GCPtr/*pGC*/,
540 int /*nInit*/,
541 DDXPointPtr /*pptInit*/,
542 int * /*pwidthInit*/,
543 int /*fSorted*/
544);
545
546extern void iplUnnaturalStippleFS(
547 DrawablePtr /*pDrawable*/,
548 GCPtr/*pGC*/,
549 int /*nInit*/,
550 DDXPointPtr /*pptInit*/,
551 int * /*pwidthInit*/,
552 int /*fSorted*/
553);
554
555extern void ipl8Stipple32FS(
556 DrawablePtr /*pDrawable*/,
557 GCPtr /*pGC*/,
558 int /*nInit*/,
559 DDXPointPtr /*pptInit*/,
560 int * /*pwidthInit*/,
561 int /*fSorted*/
562);
563
564extern void ipl8OpaqueStipple32FS(
565 DrawablePtr /*pDrawable*/,
566 GCPtr /*pGC*/,
567 int /*nInit*/,
568 DDXPointPtr /*pptInit*/,
569 int * /*pwidthInit*/,
570 int /*fSorted*/
571);
572/* iplgc.c */
573
574extern GCOpsPtr iplMatchCommon(
575 GCPtr /*pGC*/,
576 iplPrivGCPtr /*devPriv*/
577);
578
579extern Bool iplCreateGC(
580 GCPtr /*pGC*/
581);
582
583extern void iplValidateGC(
584 GCPtr /*pGC*/,
585 unsigned long /*changes*/,
586 DrawablePtr /*pDrawable*/
587);
588
589/* iplgetsp.c */
590
591extern void iplGetSpans(
592 DrawablePtr /*pDrawable*/,
593 int /*wMax*/,
594 DDXPointPtr /*ppt*/,
595 int * /*pwidth*/,
596 int /*nspans*/,
597 char * /*pdstStart*/
598);
599/* iplglblt8.c */
600
601extern void iplPolyGlyphBlt8(
602 DrawablePtr /*pDrawable*/,
603 GCPtr /*pGC*/,
604 int /*x*/,
605 int /*y*/,
606 unsigned int /*nglyph*/,
607 CharInfoPtr * /*ppci*/,
608 pointer /*pglyphBase*/
609);
610/* iplglrop8.c */
611
612extern void iplPolyGlyphRop8(
613 DrawablePtr /*pDrawable*/,
614 GCPtr /*pGC*/,
615 int /*x*/,
616 int /*y*/,
617 unsigned int /*nglyph*/,
618 CharInfoPtr * /*ppci*/,
619 pointer /*pglyphBase*/
620);
621/* iplhrzvert.c */
622
623extern int iplHorzS(
624 int /*rop*/,
625 unsigned short * /*and*/,
626 unsigned short * /*xor*/,
627 unsigned short * /*addrg*/,
628 int /*nlwidth*/,
629 int /*x1*/,
630 int /*y1*/,
631 int /*len*/
632);
633
634extern int iplVertS(
635 int /*rop*/,
636 unsigned short * /*and*/,
637 unsigned short * /*xor*/,
638 unsigned short * /*addrg*/,
639 int /*nlwidth*/,
640 int /*x1*/,
641 int /*y1*/,
642 int /*len*/
643);
644/* ipligblt8.c */
645
646extern void iplImageGlyphBlt8(
647 DrawablePtr /*pDrawable*/,
648 GCPtr /*pGC*/,
649 int /*x*/,
650 int /*y*/,
651 unsigned int /*nglyph*/,
652 CharInfoPtr * /*ppci*/,
653 pointer /*pglyphBase*/
654);
655/* iplimage.c */
656
657extern void iplPutImage(
658 DrawablePtr /*pDraw*/,
659 GCPtr /*pGC*/,
660 int /*depth*/,
661 int /*x*/,
662 int /*y*/,
663 int /*w*/,
664 int /*h*/,
665 int /*leftPad*/,
666 int /*format*/,
667 char * /*pImage*/
668);
669
670extern void iplGetImage(
671 DrawablePtr /*pDrawable*/,
672 int /*sx*/,
673 int /*sy*/,
674 int /*w*/,
675 int /*h*/,
676 unsigned int /*format*/,
677 unsigned long /*planeMask*/,
678 char * /*pdstLine*/
679);
680/* iplline.c */
681
682extern void iplLineSS(
683 DrawablePtr /*pDrawable*/,
684 GCPtr /*pGC*/,
685 int /*mode*/,
686 int /*npt*/,
687 DDXPointPtr /*pptInit*/
688);
689
690extern void iplLineSD(
691 DrawablePtr /*pDrawable*/,
692 GCPtr /*pGC*/,
693 int /*mode*/,
694 int /*npt*/,
695 DDXPointPtr /*pptInit*/
696);
697/* iplmskbits.c */
698/* iplpixmap.c */
699
700extern PixmapPtr iplCreatePixmap(
701 ScreenPtr /*pScreen*/,
702 int /*width*/,
703 int /*height*/,
704 int /*depth*/
705);
706
707extern Bool iplDestroyPixmap(
708 PixmapPtr /*pPixmap*/
709);
710
711extern PixmapPtr iplCopyPixmap(
712 PixmapPtr /*pSrc*/
713);
714
715extern void iplPadPixmap(
716 PixmapPtr /*pPixmap*/
717);
718
719extern void iplXRotatePixmap(
720 PixmapPtr /*pPix*/,
721 int /*rw*/
722);
723
724extern void iplYRotatePixmap(
725 PixmapPtr /*pPix*/,
726 int /*rh*/
727);
728
729extern void iplCopyRotatePixmap(
730 PixmapPtr /*psrcPix*/,
731 PixmapPtr * /*ppdstPix*/,
732 int /*xrot*/,
733 int /*yrot*/
734);
735/* iplply1rctC.c */
736
737extern void iplFillPoly1RectCopy(
738 DrawablePtr /*pDrawable*/,
739 GCPtr /*pGC*/,
740 int /*shape*/,
741 int /*mode*/,
742 int /*count*/,
743 DDXPointPtr /*ptsIn*/
744);
745/* iplply1rctG.c */
746
747extern void iplFillPoly1RectGeneral(
748 DrawablePtr /*pDrawable*/,
749 GCPtr /*pGC*/,
750 int /*shape*/,
751 int /*mode*/,
752 int /*count*/,
753 DDXPointPtr /*ptsIn*/
754);
755/* iplpntwin.c */
756
757extern void iplPaintWindow(
758 WindowPtr /*pWin*/,
759 RegionPtr /*pRegion*/,
760 int /*what*/
761);
762
763extern void iplFillBoxSolid(
764 DrawablePtr /*pDrawable*/,
765 int /*nBox*/,
766 BoxPtr /*pBox*/,
767 unsigned long /*pixel*/
768);
769
770extern void iplFillBoxTile32(
771 DrawablePtr /*pDrawable*/,
772 int /*nBox*/,
773 BoxPtr /*pBox*/,
774 PixmapPtr /*tile*/
775);
776/* iplpolypnt.c */
777
778extern void iplPolyPoint(
779 DrawablePtr /*pDrawable*/,
780 GCPtr /*pGC*/,
781 int /*mode*/,
782 int /*npt*/,
783 xPoint * /*pptInit*/
784);
785/* iplpush8.c */
786
787extern void iplPushPixels8(
788 GCPtr /*pGC*/,
789 PixmapPtr /*pBitmap*/,
790 DrawablePtr /*pDrawable*/,
791 int /*dx*/,
792 int /*dy*/,
793 int /*xOrg*/,
794 int /*yOrg*/
795);
796/* iplrctstp8.c */
797
798extern void ipl8FillRectOpaqueStippled32(
799 DrawablePtr /*pDrawable*/,
800 GCPtr /*pGC*/,
801 int /*nBox*/,
802 BoxPtr /*pBox*/
803);
804
805extern void ipl8FillRectTransparentStippled32(
806 DrawablePtr /*pDrawable*/,
807 GCPtr /*pGC*/,
808 int /*nBox*/,
809 BoxPtr /*pBox*/
810);
811
812extern void ipl8FillRectStippledUnnatural(
813 DrawablePtr /*pDrawable*/,
814 GCPtr /*pGC*/,
815 int /*nBox*/,
816 BoxPtr /*pBox*/
817);
818/* iplrrop.c */
819
820extern int iplReduceRasterOp(
821 int /*rop*/,
822 unsigned long /*fg*/,
823 unsigned long /*pm*/,
824 unsigned short * /*andp*/,
825 unsigned short * /*xorp*/
826);
827/* iplscrinit.c */
828
829extern Bool iplCloseScreen(
830 int /*index*/,
831 ScreenPtr /*pScreen*/
832);
833
834extern Bool iplSetupScreen(
835 ScreenPtr /*pScreen*/,
836 pointer /*pbits*/,
837 int /*xsize*/,
838 int /*ysize*/,
839 int /*dpix*/,
840 int /*dpiy*/,
841 int /*width*/
842);
843
844extern int iplFinishScreenInit(
845 ScreenPtr /*pScreen*/,
846 pointer /*pbits*/,
847 int /*xsize*/,
848 int /*ysize*/,
849 int /*dpix*/,
850 int /*dpiy*/,
851 int /*width*/
852);
853
854extern Bool iplScreenInit(
855 ScreenPtr /*pScreen*/,
856 pointer /*pbits*/,
857 int /*xsize*/,
858 int /*ysize*/,
859 int /*dpix*/,
860 int /*dpiy*/,
861 int /*width*/
862);
863
864extern PixmapPtr iplGetScreenPixmap(
865 ScreenPtr /*pScreen*/
866);
867
868extern void iplSetScreenPixmap(
869 PixmapPtr /*pPix*/
870);
871
872/* iplseg.c */
873
874extern void iplSegmentSS(
875 DrawablePtr /*pDrawable*/,
876 GCPtr /*pGC*/,
877 int /*nseg*/,
878 xSegment * /*pSeg*/
879);
880
881extern void iplSegmentSD(
882 DrawablePtr /*pDrawable*/,
883 GCPtr /*pGC*/,
884 int /*nseg*/,
885 xSegment * /*pSeg*/
886);
887/* iplsetsp.c */
888
889extern int iplSetScanline(
890 int /*y*/,
891 int /*xOrigin*/,
892 int /*xStart*/,
893 int /*xEnd*/,
894 unsigned int * /*psrc*/,
895 int /*alu*/,
896 unsigned short * /*pdstBase*/,
897 int /*widthDst*/,
898 unsigned long /*planemask*/
899);
900
901extern void iplSetSpans(
902 DrawablePtr /*pDrawable*/,
903 GCPtr /*pGC*/,
904 char * /*psrc*/,
905 DDXPointPtr /*ppt*/,
906 int * /*pwidth*/,
907 int /*nspans*/,
908 int /*fSorted*/
909);
910/* iplsolidC.c */
911
912extern void iplFillRectSolidCopy(
913 DrawablePtr /*pDrawable*/,
914 GCPtr /*pGC*/,
915 int /*nBox*/,
916 BoxPtr /*pBox*/
917);
918
919extern void iplSolidSpansCopy(
920 DrawablePtr /*pDrawable*/,
921 GCPtr /*pGC*/,
922 int /*nInit*/,
923 DDXPointPtr /*pptInit*/,
924 int * /*pwidthInit*/,
925 int /*fSorted*/
926);
927/* iplsolidG.c */
928
929extern void iplFillRectSolidGeneral(
930 DrawablePtr /*pDrawable*/,
931 GCPtr /*pGC*/,
932 int /*nBox*/,
933 BoxPtr /*pBox*/
934);
935
936extern void iplSolidSpansGeneral(
937 DrawablePtr /*pDrawable*/,
938 GCPtr /*pGC*/,
939 int /*nInit*/,
940 DDXPointPtr /*pptInit*/,
941 int * /*pwidthInit*/,
942 int /*fSorted*/
943);
944/* iplsolidX.c */
945
946extern void iplFillRectSolidXor(
947 DrawablePtr /*pDrawable*/,
948 GCPtr /*pGC*/,
949 int /*nBox*/,
950 BoxPtr /*pBox*/
951);
952
953extern void iplSolidSpansXor(
954 DrawablePtr /*pDrawable*/,
955 GCPtr /*pGC*/,
956 int /*nInit*/,
957 DDXPointPtr /*pptInit*/,
958 int * /*pwidthInit*/,
959 int /*fSorted*/
960);
961/* iplteblt8.c */
962
963extern void iplTEGlyphBlt8(
964 DrawablePtr /*pDrawable*/,
965 GCPtr/*pGC*/,
966 int /*xInit*/,
967 int /*yInit*/,
968 unsigned int /*nglyph*/,
969 CharInfoPtr * /*ppci*/,
970 pointer /*pglyphBase*/
971);
972/* ipltegblt.c */
973
974extern void iplTEGlyphBlt(
975 DrawablePtr /*pDrawable*/,
976 GCPtr/*pGC*/,
977 int /*x*/,
978 int /*y*/,
979 unsigned int /*nglyph*/,
980 CharInfoPtr * /*ppci*/,
981 pointer /*pglyphBase*/
982);
983/* ipltile32C.c */
984
985extern void iplFillRectTile32Copy(
986 DrawablePtr /*pDrawable*/,
987 GCPtr /*pGC*/,
988 int /*nBox*/,
989 BoxPtr /*pBox*/
990);
991
992extern void iplTile32FSCopy(
993 DrawablePtr /*pDrawable*/,
994 GCPtr /*pGC*/,
995 int /*nInit*/,
996 DDXPointPtr /*pptInit*/,
997 int * /*pwidthInit*/,
998 int /*fSorted*/
999);
1000/* ipltile32G.c */
1001
1002extern void iplFillRectTile32General(
1003 DrawablePtr /*pDrawable*/,
1004 GCPtr /*pGC*/,
1005 int /*nBox*/,
1006 BoxPtr /*pBox*/
1007);
1008
1009extern void iplTile32FSGeneral(
1010 DrawablePtr /*pDrawable*/,
1011 GCPtr /*pGC*/,
1012 int /*nInit*/,
1013 DDXPointPtr /*pptInit*/,
1014 int * /*pwidthInit*/,
1015 int /*fSorted*/
1016);
1017/* ipltileoddC.c */
1018
1019extern void iplFillBoxTileOddCopy(
1020 DrawablePtr /*pDrawable*/,
1021 int /*nBox*/,
1022 BoxPtr /*pBox*/,
1023 PixmapPtr /*tile*/,
1024 int /*xrot*/,
1025 int /*yrot*/,
1026 int /*alu*/,
1027 unsigned long /*planemask*/
1028);
1029
1030extern void iplFillSpanTileOddCopy(
1031 DrawablePtr /*pDrawable*/,
1032 int /*n*/,
1033 DDXPointPtr /*ppt*/,
1034 int * /*pwidth*/,
1035 PixmapPtr /*tile*/,
1036 int /*xrot*/,
1037 int /*yrot*/,
1038 int /*alu*/,
1039 unsigned long /*planemask*/
1040);
1041
1042extern void iplFillBoxTile32sCopy(
1043 DrawablePtr /*pDrawable*/,
1044 int /*nBox*/,
1045 BoxPtr /*pBox*/,
1046 PixmapPtr /*tile*/,
1047 int /*xrot*/,
1048 int /*yrot*/,
1049 int /*alu*/,
1050 unsigned long /*planemask*/
1051);
1052
1053extern void iplFillSpanTile32sCopy(
1054 DrawablePtr /*pDrawable*/,
1055 int /*n*/,
1056 DDXPointPtr /*ppt*/,
1057 int * /*pwidth*/,
1058 PixmapPtr /*tile*/,
1059 int /*xrot*/,
1060 int /*yrot*/,
1061 int /*alu*/,
1062 unsigned long /*planemask*/
1063);
1064/* ipltileoddG.c */
1065
1066extern void iplFillBoxTileOddGeneral(
1067 DrawablePtr /*pDrawable*/,
1068 int /*nBox*/,
1069 BoxPtr /*pBox*/,
1070 PixmapPtr /*tile*/,
1071 int /*xrot*/,
1072 int /*yrot*/,
1073 int /*alu*/,
1074 unsigned long /*planemask*/
1075);
1076
1077extern void iplFillSpanTileOddGeneral(
1078 DrawablePtr /*pDrawable*/,
1079 int /*n*/,
1080 DDXPointPtr /*ppt*/,
1081 int * /*pwidth*/,
1082 PixmapPtr /*tile*/,
1083 int /*xrot*/,
1084 int /*yrot*/,
1085 int /*alu*/,
1086 unsigned long /*planemask*/
1087);
1088
1089extern void iplFillBoxTile32sGeneral(
1090 DrawablePtr /*pDrawable*/,
1091 int /*nBox*/,
1092 BoxPtr /*pBox*/,
1093 PixmapPtr /*tile*/,
1094 int /*xrot*/,
1095 int /*yrot*/,
1096 int /*alu*/,
1097 unsigned long /*planemask*/
1098);
1099
1100extern void iplFillSpanTile32sGeneral(
1101 DrawablePtr /*pDrawable*/,
1102 int /*n*/,
1103 DDXPointPtr /*ppt*/,
1104 int * /*pwidth*/,
1105 PixmapPtr /*tile*/,
1106 int /*xrot*/,
1107 int /*yrot*/,
1108 int /*alu*/,
1109 unsigned long /*planemask*/
1110);
1111/* iplwindow.c */
1112
1113extern Bool iplCreateWindow(
1114 WindowPtr /*pWin*/
1115);
1116
1117extern Bool iplDestroyWindow(
1118 WindowPtr /*pWin*/
1119);
1120
1121extern Bool iplMapWindow(
1122 WindowPtr /*pWindow*/
1123);
1124
1125extern Bool iplPositionWindow(
1126 WindowPtr /*pWin*/,
1127 int /*x*/,
1128 int /*y*/
1129);
1130
1131extern Bool iplUnmapWindow(
1132 WindowPtr /*pWindow*/
1133);
1134
1135extern void iplCopyWindow(
1136 WindowPtr /*pWin*/,
1137 DDXPointRec /*ptOldOrg*/,
1138 RegionPtr /*prgnSrc*/
1139);
1140
1141extern Bool iplChangeWindowAttributes(
1142 WindowPtr /*pWin*/,
1143 unsigned long /*mask*/
1144);
1145/* iplzerarcC.c */
1146
1147extern void iplZeroPolyArcSS8Copy(
1148 DrawablePtr /*pDraw*/,
1149 GCPtr /*pGC*/,
1150 int /*narcs*/,
1151 xArc * /*parcs*/
1152);
1153/* iplzerarcG.c */
1154
1155extern void iplZeroPolyArcSS8General(
1156 DrawablePtr /*pDraw*/,
1157 GCPtr /*pGC*/,
1158 int /*narcs*/,
1159 xArc * /*parcs*/
1160);
1161/* iplzerarcX.c */
1162
1163extern void iplZeroPolyArcSS8Xor(
1164 DrawablePtr /*pDraw*/,
1165 GCPtr /*pGC*/,
1166 int /*narcs*/,
1167 xArc * /*parcs*/
1168);
1169
1170/* Common macros for extracting drawing information */
1171
1172#if (!defined(SINGLEDEPTH) && PSZ != 8) || defined(FORCE_SEPARATE_PRIVATE)
1173
1174#define CFB_NEED_SCREEN_PRIVATE
1175
1176extern int iplScreenPrivateIndex;
1177#endif
1178
1179#define iplGetWindowPixmap(d) \
1180 ((* ((DrawablePtr)(d))->pScreen->GetWindowPixmap)((WindowPtr)(d)))
1181
1182#define iplGetTypedWidth(pDrawable,wtype) (\
1183 (((pDrawable)->type != DRAWABLE_PIXMAP) ? \
1184 (int) (iplGetWindowPixmap(pDrawable)->devKind) : \
1185 (int)(((PixmapPtr)pDrawable)->devKind)) / sizeof (wtype))
1186
1187#define iplGetByteWidth(pDrawable) iplGetTypedWidth(pDrawable, unsigned char)
1188
1189#define iplGetPixelWidth(pDrawable) iplGetTypedWidth(pDrawable, PixelType)
1190
1191#define iplGetLongWidth(pDrawable) iplGetTypedWidth(pDrawable, unsigned long)
1192
1193#define iplGetTypedWidthAndPointer(pDrawable, width, pointer, wtype, ptype) {\
1194 PixmapPtr _pPix; \
1195 if ((pDrawable)->type != DRAWABLE_PIXMAP) \
1196 _pPix = iplGetWindowPixmap(pDrawable); \
1197 else \
1198 _pPix = (PixmapPtr) (pDrawable); \
1199 (pointer) = (ptype *) _pPix->devPrivate.ptr; \
1200 (width) = ((int) _pPix->devKind) / sizeof (wtype); \
1201}
1202
1203#define iplGetByteWidthAndPointer(pDrawable, width, pointer) \
1204 iplGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned char, unsigned char)
1205
1206#define iplGetLongWidthAndPointer(pDrawable, width, pointer) \
1207 iplGetTypedWidthAndPointer(pDrawable, width, pointer, unsigned long, unsigned long)
1208
1209#define iplGetPixelWidthAndPointer(pDrawable, width, pointer) \
1210 iplGetTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
1211
1212#define iplGetWindowTypedWidthAndPointer(pWin, width, pointer, wtype, ptype) {\
1213 PixmapPtr _pPix = iplGetWindowPixmap((DrawablePtr) (pWin)); \
1214 (pointer) = (ptype *) _pPix->devPrivate.ptr; \
1215 (width) = ((int) _pPix->devKind) / sizeof (wtype); \
1216}
1217
1218#define iplGetWindowLongWidthAndPointer(pWin, width, pointer) \
1219 iplGetWindowTypedWidthAndPointer(pWin, width, pointer, unsigned long, unsigned long)
1220
1221#define iplGetWindowByteWidthAndPointer(pWin, width, pointer) \
1222 iplGetWindowTypedWidthAndPointer(pWin, width, pointer, unsigned char, unsigned char)
1223
1224#define iplGetWindowPixelWidthAndPointer(pDrawable, width, pointer) \
1225 iplGetWindowTypedWidthAndPointer(pDrawable, width, pointer, PixelType, PixelType)
1226
1227/* Macros which handle a coordinate in a single register */
1228
1229/* Most compilers will convert divide by 65536 into a shift, if signed
1230 * shifts exist. If your machine does arithmetic shifts and your compiler
1231 * can't get it right, add to this line.
1232 */
1233
1234/* mips compiler - what a joke - it CSEs the 65536 constant into a reg
1235 * forcing as to use div instead of shift. Let's be explicit.
1236 */
1237
1238#if defined(mips) || defined(sparc) || defined(__alpha) || defined(__alpha__)
1239#define GetHighWord(x) (((int) (x)) >> 16)
1240#else
1241#define GetHighWord(x) (((int) (x)) / 65536)
1242#endif
1243
1244#if IMAGE_BYTE_ORDER == MSBFirst
1245#define intToCoord(i,x,y) (((x) = GetHighWord(i)), ((y) = (int) ((short) (i))))
1246#define coordToInt(x,y) (((x) << 16) | (y))
1247#define intToX(i) (GetHighWord(i))
1248#define intToY(i) ((int) ((short) i))
1249#else
1250#define intToCoord(i,x,y) (((x) = (int) ((short) (i))), ((y) = GetHighWord(i)))
1251#define coordToInt(x,y) (((y) << 16) | (x))
1252#define intToX(i) ((int) ((short) (i)))
1253#define intToY(i) (GetHighWord(i))
1254#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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