]> git.sesse.net Git - rdpsrv/blob - Xserver/programs/Xserver/mi/mi.h
b836fc7fe182801862626c48fddf089adde23bef
[rdpsrv] / Xserver / programs / Xserver / mi / mi.h
1 /* $XConsortium: mi.h,v 1.17 94/04/17 20:27:10 dpw Exp $ */
2 /* $XFree86: xc/programs/Xserver/mi/mi.h,v 3.1 1997/01/14 22:22:51 dawes Exp $ */
3 /***********************************************************
4
5 Copyright (c) 1987  X Consortium
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
20 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
24 Except as contained in this notice, the name of the X Consortium shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from the X Consortium.
27
28
29 Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
30
31                         All Rights Reserved
32
33 Permission to use, copy, modify, and distribute this software and its 
34 documentation for any purpose and without fee is hereby granted, 
35 provided that the above copyright notice appear in all copies and that
36 both that copyright notice and this permission notice appear in 
37 supporting documentation, and that the name of Digital not be
38 used in advertising or publicity pertaining to distribution of the
39 software without specific, written prior permission.  
40
41 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
42 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
43 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
44 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
46 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
47 SOFTWARE.
48
49 ******************************************************************/
50 #ifndef MI_H
51 #define MI_H
52 #include "X11/X.h"
53 #include "region.h"
54 #include "validate.h"
55 #include "window.h"
56 #include "gc.h"
57 #include "font.h"
58 #include "input.h"
59 #include "cursor.h"
60
61 typedef struct _miDash *miDashPtr;
62 #define EVEN_DASH       0
63 #define ODD_DASH        ~0
64
65 /* miarc.c */
66
67 extern void miPolyArc(
68 #if NeedFunctionPrototypes
69     DrawablePtr /*pDraw*/,
70     GCPtr /*pGC*/,
71     int /*narcs*/,
72     xArc * /*parcs*/
73 #endif
74 );
75
76 /* mibitblt.c */
77
78 extern RegionPtr miCopyArea(
79 #if NeedFunctionPrototypes
80     DrawablePtr /*pSrcDrawable*/,
81     DrawablePtr /*pDstDrawable*/,
82     GCPtr /*pGC*/,
83     int /*xIn*/,
84     int /*yIn*/,
85     int /*widthSrc*/,
86     int /*heightSrc*/,
87     int /*xOut*/,
88     int /*yOut*/
89 #endif
90 );
91
92 extern void miOpqStipDrawable(
93 #if NeedFunctionPrototypes
94     DrawablePtr /*pDraw*/,
95     GCPtr /*pGC*/,
96     RegionPtr /*prgnSrc*/,
97     unsigned long * /*pbits*/,
98     int /*srcx*/,
99     int /*w*/,
100     int /*h*/,
101     int /*dstx*/,
102     int /*dsty*/
103 #endif
104 );
105
106 extern RegionPtr miCopyPlane(
107 #if NeedFunctionPrototypes
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
121 extern void miGetImage(
122 #if NeedFunctionPrototypes
123     DrawablePtr /*pDraw*/,
124     int /*sx*/,
125     int /*sy*/,
126     int /*w*/,
127     int /*h*/,
128     unsigned int /*format*/,
129     unsigned long /*planeMask*/,
130     char * /*pdstLine*/
131 #endif
132 );
133
134 extern void miPutImage(
135 #if NeedFunctionPrototypes
136     DrawablePtr /*pDraw*/,
137     GCPtr /*pGC*/,
138     int /*depth*/,
139     int /*x*/,
140     int /*y*/,
141     int /*w*/,
142     int /*h*/,
143     int /*leftPad*/,
144     int /*format*/,
145     char * /*pImage*/
146 #endif
147 );
148
149 /* miclipn.c */
150
151 extern void miClipNotify(
152 #if NeedFunctionPrototypes
153     void (* /*func*/)(
154 #if NeedNestedPrototypes
155         WindowPtr /* pWin */,
156         int /* dx */,
157         int /* dy */
158 #endif
159         )
160 #endif
161 );
162
163 /* micursor.c */
164
165 extern void miRecolorCursor(
166 #if NeedFunctionPrototypes
167     ScreenPtr /*pScr*/,
168     CursorPtr /*pCurs*/,
169     Bool /*displayed*/
170 #endif
171 );
172
173 /* midash.c */
174
175 extern miDashPtr miDashLine(
176 #if NeedFunctionPrototypes
177     int /*npt*/,
178     DDXPointPtr /*ppt*/,
179     unsigned int /*nDash*/,
180     unsigned char * /*pDash*/,
181     unsigned int /*offset*/,
182     int * /*pnseg*/
183 #endif
184 );
185
186 extern void miStepDash(
187 #if NeedFunctionPrototypes
188     int /*dist*/,
189     int * /*pDashIndex*/,
190     unsigned char * /*pDash*/,
191     int /*numInDashList*/,
192     int * /*pDashOffset*/
193 #endif
194 );
195
196 /* mieq.c */
197
198
199 #ifndef INPUT_H
200 typedef struct _DeviceRec *DevicePtr;
201 #endif
202
203 extern Bool mieqInit(
204 #if NeedFunctionPrototypes
205     DevicePtr /*pKbd*/,
206     DevicePtr /*pPtr*/
207 #endif
208 );
209
210 extern void mieqEnqueue(
211 #if NeedFunctionPrototypes
212     xEventPtr /*e*/
213 #endif
214 );
215
216 extern void mieqSwitchScreen(
217 #if NeedFunctionPrototypes
218     ScreenPtr /*pScreen*/,
219     Bool /*fromDIX*/
220 #endif
221 );
222
223 extern int mieqProcessInputEvents(
224 #if NeedFunctionPrototypes
225     void
226 #endif
227 );
228
229 /* miexpose.c */
230
231 extern RegionPtr miHandleExposures(
232 #if NeedFunctionPrototypes
233     DrawablePtr /*pSrcDrawable*/,
234     DrawablePtr /*pDstDrawable*/,
235     GCPtr /*pGC*/,
236     int /*srcx*/,
237     int /*srcy*/,
238     int /*width*/,
239     int /*height*/,
240     int /*dstx*/,
241     int /*dsty*/,
242     unsigned long /*plane*/
243 #endif
244 );
245
246 extern void miSendGraphicsExpose(
247 #if NeedFunctionPrototypes
248     ClientPtr /*client*/,
249     RegionPtr /*pRgn*/,
250     XID /*drawable*/,
251     int /*major*/,
252     int /*minor*/
253 #endif
254 );
255
256 extern void miSendExposures(
257 #if NeedFunctionPrototypes
258     WindowPtr /*pWin*/,
259     RegionPtr /*pRgn*/,
260     int /*dx*/,
261     int /*dy*/
262 #endif
263 );
264
265 extern void miWindowExposures(
266 #if NeedFunctionPrototypes
267     WindowPtr /*pWin*/,
268     RegionPtr /*prgn*/,
269     RegionPtr /*other_exposed*/
270 #endif
271 );
272
273 extern void miPaintWindow(
274 #if NeedFunctionPrototypes
275     WindowPtr /*pWin*/,
276     RegionPtr /*prgn*/,
277     int /*what*/
278 #endif
279 );
280
281 extern int miClearDrawable(
282 #if NeedFunctionPrototypes
283     DrawablePtr /*pDraw*/,
284     GCPtr /*pGC*/
285 #endif
286 );
287
288 /* mifillrct.c */
289
290 extern void miPolyFillRect(
291 #if NeedFunctionPrototypes
292     DrawablePtr /*pDrawable*/,
293     GCPtr /*pGC*/,
294     int /*nrectFill*/,
295     xRectangle * /*prectInit*/
296 #endif
297 );
298
299 /* miglblt.c */
300
301 extern void miPolyGlyphBlt(
302 #if NeedFunctionPrototypes
303     DrawablePtr /*pDrawable*/,
304     GCPtr /*pGC*/,
305     int /*x*/,
306     int /*y*/,
307     unsigned int /*nglyph*/,
308     CharInfoPtr * /*ppci*/,
309     pointer /*pglyphBase*/
310 #endif
311 );
312
313 extern void miImageGlyphBlt(
314 #if NeedFunctionPrototypes
315     DrawablePtr /*pDrawable*/,
316     GCPtr /*pGC*/,
317     int /*x*/,
318     int /*y*/,
319     unsigned int /*nglyph*/,
320     CharInfoPtr * /*ppci*/,
321     pointer /*pglyphBase*/
322 #endif
323 );
324
325 /* mipoly.c */
326
327 extern void miFillPolygon(
328 #if NeedFunctionPrototypes
329     DrawablePtr /*dst*/,
330     GCPtr /*pgc*/,
331     int /*shape*/,
332     int /*mode*/,
333     int /*count*/,
334     DDXPointPtr /*pPts*/
335 #endif
336 );
337
338 /* mipolycon.c */
339
340 extern Bool miFillConvexPoly(
341 #if NeedFunctionPrototypes
342     DrawablePtr /*dst*/,
343     GCPtr /*pgc*/,
344     int /*count*/,
345     DDXPointPtr /*ptsIn*/
346 #endif
347 );
348
349 /* mipolygen.c */
350
351 extern Bool miFillGeneralPoly(
352 #if NeedFunctionPrototypes
353     DrawablePtr /*dst*/,
354     GCPtr /*pgc*/,
355     int /*count*/,
356     DDXPointPtr /*ptsIn*/
357 #endif
358 );
359
360 /* mipolypnt.c */
361
362 extern void miPolyPoint(
363 #if NeedFunctionPrototypes
364     DrawablePtr /*pDrawable*/,
365     GCPtr /*pGC*/,
366     int /*mode*/,
367     int /*npt*/,
368     xPoint * /*pptInit*/
369 #endif
370 );
371
372 /* mipolyrect.c */
373
374 extern void miPolyRectangle(
375 #if NeedFunctionPrototypes
376     DrawablePtr /*pDraw*/,
377     GCPtr /*pGC*/,
378     int /*nrects*/,
379     xRectangle * /*pRects*/
380 #endif
381 );
382
383 /* mipolyseg.c */
384
385 extern void miPolySegment(
386 #if NeedFunctionPrototypes
387     DrawablePtr /*pDraw*/,
388     GCPtr /*pGC*/,
389     int /*nseg*/,
390     xSegment * /*pSegs*/
391 #endif
392 );
393
394 /* mipolytext.c */
395
396 extern int miPolyText(
397 #if NeedFunctionPrototypes
398     DrawablePtr /*pDraw*/,
399     GCPtr /*pGC*/,
400     int /*x*/,
401     int /*y*/,
402     int /*count*/,
403     char * /*chars*/,
404     FontEncoding /*fontEncoding*/
405 #endif
406 );
407
408 extern int miPolyText8(
409 #if NeedFunctionPrototypes
410     DrawablePtr /*pDraw*/,
411     GCPtr /*pGC*/,
412     int /*x*/,
413     int /*y*/,
414     int /*count*/,
415     char * /*chars*/
416 #endif
417 );
418
419 extern int miPolyText16(
420 #if NeedFunctionPrototypes
421     DrawablePtr /*pDraw*/,
422     GCPtr /*pGC*/,
423     int /*x*/,
424     int /*y*/,
425     int /*count*/,
426     unsigned short * /*chars*/
427 #endif
428 );
429
430 extern int miImageText(
431 #if NeedFunctionPrototypes
432     DrawablePtr /*pDraw*/,
433     GCPtr /*pGC*/,
434     int /*x*/,
435     int /*y*/,
436     int /*count*/,
437     char * /*chars*/,
438     FontEncoding /*fontEncoding*/
439 #endif
440 );
441
442 extern void miImageText8(
443 #if NeedFunctionPrototypes
444     DrawablePtr /*pDraw*/,
445     GCPtr /*pGC*/,
446     int /*x*/,
447     int /*y*/,
448     int /*count*/,
449     char * /*chars*/
450 #endif
451 );
452
453 extern void miImageText16(
454 #if NeedFunctionPrototypes
455     DrawablePtr /*pDraw*/,
456     GCPtr /*pGC*/,
457     int /*x*/,
458     int /*y*/,
459     int /*count*/,
460     unsigned short * /*chars*/
461 #endif
462 );
463
464 /* mipushpxl.c */
465
466 extern void miPushPixels(
467 #if NeedFunctionPrototypes
468     GCPtr /*pGC*/,
469     PixmapPtr /*pBitMap*/,
470     DrawablePtr /*pDrawable*/,
471     int /*dx*/,
472     int /*dy*/,
473     int /*xOrg*/,
474     int /*yOrg*/
475 #endif
476 );
477
478 /* miregion.c */
479
480 /* see also region.h */
481
482 extern Bool miRectAlloc(
483 #if NeedFunctionPrototypes
484     RegionPtr /*pRgn*/,
485     int /*n*/
486 #endif
487 );
488
489 extern void miSetExtents(
490 #if NeedFunctionPrototypes
491     RegionPtr /*pReg*/
492 #endif
493 );
494
495 extern int miFindMaxBand(
496 #if NeedFunctionPrototypes
497     RegionPtr /*prgn*/
498 #endif
499 );
500
501 #ifdef DEBUG
502 extern Bool miValidRegion(
503 #if NeedFunctionPrototypes
504     RegionPtr /*prgn*/
505 #endif
506 );
507 #endif
508
509 /* miscrinit.c */
510
511 extern Bool miModifyPixmapHeader(
512 #if NeedFunctionPrototypes
513     PixmapPtr /*pPixmap*/,
514     int /*width*/,
515     int /*height*/,
516     int /*depth*/,
517     int /*bitsPerPixel*/,
518     int /*devKind*/,
519     pointer /*pPixData*/
520 #endif
521 );
522
523 extern Bool miCloseScreen(
524 #if NeedFunctionPrototypes
525     int /*index*/,
526     ScreenPtr /*pScreen*/
527 #endif
528 );
529
530 extern Bool miCreateScreenResources(
531 #if NeedFunctionPrototypes
532     ScreenPtr /*pScreen*/
533 #endif
534 );
535
536 extern Bool miScreenDevPrivateInit(
537 #if NeedFunctionPrototypes
538     ScreenPtr /*pScreen*/,
539     int /*width*/,
540     pointer /*pbits*/
541 #endif
542 );
543
544 #ifndef _XTYPEDEF_MIBSFUNCPTR
545 typedef struct _miBSFuncRec *miBSFuncPtr;
546 #define _XTYPEDEF_MIBSFUNCPTR
547 #endif
548
549 extern Bool miScreenInit(
550 #if NeedFunctionPrototypes
551     ScreenPtr /*pScreen*/,
552     pointer /*pbits*/,
553     int /*xsize*/,
554     int /*ysize*/,
555     int /*dpix*/,
556     int /*dpiy*/,
557     int /*width*/,
558     int /*rootDepth*/,
559     int /*numDepths*/,
560     DepthPtr /*depths*/,
561     VisualID /*rootVisual*/,
562     int /*numVisuals*/,
563     VisualPtr /*visuals*/,
564     miBSFuncPtr /*bsfuncs*/
565 #endif
566 );
567
568 extern int miAllocateGCPrivateIndex(
569 #if NeedFunctionPrototypes
570     void
571 #endif
572 );
573
574 /* mivaltree.c */
575
576 extern int miShapedWindowIn(
577 #if NeedFunctionPrototypes
578     ScreenPtr /*pScreen*/,
579     RegionPtr /*universe*/,
580     RegionPtr /*bounding*/,
581     BoxPtr /*rect*/,
582     int /*x*/,
583     int /*y*/
584 #endif
585 );
586
587 extern int miValidateTree(
588 #if NeedFunctionPrototypes
589     WindowPtr /*pParent*/,
590     WindowPtr /*pChild*/,
591     VTKind /*kind*/
592 #endif
593 );
594
595 extern void miWideLine(
596 #if NeedFunctionPrototypes
597     DrawablePtr /*pDrawable*/,
598     GCPtr /*pGC*/,
599     int /*mode*/,
600     int /*npt*/,
601     DDXPointPtr /*pPts*/
602 #endif
603 );
604
605 extern void miWideDash(
606 #if NeedFunctionPrototypes
607     DrawablePtr /*pDrawable*/,
608     GCPtr /*pGC*/,
609     int /*mode*/,
610     int /*npt*/,
611     DDXPointPtr /*pPts*/
612 #endif
613 );
614
615 extern void miMiter(
616 #if NeedFunctionPrototypes
617     void
618 #endif
619 );
620
621 extern void miNotMiter(
622 #if NeedFunctionPrototypes
623     void
624 #endif
625 );
626
627 /* miwindow.c */
628
629 extern void miClearToBackground(
630 #if NeedFunctionPrototypes
631     WindowPtr /*pWin*/,
632     int /*x*/,
633     int /*y*/,
634     int /*w*/,
635     int /*h*/,
636     Bool /*generateExposures*/
637 #endif
638 );
639
640 extern Bool miChangeSaveUnder(
641 #if NeedFunctionPrototypes
642     WindowPtr /*pWin*/,
643     WindowPtr /*first*/
644 #endif
645 );
646
647 extern void miPostChangeSaveUnder(
648 #if NeedFunctionPrototypes
649     WindowPtr /*pWin*/,
650     WindowPtr /*pFirst*/
651 #endif
652 );
653
654 extern void miMarkWindow(
655 #if NeedFunctionPrototypes
656     WindowPtr /*pWin*/
657 #endif
658 );
659
660 extern Bool miMarkOverlappedWindows(
661 #if NeedFunctionPrototypes
662     WindowPtr /*pWin*/,
663     WindowPtr /*pFirst*/,
664     WindowPtr * /*ppLayerWin*/
665 #endif
666 );
667
668 extern void miHandleValidateExposures(
669 #if NeedFunctionPrototypes
670     WindowPtr /*pWin*/
671 #endif
672 );
673
674 extern void miMoveWindow(
675 #if NeedFunctionPrototypes
676     WindowPtr /*pWin*/,
677     int /*x*/,
678     int /*y*/,
679     WindowPtr /*pNextSib*/,
680     VTKind /*kind*/
681 #endif
682 );
683
684 extern void miSlideAndSizeWindow(
685 #if NeedFunctionPrototypes
686     WindowPtr /*pWin*/,
687     int /*x*/,
688     int /*y*/,
689     unsigned int /*w*/,
690     unsigned int /*h*/,
691     WindowPtr /*pSib*/
692 #endif
693 );
694
695 extern WindowPtr miGetLayerWindow(
696 #if NeedFunctionPrototypes
697     WindowPtr /*pWin*/
698 #endif
699 );
700
701 extern void miSetShape(
702 #if NeedFunctionPrototypes
703     WindowPtr /*pWin*/
704 #endif
705 );
706
707 extern void miChangeBorderWidth(
708 #if NeedFunctionPrototypes
709     WindowPtr /*pWin*/,
710     unsigned int /*width*/
711 #endif
712 );
713
714 extern void miMarkUnrealizedWindow(
715 #if NeedFunctionPrototypes
716     WindowPtr /*pChild*/,
717     WindowPtr /*pWin*/,
718     Bool /*fromConfigure*/
719 #endif
720 );
721
722 extern void miZeroPolyArc(
723 #if NeedFunctionPrototypes
724     DrawablePtr /*pDraw*/,
725     GCPtr /*pGC*/,
726     int /*narcs*/,
727     xArc * /*parcs*/
728 #endif
729 );
730
731 /* mizerline.c */
732
733 extern void miZeroLine(
734 #if NeedFunctionPrototypes
735     DrawablePtr /*dst*/,
736     GCPtr /*pgc*/,
737     int /*mode*/,
738     int /*nptInit*/,
739     DDXPointRec * /*pptInit*/
740 #endif
741 );
742
743 extern void miZeroDashLine(
744 #if NeedFunctionPrototypes
745     DrawablePtr /*dst*/,
746     GCPtr /*pgc*/,
747     int /*mode*/,
748     int /*nptInit*/,
749     DDXPointRec * /*pptInit*/
750 #endif
751 );
752
753 extern void miPolyFillArc(
754 #if NeedFunctionPrototypes
755     DrawablePtr /*pDraw*/,
756     GCPtr /*pGC*/,
757     int /*narcs*/,
758     xArc * /*parcs*/
759 #endif
760 );
761
762 #endif /* MI_H */