~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/programs/Xserver/include/scrnintstr.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Xorg: scrnintstr.h,v 1.4 2001/02/09 02:05:15 xorgcvs Exp $ */
 
2
/***********************************************************
 
3
 
 
4
Copyright 1987, 1998  The Open Group
 
5
 
 
6
Permission to use, copy, modify, distribute, and sell this software and its
 
7
documentation for any purpose is hereby granted without fee, provided that
 
8
the above copyright notice appear in all copies and that both that
 
9
copyright notice and this permission notice appear in supporting
 
10
documentation.
 
11
 
 
12
The above copyright notice and this permission notice shall be included in
 
13
all copies or substantial portions of the Software.
 
14
 
 
15
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
16
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
17
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
 
18
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
 
19
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 
20
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
21
 
 
22
Except as contained in this notice, the name of The Open Group shall not be
 
23
used in advertising or otherwise to promote the sale, use or other dealings
 
24
in this Software without prior written authorization from The Open Group.
 
25
 
 
26
 
 
27
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
 
28
 
 
29
                        All Rights Reserved
 
30
 
 
31
Permission to use, copy, modify, and distribute this software and its 
 
32
documentation for any purpose and without fee is hereby granted, 
 
33
provided that the above copyright notice appear in all copies and that
 
34
both that copyright notice and this permission notice appear in 
 
35
supporting documentation, and that the name of Digital not be
 
36
used in advertising or publicity pertaining to distribution of the
 
37
software without specific, written prior permission.  
 
38
 
 
39
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 
40
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
 
41
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
 
42
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
 
43
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 
44
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 
45
SOFTWARE.
 
46
 
 
47
******************************************************************/
 
48
/* $XFree86: xc/programs/Xserver/include/scrnintstr.h,v 1.10 2001/12/14 19:59:56 dawes Exp $ */
 
49
 
 
50
#ifndef SCREENINTSTRUCT_H
 
51
#define SCREENINTSTRUCT_H
 
52
 
 
53
#include "screenint.h"
 
54
#include "miscstruct.h"
 
55
#include "bstore.h"
 
56
#include "colormap.h"
 
57
#include "cursor.h"
 
58
#include "validate.h"
 
59
#include "X11/Xproto.h"
 
60
#include "dix.h"
 
61
 
 
62
typedef struct _PixmapFormat {
 
63
    unsigned char       depth;
 
64
    unsigned char       bitsPerPixel;
 
65
    unsigned char       scanlinePad;
 
66
    } PixmapFormatRec;
 
67
    
 
68
typedef struct _Visual {
 
69
    VisualID            vid;
 
70
    short               class;
 
71
    short               bitsPerRGBValue;
 
72
    short               ColormapEntries;
 
73
    short               nplanes;/* = log2 (ColormapEntries). This does not
 
74
                                 * imply that the screen has this many planes.
 
75
                                 * it may have more or fewer */
 
76
    unsigned long       redMask, greenMask, blueMask;
 
77
    int                 offsetRed, offsetGreen, offsetBlue;
 
78
  } VisualRec;
 
79
 
 
80
typedef struct _Depth {
 
81
    unsigned char       depth;
 
82
    short               numVids;
 
83
    VisualID            *vids;    /* block of visual ids for this depth */
 
84
  } DepthRec;
 
85
 
 
86
 
 
87
/*
 
88
 *  There is a typedef for each screen function pointer so that code that
 
89
 *  needs to declare a screen function pointer (e.g. in a screen private
 
90
 *  or as a local variable) can easily do so and retain full type checking.
 
91
 */
 
92
 
 
93
typedef    Bool (* CloseScreenProcPtr)(
 
94
#if NeedNestedPrototypes
 
95
        int /*index*/,
 
96
        ScreenPtr /*pScreen*/
 
97
#endif
 
98
);
 
99
 
 
100
typedef    void (* QueryBestSizeProcPtr)(
 
101
#if NeedNestedPrototypes
 
102
        int /*class*/,
 
103
        unsigned short * /*pwidth*/,
 
104
        unsigned short * /*pheight*/,
 
105
        ScreenPtr /*pScreen*/
 
106
#endif
 
107
);
 
108
 
 
109
typedef    Bool (* SaveScreenProcPtr)(
 
110
#if NeedNestedPrototypes
 
111
         ScreenPtr /*pScreen*/,
 
112
         int /*on*/
 
113
#endif
 
114
);
 
115
 
 
116
typedef    void (* GetImageProcPtr)(
 
117
#if NeedNestedPrototypes
 
118
        DrawablePtr /*pDrawable*/,
 
119
        int /*sx*/,
 
120
        int /*sy*/,
 
121
        int /*w*/,
 
122
        int /*h*/,
 
123
        unsigned int /*format*/,
 
124
        unsigned long /*planeMask*/,
 
125
        char * /*pdstLine*/
 
126
#endif
 
127
);
 
128
 
 
129
typedef    void (* GetSpansProcPtr)(
 
130
#if NeedNestedPrototypes
 
131
        DrawablePtr /*pDrawable*/,
 
132
        int /*wMax*/,
 
133
        DDXPointPtr /*ppt*/,
 
134
        int* /*pwidth*/,
 
135
        int /*nspans*/,
 
136
        char * /*pdstStart*/
 
137
#endif
 
138
);
 
139
 
 
140
typedef    void (* PointerNonInterestBoxProcPtr)(
 
141
#if NeedNestedPrototypes
 
142
        ScreenPtr /*pScreen*/,
 
143
        BoxPtr /*pBox*/
 
144
#endif
 
145
);
 
146
 
 
147
typedef    void (* SourceValidateProcPtr)(
 
148
#if NeedNestedPrototypes
 
149
        DrawablePtr /*pDrawable*/,
 
150
        int /*x*/,
 
151
        int /*y*/,
 
152
        int /*width*/,
 
153
        int /*height*/
 
154
#endif
 
155
);
 
156
 
 
157
typedef    Bool (* CreateWindowProcPtr)(
 
158
#if NeedNestedPrototypes
 
159
        WindowPtr /*pWindow*/
 
160
#endif
 
161
);
 
162
 
 
163
typedef    Bool (* DestroyWindowProcPtr)(
 
164
#if NeedNestedPrototypes
 
165
        WindowPtr /*pWindow*/
 
166
#endif
 
167
);
 
168
 
 
169
typedef    Bool (* PositionWindowProcPtr)(
 
170
#if NeedNestedPrototypes
 
171
        WindowPtr /*pWindow*/,
 
172
        int /*x*/,
 
173
        int /*y*/
 
174
#endif
 
175
);
 
176
 
 
177
typedef    Bool (* ChangeWindowAttributesProcPtr)(
 
178
#if NeedNestedPrototypes
 
179
        WindowPtr /*pWindow*/,
 
180
        unsigned long /*mask*/
 
181
#endif
 
182
);
 
183
 
 
184
typedef    Bool (* RealizeWindowProcPtr)(
 
185
#if NeedNestedPrototypes
 
186
        WindowPtr /*pWindow*/
 
187
#endif
 
188
);
 
189
 
 
190
typedef    Bool (* UnrealizeWindowProcPtr)(
 
191
#if NeedNestedPrototypes
 
192
        WindowPtr /*pWindow*/
 
193
#endif
 
194
);
 
195
 
 
196
typedef    void (* RestackWindowProcPtr)(
 
197
#if NeedNestedPrototypes
 
198
        WindowPtr /*pWindow*/,
 
199
        WindowPtr /*pOldNextSib*/
 
200
#endif
 
201
);
 
202
 
 
203
typedef    int  (* ValidateTreeProcPtr)(
 
204
#if NeedNestedPrototypes
 
205
        WindowPtr /*pParent*/,
 
206
        WindowPtr /*pChild*/,
 
207
        VTKind /*kind*/
 
208
#endif
 
209
);
 
210
 
 
211
typedef    void (* PostValidateTreeProcPtr)(
 
212
#if NeedNestedPrototypes
 
213
        WindowPtr /*pParent*/,
 
214
        WindowPtr /*pChild*/,
 
215
        VTKind /*kind*/
 
216
#endif
 
217
);
 
218
 
 
219
typedef    void (* WindowExposuresProcPtr)(
 
220
#if NeedNestedPrototypes
 
221
        WindowPtr /*pWindow*/,
 
222
        RegionPtr /*prgn*/,
 
223
        RegionPtr /*other_exposed*/
 
224
#endif
 
225
);
 
226
 
 
227
typedef    void (* PaintWindowProcPtr)(
 
228
#if NeedNestedPrototypes
 
229
        WindowPtr /*pWindow*/,
 
230
        RegionPtr /*pRegion*/,
 
231
        int /*what*/
 
232
#endif
 
233
);
 
234
 
 
235
typedef PaintWindowProcPtr PaintWindowBackgroundProcPtr;
 
236
typedef PaintWindowProcPtr PaintWindowBorderProcPtr;
 
237
 
 
238
typedef    void (* CopyWindowProcPtr)(
 
239
#if NeedNestedPrototypes
 
240
        WindowPtr /*pWindow*/,
 
241
        DDXPointRec /*ptOldOrg*/,
 
242
        RegionPtr /*prgnSrc*/
 
243
#endif
 
244
);
 
245
 
 
246
typedef    void (* ClearToBackgroundProcPtr)(
 
247
#if NeedNestedPrototypes
 
248
        WindowPtr /*pWindow*/,
 
249
        int /*x*/,
 
250
        int /*y*/,
 
251
        int /*w*/,
 
252
        int /*h*/,
 
253
        Bool /*generateExposures*/
 
254
#endif
 
255
);
 
256
 
 
257
typedef    void (* ClipNotifyProcPtr)(
 
258
#if NeedNestedPrototypes
 
259
        WindowPtr /*pWindow*/,
 
260
        int /*dx*/,
 
261
        int /*dy*/
 
262
#endif
 
263
);
 
264
 
 
265
typedef    PixmapPtr (* CreatePixmapProcPtr)(
 
266
#if NeedNestedPrototypes
 
267
        ScreenPtr /*pScreen*/,
 
268
        int /*width*/,
 
269
        int /*height*/,
 
270
        int /*depth*/
 
271
#endif
 
272
);
 
273
 
 
274
typedef    Bool (* DestroyPixmapProcPtr)(
 
275
#if NeedNestedPrototypes
 
276
        PixmapPtr /*pPixmap*/
 
277
#endif
 
278
);
 
279
 
 
280
typedef    void (* SaveDoomedAreasProcPtr)(
 
281
#if NeedNestedPrototypes
 
282
        WindowPtr /*pWindow*/,
 
283
        RegionPtr /*prgnSave*/,
 
284
        int /*xorg*/,
 
285
        int /*yorg*/
 
286
#endif
 
287
);
 
288
 
 
289
typedef    RegionPtr (* RestoreAreasProcPtr)(
 
290
#if NeedNestedPrototypes
 
291
        WindowPtr /*pWindow*/,
 
292
        RegionPtr /*prgnRestore*/
 
293
#endif
 
294
);
 
295
 
 
296
typedef    void (* ExposeCopyProcPtr)(
 
297
#if NeedNestedPrototypes
 
298
        WindowPtr /*pSrc*/,
 
299
        DrawablePtr /*pDst*/,
 
300
        GCPtr /*pGC*/,
 
301
        RegionPtr /*prgnExposed*/,
 
302
        int /*srcx*/,
 
303
        int /*srcy*/,
 
304
        int /*dstx*/,
 
305
        int /*dsty*/,
 
306
        unsigned long /*plane*/
 
307
#endif
 
308
);
 
309
 
 
310
typedef    RegionPtr (* TranslateBackingStoreProcPtr)(
 
311
#if NeedNestedPrototypes
 
312
        WindowPtr /*pWindow*/,
 
313
        int /*windx*/,
 
314
        int /*windy*/,
 
315
        RegionPtr /*oldClip*/,
 
316
        int /*oldx*/,
 
317
        int /*oldy*/
 
318
#endif
 
319
);
 
320
 
 
321
typedef    RegionPtr (* ClearBackingStoreProcPtr)(
 
322
#if NeedNestedPrototypes
 
323
        WindowPtr /*pWindow*/,
 
324
        int /*x*/,
 
325
        int /*y*/,
 
326
        int /*w*/,
 
327
        int /*h*/,
 
328
        Bool /*generateExposures*/
 
329
#endif
 
330
);
 
331
 
 
332
typedef    void (* DrawGuaranteeProcPtr)(
 
333
#if NeedNestedPrototypes
 
334
        WindowPtr /*pWindow*/,
 
335
        GCPtr /*pGC*/,
 
336
        int /*guarantee*/
 
337
#endif
 
338
);
 
339
    
 
340
typedef    Bool (* RealizeFontProcPtr)(
 
341
#if NeedNestedPrototypes
 
342
        ScreenPtr /*pScreen*/,
 
343
        FontPtr /*pFont*/
 
344
#endif
 
345
);
 
346
 
 
347
typedef    Bool (* UnrealizeFontProcPtr)(
 
348
#if NeedNestedPrototypes
 
349
        ScreenPtr /*pScreen*/,
 
350
        FontPtr /*pFont*/
 
351
#endif
 
352
);
 
353
 
 
354
typedef    void (* ConstrainCursorProcPtr)(
 
355
#if NeedNestedPrototypes
 
356
        ScreenPtr /*pScreen*/,
 
357
        BoxPtr /*pBox*/
 
358
#endif
 
359
);
 
360
 
 
361
typedef    void (* CursorLimitsProcPtr)(
 
362
#if NeedNestedPrototypes
 
363
        ScreenPtr /*pScreen*/,
 
364
        CursorPtr /*pCursor*/,
 
365
        BoxPtr /*pHotBox*/,
 
366
        BoxPtr /*pTopLeftBox*/
 
367
#endif
 
368
);
 
369
 
 
370
typedef    Bool (* DisplayCursorProcPtr)(
 
371
#if NeedNestedPrototypes
 
372
        ScreenPtr /*pScreen*/,
 
373
        CursorPtr /*pCursor*/
 
374
#endif
 
375
);
 
376
 
 
377
typedef    Bool (* RealizeCursorProcPtr)(
 
378
#if NeedNestedPrototypes
 
379
        ScreenPtr /*pScreen*/,
 
380
        CursorPtr /*pCursor*/
 
381
#endif
 
382
);
 
383
 
 
384
typedef    Bool (* UnrealizeCursorProcPtr)(
 
385
#if NeedNestedPrototypes
 
386
        ScreenPtr /*pScreen*/,
 
387
        CursorPtr /*pCursor*/
 
388
#endif
 
389
);
 
390
 
 
391
typedef    void (* RecolorCursorProcPtr)(
 
392
#if NeedNestedPrototypes
 
393
        ScreenPtr /*pScreen*/,
 
394
        CursorPtr /*pCursor*/,
 
395
        Bool /*displayed*/
 
396
#endif
 
397
);
 
398
 
 
399
typedef    Bool (* SetCursorPositionProcPtr)(
 
400
#if NeedNestedPrototypes
 
401
        ScreenPtr /*pScreen*/,
 
402
        int /*x*/,
 
403
        int /*y*/,
 
404
        Bool /*generateEvent*/
 
405
#endif
 
406
);
 
407
 
 
408
typedef    Bool (* CreateGCProcPtr)(
 
409
#if NeedNestedPrototypes
 
410
        GCPtr /*pGC*/
 
411
#endif
 
412
);
 
413
 
 
414
typedef    Bool (* CreateColormapProcPtr)(
 
415
#if NeedNestedPrototypes
 
416
        ColormapPtr /*pColormap*/
 
417
#endif
 
418
);
 
419
 
 
420
typedef    void (* DestroyColormapProcPtr)(
 
421
#if NeedNestedPrototypes
 
422
        ColormapPtr /*pColormap*/
 
423
#endif
 
424
);
 
425
 
 
426
typedef    void (* InstallColormapProcPtr)(
 
427
#if NeedNestedPrototypes
 
428
        ColormapPtr /*pColormap*/
 
429
#endif
 
430
);
 
431
 
 
432
typedef    void (* UninstallColormapProcPtr)(
 
433
#if NeedNestedPrototypes
 
434
        ColormapPtr /*pColormap*/
 
435
#endif
 
436
);
 
437
 
 
438
typedef    int (* ListInstalledColormapsProcPtr) (
 
439
#if NeedNestedPrototypes
 
440
        ScreenPtr /*pScreen*/,
 
441
        XID* /*pmaps */
 
442
#endif
 
443
);
 
444
 
 
445
typedef    void (* StoreColorsProcPtr)(
 
446
#if NeedNestedPrototypes
 
447
        ColormapPtr /*pColormap*/,
 
448
        int /*ndef*/,
 
449
        xColorItem * /*pdef*/
 
450
#endif
 
451
);
 
452
 
 
453
typedef    void (* ResolveColorProcPtr)(
 
454
#if NeedNestedPrototypes
 
455
        unsigned short* /*pred*/,
 
456
        unsigned short* /*pgreen*/,
 
457
        unsigned short* /*pblue*/,
 
458
        VisualPtr /*pVisual*/
 
459
#endif
 
460
);
 
461
 
 
462
#ifdef NEED_SCREEN_REGIONS
 
463
 
 
464
typedef    RegionPtr (* RegionCreateProcPtr)(
 
465
#if NeedNestedPrototypes
 
466
        BoxPtr /*rect*/,
 
467
        int /*size*/
 
468
#endif
 
469
);
 
470
 
 
471
typedef    void (* RegionInitProcPtr)(
 
472
#if NeedNestedPrototypes
 
473
        RegionPtr /*pReg*/,
 
474
        BoxPtr /*rect*/,
 
475
        int /*size*/
 
476
#endif
 
477
);
 
478
 
 
479
typedef    Bool (* RegionCopyProcPtr)(
 
480
#if NeedNestedPrototypes
 
481
        RegionPtr /*dst*/,
 
482
        RegionPtr /*src*/
 
483
#endif
 
484
);
 
485
 
 
486
typedef    void (* RegionDestroyProcPtr)(
 
487
#if NeedNestedPrototypes
 
488
        RegionPtr /*pReg*/
 
489
#endif
 
490
);
 
491
 
 
492
typedef    void (* RegionUninitProcPtr)(
 
493
#if NeedNestedPrototypes
 
494
        RegionPtr /*pReg*/
 
495
#endif
 
496
);
 
497
 
 
498
typedef    Bool (* IntersectProcPtr)(
 
499
#if NeedNestedPrototypes
 
500
        RegionPtr /*newReg*/,
 
501
        RegionPtr /*reg1*/,
 
502
        RegionPtr /*reg2*/
 
503
#endif
 
504
);
 
505
 
 
506
typedef    Bool (* UnionProcPtr)(
 
507
#if NeedNestedPrototypes
 
508
        RegionPtr /*newReg*/,
 
509
        RegionPtr /*reg1*/,
 
510
        RegionPtr /*reg2*/
 
511
#endif
 
512
);
 
513
 
 
514
typedef    Bool (* SubtractProcPtr)(
 
515
#if NeedNestedPrototypes
 
516
        RegionPtr /*regD*/,
 
517
        RegionPtr /*regM*/,
 
518
        RegionPtr /*regS*/
 
519
#endif
 
520
);
 
521
 
 
522
typedef    Bool (* InverseProcPtr)(
 
523
#if NeedNestedPrototypes
 
524
        RegionPtr /*newReg*/,
 
525
        RegionPtr /*reg1*/,
 
526
        BoxPtr /*invRect*/
 
527
#endif
 
528
);
 
529
 
 
530
typedef    void (* RegionResetProcPtr)(
 
531
#if NeedNestedPrototypes
 
532
        RegionPtr /*pReg*/,
 
533
        BoxPtr /*pBox*/
 
534
#endif
 
535
);
 
536
 
 
537
typedef    void (* TranslateRegionProcPtr)(
 
538
#if NeedNestedPrototypes
 
539
        RegionPtr /*pReg*/,
 
540
        int /*x*/,
 
541
        int /*y*/
 
542
#endif
 
543
);
 
544
 
 
545
typedef    int (* RectInProcPtr)(
 
546
#if NeedNestedPrototypes
 
547
        RegionPtr /*region*/,
 
548
        BoxPtr /*prect*/
 
549
#endif
 
550
);
 
551
 
 
552
typedef    Bool (* PointInRegionProcPtr)(
 
553
#if NeedNestedPrototypes
 
554
        RegionPtr /*pReg*/,
 
555
        int /*x*/,
 
556
        int /*y*/,
 
557
        BoxPtr /*box*/
 
558
#endif
 
559
);
 
560
 
 
561
typedef    Bool (* RegionNotEmptyProcPtr)(
 
562
#if NeedNestedPrototypes
 
563
        RegionPtr /*pReg*/
 
564
#endif
 
565
);
 
566
 
 
567
typedef    Bool (* RegionBrokenProcPtr)(
 
568
#if NeedNestedPrototypes
 
569
        RegionPtr /*pReg*/
 
570
#endif
 
571
);
 
572
 
 
573
typedef    Bool (* RegionBreakProcPtr)(
 
574
#if NeedNestedPrototypes
 
575
        RegionPtr /*pReg*/
 
576
#endif
 
577
);
 
578
 
 
579
typedef    void (* RegionEmptyProcPtr)(
 
580
#if NeedNestedPrototypes
 
581
        RegionPtr /*pReg*/
 
582
#endif
 
583
);
 
584
 
 
585
typedef    BoxPtr (* RegionExtentsProcPtr)(
 
586
#if NeedNestedPrototypes
 
587
        RegionPtr /*pReg*/
 
588
#endif
 
589
);
 
590
 
 
591
typedef    Bool (* RegionAppendProcPtr)(
 
592
#if NeedNestedPrototypes
 
593
        RegionPtr /*dstrgn*/,
 
594
        RegionPtr /*rgn*/
 
595
#endif
 
596
);
 
597
 
 
598
typedef    Bool (* RegionValidateProcPtr)(
 
599
#if NeedNestedPrototypes
 
600
        RegionPtr /*badreg*/,
 
601
        Bool* /*pOverlap*/
 
602
#endif
 
603
);
 
604
 
 
605
#endif /* NEED_SCREEN_REGIONS */
 
606
 
 
607
typedef    RegionPtr (* BitmapToRegionProcPtr)(
 
608
#if NeedNestedPrototypes
 
609
        PixmapPtr /*pPix*/
 
610
#endif
 
611
);
 
612
 
 
613
#ifdef NEED_SCREEN_REGIONS
 
614
 
 
615
typedef    RegionPtr (* RectsToRegionProcPtr)(
 
616
#if NeedNestedPrototypes
 
617
        int /*nrects*/,
 
618
        xRectangle* /*prect*/,
 
619
        int /*ctype*/
 
620
#endif
 
621
);
 
622
 
 
623
#endif /* NEED_SCREEN_REGIONS */
 
624
 
 
625
typedef    void (* SendGraphicsExposeProcPtr)(
 
626
#if NeedNestedPrototypes
 
627
        ClientPtr /*client*/,
 
628
        RegionPtr /*pRgn*/,
 
629
        XID /*drawable*/,
 
630
        int /*major*/,
 
631
        int /*minor*/
 
632
#endif
 
633
);
 
634
 
 
635
typedef    void (* ScreenBlockHandlerProcPtr)(
 
636
#if NeedNestedPrototypes
 
637
        int /*screenNum*/,
 
638
        pointer /*blockData*/,
 
639
        pointer /*pTimeout*/,
 
640
        pointer /*pReadmask*/
 
641
#endif
 
642
);
 
643
 
 
644
typedef    void (* ScreenWakeupHandlerProcPtr)(
 
645
#if NeedNestedPrototypes
 
646
         int /*screenNum*/,
 
647
         pointer /*wakeupData*/,
 
648
         unsigned long /*result*/,
 
649
         pointer /*pReadMask*/
 
650
#endif
 
651
);
 
652
 
 
653
typedef    Bool (* CreateScreenResourcesProcPtr)(
 
654
#if NeedNestedPrototypes
 
655
        ScreenPtr /*pScreen*/
 
656
#endif
 
657
);
 
658
 
 
659
typedef    Bool (* ModifyPixmapHeaderProcPtr)(
 
660
#if NeedNestedPrototypes
 
661
        PixmapPtr /*pPixmap*/,
 
662
        int /*width*/,
 
663
        int /*height*/,
 
664
        int /*depth*/,
 
665
        int /*bitsPerPixel*/,
 
666
        int /*devKind*/,
 
667
        pointer /*pPixData*/
 
668
#endif
 
669
);
 
670
 
 
671
typedef    PixmapPtr (* GetWindowPixmapProcPtr)(
 
672
#if NeedNestedPrototypes
 
673
        WindowPtr /*pWin*/
 
674
#endif
 
675
);
 
676
 
 
677
typedef    void (* SetWindowPixmapProcPtr)(
 
678
#if NeedNestedPrototypes
 
679
        WindowPtr /*pWin*/,
 
680
        PixmapPtr /*pPix*/
 
681
#endif
 
682
);
 
683
 
 
684
typedef    PixmapPtr (* GetScreenPixmapProcPtr)(
 
685
#if NeedNestedPrototypes
 
686
        ScreenPtr /*pScreen*/
 
687
#endif
 
688
);
 
689
 
 
690
typedef    void (* SetScreenPixmapProcPtr)(
 
691
#if NeedNestedPrototypes
 
692
        PixmapPtr /*pPix*/
 
693
#endif
 
694
);
 
695
 
 
696
typedef    void (* MarkWindowProcPtr)(
 
697
#if NeedNestedPrototypes
 
698
        WindowPtr /*pWin*/
 
699
#endif
 
700
);
 
701
 
 
702
typedef    Bool (* MarkOverlappedWindowsProcPtr)(
 
703
#if NeedNestedPrototypes
 
704
        WindowPtr /*parent*/,
 
705
        WindowPtr /*firstChild*/,
 
706
        WindowPtr * /*pLayerWin*/
 
707
#endif
 
708
);
 
709
 
 
710
typedef    Bool (* ChangeSaveUnderProcPtr)(
 
711
#if NeedNestedPrototypes
 
712
        WindowPtr /*pLayerWin*/,
 
713
        WindowPtr /*firstChild*/
 
714
#endif
 
715
);
 
716
 
 
717
typedef    void (* PostChangeSaveUnderProcPtr)(
 
718
#if NeedNestedPrototypes
 
719
        WindowPtr /*pLayerWin*/,
 
720
        WindowPtr /*firstChild*/
 
721
#endif
 
722
);
 
723
 
 
724
typedef    void (* MoveWindowProcPtr)(
 
725
#if NeedNestedPrototypes
 
726
        WindowPtr /*pWin*/,
 
727
        int /*x*/,
 
728
        int /*y*/,
 
729
        WindowPtr /*pSib*/,
 
730
        VTKind /*kind*/
 
731
#endif
 
732
);
 
733
 
 
734
typedef    void (* ResizeWindowProcPtr)(
 
735
#if NeedNestedPrototypes
 
736
    WindowPtr /*pWin*/,
 
737
    int /*x*/,
 
738
    int /*y*/, 
 
739
    unsigned int /*w*/,
 
740
    unsigned int /*h*/,
 
741
    WindowPtr /*pSib*/
 
742
#endif
 
743
);
 
744
 
 
745
typedef    WindowPtr (* GetLayerWindowProcPtr)(
 
746
#if NeedNestedPrototypes
 
747
    WindowPtr /*pWin*/
 
748
#endif
 
749
);
 
750
 
 
751
typedef    void (* HandleExposuresProcPtr)(
 
752
#if NeedNestedPrototypes
 
753
    WindowPtr /*pWin*/
 
754
#endif
 
755
);
 
756
 
 
757
typedef    void (* ReparentWindowProcPtr)(
 
758
#if NeedNestedPrototypes
 
759
    WindowPtr /*pWin*/,
 
760
    WindowPtr /*pPriorParent*/
 
761
#endif
 
762
);
 
763
 
 
764
#ifdef SHAPE
 
765
typedef    void (* SetShapeProcPtr)(
 
766
#if NeedFunctionPrototypes
 
767
        WindowPtr /*pWin*/
 
768
#endif
 
769
);
 
770
#endif /* SHAPE */
 
771
 
 
772
typedef    void (* ChangeBorderWidthProcPtr)(
 
773
#if NeedFunctionPrototypes
 
774
        WindowPtr /*pWin*/,
 
775
        unsigned int /*width*/
 
776
#endif
 
777
);
 
778
 
 
779
typedef    void (* MarkUnrealizedWindowProcPtr)(
 
780
#if NeedFunctionPrototypes
 
781
        WindowPtr /*pChild*/,
 
782
        WindowPtr /*pWin*/,
 
783
        Bool /*fromConfigure*/
 
784
#endif
 
785
);
 
786
 
 
787
typedef struct _Screen {
 
788
    int                 myNum;  /* index of this instance in Screens[] */
 
789
    ATOM                id;
 
790
    short               width, height;
 
791
    short               mmWidth, mmHeight;
 
792
    short               numDepths;
 
793
    unsigned char       rootDepth;
 
794
    DepthPtr            allowedDepths;
 
795
    unsigned long       rootVisual;
 
796
    unsigned long       defColormap;
 
797
    short               minInstalledCmaps, maxInstalledCmaps;
 
798
    char                backingStoreSupport, saveUnderSupport;
 
799
    unsigned long       whitePixel, blackPixel;
 
800
    unsigned long       rgf;    /* array of flags; she's -- HUNGARIAN */
 
801
    GCPtr               GCperDepth[MAXFORMATS+1];
 
802
                        /* next field is a stipple to use as default in
 
803
                           a GC.  we don't build default tiles of all depths
 
804
                           because they are likely to be of a color
 
805
                           different from the default fg pixel, so
 
806
                           we don't win anything by building
 
807
                           a standard one.
 
808
                        */
 
809
    PixmapPtr           PixmapPerDepth[1];
 
810
    pointer             devPrivate;
 
811
    short               numVisuals;
 
812
    VisualPtr           visuals;
 
813
    int                 WindowPrivateLen;
 
814
    unsigned            *WindowPrivateSizes;
 
815
    unsigned            totalWindowSize;
 
816
    int                 GCPrivateLen;
 
817
    unsigned            *GCPrivateSizes;
 
818
    unsigned            totalGCSize;
 
819
 
 
820
    /* Random screen procedures */
 
821
 
 
822
    CloseScreenProcPtr          CloseScreen;
 
823
    QueryBestSizeProcPtr        QueryBestSize;
 
824
    SaveScreenProcPtr           SaveScreen;
 
825
    GetImageProcPtr             GetImage;
 
826
    GetSpansProcPtr             GetSpans;
 
827
    PointerNonInterestBoxProcPtr PointerNonInterestBox;
 
828
    SourceValidateProcPtr       SourceValidate;
 
829
 
 
830
    /* Window Procedures */
 
831
 
 
832
    CreateWindowProcPtr         CreateWindow;
 
833
    DestroyWindowProcPtr        DestroyWindow;
 
834
    PositionWindowProcPtr       PositionWindow;
 
835
    ChangeWindowAttributesProcPtr ChangeWindowAttributes;
 
836
    RealizeWindowProcPtr        RealizeWindow;
 
837
    UnrealizeWindowProcPtr      UnrealizeWindow;
 
838
    ValidateTreeProcPtr         ValidateTree;
 
839
    PostValidateTreeProcPtr     PostValidateTree;
 
840
    WindowExposuresProcPtr      WindowExposures;
 
841
    PaintWindowBackgroundProcPtr PaintWindowBackground;
 
842
    PaintWindowBorderProcPtr    PaintWindowBorder;
 
843
    CopyWindowProcPtr           CopyWindow;
 
844
    ClearToBackgroundProcPtr    ClearToBackground;
 
845
    ClipNotifyProcPtr           ClipNotify;
 
846
    RestackWindowProcPtr        RestackWindow;
 
847
 
 
848
    /* Pixmap procedures */
 
849
 
 
850
    CreatePixmapProcPtr         CreatePixmap;
 
851
    DestroyPixmapProcPtr        DestroyPixmap;
 
852
 
 
853
    /* Backing store procedures */
 
854
 
 
855
    SaveDoomedAreasProcPtr      SaveDoomedAreas;
 
856
    RestoreAreasProcPtr         RestoreAreas;
 
857
    ExposeCopyProcPtr           ExposeCopy;
 
858
    TranslateBackingStoreProcPtr TranslateBackingStore;
 
859
    ClearBackingStoreProcPtr    ClearBackingStore;
 
860
    DrawGuaranteeProcPtr        DrawGuarantee;
 
861
    /*
 
862
     * A read/write copy of the lower level backing store vector is needed now
 
863
     * that the functions can be wrapped.
 
864
     */
 
865
    BSFuncRec                   BackingStoreFuncs;
 
866
    
 
867
    /* Font procedures */
 
868
 
 
869
    RealizeFontProcPtr          RealizeFont;
 
870
    UnrealizeFontProcPtr        UnrealizeFont;
 
871
 
 
872
    /* Cursor Procedures */
 
873
 
 
874
    ConstrainCursorProcPtr      ConstrainCursor;
 
875
    CursorLimitsProcPtr         CursorLimits;
 
876
    DisplayCursorProcPtr        DisplayCursor;
 
877
    RealizeCursorProcPtr        RealizeCursor;
 
878
    UnrealizeCursorProcPtr      UnrealizeCursor;
 
879
    RecolorCursorProcPtr        RecolorCursor;
 
880
    SetCursorPositionProcPtr    SetCursorPosition;
 
881
 
 
882
    /* GC procedures */
 
883
 
 
884
    CreateGCProcPtr             CreateGC;
 
885
 
 
886
    /* Colormap procedures */
 
887
 
 
888
    CreateColormapProcPtr       CreateColormap;
 
889
    DestroyColormapProcPtr      DestroyColormap;
 
890
    InstallColormapProcPtr      InstallColormap;
 
891
    UninstallColormapProcPtr    UninstallColormap;
 
892
    ListInstalledColormapsProcPtr ListInstalledColormaps;
 
893
    StoreColorsProcPtr          StoreColors;
 
894
    ResolveColorProcPtr         ResolveColor;
 
895
 
 
896
    /* Region procedures */
 
897
 
 
898
#ifdef NEED_SCREEN_REGIONS
 
899
    RegionCreateProcPtr         RegionCreate;
 
900
    RegionInitProcPtr           RegionInit;
 
901
    RegionCopyProcPtr           RegionCopy;
 
902
    RegionDestroyProcPtr        RegionDestroy;
 
903
    RegionUninitProcPtr         RegionUninit;
 
904
    IntersectProcPtr            Intersect;
 
905
    UnionProcPtr                Union;
 
906
    SubtractProcPtr             Subtract;
 
907
    InverseProcPtr              Inverse;
 
908
    RegionResetProcPtr          RegionReset;
 
909
    TranslateRegionProcPtr      TranslateRegion;
 
910
    RectInProcPtr               RectIn;
 
911
    PointInRegionProcPtr        PointInRegion;
 
912
    RegionNotEmptyProcPtr       RegionNotEmpty;
 
913
    RegionBrokenProcPtr         RegionBroken;
 
914
    RegionBreakProcPtr          RegionBreak;
 
915
    RegionEmptyProcPtr          RegionEmpty;
 
916
    RegionExtentsProcPtr        RegionExtents;
 
917
    RegionAppendProcPtr         RegionAppend;
 
918
    RegionValidateProcPtr       RegionValidate;
 
919
#endif /* NEED_SCREEN_REGIONS */
 
920
    BitmapToRegionProcPtr       BitmapToRegion;
 
921
#ifdef NEED_SCREEN_REGIONS
 
922
    RectsToRegionProcPtr        RectsToRegion;
 
923
#endif /* NEED_SCREEN_REGIONS */
 
924
    SendGraphicsExposeProcPtr   SendGraphicsExpose;
 
925
 
 
926
    /* os layer procedures */
 
927
 
 
928
    ScreenBlockHandlerProcPtr   BlockHandler;
 
929
    ScreenWakeupHandlerProcPtr  WakeupHandler;
 
930
 
 
931
    pointer blockData;
 
932
    pointer wakeupData;
 
933
 
 
934
    /* anybody can get a piece of this array */
 
935
    DevUnion    *devPrivates;
 
936
 
 
937
    CreateScreenResourcesProcPtr CreateScreenResources;
 
938
    ModifyPixmapHeaderProcPtr   ModifyPixmapHeader;
 
939
 
 
940
    GetWindowPixmapProcPtr      GetWindowPixmap;
 
941
    SetWindowPixmapProcPtr      SetWindowPixmap;
 
942
    GetScreenPixmapProcPtr      GetScreenPixmap;
 
943
    SetScreenPixmapProcPtr      SetScreenPixmap;
 
944
 
 
945
    PixmapPtr pScratchPixmap;           /* scratch pixmap "pool" */
 
946
 
 
947
#ifdef PIXPRIV
 
948
    int                 PixmapPrivateLen;
 
949
    unsigned int                *PixmapPrivateSizes;
 
950
    unsigned int                totalPixmapSize;
 
951
#endif
 
952
 
 
953
    MarkWindowProcPtr           MarkWindow;
 
954
    MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
 
955
    ChangeSaveUnderProcPtr      ChangeSaveUnder;
 
956
    PostChangeSaveUnderProcPtr  PostChangeSaveUnder;
 
957
    MoveWindowProcPtr           MoveWindow;
 
958
    ResizeWindowProcPtr         ResizeWindow;
 
959
    GetLayerWindowProcPtr       GetLayerWindow;
 
960
    HandleExposuresProcPtr      HandleExposures;
 
961
    ReparentWindowProcPtr       ReparentWindow;
 
962
 
 
963
#ifdef SHAPE
 
964
    SetShapeProcPtr             SetShape;
 
965
#endif /* SHAPE */
 
966
 
 
967
    ChangeBorderWidthProcPtr    ChangeBorderWidth;
 
968
    MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
 
969
 
 
970
} ScreenRec;
 
971
 
 
972
typedef struct _ScreenInfo {
 
973
    int         imageByteOrder;
 
974
    int         bitmapScanlineUnit;
 
975
    int         bitmapScanlinePad;
 
976
    int         bitmapBitOrder;
 
977
    int         numPixmapFormats;
 
978
    PixmapFormatRec
 
979
                formats[MAXFORMATS];
 
980
    int         arraySize;
 
981
    int         numScreens;
 
982
    ScreenPtr   screens[MAXSCREENS];
 
983
    int         numVideoScreens;
 
984
} ScreenInfo;
 
985
 
 
986
extern ScreenInfo screenInfo;
 
987
 
 
988
extern void InitOutput(
 
989
#if NeedFunctionPrototypes
 
990
    ScreenInfo  * /*pScreenInfo*/,
 
991
    int         /*argc*/,
 
992
    char        ** /*argv*/
 
993
#endif
 
994
);
 
995
 
 
996
#endif /* SCREENINTSTRUCT_H */