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