~ubuntu-branches/ubuntu/edgy/xorg-server/edgy-updates

« back to all changes in this revision

Viewing changes to iplan2p4/ipl.h

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
/************************************************************
4
 
Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA.
5
 
 
6
 
                    All Rights Reserved
7
 
 
8
 
Permission  to  use,  copy,  modify,  and  distribute   this
9
 
software  and  its documentation for any purpose and without
10
 
fee is hereby granted, provided that the above copyright no-
11
 
tice  appear  in all copies and that both that copyright no-
12
 
tice and this permission notice appear in  supporting  docu-
13
 
mentation,  and  that the names of Sun or X Consortium
14
 
not be used in advertising or publicity pertaining to 
15
 
distribution  of  the software  without specific prior 
16
 
written permission. Sun and X Consortium make no 
17
 
representations about the suitability of this software for 
18
 
any purpose. It is provided "as is" without any express or 
19
 
implied warranty.
20
 
 
21
 
SUN DISCLAIMS ALL WARRANTIES WITH REGARD TO  THIS  SOFTWARE,
22
 
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FIT-
23
 
NESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SUN BE  LI-
24
 
ABLE  FOR  ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
25
 
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,  DATA  OR
26
 
PROFITS,  WHETHER  IN  AN  ACTION OF CONTRACT, NEGLIGENCE OR
27
 
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION  WITH
28
 
THE USE OR PERFORMANCE OF THIS SOFTWARE.
29
 
 
30
 
********************************************************/
31
 
 
32
 
/* Modified nov 94 by Martin Schaller (Martin_Schaller@maus.r.de) for use with
33
 
interleaved 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
 
 
58
 
extern int  iplGCPrivateIndex;
59
 
extern int  iplWindowPrivateIndex;
60
 
 
61
 
/* private field of GC */
62
 
typedef 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
 
 
72
 
typedef 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 */
80
 
typedef 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 */
87
 
typedef 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
 
 
102
 
extern int iplSetStipple(
103
 
    int /*alu*/,
104
 
    unsigned long /*fg*/,
105
 
    unsigned long /*planemask*/
106
 
);
107
 
 
108
 
extern int iplSetOpaqueStipple(
109
 
    int /*alu*/,
110
 
    unsigned long /*fg*/,
111
 
    unsigned long /*bg*/,
112
 
    unsigned long /*planemask*/
113
 
);
114
 
 
115
 
extern 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
 
 
126
 
extern void iplCopyImagePlane(
127
 
    DrawablePtr /*pSrcDrawable*/,
128
 
    DrawablePtr /*pDstDrawable*/,
129
 
    int /*rop*/,
130
 
    RegionPtr /*prgnDst*/,
131
 
    DDXPointPtr /*pptSrc*/,
132
 
    unsigned long /*planemask*/
133
 
);
134
 
 
135
 
extern 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
 
 
146
 
extern 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
 
 
159
 
extern void ipl8LineSS1Rect(
160
 
    DrawablePtr /*pDrawable*/,
161
 
    GCPtr /*pGC*/,
162
 
    int /*mode*/,
163
 
    int /*npt*/,
164
 
    DDXPointPtr /*pptInit*/
165
 
);
166
 
 
167
 
extern 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
 
 
179
 
extern 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
 
 
193
 
extern 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
 
 
206
 
extern 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
 
 
218
 
extern 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
 
 
231
 
extern 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
 
 
243
 
extern int ipl8SegmentSS1RectCopy(
244
 
    DrawablePtr /*pDrawable*/,
245
 
    GCPtr /*pGC*/,
246
 
    int /*nseg*/,
247
 
    xSegment * /*pSegInit*/
248
 
);
249
 
/* ipl8segCS.c */
250
 
 
251
 
extern int ipl8SegmentSS1RectShiftCopy(
252
 
    DrawablePtr /*pDrawable*/,
253
 
    GCPtr /*pGC*/,
254
 
    int /*nseg*/,
255
 
    xSegment * /*pSegInit*/
256
 
);
257
 
 
258
 
extern void ipl8SegmentSS1Rect(
259
 
    DrawablePtr /*pDrawable*/,
260
 
    GCPtr /*pGC*/,
261
 
    int /*nseg*/,
262
 
    xSegment * /*pSegInit*/
263
 
);
264
 
/* ipl8segG.c */
265
 
 
266
 
extern int ipl8SegmentSS1RectGeneral(
267
 
    DrawablePtr /*pDrawable*/,
268
 
    GCPtr /*pGC*/,
269
 
    int /*nseg*/,
270
 
    xSegment * /*pSegInit*/
271
 
);
272
 
/* iplsegX.c */
273
 
 
274
 
extern int ipl8SegmentSS1RectXor(
275
 
    DrawablePtr /*pDrawable*/,
276
 
    GCPtr /*pGC*/,
277
 
    int /*nseg*/,
278
 
    xSegment * /*pSegInit*/
279
 
);
280
 
/* iplallpriv.c */
281
 
 
282
 
extern Bool iplAllocatePrivates(
283
 
    ScreenPtr /*pScreen*/,
284
 
    int * /*window_index*/,
285
 
    int * /*gc_index*/
286
 
);
287
 
/* iplbitblt.c */
288
 
 
289
 
extern 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
 
 
303
 
extern void iplDoBitblt(
304
 
    DrawablePtr /*pSrc*/,
305
 
    DrawablePtr /*pDst*/,
306
 
    int /*alu*/,
307
 
    RegionPtr /*prgnDst*/,
308
 
    DDXPointPtr /*pptSrc*/,
309
 
    unsigned long /*planemask*/
310
 
);
311
 
 
312
 
extern 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
 
 
324
 
extern 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
 
 
334
 
extern 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
 
 
348
 
extern 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
 
 
358
 
extern 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
 
 
368
 
extern 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
 
 
378
 
extern 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
 
 
388
 
extern 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
 
 
406
 
extern 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
 
 
427
 
extern void iplSaveAreas(
428
 
    PixmapPtr /*pPixmap*/,
429
 
    RegionPtr /*prgnSave*/,
430
 
    int /*xorg*/,
431
 
    int /*yorg*/,
432
 
    WindowPtr /*pWin*/
433
 
);
434
 
 
435
 
extern void iplRestoreAreas(
436
 
    PixmapPtr /*pPixmap*/,
437
 
    RegionPtr /*prgnRestore*/,
438
 
    int /*xorg*/,
439
 
    int /*yorg*/,
440
 
    WindowPtr /*pWin*/
441
 
);
442
 
/* iplcmap.c */
443
 
 
444
 
extern int iplListInstalledColormaps(
445
 
    ScreenPtr   /*pScreen*/,
446
 
    Colormap    * /*pmaps*/
447
 
);
448
 
 
449
 
extern void iplInstallColormap(
450
 
    ColormapPtr /*pmap*/
451
 
);
452
 
 
453
 
extern void iplUninstallColormap(
454
 
    ColormapPtr /*pmap*/
455
 
);
456
 
 
457
 
extern void iplResolveColor(
458
 
    unsigned short * /*pred*/,
459
 
    unsigned short * /*pgreen*/,
460
 
    unsigned short * /*pblue*/,
461
 
    VisualPtr /*pVisual*/
462
 
);
463
 
 
464
 
extern Bool iplInitializeColormap(
465
 
    ColormapPtr /*pmap*/
466
 
);
467
 
 
468
 
extern int iplExpandDirectColors(
469
 
    ColormapPtr /*pmap*/,
470
 
    int /*ndef*/,
471
 
    xColorItem * /*indefs*/,
472
 
    xColorItem * /*outdefs*/
473
 
);
474
 
 
475
 
extern Bool iplCreateDefColormap(
476
 
    ScreenPtr /*pScreen*/
477
 
);
478
 
 
479
 
extern Bool iplSetVisualTypes(
480
 
    int /*depth*/,
481
 
    int /*visuals*/,
482
 
    int /*bitsPerRGB*/
483
 
);
484
 
 
485
 
extern 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
 
 
497
 
extern void iplPolyFillArcSolidCopy(
498
 
    DrawablePtr /*pDraw*/,
499
 
    GCPtr /*pGC*/,
500
 
    int /*narcs*/,
501
 
    xArc * /*parcs*/
502
 
);
503
 
/* iplfillarcG.c */
504
 
 
505
 
extern void iplPolyFillArcSolidGeneral(
506
 
    DrawablePtr /*pDraw*/,
507
 
    GCPtr /*pGC*/,
508
 
    int /*narcs*/,
509
 
    xArc * /*parcs*/
510
 
);
511
 
/* iplfillrct.c */
512
 
 
513
 
extern void iplFillBoxTileOdd(
514
 
    DrawablePtr /*pDrawable*/,
515
 
    int /*n*/,
516
 
    BoxPtr /*rects*/,
517
 
    PixmapPtr /*tile*/,
518
 
    int /*xrot*/,
519
 
    int /*yrot*/
520
 
);
521
 
 
522
 
extern void iplFillRectTileOdd(
523
 
    DrawablePtr /*pDrawable*/,
524
 
    GCPtr /*pGC*/,
525
 
    int /*nBox*/,
526
 
    BoxPtr /*pBox*/
527
 
);
528
 
 
529
 
extern void iplPolyFillRect(
530
 
    DrawablePtr /*pDrawable*/,
531
 
    GCPtr /*pGC*/,
532
 
    int /*nrectFill*/,
533
 
    xRectangle * /*prectInit*/
534
 
);
535
 
/* iplfillsp.c */
536
 
 
537
 
extern void iplUnnaturalTileFS(
538
 
    DrawablePtr /*pDrawable*/,
539
 
    GCPtr/*pGC*/,
540
 
    int /*nInit*/,
541
 
    DDXPointPtr /*pptInit*/,
542
 
    int * /*pwidthInit*/,
543
 
    int /*fSorted*/
544
 
);
545
 
 
546
 
extern void iplUnnaturalStippleFS(
547
 
    DrawablePtr /*pDrawable*/,
548
 
    GCPtr/*pGC*/,
549
 
    int /*nInit*/,
550
 
    DDXPointPtr /*pptInit*/,
551
 
    int * /*pwidthInit*/,
552
 
    int /*fSorted*/
553
 
);
554
 
 
555
 
extern void ipl8Stipple32FS(
556
 
    DrawablePtr /*pDrawable*/,
557
 
    GCPtr /*pGC*/,
558
 
    int /*nInit*/,
559
 
    DDXPointPtr /*pptInit*/,
560
 
    int * /*pwidthInit*/,
561
 
    int /*fSorted*/
562
 
);
563
 
 
564
 
extern 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
 
 
574
 
extern GCOpsPtr iplMatchCommon(
575
 
    GCPtr /*pGC*/,
576
 
    iplPrivGCPtr /*devPriv*/
577
 
);
578
 
 
579
 
extern Bool iplCreateGC(
580
 
    GCPtr /*pGC*/
581
 
);
582
 
 
583
 
extern void iplValidateGC(
584
 
    GCPtr /*pGC*/,
585
 
    unsigned long /*changes*/,
586
 
    DrawablePtr /*pDrawable*/
587
 
);
588
 
 
589
 
/* iplgetsp.c */
590
 
 
591
 
extern 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
 
 
601
 
extern 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
 
 
612
 
extern 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
 
 
623
 
extern 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
 
 
634
 
extern 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
 
 
646
 
extern 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
 
 
657
 
extern 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
 
 
670
 
extern 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
 
 
682
 
extern void iplLineSS(
683
 
    DrawablePtr /*pDrawable*/,
684
 
    GCPtr /*pGC*/,
685
 
    int /*mode*/,
686
 
    int /*npt*/,
687
 
    DDXPointPtr /*pptInit*/
688
 
);
689
 
 
690
 
extern 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
 
 
700
 
extern PixmapPtr iplCreatePixmap(
701
 
    ScreenPtr /*pScreen*/,
702
 
    int /*width*/,
703
 
    int /*height*/,
704
 
    int /*depth*/
705
 
);
706
 
 
707
 
extern Bool iplDestroyPixmap(
708
 
    PixmapPtr /*pPixmap*/
709
 
);
710
 
 
711
 
extern PixmapPtr iplCopyPixmap(
712
 
    PixmapPtr /*pSrc*/
713
 
);
714
 
 
715
 
extern void iplPadPixmap(
716
 
    PixmapPtr /*pPixmap*/
717
 
);
718
 
 
719
 
extern void iplXRotatePixmap(
720
 
    PixmapPtr /*pPix*/,
721
 
    int /*rw*/
722
 
);
723
 
 
724
 
extern void iplYRotatePixmap(
725
 
    PixmapPtr /*pPix*/,
726
 
    int /*rh*/
727
 
);
728
 
 
729
 
extern void iplCopyRotatePixmap(
730
 
    PixmapPtr /*psrcPix*/,
731
 
    PixmapPtr * /*ppdstPix*/,
732
 
    int /*xrot*/,
733
 
    int /*yrot*/
734
 
);
735
 
/* iplply1rctC.c */
736
 
 
737
 
extern 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
 
 
747
 
extern 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
 
 
757
 
extern void iplPaintWindow(
758
 
    WindowPtr /*pWin*/,
759
 
    RegionPtr /*pRegion*/,
760
 
    int /*what*/
761
 
);
762
 
 
763
 
extern void iplFillBoxSolid(
764
 
    DrawablePtr /*pDrawable*/,
765
 
    int /*nBox*/,
766
 
    BoxPtr /*pBox*/,
767
 
    unsigned long /*pixel*/
768
 
);
769
 
 
770
 
extern void iplFillBoxTile32(
771
 
    DrawablePtr /*pDrawable*/,
772
 
    int /*nBox*/,
773
 
    BoxPtr /*pBox*/,
774
 
    PixmapPtr /*tile*/
775
 
);
776
 
/* iplpolypnt.c */
777
 
 
778
 
extern void iplPolyPoint(
779
 
    DrawablePtr /*pDrawable*/,
780
 
    GCPtr /*pGC*/,
781
 
    int /*mode*/,
782
 
    int /*npt*/,
783
 
    xPoint * /*pptInit*/
784
 
);
785
 
/* iplpush8.c */
786
 
 
787
 
extern 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
 
 
798
 
extern void ipl8FillRectOpaqueStippled32(
799
 
    DrawablePtr /*pDrawable*/,
800
 
    GCPtr /*pGC*/,
801
 
    int /*nBox*/,
802
 
    BoxPtr /*pBox*/
803
 
);
804
 
 
805
 
extern void ipl8FillRectTransparentStippled32(
806
 
    DrawablePtr /*pDrawable*/,
807
 
    GCPtr /*pGC*/,
808
 
    int /*nBox*/,
809
 
    BoxPtr /*pBox*/
810
 
);
811
 
 
812
 
extern void ipl8FillRectStippledUnnatural(
813
 
    DrawablePtr /*pDrawable*/,
814
 
    GCPtr /*pGC*/,
815
 
    int /*nBox*/,
816
 
    BoxPtr /*pBox*/
817
 
);
818
 
/* iplrrop.c */
819
 
 
820
 
extern 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
 
 
829
 
extern Bool iplCloseScreen(
830
 
    int /*index*/,
831
 
    ScreenPtr /*pScreen*/
832
 
);
833
 
 
834
 
extern 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
 
 
844
 
extern 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
 
 
854
 
extern 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
 
 
864
 
extern PixmapPtr iplGetScreenPixmap(
865
 
    ScreenPtr /*pScreen*/
866
 
);
867
 
 
868
 
extern void iplSetScreenPixmap(
869
 
    PixmapPtr /*pPix*/
870
 
);
871
 
 
872
 
/* iplseg.c */
873
 
 
874
 
extern void iplSegmentSS(
875
 
    DrawablePtr /*pDrawable*/,
876
 
    GCPtr /*pGC*/,
877
 
    int /*nseg*/,
878
 
    xSegment * /*pSeg*/
879
 
);
880
 
 
881
 
extern void iplSegmentSD(
882
 
    DrawablePtr /*pDrawable*/,
883
 
    GCPtr /*pGC*/,
884
 
    int /*nseg*/,
885
 
    xSegment * /*pSeg*/
886
 
);
887
 
/* iplsetsp.c */
888
 
 
889
 
extern 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
 
 
901
 
extern 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
 
 
912
 
extern void iplFillRectSolidCopy(
913
 
    DrawablePtr /*pDrawable*/,
914
 
    GCPtr /*pGC*/,
915
 
    int /*nBox*/,
916
 
    BoxPtr /*pBox*/
917
 
);
918
 
 
919
 
extern 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
 
 
929
 
extern void iplFillRectSolidGeneral(
930
 
    DrawablePtr /*pDrawable*/,
931
 
    GCPtr /*pGC*/,
932
 
    int /*nBox*/,
933
 
    BoxPtr /*pBox*/
934
 
);
935
 
 
936
 
extern 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
 
 
946
 
extern void iplFillRectSolidXor(
947
 
    DrawablePtr /*pDrawable*/,
948
 
    GCPtr /*pGC*/,
949
 
    int /*nBox*/,
950
 
    BoxPtr /*pBox*/
951
 
);
952
 
 
953
 
extern 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
 
 
963
 
extern 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
 
 
974
 
extern 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
 
 
985
 
extern void iplFillRectTile32Copy(
986
 
    DrawablePtr /*pDrawable*/,
987
 
    GCPtr /*pGC*/,
988
 
    int /*nBox*/,
989
 
    BoxPtr /*pBox*/
990
 
);
991
 
 
992
 
extern 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
 
 
1002
 
extern void iplFillRectTile32General(
1003
 
    DrawablePtr /*pDrawable*/,
1004
 
    GCPtr /*pGC*/,
1005
 
    int /*nBox*/,
1006
 
    BoxPtr /*pBox*/
1007
 
);
1008
 
 
1009
 
extern 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
 
 
1019
 
extern 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
 
 
1030
 
extern 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
 
 
1042
 
extern 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
 
 
1053
 
extern 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
 
 
1066
 
extern 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
 
 
1077
 
extern 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
 
 
1089
 
extern 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
 
 
1100
 
extern 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
 
 
1113
 
extern Bool iplCreateWindow(
1114
 
    WindowPtr /*pWin*/
1115
 
);
1116
 
 
1117
 
extern Bool iplDestroyWindow(
1118
 
    WindowPtr /*pWin*/
1119
 
);
1120
 
 
1121
 
extern Bool iplMapWindow(
1122
 
    WindowPtr /*pWindow*/
1123
 
);
1124
 
 
1125
 
extern Bool iplPositionWindow(
1126
 
    WindowPtr /*pWin*/,
1127
 
    int /*x*/,
1128
 
    int /*y*/
1129
 
);
1130
 
 
1131
 
extern Bool iplUnmapWindow(
1132
 
    WindowPtr /*pWindow*/
1133
 
);
1134
 
 
1135
 
extern void iplCopyWindow(
1136
 
    WindowPtr /*pWin*/,
1137
 
    DDXPointRec /*ptOldOrg*/,
1138
 
    RegionPtr /*prgnSrc*/
1139
 
);
1140
 
 
1141
 
extern Bool iplChangeWindowAttributes(
1142
 
    WindowPtr /*pWin*/,
1143
 
    unsigned long /*mask*/
1144
 
);
1145
 
/* iplzerarcC.c */
1146
 
 
1147
 
extern void iplZeroPolyArcSS8Copy(
1148
 
    DrawablePtr /*pDraw*/,
1149
 
    GCPtr /*pGC*/,
1150
 
    int /*narcs*/,
1151
 
    xArc * /*parcs*/
1152
 
);
1153
 
/* iplzerarcG.c */
1154
 
 
1155
 
extern void iplZeroPolyArcSS8General(
1156
 
    DrawablePtr /*pDraw*/,
1157
 
    GCPtr /*pGC*/,
1158
 
    int /*narcs*/,
1159
 
    xArc * /*parcs*/
1160
 
);
1161
 
/* iplzerarcX.c */
1162
 
 
1163
 
extern 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
 
 
1176
 
extern 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