]> git.sesse.net Git - rdpsrv/blob - Xserver/programs/Xserver/mi/mibstorest.h
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / programs / Xserver / mi / mibstorest.h
1 /*
2  * mibstorest.h
3  *
4  * internal structure definitions for mi backing store
5  */
6
7 /* $XConsortium: mibstorest.h,v 5.10 94/04/17 20:27:25 dpw Exp $ */
8
9 /*
10
11 Copyright (c) 1989  X Consortium
12
13 Permission is hereby granted, free of charge, to any person obtaining a copy
14 of this software and associated documentation files (the "Software"), to deal
15 in the Software without restriction, including without limitation the rights
16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 copies of the Software, and to permit persons to whom the Software is
18 furnished to do so, subject to the following conditions:
19
20 The above copyright notice and this permission notice shall be included in
21 all copies or substantial portions of the Software.
22
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
26 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
27 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
30 Except as contained in this notice, the name of the X Consortium shall not be
31 used in advertising or otherwise to promote the sale, use or other dealings
32 in this Software without prior written authorization from the X Consortium.
33 */
34
35 #include "mibstore.h"
36 #include "regionstr.h"
37
38 /*
39  * One of these structures is allocated per GC used with a backing-store
40  * drawable.
41  */
42
43 typedef struct {
44     GCPtr           pBackingGC;     /* Copy of the GC but with graphicsExposures
45                                      * set FALSE and the clientClip set to
46                                      * clip output to the valid regions of the
47                                      * backing pixmap. */
48     int             guarantee;      /* GuaranteeNothing, etc. */
49     unsigned long   serialNumber;   /* clientClip computed time */
50     unsigned long   stateChanges;   /* changes in parent gc since last copy */
51     GCOps           *wrapOps;       /* wrapped ops */
52     GCFuncs         *wrapFuncs;     /* wrapped funcs */
53 } miBSGCRec, *miBSGCPtr;
54
55 /*
56  * one of these structures is allocated per Window with backing store
57  */
58
59 typedef struct {
60     PixmapPtr     pBackingPixmap;   /* Pixmap for saved areas */
61     short         x;                /* origin of pixmap relative to window */
62     short         y;
63     RegionRec     SavedRegion;      /* Valid area in pBackingPixmap */
64     char          viewable;         /* Tracks pWin->viewable so SavedRegion may
65                                      * be initialized correctly when the window
66                                      * is first mapped */
67     char          status;           /* StatusNoPixmap, etc. */
68     char          backgroundState;  /* background type */
69     PixUnion      background;       /* background pattern */
70 } miBSWindowRec, *miBSWindowPtr;
71
72 #define StatusNoPixmap  1       /* pixmap has not been created */
73 #define StatusVirtual   2       /* pixmap is virtual, tiled with background */
74 #define StatusVDirty    3       /* pixmap is virtual, visiblt has contents */
75 #define StatusBadAlloc  4       /* pixmap create failed, do not try again */
76 #define StatusContents  5       /* pixmap is created, has valid contents */
77
78 typedef struct {
79     /*
80      * screen func wrappers
81      */
82     CloseScreenProcPtr  CloseScreen;
83     GetImageProcPtr     GetImage;
84     GetSpansProcPtr     GetSpans;
85     ChangeWindowAttributesProcPtr ChangeWindowAttributes;
86     CreateGCProcPtr     CreateGC;
87     DestroyWindowProcPtr DestroyWindow;
88     /*
89      * pointer to vector of device-specific backing store functions
90      */
91     miBSFuncPtr     funcs;
92 } miBSScreenRec, *miBSScreenPtr;