[xserver-commit] xserver/xfixes region.c,1.1.2.1,1.1.2.2 xfixes.h,1.3,1.3.2.1 xfixesint.h,1.3.2.1,1.3.2.2
Keith Packard
xserver-commit@pdx.freedesktop.org
Thu, 23 Oct 2003 23:35:27 -0700
Committed by: keithp
Update of /cvs/xserver/xserver/xfixes
In directory pdx:/tmp/cvs-serv25100/xfixes
Modified Files:
Tag: xfixes_2_branch
region.c xfixes.h xfixesint.h
Log Message:
* Makefile.am:
* configure.ac:
* damageext/Makefile.am:
* damageext/damageext.c: (DamageExtNotify), (DamageExtReport),
(DamageExtDestroy), (ProcDamageQueryVersion), (ProcDamageCreate),
(ProcDamageDestroy), (ProcDamageSubtract), (XDamageNumberRequests),
(ProcDamageDispatch), (SProcDamageQueryVersion),
(SProcDamageCreate), (SProcDamageDestroy), (SProcDamageSubtract),
(SProcDamageDispatch), (DamageClientCallback), (DamageResetProc),
(FreeDamageExt), (FreeDamageExtWin), (SDamageNotifyEvent),
(DamageExtensionInit):
* damageext/damageext.h:
* damageext/damageextint.h:
* hw/kdrive/fbdev/Makefile.am:
* hw/kdrive/linux/Makefile.am:
* hw/kdrive/mach64/Makefile.am:
* hw/kdrive/mga/Makefile.am:
* hw/kdrive/nvidia/Makefile.am:
* hw/kdrive/r128/Makefile.am:
* hw/kdrive/smi/Makefile.am:
* hw/kdrive/src/Makefile.am:
* hw/kdrive/vesa/Makefile.am:
* hw/xnest/Makefile.am:
* mi/Makefile.am:
* mi/miinitext.c:
* mi/misprite.c:
* miext/damage/damage.c: (damageDamageRegion), (DamageCreate),
(DamageDestroy):
* miext/damage/damage.h:
* miext/damage/damagestr.h:
* miext/shadow/shadow.c: (shadowSetup):
* xfixes/region.c:
* xfixes/xfixes.h:
* xfixes/xfixesint.h:
Ok, so this change is way bigger than it needed to be, but I
couldn't stand it anymore. The "real" change here is the
addition of the damage extension server side pieces and a
minor change of the miext/damage interface to add a callback
on damage destroy. All of the configuration changes are to
add macros for various sets of libraries so that we don't have to
keep editing every Makefile.am whenever we add another extension
to the library. The xfixes changes expose VERIFY_REGION so
that damageext can use it.
Index: region.c
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/Attic/region.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- region.c 19 Oct 2003 22:09:09 -0000 1.1.2.1
+++ region.c 24 Oct 2003 06:35:24 -0000 1.1.2.2
@@ -35,20 +35,7 @@
#include <shapeint.h>
#endif
-static RESTYPE RegionResType;
-
-#define VERIFY_REGION(pRegion, rid, client, mode) { \
- pRegion = SecurityLookupIDByType (client, rid, RegionResType, mode); \
- if (!pRegion) { \
- client->errorValue = rid; \
- return XFixesErrorBase + BadRegion; \
- } \
-}
-
-#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \
- pRegion = 0; \
- if (rid) VERIFY_REGION(pRegion, rid, client, mode); \
-}
+RESTYPE RegionResType;
static int
RegionResFree (pointer data, XID id)
Index: xfixes.h
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/xfixes.h,v
retrieving revision 1.3
retrieving revision 1.3.2.1
diff -u -d -r1.3 -r1.3.2.1
--- xfixes.h 9 Oct 2003 01:52:14 -0000 1.3
+++ xfixes.h 24 Oct 2003 06:35:24 -0000 1.3.2.1
@@ -22,3 +22,28 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef _XFIXES_H_
+#define _XFIXES_H_
+
+#include "resource.h"
+
+extern RESTYPE RegionResType;
+extern int XFixesErrorBase;
+
+#define VERIFY_REGION(pRegion, rid, client, mode) { \
+ pRegion = SecurityLookupIDByType (client, rid, RegionResType, mode); \
+ if (!pRegion) { \
+ client->errorValue = rid; \
+ return XFixesErrorBase + BadRegion; \
+ } \
+}
+
+#define VERIFY_REGION_OR_NONE(pRegion, rid, client, mode) { \
+ pRegion = 0; \
+ if (rid) VERIFY_REGION(pRegion, rid, client, mode); \
+}
+
+void
+XFixesExtensionInit(void);
+
+#endif /* _XFIXES_H_ */
Index: xfixesint.h
===================================================================
RCS file: /cvs/xserver/xserver/xfixes/xfixesint.h,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -d -r1.3.2.1 -r1.3.2.2
--- xfixesint.h 19 Oct 2003 20:34:20 -0000 1.3.2.1
+++ xfixesint.h 24 Oct 2003 06:35:24 -0000 1.3.2.2
@@ -35,6 +35,7 @@
#include <X11/extensions/xfixesproto.h>
#include "windowstr.h"
#include "selection.h"
+#include "xfixes.h"
extern unsigned char XFixesReqCode;
extern int XFixesEventBase;