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