1 | /*
|
---|
2 | * $Id: damageproto.h 43555 2009-03-02 10:37:38Z michael $
|
---|
3 | *
|
---|
4 | * Copyright © 2003 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 | #ifndef _DAMAGEPROTO_H_
|
---|
26 | #define _DAMAGEPROTO_H_
|
---|
27 |
|
---|
28 | #include <X11/Xmd.h>
|
---|
29 | #include <X11/extensions/xfixesproto.h>
|
---|
30 | #include <X11/extensions/damagewire.h>
|
---|
31 |
|
---|
32 | #define Window CARD32
|
---|
33 | #define Drawable CARD32
|
---|
34 | #define Font CARD32
|
---|
35 | #define Pixmap CARD32
|
---|
36 | #define Cursor CARD32
|
---|
37 | #define Colormap CARD32
|
---|
38 | #define GContext CARD32
|
---|
39 | #define Atom CARD32
|
---|
40 | #define VisualID CARD32
|
---|
41 | #define Time CARD32
|
---|
42 | #define KeyCode CARD8
|
---|
43 | #define KeySym CARD32
|
---|
44 | #define Picture CARD32
|
---|
45 | #define Region CARD32
|
---|
46 | #define Damage CARD32
|
---|
47 |
|
---|
48 | /************** Version 0 ******************/
|
---|
49 |
|
---|
50 | typedef struct {
|
---|
51 | CARD8 reqType;
|
---|
52 | CARD8 damageReqType;
|
---|
53 | CARD16 length B16;
|
---|
54 | } xDamageReq;
|
---|
55 |
|
---|
56 | /*
|
---|
57 | * requests and replies
|
---|
58 | */
|
---|
59 |
|
---|
60 | typedef struct {
|
---|
61 | CARD8 reqType;
|
---|
62 | CARD8 damageReqType;
|
---|
63 | CARD16 length B16;
|
---|
64 | CARD32 majorVersion B32;
|
---|
65 | CARD32 minorVersion B32;
|
---|
66 | } xDamageQueryVersionReq;
|
---|
67 |
|
---|
68 | #define sz_xDamageQueryVersionReq 12
|
---|
69 |
|
---|
70 | typedef struct {
|
---|
71 | BYTE type; /* X_Reply */
|
---|
72 | BYTE pad1;
|
---|
73 | CARD16 sequenceNumber B16;
|
---|
74 | CARD32 length B32;
|
---|
75 | CARD32 majorVersion B32;
|
---|
76 | CARD32 minorVersion B32;
|
---|
77 | CARD32 pad2 B32;
|
---|
78 | CARD32 pad3 B32;
|
---|
79 | CARD32 pad4 B32;
|
---|
80 | CARD32 pad5 B32;
|
---|
81 | } xDamageQueryVersionReply;
|
---|
82 |
|
---|
83 | #define sz_xDamageQueryVersionReply 32
|
---|
84 |
|
---|
85 | typedef struct {
|
---|
86 | CARD8 reqType;
|
---|
87 | CARD8 damageReqType;
|
---|
88 | CARD16 length B16;
|
---|
89 | Damage damage B32;
|
---|
90 | Drawable drawable B32;
|
---|
91 | CARD8 level;
|
---|
92 | CARD8 pad1;
|
---|
93 | CARD16 pad2 B16;
|
---|
94 | } xDamageCreateReq;
|
---|
95 |
|
---|
96 | #define sz_xDamageCreateReq 16
|
---|
97 |
|
---|
98 | typedef struct {
|
---|
99 | CARD8 reqType;
|
---|
100 | CARD8 damageReqType;
|
---|
101 | CARD16 length B16;
|
---|
102 | Damage damage B32;
|
---|
103 | } xDamageDestroyReq;
|
---|
104 |
|
---|
105 | #define sz_xDamageDestroyReq 8
|
---|
106 |
|
---|
107 | typedef struct {
|
---|
108 | CARD8 reqType;
|
---|
109 | CARD8 damageReqType;
|
---|
110 | CARD16 length B16;
|
---|
111 | Damage damage B32;
|
---|
112 | Region repair B32;
|
---|
113 | Region parts B32;
|
---|
114 | } xDamageSubtractReq;
|
---|
115 |
|
---|
116 | #define sz_xDamageSubtractReq 16
|
---|
117 |
|
---|
118 | /* Events */
|
---|
119 |
|
---|
120 | #define DamageNotifyMore 0x80
|
---|
121 |
|
---|
122 | typedef struct {
|
---|
123 | CARD8 type;
|
---|
124 | CARD8 level;
|
---|
125 | CARD16 sequenceNumber B16;
|
---|
126 | Drawable drawable B32;
|
---|
127 | Damage damage B32;
|
---|
128 | Time timestamp B32;
|
---|
129 | xRectangle area;
|
---|
130 | xRectangle geometry;
|
---|
131 | } xDamageNotifyEvent;
|
---|
132 |
|
---|
133 | #undef Damage
|
---|
134 | #undef Region
|
---|
135 | #undef Picture
|
---|
136 | #undef Window
|
---|
137 | #undef Drawable
|
---|
138 | #undef Font
|
---|
139 | #undef Pixmap
|
---|
140 | #undef Cursor
|
---|
141 | #undef Colormap
|
---|
142 | #undef GContext
|
---|
143 | #undef Atom
|
---|
144 | #undef VisualID
|
---|
145 | #undef Time
|
---|
146 | #undef KeyCode
|
---|
147 | #undef KeySym
|
---|
148 |
|
---|
149 | #endif /* _DAMAGEPROTO_H_ */
|
---|