65fea56f17cd614bc8908264df980a62e1931468vboxsync/*
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Copyright © 2002 Keith Packard
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * Permission to use, copy, modify, distribute, and sell this software and its
65fea56f17cd614bc8908264df980a62e1931468vboxsync * documentation for any purpose is hereby granted without fee, provided that
65fea56f17cd614bc8908264df980a62e1931468vboxsync * the above copyright notice appear in all copies and that both that
65fea56f17cd614bc8908264df980a62e1931468vboxsync * copyright notice and this permission notice appear in supporting
65fea56f17cd614bc8908264df980a62e1931468vboxsync * documentation, and that the name of Keith Packard not be used in
65fea56f17cd614bc8908264df980a62e1931468vboxsync * advertising or publicity pertaining to distribution of the software without
65fea56f17cd614bc8908264df980a62e1931468vboxsync * specific, written prior permission. Keith Packard makes no
65fea56f17cd614bc8908264df980a62e1931468vboxsync * representations about the suitability of this software for any purpose. It
65fea56f17cd614bc8908264df980a62e1931468vboxsync * is provided "as is" without express or implied warranty.
65fea56f17cd614bc8908264df980a62e1931468vboxsync *
65fea56f17cd614bc8908264df980a62e1931468vboxsync * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
65fea56f17cd614bc8908264df980a62e1931468vboxsync * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
65fea56f17cd614bc8908264df980a62e1931468vboxsync * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
65fea56f17cd614bc8908264df980a62e1931468vboxsync * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
65fea56f17cd614bc8908264df980a62e1931468vboxsync * PERFORMANCE OF THIS SOFTWARE.
65fea56f17cd614bc8908264df980a62e1931468vboxsync */
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifdef HAVE_DIX_CONFIG_H
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <dix-config.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#ifndef _DAMAGEEXTINT_H_
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define _DAMAGEEXTINT_H_
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <X11/X.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <X11/Xproto.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "misc.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "os.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "dixstruct.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "extnsionst.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include <X11/extensions/damageproto.h>
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "windowstr.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "selection.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "scrnintstr.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "damage.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync#include "xfixes.h"
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _DamageClient {
65fea56f17cd614bc8908264df980a62e1931468vboxsync CARD32 major_version;
65fea56f17cd614bc8908264df980a62e1931468vboxsync CARD32 minor_version;
65fea56f17cd614bc8908264df980a62e1931468vboxsync int critical;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} DamageClientRec, *DamageClientPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey))
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsynctypedef struct _DamageExt {
65fea56f17cd614bc8908264df980a62e1931468vboxsync DamagePtr pDamage;
65fea56f17cd614bc8908264df980a62e1931468vboxsync DrawablePtr pDrawable;
65fea56f17cd614bc8908264df980a62e1931468vboxsync DamageReportLevel level;
65fea56f17cd614bc8908264df980a62e1931468vboxsync ClientPtr pClient;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID id;
65fea56f17cd614bc8908264df980a62e1931468vboxsync XID drawable;
65fea56f17cd614bc8908264df980a62e1931468vboxsync} DamageExtRec, *DamageExtPtr;
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \
65fea56f17cd614bc8908264df980a62e1931468vboxsync int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \
65fea56f17cd614bc8908264df980a62e1931468vboxsync DamageExtType, client, mode); \
65fea56f17cd614bc8908264df980a62e1931468vboxsync if (rc != Success) \
65fea56f17cd614bc8908264df980a62e1931468vboxsync return rc; \
65fea56f17cd614bc8908264df980a62e1931468vboxsync}
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncvoid
65fea56f17cd614bc8908264df980a62e1931468vboxsync DamageExtSetCritical(ClientPtr pClient, Bool critical);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsyncvoid PanoramiXDamageInit(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsyncvoid PanoramiXDamageReset(void);
65fea56f17cd614bc8908264df980a62e1931468vboxsync
65fea56f17cd614bc8908264df980a62e1931468vboxsync#endif /* _DAMAGEEXTINT_H_ */