Xext: remove ev_fill from GEExtensions.

This commit is contained in:
Peter Hutterer 2009-03-10 10:15:45 +10:00
parent 445daa62e7
commit 6b6b660c36
3 changed files with 5 additions and 19 deletions

View File

@ -261,16 +261,13 @@ GEExtensionInit(void)
*/
void
GERegisterExtension(int extension,
void (*ev_swap)(xGenericEvent* from, xGenericEvent* to),
void (*ev_fill)(xGenericEvent* ev, DeviceIntPtr pDev,
WindowPtr pWin, GrabPtr pGrab))
void (*ev_swap)(xGenericEvent* from, xGenericEvent* to))
{
if ((extension & 0x7F) >= MAXEXTENSIONS)
FatalError("GE: extension > MAXEXTENSIONS. This should not happen.\n");
/* extension opcodes are > 128, might as well save some space here */
GEExtensions[extension & 0x7f].evswap = ev_swap;
GEExtensions[extension & 0x7f].evfill = ev_fill;
}

View File

@ -34,18 +34,10 @@ from the author.
#define _GEEXT_H_
#include <X11/extensions/geproto.h>
/* 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;
@ -82,10 +74,7 @@ extern _X_EXPORT GEExtension GEExtensions[MAXEXTENSIONS];
/* Interface for other extensions */
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));
extern _X_EXPORT void GEInitEvent(xGenericEvent* ev, int extension);

View File

@ -1083,7 +1083,7 @@ XInputExtensionInit(void)
EventSwapVector[DeviceEnterNotify] = SEventIDispatch;
EventSwapVector[DeviceLeaveNotify] = SEventIDispatch;
GERegisterExtension(IReqCode, XI2EventSwap, NULL);
GERegisterExtension(IReqCode, XI2EventSwap);
} else {
FatalError("IExtensionInit: AddExtensions failed\n");
}