aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/geext.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 05:23:48 +0000
commit81f91c615982e50bb62708201569c33a3cd3d973 (patch)
tree4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/Xext/geext.h
parentb571a562410f565af2bdde52d9f7f9a23ffae04f (diff)
parenta915739887477b28d924ecc8417ee107d125bd6c (diff)
downloadvcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2
vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/Xext/geext.h')
-rw-r--r--xorg-server/Xext/geext.h61
1 files changed, 15 insertions, 46 deletions
diff --git a/xorg-server/Xext/geext.h b/xorg-server/Xext/geext.h
index 3d1665373..8e6dbeb24 100644
--- a/xorg-server/Xext/geext.h
+++ b/xorg-server/Xext/geext.h
@@ -34,46 +34,23 @@ from the author.
#define _GEEXT_H_
#include <X11/extensions/geproto.h>
-
-/**
- * This struct is used both in the window and by grabs to determine the event
- * mask for a client.
- * A window will have a linked list of these structs, with one entry per
- * client per device, null-terminated.
- * A grab has only one instance of this struct.
- */
-typedef struct _GenericMaskRec {
- struct _GenericMaskRec* next;
- XID resource; /* id for the resource manager */
- DeviceIntPtr dev;
- Mask eventMask[MAXEXTENSIONS]; /* one mask per extension */
-} GenericMaskRec, *GenericMaskPtr;
-
-
-/* Struct to keep information about registered extensions
- *
- * evswap ... use to swap event fields for different byte ordered clients.
- * evfill ... use to fill various event fields from the given parameters.
- */
+/** Struct to keep information about registered extensions */
typedef struct _GEExtension {
+ /** Event swapping routine */
void (*evswap)(xGenericEvent* from, xGenericEvent* to);
- void (*evfill)(xGenericEvent* ev,
- DeviceIntPtr pDev, /* device */
- WindowPtr pWin, /* event window */
- GrabPtr pGrab /* current grab, may be NULL */
- );
} GEExtension, *GEExtensionPtr;
/* All registered extensions and their handling functions. */
-extern GEExtension GEExtensions[MAXEXTENSIONS];
+extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS];
+/* Typecast to generic event */
+#define GEV(ev) ((xGenericEvent*)(ev))
/* Returns the extension offset from the event */
-#define GEEXT(ev) (((xGenericEvent*)(ev))->extension)
+#define GEEXT(ev) (GEV(ev)->extension)
+/* Return zero-based extension offset (offset - 128). Only for use in arrays */
#define GEEXTIDX(ev) (GEEXT(ev) & 0x7F)
-/* Typecast to generic event */
-#define GEV(ev) ((xGenericEvent*)(ev))
/* True if mask is set for extension on window */
#define GEMaskIsSet(pWin, extension, mask) \
((pWin)->optional && \
@@ -86,29 +63,21 @@ extern GEExtension GEExtensions[MAXEXTENSIONS];
/* Returns the event_fill for the given event */
#define GEEventFill(ev) \
- GEExtensions[GEEXTIDX(xE)].evfill
+ GEExtensions[GEEXTIDX(ev)].evfill
#define GEIsType(ev, ext, ev_type) \
- ((ev->u.u.type == GenericEvent) && \
- ((xGenericEvent*)(ev))->extension == ext && \
- ((xGenericEvent*)(ev))->evtype == ev_type)
+ ((GEV(ev)->type == GenericEvent) && \
+ GEEXT(ev) == (ext) && \
+ GEV(ev)->evtype == (ev_type))
/* Interface for other extensions */
-void GEWindowSetMask(ClientPtr pClient, DeviceIntPtr pDev,
- WindowPtr pWin, int extension, Mask mask);
-
-void GERegisterExtension(
+extern _X_EXPORT void GERegisterExtension(
int extension,
- void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to),
- void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev,
- WindowPtr pWin, GrabPtr pGrab)
- );
+ void (*ev_dispatch)(xGenericEvent* from, xGenericEvent* to));
-void GEInitEvent(xGenericEvent* ev, int extension);
-BOOL GEDeviceMaskIsSet(WindowPtr pWin, DeviceIntPtr pDev,
- int extension, Mask mask);
+extern _X_EXPORT void GEInitEvent(xGenericEvent* ev, int extension);
-void GEExtensionInit(void);
+extern _X_EXPORT void GEExtensionInit(void);
#endif /* _GEEXT_H_ */