1706f2543Smrg/* 2706f2543Smrg * Copyright © 2002 Keith Packard 3706f2543Smrg * 4706f2543Smrg * Permission to use, copy, modify, distribute, and sell this software and its 5706f2543Smrg * documentation for any purpose is hereby granted without fee, provided that 6706f2543Smrg * the above copyright notice appear in all copies and that both that 7706f2543Smrg * copyright notice and this permission notice appear in supporting 8706f2543Smrg * documentation, and that the name of Keith Packard not be used in 9706f2543Smrg * advertising or publicity pertaining to distribution of the software without 10706f2543Smrg * specific, written prior permission. Keith Packard makes no 11706f2543Smrg * representations about the suitability of this software for any purpose. It 12706f2543Smrg * is provided "as is" without express or implied warranty. 13706f2543Smrg * 14706f2543Smrg * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15706f2543Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16706f2543Smrg * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17706f2543Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18706f2543Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19706f2543Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20706f2543Smrg * PERFORMANCE OF THIS SOFTWARE. 21706f2543Smrg */ 22706f2543Smrg 23706f2543Smrg#ifdef HAVE_DIX_CONFIG_H 24706f2543Smrg#include <dix-config.h> 25706f2543Smrg#endif 26706f2543Smrg 27706f2543Smrg#ifndef _DAMAGEEXTINT_H_ 28706f2543Smrg#define _DAMAGEEXTINT_H_ 29706f2543Smrg 30706f2543Smrg#include <X11/X.h> 31706f2543Smrg#include <X11/Xproto.h> 32706f2543Smrg#include "misc.h" 33706f2543Smrg#include "os.h" 34706f2543Smrg#include "dixstruct.h" 35706f2543Smrg#include "extnsionst.h" 36706f2543Smrg#include <X11/extensions/damageproto.h> 37706f2543Smrg#include "windowstr.h" 38706f2543Smrg#include "selection.h" 39706f2543Smrg#include "scrnintstr.h" 40706f2543Smrg#include "damageext.h" 41706f2543Smrg#include "damage.h" 42706f2543Smrg#include "xfixes.h" 43706f2543Smrg 44706f2543Smrgtypedef struct _DamageClient { 45706f2543Smrg CARD32 major_version; 46706f2543Smrg CARD32 minor_version; 47706f2543Smrg int critical; 48706f2543Smrg} DamageClientRec, *DamageClientPtr; 49706f2543Smrg 50706f2543Smrg#define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey)) 51706f2543Smrg 52706f2543Smrgtypedef struct _DamageExt { 53706f2543Smrg DamagePtr pDamage; 54706f2543Smrg DrawablePtr pDrawable; 55706f2543Smrg DamageReportLevel level; 56706f2543Smrg ClientPtr pClient; 57706f2543Smrg XID id; 58706f2543Smrg XID drawable; 59706f2543Smrg} DamageExtRec, *DamageExtPtr; 60706f2543Smrg 61706f2543Smrg#define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ 62706f2543Smrg int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \ 63706f2543Smrg DamageExtType, client, mode); \ 64706f2543Smrg if (rc != Success) \ 65706f2543Smrg return rc; \ 66706f2543Smrg} 67706f2543Smrg 68706f2543Smrgvoid 69706f2543SmrgDamageExtSetCritical (ClientPtr pClient, Bool critical); 70706f2543Smrg 71706f2543Smrg#endif /* _DAMAGEEXTINT_H_ */ 72