summaryrefslogtreecommitdiff
path: root/damageproto
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-04-06 14:17:22 -0700
committerKeith Packard <keithp@keithp.com>2010-04-06 14:17:22 -0700
commit37362f1b200f426fa62690d31b03d9dd1d0fac93 (patch)
treef1d457e0435f006ee82c8c24b6214e2ecf9b8c55 /damageproto
parent3e4e9437e5a9d13a7accbf77ed498e327d51ac2e (diff)
Move damageproto files to their sub-directory
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'damageproto')
-rw-r--r--damageproto/.gitignore78
-rw-r--r--damageproto/AUTHORS2
-rw-r--r--damageproto/COPYING23
-rw-r--r--damageproto/Makefile.am43
-rw-r--r--damageproto/NEWS2
-rw-r--r--damageproto/README34
-rwxr-xr-xdamageproto/autogen.sh12
-rw-r--r--damageproto/configure.ac37
-rw-r--r--damageproto/damageproto.h158
-rw-r--r--damageproto/damageproto.pc.in9
-rw-r--r--damageproto/damageproto.txt222
-rw-r--r--damageproto/damagewire.h56
12 files changed, 676 insertions, 0 deletions
diff --git a/damageproto/.gitignore b/damageproto/.gitignore
new file mode 100644
index 0000000..cd9ffab
--- /dev/null
+++ b/damageproto/.gitignore
@@ -0,0 +1,78 @@
+#
+# X.Org module default exclusion patterns
+# The next section if for module specific patterns
+#
+# Do not edit the following section
+# GNU Build System (Autotools)
+aclocal.m4
+autom4te.cache/
+autoscan.log
+ChangeLog
+compile
+config.guess
+config.h
+config.h.in
+config.log
+config-ml.in
+config.py
+config.status
+config.status.lineno
+config.sub
+configure
+configure.scan
+depcomp
+.deps/
+INSTALL
+install-sh
+.libs/
+libtool
+libtool.m4
+ltmain.sh
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
+Makefile
+Makefile.in
+mdate-sh
+missing
+mkinstalldirs
+*.pc
+py-compile
+stamp-h?
+symlink-tree
+texinfo.tex
+ylwrap
+
+# Do not edit the following section
+# Edit Compile Debug Document Distribute
+*~
+*.[0-9]
+*.[0-9]x
+*.bak
+*.bin
+core
+*.dll
+*.exe
+*-ISO*.bdf
+*-JIS*.bdf
+*-KOI8*.bdf
+*.kld
+*.ko
+*.ko.cmd
+*.lai
+*.l[oa]
+*.[oa]
+*.obj
+*.patch
+*.so
+*.pcf.gz
+*.pdb
+*.tar.bz2
+*.tar.gz
+#
+# Add & Override patterns for damageproto
+#
+# Edit the following section as needed
+# For example, !report.pc overrides *.pc. See 'man gitignore'
+#
diff --git a/damageproto/AUTHORS b/damageproto/AUTHORS
new file mode 100644
index 0000000..78b329f
--- /dev/null
+++ b/damageproto/AUTHORS
@@ -0,0 +1,2 @@
+Keith Packard, HP
+Eric Anholt, Intel
diff --git a/damageproto/COPYING b/damageproto/COPYING
new file mode 100644
index 0000000..a44e065
--- /dev/null
+++ b/damageproto/COPYING
@@ -0,0 +1,23 @@
+$Id: COPYING,v 1.1 2003-10-24 06:16:46 keithp Exp $
+
+Copyright © 2001,2003 Keith Packard
+Copyright © 2007 Eric Anholt
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Keith Packard not be used in
+advertising or publicity pertaining to distribution of the software without
+specific, written prior permission. Keith Packard makes no
+representations about the suitability of this software for any purpose. It
+is provided "as is" without express or implied warranty.
+
+KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
diff --git a/damageproto/Makefile.am b/damageproto/Makefile.am
new file mode 100644
index 0000000..7c9b757
--- /dev/null
+++ b/damageproto/Makefile.am
@@ -0,0 +1,43 @@
+#
+# Copyright © 2003 Keith Packard, Noah Levitt
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of Keith Packard not be used in
+# advertising or publicity pertaining to distribution of the software without
+# specific, written prior permission. Keith Packard makes no
+# representations about the suitability of this software for any purpose. It
+# is provided "as is" without express or implied warranty.
+#
+# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+# PERFORMANCE OF THIS SOFTWARE.
+
+damagedir = $(includedir)/X11/extensions
+damage_HEADERS = \
+ damageproto.h \
+ damagewire.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = damageproto.pc
+
+dist_doc_DATA = damageproto.txt
+
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+ $(INSTALL_CMD)
+
+ChangeLog:
+ $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/damageproto/NEWS b/damageproto/NEWS
new file mode 100644
index 0000000..29b8edd
--- /dev/null
+++ b/damageproto/NEWS
@@ -0,0 +1,2 @@
+2004-01-05: Version 1.0 released.
+2007-01-09: Version 1.1 released, adding the DamageAdd request. \ No newline at end of file
diff --git a/damageproto/README b/damageproto/README
new file mode 100644
index 0000000..a8a4e78
--- /dev/null
+++ b/damageproto/README
@@ -0,0 +1,34 @@
+ Damage
+ X Damage Extension
+ Version 1.1
+ 2007-01-08
+
+This package contains header files and documentation for the X Damage
+extension. Library and server implementations are separate.
+
+Keith Packard
+keithp@keithp.com
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+ http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+ https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+ git://anongit.freedesktop.org/git/xorg/proto/damageproto
+
+ http://cgit.freedesktop.org/xorg/proto/damageproto
+
+For patch submission instructions, see:
+
+ http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+ http://wiki.x.org/wiki/GitPage
+
diff --git a/damageproto/autogen.sh b/damageproto/autogen.sh
new file mode 100755
index 0000000..904cd67
--- /dev/null
+++ b/damageproto/autogen.sh
@@ -0,0 +1,12 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
+
+$srcdir/configure --enable-maintainer-mode "$@"
diff --git a/damageproto/configure.ac b/damageproto/configure.ac
new file mode 100644
index 0000000..b0d682b
--- /dev/null
+++ b/damageproto/configure.ac
@@ -0,0 +1,37 @@
+dnl
+dnl Copyright © 2003 Keith Packard, Noah Levitt
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the name of Keith Packard not be used in
+dnl advertising or publicity pertaining to distribution of the software without
+dnl specific, written prior permission. Keith Packard makes no
+dnl representations about the suitability of this software for any purpose. It
+dnl is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ([2.60])
+AC_INIT([DamageProto], [1.2.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Require xorg-macros: XORG_DEFAULT_OPTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+ [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.3)
+XORG_DEFAULT_OPTIONS
+
+AC_OUTPUT([Makefile
+ damageproto.pc])
+
diff --git a/damageproto/damageproto.h b/damageproto/damageproto.h
new file mode 100644
index 0000000..107e192
--- /dev/null
+++ b/damageproto/damageproto.h
@@ -0,0 +1,158 @@
+/*
+ * Copyright © 2003 Keith Packard
+ * Copyright © 2007 Eric Anholt
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DAMAGEPROTO_H_
+#define _DAMAGEPROTO_H_
+
+#include <X11/Xmd.h>
+#include <X11/extensions/xfixesproto.h>
+#include <X11/extensions/damagewire.h>
+
+#define Window CARD32
+#define Drawable CARD32
+#define Font CARD32
+#define Pixmap CARD32
+#define Cursor CARD32
+#define Colormap CARD32
+#define GContext CARD32
+#define Atom CARD32
+#define VisualID CARD32
+#define Time CARD32
+#define KeyCode CARD8
+#define KeySym CARD32
+#define Picture CARD32
+#define Region CARD32
+#define Damage CARD32
+
+/************** Version 0 ******************/
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+} xDamageReq;
+
+/*
+ * requests and replies
+ */
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+} xDamageQueryVersionReq;
+
+#define sz_xDamageQueryVersionReq 12
+
+typedef struct {
+ BYTE type; /* X_Reply */
+ BYTE pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 majorVersion B32;
+ CARD32 minorVersion B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+} xDamageQueryVersionReply;
+
+#define sz_xDamageQueryVersionReply 32
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+ Drawable drawable B32;
+ CARD8 level;
+ CARD8 pad1;
+ CARD16 pad2 B16;
+} xDamageCreateReq;
+
+#define sz_xDamageCreateReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+} xDamageDestroyReq;
+
+#define sz_xDamageDestroyReq 8
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Damage damage B32;
+ Region repair B32;
+ Region parts B32;
+} xDamageSubtractReq;
+
+#define sz_xDamageSubtractReq 16
+
+typedef struct {
+ CARD8 reqType;
+ CARD8 damageReqType;
+ CARD16 length B16;
+ Drawable drawable B32;
+ Region region B32;
+} xDamageAddReq;
+
+#define sz_xDamageAddReq 12
+
+/* Events */
+
+#define DamageNotifyMore 0x80
+
+typedef struct {
+ CARD8 type;
+ CARD8 level;
+ CARD16 sequenceNumber B16;
+ Drawable drawable B32;
+ Damage damage B32;
+ Time timestamp B32;
+ xRectangle area;
+ xRectangle geometry;
+} xDamageNotifyEvent;
+
+#undef Damage
+#undef Region
+#undef Picture
+#undef Window
+#undef Drawable
+#undef Font
+#undef Pixmap
+#undef Cursor
+#undef Colormap
+#undef GContext
+#undef Atom
+#undef VisualID
+#undef Time
+#undef KeyCode
+#undef KeySym
+
+#endif /* _DAMAGEPROTO_H_ */
diff --git a/damageproto/damageproto.pc.in b/damageproto/damageproto.pc.in
new file mode 100644
index 0000000..25476b9
--- /dev/null
+++ b/damageproto/damageproto.pc.in
@@ -0,0 +1,9 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: DamageProto
+Description: Damage extension headers
+Version: @PACKAGE_VERSION@
+Cflags: -I${includedir}
diff --git a/damageproto/damageproto.txt b/damageproto/damageproto.txt
new file mode 100644
index 0000000..1f254d4
--- /dev/null
+++ b/damageproto/damageproto.txt
@@ -0,0 +1,222 @@
+ The DAMAGE Extension
+ Protocol Version 1.1
+ Document Revision 1
+ 2007-01-08
+
+ Keith Packard
+ keithp@keithp.com
+
+ Eric Anholt
+ eric@anholt.net
+ Open Source Technology Center
+ Intel Corporation
+1. Introduction
+
+Monitoring the regions affected by rendering has wide-spread use, from
+VNC-like systems scraping the screen to screen magnifying applications
+designed to aid users with limited visual acuity. The DAMAGE extension is
+designed to make such applications reasonably efficient in the face of
+server-client latency.
+
+2. Acknolwedgements
+
+As usual, the author had significant input from many people, in particular:
+
+ + Havoc Pennington who designed and implemented a Damage extension
+ last year which was then lost to the mists of time.
+
+ + Bill Haneman whose work on accessibility in the Gnome environment
+ is legendary.
+
+ + Jim Gettys who found a way to avoid streaming damage rectangles
+ to the client in many cases.
+
+ + Owen Taylor who suggested that streaming damage rectangles may
+ be warranted in some cases after all.
+
+3. Damage Model
+
+We call changes made to pixel contents of windows and pixmaps 'damage'
+throughout this extension. Another notion of 'damage' are drawable regions
+which are in need of redisplay to repair the effects of window manipulation
+or other data loss. This extension doesn't deal with this second notion at
+all; suggestions on a better term which isn't easily conflated with existing
+notions are eagerly solicited.
+
+Damage accumulates as drawing occurs in the drawable. Each drawing operation
+'damages' one or more rectangular areas within the drawable. The rectangles
+are guaranteed to include the set of pixels modified by each operation, but
+may include significantly more than just those pixels. The desire is for
+the damage to strike a balance between the number of rectangles reported and
+the extraneous area included. A reasonable goal is for each primitive
+object drawn (line, string, rectangle) to be represented as a single
+rectangle and for the damage area of the operation to be the union of these
+rectangles.
+
+The DAMAGE extension allows applications to either receive the raw
+rectangles as a stream of events, or to have them partially processed within
+the X server to reduce the amount of data transmitted as well as reduce the
+processing latency once the repaint operation has started.
+
+Damage to a window reflects both drawing within the window itself as well as
+drawing within any inferior window that affects pixels seen by
+IncludeInferiors rendering operations. To reduce the computational
+complexity of this, the DAMAGE extension allows the server to monitor all
+rendering operations within the physical target pixel storage that fall
+within the bounds of the window. In a system with a single frame buffer
+holding all windows, this means that damage will accumulate for all
+rendering operations that lie within the visible part of the window.
+
+The precise reason for this architecture is to enable the Composite
+extension which provides multiple pixel storage areas for the screen
+contents.
+
+3.1 Additions in the 1.1 version of the protocol
+
+Damage is automatically computed by the X Server for X rendering operations,
+but direct rendering extensions have allowed clients to perform rendering
+outside of the control of the X Server. The 1.1 version of the protocol
+added a request to allow direct rendering clients to report damage to a
+drawable. Some direct rendering clients, due to architectural limitations,
+always perform rendering to the root window, even in when it should be
+performed to the backing pixmap in the Composite case. To provide
+less-incorrect rendering in this cases, the direct rendering client should
+translate its damage region to screen coordinates and report the damage against
+the root window rather than the drawable.
+
+4. Data types
+
+The "Damage" object holds any accumulated damage region and reflects the
+relationship between the drawable selected for damage notification and the
+drawable for which damage is tracked.
+
+5. Errors
+
+Damage
+ A value for a DAMAGE argument does not name a defined DAMAGE.
+
+6. Types
+
+ DAMAGE 32-bit value (top three bits guaranteed to be zero)
+
+ DamageReportLevel { DamageReportRawRectangles,
+ DamageReportDeltaRectangles,
+ DamageReportBoundingBox,
+ DamageReportNonEmpty }
+
+ DamageReportRawRectangles
+
+ Delivers DamageNotify events each time the screen
+ is modified with rectangular bounds that circumscribe
+ the damaged area. No attempt to compress out overlapping
+ rectangles is made.
+
+ DamageReportDeltaRectangles
+
+ Delivers DamageNotify events each time damage occurs
+ which is not included in the damage region. The
+ reported rectangles include only the changes to that
+ area, not the raw damage data.
+
+ DamageReportBoundingBox
+
+ Delivers DamageNotify events each time the bounding
+ box enclosing the damage region increases in size.
+ The reported rectangle encloses the entire damage region,
+ not just the changes to that size.
+
+ DamageReportNonEmpty
+
+ Delivers a single DamageNotify event each time the
+ damage rectangle changes from empty to non-empty, and
+ also whenever the result of a DamageSubtract request
+ results in a non-empty region.
+
+7. Events
+
+DamageNotify
+
+ level: DamageReportLevel
+ drawable: Drawable
+ damage: DAMAGE
+ more: Bool
+ timestamp: Timestamp
+ area: Rectangle
+ drawable-geometry: Rectangle
+
+ 'more' indicates whether there are subsequent damage events
+ being delivered immediately as part of a larger damage region
+
+8. Extension Initialization
+
+The client must negotiate the version of the extension before executing
+extension requests. Otherwise, the server will return BadRequest for any
+operations other than QueryVersion.
+
+QueryVersion
+
+ client-major-version: CARD32
+ client-minor-version: CARD32
+
+ ->
+
+ major-version: CARD32
+ minor-version: CARD32
+
+ The client sends the highest supported version to the server and
+ the server sends the highest version it supports, but no higher than
+ the requested version. Major versions changes can introduce
+ incompatibilities in existing functionality, minor version
+ changes introduce only backward compatible changes. It is
+ the clients responsibility to ensure that the server supports
+ a version which is compatible with its expectations. Servers
+ are encouraged to support multiple versions of the extension.
+
+9. Enable Monitoring
+
+DamageCreate
+
+ damage: DAMAGE
+ drawable: Drawable
+ level: DamageReportLevel
+
+ Creates a damage object to monitor changes to Drawable
+
+DamageDestroy
+ damage: DAMAGE
+
+ Destroys damage.
+
+DamageSubtract
+
+ damage: DAMAGE
+ repair: Region or None
+ parts: Region or None
+
+ Synchronously modifies the regions in the following manner:
+
+ If repair is None:
+
+ 1) if parts is not None, parts = damage
+ 2) damage = <empty>
+
+ Otherwise:
+
+ 1) tmp = damage INTERSECT repair
+ 2) damage = damage - tmp
+ 3) if parts is not None, parts = tmp
+ 4) Generate DamageNotify for remaining damage areas
+
+DamageAdd
+
+ drawable: Drawable
+ region: Region
+
+ Reports damage of the region within the given drawable. This may be
+ used by direct rendering clients to report damage that the server would
+ otherwise be unaware of. The damage region is relative to the origin
+ of the drawable.
+
+ Damage posted in this way will appear in DamageNotify events as normal,
+ and also in server internal damage tracking (for shadow framebuffer
+ updates, pixmap damage, and other uses).
diff --git a/damageproto/damagewire.h b/damageproto/damagewire.h
new file mode 100644
index 0000000..d90a0dd
--- /dev/null
+++ b/damageproto/damagewire.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright © 2003 Keith Packard
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Keith Packard not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. Keith Packard makes no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _DAMAGEWIRE_H_
+#define _DAMAGEWIRE_H_
+
+#define DAMAGE_NAME "DAMAGE"
+#define DAMAGE_MAJOR 1
+#define DAMAGE_MINOR 1
+
+/************* Version 1 ****************/
+
+/* Constants */
+#define XDamageReportRawRectangles 0
+#define XDamageReportDeltaRectangles 1
+#define XDamageReportBoundingBox 2
+#define XDamageReportNonEmpty 3
+
+/* Requests */
+#define X_DamageQueryVersion 0
+#define X_DamageCreate 1
+#define X_DamageDestroy 2
+#define X_DamageSubtract 3
+#define X_DamageAdd 4
+
+#define XDamageNumberRequests (X_DamageAdd + 1)
+
+/* Events */
+#define XDamageNotify 0
+
+#define XDamageNumberEvents (XDamageNotify + 1)
+
+/* Errors */
+#define BadDamage 0
+#define XDamageNumberErrors (BadDamage + 1)
+
+#endif /* _DAMAGEWIRE_H_ */