1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright © 2002 Keith Packard 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Permission to use, copy, modify, distribute, and sell this software and its 5*4882a593Smuzhiyun * documentation for any purpose is hereby granted without fee, provided that 6*4882a593Smuzhiyun * the above copyright notice appear in all copies and that both that 7*4882a593Smuzhiyun * copyright notice and this permission notice appear in supporting 8*4882a593Smuzhiyun * documentation, and that the name of Keith Packard not be used in 9*4882a593Smuzhiyun * advertising or publicity pertaining to distribution of the software without 10*4882a593Smuzhiyun * specific, written prior permission. Keith Packard makes no 11*4882a593Smuzhiyun * representations about the suitability of this software for any purpose. It 12*4882a593Smuzhiyun * is provided "as is" without express or implied warranty. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 15*4882a593Smuzhiyun * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 16*4882a593Smuzhiyun * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR 17*4882a593Smuzhiyun * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 18*4882a593Smuzhiyun * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 19*4882a593Smuzhiyun * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 20*4882a593Smuzhiyun * PERFORMANCE OF THIS SOFTWARE. 21*4882a593Smuzhiyun */ 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun #ifdef HAVE_DIX_CONFIG_H 24*4882a593Smuzhiyun #include <dix-config.h> 25*4882a593Smuzhiyun #endif 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #ifndef _DAMAGEEXTINT_H_ 28*4882a593Smuzhiyun #define _DAMAGEEXTINT_H_ 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun #include <X11/X.h> 31*4882a593Smuzhiyun #include <X11/Xproto.h> 32*4882a593Smuzhiyun #include "misc.h" 33*4882a593Smuzhiyun #include "os.h" 34*4882a593Smuzhiyun #include "dixstruct.h" 35*4882a593Smuzhiyun #include "extnsionst.h" 36*4882a593Smuzhiyun #include <X11/extensions/damageproto.h> 37*4882a593Smuzhiyun #include "windowstr.h" 38*4882a593Smuzhiyun #include "selection.h" 39*4882a593Smuzhiyun #include "scrnintstr.h" 40*4882a593Smuzhiyun #include "damage.h" 41*4882a593Smuzhiyun #include "xfixes.h" 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun typedef struct _DamageClient { 44*4882a593Smuzhiyun CARD32 major_version; 45*4882a593Smuzhiyun CARD32 minor_version; 46*4882a593Smuzhiyun int critical; 47*4882a593Smuzhiyun } DamageClientRec, *DamageClientPtr; 48*4882a593Smuzhiyun 49*4882a593Smuzhiyun #define GetDamageClient(pClient) ((DamageClientPtr)dixLookupPrivate(&(pClient)->devPrivates, DamageClientPrivateKey)) 50*4882a593Smuzhiyun 51*4882a593Smuzhiyun typedef struct _DamageExt { 52*4882a593Smuzhiyun DamagePtr pDamage; 53*4882a593Smuzhiyun DrawablePtr pDrawable; 54*4882a593Smuzhiyun DamageReportLevel level; 55*4882a593Smuzhiyun ClientPtr pClient; 56*4882a593Smuzhiyun XID id; 57*4882a593Smuzhiyun XID drawable; 58*4882a593Smuzhiyun } DamageExtRec, *DamageExtPtr; 59*4882a593Smuzhiyun 60*4882a593Smuzhiyun #define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ 61*4882a593Smuzhiyun int rc = dixLookupResourceByType((void **)&(pDamageExt), rid, \ 62*4882a593Smuzhiyun DamageExtType, client, mode); \ 63*4882a593Smuzhiyun if (rc != Success) \ 64*4882a593Smuzhiyun return rc; \ 65*4882a593Smuzhiyun } 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun void 68*4882a593Smuzhiyun DamageExtSetCritical(ClientPtr pClient, Bool critical); 69*4882a593Smuzhiyun 70*4882a593Smuzhiyun void PanoramiXDamageInit(void); 71*4882a593Smuzhiyun void PanoramiXDamageReset(void); 72*4882a593Smuzhiyun 73*4882a593Smuzhiyun #endif /* _DAMAGEEXTINT_H_ */ 74