1 | /***********************************************************
|
---|
2 |
|
---|
3 | Copyright 1987, 1998 The Open Group
|
---|
4 |
|
---|
5 | Permission to use, copy, modify, distribute, and sell this software and its
|
---|
6 | documentation for any purpose is hereby granted without fee, provided that
|
---|
7 | the above copyright notice appear in all copies and that both that
|
---|
8 | copyright notice and this permission notice appear in supporting
|
---|
9 | documentation.
|
---|
10 |
|
---|
11 | The above copyright notice and this permission notice shall be included in
|
---|
12 | all copies or substantial portions of the Software.
|
---|
13 |
|
---|
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
---|
15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
---|
16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
---|
17 | OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
---|
18 | AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
---|
20 |
|
---|
21 | Except as contained in this notice, the name of The Open Group shall not be
|
---|
22 | used in advertising or otherwise to promote the sale, use or other dealings
|
---|
23 | in this Software without prior written authorization from The Open Group.
|
---|
24 |
|
---|
25 | Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
---|
26 |
|
---|
27 | All Rights Reserved
|
---|
28 |
|
---|
29 | Permission to use, copy, modify, and distribute this software and its
|
---|
30 | documentation for any purpose and without fee is hereby granted,
|
---|
31 | provided that the above copyright notice appear in all copies and that
|
---|
32 | both that copyright notice and this permission notice appear in
|
---|
33 | supporting documentation, and that the name of Digital not be
|
---|
34 | used in advertising or publicity pertaining to distribution of the
|
---|
35 | software without specific, written prior permission.
|
---|
36 |
|
---|
37 | DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
---|
38 | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
---|
39 | DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
---|
40 | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
---|
41 | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
---|
42 | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
---|
43 | SOFTWARE.
|
---|
44 |
|
---|
45 | ******************************************************************/
|
---|
46 |
|
---|
47 | #ifndef SCREENINTSTRUCT_H
|
---|
48 | #define SCREENINTSTRUCT_H
|
---|
49 |
|
---|
50 | #include "screenint.h"
|
---|
51 | #include "regionstr.h"
|
---|
52 | #include "colormap.h"
|
---|
53 | #include "cursor.h"
|
---|
54 | #include "validate.h"
|
---|
55 | #include <X11/Xproto.h>
|
---|
56 | #include "dix.h"
|
---|
57 | #include "privates.h"
|
---|
58 |
|
---|
59 | typedef struct _PixmapFormat {
|
---|
60 | unsigned char depth;
|
---|
61 | unsigned char bitsPerPixel;
|
---|
62 | unsigned char scanlinePad;
|
---|
63 | } PixmapFormatRec;
|
---|
64 |
|
---|
65 | typedef struct _Visual {
|
---|
66 | VisualID vid;
|
---|
67 | short class;
|
---|
68 | short bitsPerRGBValue;
|
---|
69 | short ColormapEntries;
|
---|
70 | short nplanes; /* = log2 (ColormapEntries). This does not
|
---|
71 | * imply that the screen has this many planes.
|
---|
72 | * it may have more or fewer */
|
---|
73 | unsigned long redMask, greenMask, blueMask;
|
---|
74 | int offsetRed, offsetGreen, offsetBlue;
|
---|
75 | } VisualRec;
|
---|
76 |
|
---|
77 | typedef struct _Depth {
|
---|
78 | unsigned char depth;
|
---|
79 | short numVids;
|
---|
80 | VisualID *vids; /* block of visual ids for this depth */
|
---|
81 | } DepthRec;
|
---|
82 |
|
---|
83 | typedef struct _ScreenSaverStuff {
|
---|
84 | WindowPtr pWindow;
|
---|
85 | XID wid;
|
---|
86 | char blanked;
|
---|
87 | Bool (*ExternalScreenSaver) (ScreenPtr /*pScreen */ ,
|
---|
88 | int /*xstate */ ,
|
---|
89 | Bool /*force */ );
|
---|
90 | } ScreenSaverStuffRec;
|
---|
91 |
|
---|
92 | /*
|
---|
93 | * There is a typedef for each screen function pointer so that code that
|
---|
94 | * needs to declare a screen function pointer (e.g. in a screen private
|
---|
95 | * or as a local variable) can easily do so and retain full type checking.
|
---|
96 | */
|
---|
97 |
|
---|
98 | typedef Bool (*CloseScreenProcPtr) (ScreenPtr /*pScreen */ );
|
---|
99 |
|
---|
100 | typedef void (*QueryBestSizeProcPtr) (int /*class */ ,
|
---|
101 | unsigned short * /*pwidth */ ,
|
---|
102 | unsigned short * /*pheight */ ,
|
---|
103 | ScreenPtr /*pScreen */ );
|
---|
104 |
|
---|
105 | typedef Bool (*SaveScreenProcPtr) (ScreenPtr /*pScreen */ ,
|
---|
106 | int /*on */ );
|
---|
107 |
|
---|
108 | typedef void (*GetImageProcPtr) (DrawablePtr /*pDrawable */ ,
|
---|
109 | int /*sx */ ,
|
---|
110 | int /*sy */ ,
|
---|
111 | int /*w */ ,
|
---|
112 | int /*h */ ,
|
---|
113 | unsigned int /*format */ ,
|
---|
114 | unsigned long /*planeMask */ ,
|
---|
115 | char * /*pdstLine */ );
|
---|
116 |
|
---|
117 | typedef void (*GetSpansProcPtr) (DrawablePtr /*pDrawable */ ,
|
---|
118 | int /*wMax */ ,
|
---|
119 | DDXPointPtr /*ppt */ ,
|
---|
120 | int * /*pwidth */ ,
|
---|
121 | int /*nspans */ ,
|
---|
122 | char * /*pdstStart */ );
|
---|
123 |
|
---|
124 | typedef void (*SourceValidateProcPtr) (DrawablePtr /*pDrawable */ ,
|
---|
125 | int /*x */ ,
|
---|
126 | int /*y */ ,
|
---|
127 | int /*width */ ,
|
---|
128 | int /*height */ ,
|
---|
129 | unsigned int /*subWindowMode */ );
|
---|
130 |
|
---|
131 | typedef Bool (*CreateWindowProcPtr) (WindowPtr /*pWindow */ );
|
---|
132 |
|
---|
133 | typedef Bool (*DestroyWindowProcPtr) (WindowPtr /*pWindow */ );
|
---|
134 |
|
---|
135 | typedef Bool (*PositionWindowProcPtr) (WindowPtr /*pWindow */ ,
|
---|
136 | int /*x */ ,
|
---|
137 | int /*y */ );
|
---|
138 |
|
---|
139 | typedef Bool (*ChangeWindowAttributesProcPtr) (WindowPtr /*pWindow */ ,
|
---|
140 | unsigned long /*mask */ );
|
---|
141 |
|
---|
142 | typedef Bool (*RealizeWindowProcPtr) (WindowPtr /*pWindow */ );
|
---|
143 |
|
---|
144 | typedef Bool (*UnrealizeWindowProcPtr) (WindowPtr /*pWindow */ );
|
---|
145 |
|
---|
146 | typedef void (*RestackWindowProcPtr) (WindowPtr /*pWindow */ ,
|
---|
147 | WindowPtr /*pOldNextSib */ );
|
---|
148 |
|
---|
149 | typedef int (*ValidateTreeProcPtr) (WindowPtr /*pParent */ ,
|
---|
150 | WindowPtr /*pChild */ ,
|
---|
151 | VTKind /*kind */ );
|
---|
152 |
|
---|
153 | typedef void (*PostValidateTreeProcPtr) (WindowPtr /*pParent */ ,
|
---|
154 | WindowPtr /*pChild */ ,
|
---|
155 | VTKind /*kind */ );
|
---|
156 |
|
---|
157 | typedef void (*WindowExposuresProcPtr) (WindowPtr /*pWindow */ ,
|
---|
158 | RegionPtr /*prgn */ ,
|
---|
159 | RegionPtr /*other_exposed */ );
|
---|
160 |
|
---|
161 | typedef void (*CopyWindowProcPtr) (WindowPtr /*pWindow */ ,
|
---|
162 | DDXPointRec /*ptOldOrg */ ,
|
---|
163 | RegionPtr /*prgnSrc */ );
|
---|
164 |
|
---|
165 | typedef void (*ClearToBackgroundProcPtr) (WindowPtr /*pWindow */ ,
|
---|
166 | int /*x */ ,
|
---|
167 | int /*y */ ,
|
---|
168 | int /*w */ ,
|
---|
169 | int /*h */ ,
|
---|
170 | Bool /*generateExposures */ );
|
---|
171 |
|
---|
172 | typedef void (*ClipNotifyProcPtr) (WindowPtr /*pWindow */ ,
|
---|
173 | int /*dx */ ,
|
---|
174 | int /*dy */ );
|
---|
175 |
|
---|
176 | /* pixmap will exist only for the duration of the current rendering operation */
|
---|
177 | #define CREATE_PIXMAP_USAGE_SCRATCH 1
|
---|
178 | /* pixmap will be the backing pixmap for a redirected window */
|
---|
179 | #define CREATE_PIXMAP_USAGE_BACKING_PIXMAP 2
|
---|
180 | /* pixmap will contain a glyph */
|
---|
181 | #define CREATE_PIXMAP_USAGE_GLYPH_PICTURE 3
|
---|
182 | /* pixmap will be shared */
|
---|
183 | #define CREATE_PIXMAP_USAGE_SHARED 4
|
---|
184 |
|
---|
185 | typedef PixmapPtr (*CreatePixmapProcPtr) (ScreenPtr /*pScreen */ ,
|
---|
186 | int /*width */ ,
|
---|
187 | int /*height */ ,
|
---|
188 | int /*depth */ ,
|
---|
189 | unsigned /*usage_hint */ );
|
---|
190 |
|
---|
191 | typedef Bool (*DestroyPixmapProcPtr) (PixmapPtr /*pPixmap */ );
|
---|
192 |
|
---|
193 | typedef Bool (*RealizeFontProcPtr) (ScreenPtr /*pScreen */ ,
|
---|
194 | FontPtr /*pFont */ );
|
---|
195 |
|
---|
196 | typedef Bool (*UnrealizeFontProcPtr) (ScreenPtr /*pScreen */ ,
|
---|
197 | FontPtr /*pFont */ );
|
---|
198 |
|
---|
199 | typedef void (*ConstrainCursorProcPtr) (DeviceIntPtr /*pDev */ ,
|
---|
200 | ScreenPtr /*pScreen */ ,
|
---|
201 | BoxPtr /*pBox */ );
|
---|
202 |
|
---|
203 | typedef void (*CursorLimitsProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
204 | ScreenPtr /*pScreen */ ,
|
---|
205 | CursorPtr /*pCursor */ ,
|
---|
206 | BoxPtr /*pHotBox */ ,
|
---|
207 | BoxPtr /*pTopLeftBox */ );
|
---|
208 |
|
---|
209 | typedef Bool (*DisplayCursorProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
210 | ScreenPtr /*pScreen */ ,
|
---|
211 | CursorPtr /*pCursor */ );
|
---|
212 |
|
---|
213 | typedef Bool (*RealizeCursorProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
214 | ScreenPtr /*pScreen */ ,
|
---|
215 | CursorPtr /*pCursor */ );
|
---|
216 |
|
---|
217 | typedef Bool (*UnrealizeCursorProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
218 | ScreenPtr /*pScreen */ ,
|
---|
219 | CursorPtr /*pCursor */ );
|
---|
220 |
|
---|
221 | typedef void (*RecolorCursorProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
222 | ScreenPtr /*pScreen */ ,
|
---|
223 | CursorPtr /*pCursor */ ,
|
---|
224 | Bool /*displayed */ );
|
---|
225 |
|
---|
226 | typedef Bool (*SetCursorPositionProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
227 | ScreenPtr /*pScreen */ ,
|
---|
228 | int /*x */ ,
|
---|
229 | int /*y */ ,
|
---|
230 | Bool /*generateEvent */ );
|
---|
231 |
|
---|
232 | typedef Bool (*CreateGCProcPtr) (GCPtr /*pGC */ );
|
---|
233 |
|
---|
234 | typedef Bool (*CreateColormapProcPtr) (ColormapPtr /*pColormap */ );
|
---|
235 |
|
---|
236 | typedef void (*DestroyColormapProcPtr) (ColormapPtr /*pColormap */ );
|
---|
237 |
|
---|
238 | typedef void (*InstallColormapProcPtr) (ColormapPtr /*pColormap */ );
|
---|
239 |
|
---|
240 | typedef void (*UninstallColormapProcPtr) (ColormapPtr /*pColormap */ );
|
---|
241 |
|
---|
242 | typedef int (*ListInstalledColormapsProcPtr) (ScreenPtr /*pScreen */ ,
|
---|
243 | XID * /*pmaps */ );
|
---|
244 |
|
---|
245 | typedef void (*StoreColorsProcPtr) (ColormapPtr /*pColormap */ ,
|
---|
246 | int /*ndef */ ,
|
---|
247 | xColorItem * /*pdef */ );
|
---|
248 |
|
---|
249 | typedef void (*ResolveColorProcPtr) (unsigned short * /*pred */ ,
|
---|
250 | unsigned short * /*pgreen */ ,
|
---|
251 | unsigned short * /*pblue */ ,
|
---|
252 | VisualPtr /*pVisual */ );
|
---|
253 |
|
---|
254 | typedef RegionPtr (*BitmapToRegionProcPtr) (PixmapPtr /*pPix */ );
|
---|
255 |
|
---|
256 | typedef void (*SendGraphicsExposeProcPtr) (ClientPtr /*client */ ,
|
---|
257 | RegionPtr /*pRgn */ ,
|
---|
258 | XID /*drawable */ ,
|
---|
259 | int /*major */ ,
|
---|
260 | int /*minor */ );
|
---|
261 |
|
---|
262 | typedef void (*ScreenBlockHandlerProcPtr) (ScreenPtr /*pScreen*/ ,
|
---|
263 | void */*pTimeout */ ,
|
---|
264 | void */*pReadmask */ );
|
---|
265 |
|
---|
266 | typedef void (*ScreenWakeupHandlerProcPtr) (ScreenPtr /*pScreen*/ ,
|
---|
267 | unsigned long /*result */ ,
|
---|
268 | void */*pReadMask */ );
|
---|
269 |
|
---|
270 | typedef Bool (*CreateScreenResourcesProcPtr) (ScreenPtr /*pScreen */ );
|
---|
271 |
|
---|
272 | typedef Bool (*ModifyPixmapHeaderProcPtr) (PixmapPtr /*pPixmap */ ,
|
---|
273 | int /*width */ ,
|
---|
274 | int /*height */ ,
|
---|
275 | int /*depth */ ,
|
---|
276 | int /*bitsPerPixel */ ,
|
---|
277 | int /*devKind */ ,
|
---|
278 | void */*pPixData */ );
|
---|
279 |
|
---|
280 | typedef PixmapPtr (*GetWindowPixmapProcPtr) (WindowPtr /*pWin */ );
|
---|
281 |
|
---|
282 | typedef void (*SetWindowPixmapProcPtr) (WindowPtr /*pWin */ ,
|
---|
283 | PixmapPtr /*pPix */ );
|
---|
284 |
|
---|
285 | typedef PixmapPtr (*GetScreenPixmapProcPtr) (ScreenPtr /*pScreen */ );
|
---|
286 |
|
---|
287 | typedef void (*SetScreenPixmapProcPtr) (PixmapPtr /*pPix */ );
|
---|
288 |
|
---|
289 | typedef void (*MarkWindowProcPtr) (WindowPtr /*pWin */ );
|
---|
290 |
|
---|
291 | typedef Bool (*MarkOverlappedWindowsProcPtr) (WindowPtr /*parent */ ,
|
---|
292 | WindowPtr /*firstChild */ ,
|
---|
293 | WindowPtr * /*pLayerWin */ );
|
---|
294 |
|
---|
295 | typedef int (*ConfigNotifyProcPtr) (WindowPtr /*pWin */ ,
|
---|
296 | int /*x */ ,
|
---|
297 | int /*y */ ,
|
---|
298 | int /*w */ ,
|
---|
299 | int /*h */ ,
|
---|
300 | int /*bw */ ,
|
---|
301 | WindowPtr /*pSib */ );
|
---|
302 |
|
---|
303 | typedef void (*MoveWindowProcPtr) (WindowPtr /*pWin */ ,
|
---|
304 | int /*x */ ,
|
---|
305 | int /*y */ ,
|
---|
306 | WindowPtr /*pSib */ ,
|
---|
307 | VTKind /*kind */ );
|
---|
308 |
|
---|
309 | typedef void (*ResizeWindowProcPtr) (WindowPtr /*pWin */ ,
|
---|
310 | int /*x */ ,
|
---|
311 | int /*y */ ,
|
---|
312 | unsigned int /*w */ ,
|
---|
313 | unsigned int /*h */ ,
|
---|
314 | WindowPtr /*pSib */
|
---|
315 | );
|
---|
316 |
|
---|
317 | typedef WindowPtr (*GetLayerWindowProcPtr) (WindowPtr /*pWin */
|
---|
318 | );
|
---|
319 |
|
---|
320 | typedef void (*HandleExposuresProcPtr) (WindowPtr /*pWin */ );
|
---|
321 |
|
---|
322 | typedef void (*ReparentWindowProcPtr) (WindowPtr /*pWin */ ,
|
---|
323 | WindowPtr /*pPriorParent */ );
|
---|
324 |
|
---|
325 | typedef void (*SetShapeProcPtr) (WindowPtr /*pWin */ ,
|
---|
326 | int /* kind */ );
|
---|
327 |
|
---|
328 | typedef void (*ChangeBorderWidthProcPtr) (WindowPtr /*pWin */ ,
|
---|
329 | unsigned int /*width */ );
|
---|
330 |
|
---|
331 | typedef void (*MarkUnrealizedWindowProcPtr) (WindowPtr /*pChild */ ,
|
---|
332 | WindowPtr /*pWin */ ,
|
---|
333 | Bool /*fromConfigure */ );
|
---|
334 |
|
---|
335 | typedef Bool (*DeviceCursorInitializeProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
336 | ScreenPtr /* pScreen */ );
|
---|
337 |
|
---|
338 | typedef void (*DeviceCursorCleanupProcPtr) (DeviceIntPtr /* pDev */ ,
|
---|
339 | ScreenPtr /* pScreen */ );
|
---|
340 |
|
---|
341 | typedef void (*ConstrainCursorHarderProcPtr) (DeviceIntPtr, ScreenPtr, int,
|
---|
342 | int *, int *);
|
---|
343 |
|
---|
344 |
|
---|
345 | typedef Bool (*SharePixmapBackingProcPtr)(PixmapPtr, ScreenPtr, void **);
|
---|
346 |
|
---|
347 | typedef Bool (*SetSharedPixmapBackingProcPtr)(PixmapPtr, void *);
|
---|
348 |
|
---|
349 | typedef Bool (*StartPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr,
|
---|
350 | int x, int y);
|
---|
351 |
|
---|
352 | typedef Bool (*StopPixmapTrackingProcPtr)(PixmapPtr, PixmapPtr);
|
---|
353 |
|
---|
354 | typedef Bool (*ReplaceScanoutPixmapProcPtr)(DrawablePtr, PixmapPtr, Bool);
|
---|
355 |
|
---|
356 | typedef WindowPtr (*XYToWindowProcPtr)(ScreenPtr pScreen,
|
---|
357 | SpritePtr pSprite, int x, int y);
|
---|
358 |
|
---|
359 | typedef int (*NameWindowPixmapProcPtr)(WindowPtr, PixmapPtr, CARD32);
|
---|
360 |
|
---|
361 | typedef struct _Screen {
|
---|
362 | int myNum; /* index of this instance in Screens[] */
|
---|
363 | ATOM id;
|
---|
364 | short x, y, width, height;
|
---|
365 | short mmWidth, mmHeight;
|
---|
366 | short numDepths;
|
---|
367 | unsigned char rootDepth;
|
---|
368 | DepthPtr allowedDepths;
|
---|
369 | unsigned long rootVisual;
|
---|
370 | unsigned long defColormap;
|
---|
371 | short minInstalledCmaps, maxInstalledCmaps;
|
---|
372 | char backingStoreSupport, saveUnderSupport;
|
---|
373 | unsigned long whitePixel, blackPixel;
|
---|
374 | GCPtr GCperDepth[MAXFORMATS + 1];
|
---|
375 | /* next field is a stipple to use as default in
|
---|
376 | a GC. we don't build default tiles of all depths
|
---|
377 | because they are likely to be of a color
|
---|
378 | different from the default fg pixel, so
|
---|
379 | we don't win anything by building
|
---|
380 | a standard one.
|
---|
381 | */
|
---|
382 | PixmapPtr PixmapPerDepth[1];
|
---|
383 | void *devPrivate;
|
---|
384 | short numVisuals;
|
---|
385 | VisualPtr visuals;
|
---|
386 | WindowPtr root;
|
---|
387 | ScreenSaverStuffRec screensaver;
|
---|
388 |
|
---|
389 | DevPrivateSetRec screenSpecificPrivates[PRIVATE_LAST];
|
---|
390 |
|
---|
391 | /* Random screen procedures */
|
---|
392 |
|
---|
393 | CloseScreenProcPtr CloseScreen;
|
---|
394 | QueryBestSizeProcPtr QueryBestSize;
|
---|
395 | SaveScreenProcPtr SaveScreen;
|
---|
396 | GetImageProcPtr GetImage;
|
---|
397 | GetSpansProcPtr GetSpans;
|
---|
398 | SourceValidateProcPtr SourceValidate;
|
---|
399 |
|
---|
400 | /* Window Procedures */
|
---|
401 |
|
---|
402 | CreateWindowProcPtr CreateWindow;
|
---|
403 | DestroyWindowProcPtr DestroyWindow;
|
---|
404 | PositionWindowProcPtr PositionWindow;
|
---|
405 | ChangeWindowAttributesProcPtr ChangeWindowAttributes;
|
---|
406 | RealizeWindowProcPtr RealizeWindow;
|
---|
407 | UnrealizeWindowProcPtr UnrealizeWindow;
|
---|
408 | ValidateTreeProcPtr ValidateTree;
|
---|
409 | PostValidateTreeProcPtr PostValidateTree;
|
---|
410 | WindowExposuresProcPtr WindowExposures;
|
---|
411 | CopyWindowProcPtr CopyWindow;
|
---|
412 | ClearToBackgroundProcPtr ClearToBackground;
|
---|
413 | ClipNotifyProcPtr ClipNotify;
|
---|
414 | RestackWindowProcPtr RestackWindow;
|
---|
415 |
|
---|
416 | /* Pixmap procedures */
|
---|
417 |
|
---|
418 | CreatePixmapProcPtr CreatePixmap;
|
---|
419 | DestroyPixmapProcPtr DestroyPixmap;
|
---|
420 |
|
---|
421 | /* Font procedures */
|
---|
422 |
|
---|
423 | RealizeFontProcPtr RealizeFont;
|
---|
424 | UnrealizeFontProcPtr UnrealizeFont;
|
---|
425 |
|
---|
426 | /* Cursor Procedures */
|
---|
427 |
|
---|
428 | ConstrainCursorProcPtr ConstrainCursor;
|
---|
429 | ConstrainCursorHarderProcPtr ConstrainCursorHarder;
|
---|
430 | CursorLimitsProcPtr CursorLimits;
|
---|
431 | DisplayCursorProcPtr DisplayCursor;
|
---|
432 | RealizeCursorProcPtr RealizeCursor;
|
---|
433 | UnrealizeCursorProcPtr UnrealizeCursor;
|
---|
434 | RecolorCursorProcPtr RecolorCursor;
|
---|
435 | SetCursorPositionProcPtr SetCursorPosition;
|
---|
436 |
|
---|
437 | /* GC procedures */
|
---|
438 |
|
---|
439 | CreateGCProcPtr CreateGC;
|
---|
440 |
|
---|
441 | /* Colormap procedures */
|
---|
442 |
|
---|
443 | CreateColormapProcPtr CreateColormap;
|
---|
444 | DestroyColormapProcPtr DestroyColormap;
|
---|
445 | InstallColormapProcPtr InstallColormap;
|
---|
446 | UninstallColormapProcPtr UninstallColormap;
|
---|
447 | ListInstalledColormapsProcPtr ListInstalledColormaps;
|
---|
448 | StoreColorsProcPtr StoreColors;
|
---|
449 | ResolveColorProcPtr ResolveColor;
|
---|
450 |
|
---|
451 | /* Region procedures */
|
---|
452 |
|
---|
453 | BitmapToRegionProcPtr BitmapToRegion;
|
---|
454 | SendGraphicsExposeProcPtr SendGraphicsExpose;
|
---|
455 |
|
---|
456 | /* os layer procedures */
|
---|
457 |
|
---|
458 | ScreenBlockHandlerProcPtr BlockHandler;
|
---|
459 | ScreenWakeupHandlerProcPtr WakeupHandler;
|
---|
460 |
|
---|
461 | /* anybody can get a piece of this array */
|
---|
462 | PrivateRec *devPrivates;
|
---|
463 |
|
---|
464 | CreateScreenResourcesProcPtr CreateScreenResources;
|
---|
465 | ModifyPixmapHeaderProcPtr ModifyPixmapHeader;
|
---|
466 |
|
---|
467 | GetWindowPixmapProcPtr GetWindowPixmap;
|
---|
468 | SetWindowPixmapProcPtr SetWindowPixmap;
|
---|
469 | GetScreenPixmapProcPtr GetScreenPixmap;
|
---|
470 | SetScreenPixmapProcPtr SetScreenPixmap;
|
---|
471 | NameWindowPixmapProcPtr NameWindowPixmap;
|
---|
472 |
|
---|
473 | PixmapPtr pScratchPixmap; /* scratch pixmap "pool" */
|
---|
474 |
|
---|
475 | unsigned int totalPixmapSize;
|
---|
476 |
|
---|
477 | MarkWindowProcPtr MarkWindow;
|
---|
478 | MarkOverlappedWindowsProcPtr MarkOverlappedWindows;
|
---|
479 | ConfigNotifyProcPtr ConfigNotify;
|
---|
480 | MoveWindowProcPtr MoveWindow;
|
---|
481 | ResizeWindowProcPtr ResizeWindow;
|
---|
482 | GetLayerWindowProcPtr GetLayerWindow;
|
---|
483 | HandleExposuresProcPtr HandleExposures;
|
---|
484 | ReparentWindowProcPtr ReparentWindow;
|
---|
485 |
|
---|
486 | SetShapeProcPtr SetShape;
|
---|
487 |
|
---|
488 | ChangeBorderWidthProcPtr ChangeBorderWidth;
|
---|
489 | MarkUnrealizedWindowProcPtr MarkUnrealizedWindow;
|
---|
490 |
|
---|
491 | /* Device cursor procedures */
|
---|
492 | DeviceCursorInitializeProcPtr DeviceCursorInitialize;
|
---|
493 | DeviceCursorCleanupProcPtr DeviceCursorCleanup;
|
---|
494 |
|
---|
495 | /* set it in driver side if X server can copy the framebuffer content.
|
---|
496 | * Meant to be used together with '-background none' option, avoiding
|
---|
497 | * malicious users to steal framebuffer's content if that would be the
|
---|
498 | * default */
|
---|
499 | Bool canDoBGNoneRoot;
|
---|
500 |
|
---|
501 | Bool isGPU;
|
---|
502 |
|
---|
503 | struct xorg_list unattached_list;
|
---|
504 | struct xorg_list unattached_head;
|
---|
505 |
|
---|
506 | ScreenPtr current_master;
|
---|
507 |
|
---|
508 | struct xorg_list output_slave_list;
|
---|
509 | struct xorg_list output_head;
|
---|
510 |
|
---|
511 | SharePixmapBackingProcPtr SharePixmapBacking;
|
---|
512 | SetSharedPixmapBackingProcPtr SetSharedPixmapBacking;
|
---|
513 |
|
---|
514 | StartPixmapTrackingProcPtr StartPixmapTracking;
|
---|
515 | StopPixmapTrackingProcPtr StopPixmapTracking;
|
---|
516 |
|
---|
517 | struct xorg_list pixmap_dirty_list;
|
---|
518 | struct xorg_list offload_slave_list;
|
---|
519 | struct xorg_list offload_head;
|
---|
520 |
|
---|
521 | ReplaceScanoutPixmapProcPtr ReplaceScanoutPixmap;
|
---|
522 | XYToWindowProcPtr XYToWindow;
|
---|
523 | } ScreenRec;
|
---|
524 |
|
---|
525 | static inline RegionPtr
|
---|
526 | BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix)
|
---|
527 | {
|
---|
528 | return (*(_pScreen)->BitmapToRegion) (pPix); /* no mi version?! */
|
---|
529 | }
|
---|
530 |
|
---|
531 | typedef struct _ScreenInfo {
|
---|
532 | int imageByteOrder;
|
---|
533 | int bitmapScanlineUnit;
|
---|
534 | int bitmapScanlinePad;
|
---|
535 | int bitmapBitOrder;
|
---|
536 | int numPixmapFormats;
|
---|
537 | PixmapFormatRec formats[MAXFORMATS];
|
---|
538 | int numScreens;
|
---|
539 | ScreenPtr screens[MAXSCREENS];
|
---|
540 | int numGPUScreens;
|
---|
541 | ScreenPtr gpuscreens[MAXGPUSCREENS];
|
---|
542 | int x; /* origin */
|
---|
543 | int y; /* origin */
|
---|
544 | int width; /* total width of all screens together */
|
---|
545 | int height; /* total height of all screens together */
|
---|
546 | } ScreenInfo;
|
---|
547 |
|
---|
548 | extern _X_EXPORT ScreenInfo screenInfo;
|
---|
549 |
|
---|
550 | extern _X_EXPORT void InitOutput(ScreenInfo * /*pScreenInfo */ ,
|
---|
551 | int /*argc */ ,
|
---|
552 | char ** /*argv */ );
|
---|
553 |
|
---|
554 | #endif /* SCREENINTSTRUCT_H */
|
---|