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