4c221b0da1816acf2ca302b10092df059484468dvboxsync * Copyright © 2004 Eric Anholt
4c221b0da1816acf2ca302b10092df059484468dvboxsync * Permission to use, copy, modify, distribute, and sell this software and its
4c221b0da1816acf2ca302b10092df059484468dvboxsync * documentation for any purpose is hereby granted without fee, provided that
4c221b0da1816acf2ca302b10092df059484468dvboxsync * the above copyright notice appear in all copies and that both that
4c221b0da1816acf2ca302b10092df059484468dvboxsync * copyright notice and this permission notice appear in supporting
4c221b0da1816acf2ca302b10092df059484468dvboxsync * documentation, and that the name of Eric Anholt not be used in
4c221b0da1816acf2ca302b10092df059484468dvboxsync * advertising or publicity pertaining to distribution of the software without
4c221b0da1816acf2ca302b10092df059484468dvboxsync * specific, written prior permission. Eric Anholt makes no
4c221b0da1816acf2ca302b10092df059484468dvboxsync * representations about the suitability of this software for any purpose. It
4c221b0da1816acf2ca302b10092df059484468dvboxsync * is provided "as is" without express or implied warranty.
4c221b0da1816acf2ca302b10092df059484468dvboxsync * ERIC ANHOLT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
4c221b0da1816acf2ca302b10092df059484468dvboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
4c221b0da1816acf2ca302b10092df059484468dvboxsync * EVENT SHALL ERIC ANHOLT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
4c221b0da1816acf2ca302b10092df059484468dvboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
4c221b0da1816acf2ca302b10092df059484468dvboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
4c221b0da1816acf2ca302b10092df059484468dvboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4c221b0da1816acf2ca302b10092df059484468dvboxsync * PERFORMANCE OF THIS SOFTWARE.
4c221b0da1816acf2ca302b10092df059484468dvboxsync * One of these structures is allocated per GC that gets used with a window with
4c221b0da1816acf2ca302b10092df059484468dvboxsync * backing pixmap.
4c221b0da1816acf2ca302b10092df059484468dvboxsynctypedef struct {
4c221b0da1816acf2ca302b10092df059484468dvboxsync GCPtr pBackingGC; /* Copy of the GC but with graphicsExposures
4c221b0da1816acf2ca302b10092df059484468dvboxsync * set FALSE and the clientClip set to
4c221b0da1816acf2ca302b10092df059484468dvboxsync * clip output to the valid regions of the
4c221b0da1816acf2ca302b10092df059484468dvboxsync * backing pixmap. */
4c221b0da1816acf2ca302b10092df059484468dvboxsync unsigned long serialNumber; /* clientClip computed time */
4c221b0da1816acf2ca302b10092df059484468dvboxsync unsigned long stateChanges; /* changes in parent gc since last copy */
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey))
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p)
4c221b0da1816acf2ca302b10092df059484468dvboxsync * One of these structures is allocated per Picture that gets used with a
4c221b0da1816acf2ca302b10092df059484468dvboxsync * window with a backing pixmap
4c221b0da1816acf2ca302b10092df059484468dvboxsynctypedef struct {
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define getCwPicture(pPicture) (pPicture->pDrawable ? \
4c221b0da1816acf2ca302b10092df059484468dvboxsync (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0)
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p)
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey)
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow))
4c221b0da1816acf2ca302b10092df059484468dvboxsync dixSetPrivate(&(pWindow)->devPrivates, cwWindowKey, pPixmap)
4c221b0da1816acf2ca302b10092df059484468dvboxsynctypedef struct {
4c221b0da1816acf2ca302b10092df059484468dvboxsync * screen func wrappers
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey))
4c221b0da1816acf2ca302b10092df059484468dvboxsync#define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p)
4c221b0da1816acf2ca302b10092df059484468dvboxsync (x) = (x) + dst_off_x; \
4c221b0da1816acf2ca302b10092df059484468dvboxsync (y) = (y) + dst_off_y; \
4c221b0da1816acf2ca302b10092df059484468dvboxsync (x) = (x) + src_off_x; \
4c221b0da1816acf2ca302b10092df059484468dvboxsync (y) = (y) + src_off_y; \