From 716d84889f90880c634136e9c1e754edd587ea9e Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 5 Jan 2007 17:56:58 -0800 Subject: 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. --- README | 7 +++---- configure.ac | 2 +- include/X11/extensions/Xdamage.h | 5 +++++ src/Xdamage.c | 19 +++++++++++++++++++ 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 #include +#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 (); +} -- cgit v1.2.3