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