b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * mibstorest.h
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync *
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * internal structure definitions for mi backing store
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncCopyright 1989, 1998 The Open Group
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncPermission to use, copy, modify, distribute, and sell this software and its
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncdocumentation for any purpose is hereby granted without fee, provided that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncthe above copyright notice appear in all copies and that both that
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynccopyright notice and this permission notice appear in supporting
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncdocumentation.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncThe above copyright notice and this permission notice shall be included in
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncall copies or substantial portions of the Software.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncExcept as contained in this notice, the name of The Open Group shall not be
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncused in advertising or otherwise to promote the sale, use or other dealings
b9a21c3c91c47e090316e28d759194e46628ed49vboxsyncin this Software without prior written authorization from The Open Group.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync*/
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#ifdef HAVE_DIX_CONFIG_H
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include <dix-config.h>
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#endif
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include "mibstore.h"
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#include "regionstr.h"
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * One of these structures is allocated per GC used with a backing-store
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * drawable.
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * set FALSE and the clientClip set to
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * clip output to the valid regions of the
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * backing pixmap. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync int guarantee; /* GuaranteeNothing, etc. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned long serialNumber; /* clientClip computed time */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync unsigned long stateChanges; /* changes in parent gc since last copy */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync GCOps *wrapOps; /* wrapped ops */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync GCFuncs *wrapFuncs; /* wrapped funcs */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} miBSGCRec, *miBSGCPtr;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync/*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * one of these structures is allocated per Window with backing store
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync PixmapPtr pBackingPixmap; /* Pixmap for saved areas */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync short x; /* origin of pixmap relative to window */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync short y;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync RegionRec SavedRegion; /* Valid area in pBackingPixmap */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync char viewable; /* Tracks pWin->viewable so SavedRegion may
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * be initialized correctly when the window
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * is first mapped */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync char status; /* StatusNoPixmap, etc. */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync char backgroundState; /* background type */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync PixUnion background; /* background pattern */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} miBSWindowRec, *miBSWindowPtr;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define StatusNoPixmap 1 /* pixmap has not been created */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define StatusVirtual 2 /* pixmap is virtual, tiled with background */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define StatusVDirty 3 /* pixmap is virtual, visiblt has contents */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define StatusBadAlloc 4 /* pixmap create failed, do not try again */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync#define StatusContents 5 /* pixmap is created, has valid contents */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync
b9a21c3c91c47e090316e28d759194e46628ed49vboxsynctypedef struct {
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync /*
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync * screen func wrappers
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync */
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync CloseScreenProcPtr CloseScreen;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync GetImageProcPtr GetImage;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync GetSpansProcPtr GetSpans;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync ChangeWindowAttributesProcPtr ChangeWindowAttributes;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync CreateGCProcPtr CreateGC;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync DestroyWindowProcPtr DestroyWindow;
b9a21c3c91c47e090316e28d759194e46628ed49vboxsync} miBSScreenRec, *miBSScreenPtr;