1 module x11.extensions.Xdamage;
2 /*
3  * Copyright © 2003 Keith Packard
4  *
5  * Permission to use, copy, modify, distribute, and sell this software and its
6  * documentation for any purpose is hereby granted without fee, provided that
7  * the above copyright notice appear in all copies and that both that
8  * copyright notice and this permission notice appear in supporting
9  * documentation, and that the name of Keith Packard not be used in
10  * advertising or publicity pertaining to distribution of the software without
11  * specific, written prior permission.  Keith Packard makes no
12  * representations about the suitability of this software for any purpose.  It
13  * is provided "as is" without express or implied warranty.
14  *
15  * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17  * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
19  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
21  * PERFORMANCE OF THIS SOFTWARE.
22  */
23 
24 public import
25     x11.extensions.damagewire,
26     x11.extensions.Xfixes;
27 
28 enum XDAMAGE_1_1_INTERFACE = true;
29 
30 alias Damage = XID;
31 
32 struct XDamageNotifyEvent {
33     int type;			/* event base */
34     ulong serial;
35     Bool send_event;
36     Display *display;
37     Drawable drawable;
38     Damage damage;
39     int level;
40     Bool more;			/* more events will be delivered immediately */
41     Time timestamp;
42     XRectangle area;
43     XRectangle geometry;
44 }
45 
46 extern(C) nothrow:
47 
48 Bool XDamageQueryExtension (Display *dpy,
49                             int *event_base_return,
50                             int *error_base_return);
51 
52 Status XDamageQueryVersion (Display *dpy,
53 			    int     *major_version_return,
54 			    int     *minor_version_return);
55 
56 Damage
57 XDamageCreate (Display	*dpy, Drawable drawable, int level);
58 
59 void
60 XDamageDestroy (Display *dpy, Damage damage);
61 
62 void
63 XDamageSubtract (Display *dpy, Damage damage, 
64 		 XserverRegion repair, XserverRegion parts);
65 
66 void
67 XDamageAdd (Display *dpy, Drawable drawable, XserverRegion region);
68