summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-01-05 17:56:58 -0800
committerEric Anholt <eric@anholt.net>2007-01-05 17:58:53 -0800
commit716d84889f90880c634136e9c1e754edd587ea9e (patch)
tree02d67b2b0a5fe41402ddf7ccb5f88e3fc418c7d8
parentc3c2777a7805c95f7d7bf64998e188d0eba65cba (diff)
downloadxorg-lib-libXdamage-716d84889f90880c634136e9c1e754edd587ea9e.tar.gz
Add a request to report a region of damage against a drawable.
This brings the library up to supporting version 1.1 of the protocol. Bump package version accordingly.
-rw-r--r--README7
-rw-r--r--configure.ac2
-rw-r--r--include/X11/extensions/Xdamage.h5
-rw-r--r--src/Xdamage.c19
4 files changed, 28 insertions, 5 deletions
diff --git a/README b/README
index 9968c6b..9b3a406 100644
--- a/README
+++ b/README
@@ -1,10 +1,9 @@
RandR
X RandR Extension
- Version 1.0
- 2002-10-4
+ Version 1.1
+ 2007-01-04
-This package contains header files and documentation for the X RandR
-extension. Library and server implementations are separate.
+This package contains the library for the X Damage extension.
Keith Packard
keithp@keithp.com
diff --git a/configure.ac b/configure.ac
index 62f4960..55a2847 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ dnl try to keep these the same. Note that the library has an extra
dnl digit in the version number to track changes which don't affect the
dnl protocol, so Xfixes version l.n.m corresponds to protocol version l.n
dnl
-AC_INIT(libXdamage, 1.0.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXdamage)
+AC_INIT(libXdamage, 1.1, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXdamage)
AM_INIT_AUTOMAKE([dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/include/X11/extensions/Xdamage.h b/include/X11/extensions/Xdamage.h
index 3fd9e3d..8fa9420 100644
--- a/include/X11/extensions/Xdamage.h
+++ b/include/X11/extensions/Xdamage.h
@@ -29,6 +29,8 @@
#include <X11/extensions/Xfixes.h>
#include <X11/Xfuncproto.h>
+#define XDAMAGE_1_1_INTERFACE
+
typedef XID Damage;
typedef struct {
@@ -63,6 +65,9 @@ void
XDamageSubtract (Display *dpy, Damage damage,
XserverRegion repair, XserverRegion parts);
+void
+XDamagePost (Display *dpy, Drawable drawable, XserverRegion region);
+
_XFUNCPROTOEND
#endif /* _XDAMAGE_H_ */
diff --git a/src/Xdamage.c b/src/Xdamage.c
index ba61371..4c822a0 100644
--- a/src/Xdamage.c
+++ b/src/Xdamage.c
@@ -362,3 +362,22 @@ XDamageSubtract (Display *dpy, Damage damage,
UnlockDisplay (dpy);
SyncHandle ();
}
+
+void
+XDamagePost (Display *dpy, Drawable drawable, XserverRegion region)
+{
+ XDamageExtDisplayInfo *info = XDamageFindDisplay (dpy);
+ xDamagePostReq *req;
+ int len;
+
+ XDamageSimpleCheckExtension (dpy, info);
+ LockDisplay (dpy);
+ GetReq (DamagePost, req);
+ req->reqType = info->codes->major_opcode;
+ req->damageReqType = X_DamagePost;
+ req->drawable = drawable;
+ req->region = region;
+
+ UnlockDisplay (dpy);
+ SyncHandle ();
+}