b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Copyright © 2004 Eric Anholt
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * Permission to use, copy, modify, distribute, and sell this software and its
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * documentation for any purpose is hereby granted without fee, provided that
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * the above copyright notice appear in all copies and that both that
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * copyright notice and this permission notice appear in supporting
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * documentation, and that the name of Eric Anholt not be used in
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * advertising or publicity pertaining to distribution of the software without
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * specific, written prior permission. Eric Anholt makes no
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * representations about the suitability of this software for any purpose. It
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * is provided "as is" without express or implied warranty.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * PERFORMANCE OF THIS SOFTWARE.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* $Header: /cvs/xorg/xserver/xorg/miext/cw/cw.h,v 1.14 2005/12/09 18:32:46 ajax Exp $ */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * One of these structures is allocated per GC that gets used with a window with
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * backing pixmap.
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * set FALSE and the clientClip set to
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * clip output to the valid regions of the
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * backing pixmap. */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned long serialNumber; /* clientClip computed time */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned long stateChanges; /* changes in parent gc since last copy */
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define getCwGC(pGC) ((cwGCPtr)(pGC)->devPrivates[cwGCIndex].ptr)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define setCwGC(pGC,p) ((pGC)->devPrivates[cwGCIndex].ptr = (pointer) (p))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * One of these structures is allocated per Picture that gets used with a
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * window with a backing pixmap
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned long serialNumber;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync unsigned long stateChanges;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define getCwPicture(pPicture) ((cwPicturePtr)(pPicture)->devPrivates[cwPictureIndex].ptr)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define setCwPicture(pPicture,p) ((pPicture)->devPrivates[cwPictureIndex].ptr = (pointer) (p))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define cwWindowPrivate(pWindow) ((pWindow)->devPrivates[cwWindowIndex].ptr)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define setCwPixmap(pWindow,pPixmap) (cwWindowPrivate(pWindow) = (pointer) (pPixmap))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynctypedef struct {
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync * screen func wrappers
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync PaintWindowBackgroundProcPtr PaintWindowBackground;
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define getCwScreen(pScreen) ((cwScreenPtr)(pScreen)->devPrivates[cwScreenIndex].ptr)
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define setCwScreen(pScreen,p) ((cwScreenPtr)(pScreen)->devPrivates[cwScreenIndex].ptr = (p))
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define CW_OFFSET_XY_DST(x, y) do { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (x) = (x) + dst_off_x; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (y) = (y) + dst_off_y; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync#define CW_OFFSET_XY_SRC(x, y) do { \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (x) = (x) + src_off_x; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync (y) = (y) + src_off_y; \
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsynccwGetBackingDrawable(DrawablePtr pDrawable, int *x_off, int *y_off);
b8e299dddd091ae24e0c08c45d91b8f937bd14d2vboxsync/* Must be called before miInitializeCompositeWrapper */