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