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