Change GetXI2/XI/CoreType to just take a type argument

Avoids the dummy-event dance if we have an event type and need to get the
matching XI2 type.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
Peter Hutterer 2011-12-07 14:14:10 +10:00
commit e5aa00989c
5 changed files with 24 additions and 23 deletions

View file

@ -27,14 +27,15 @@
#include <X11/extensions/XIproto.h>
#include "input.h"
#include "events.h"
#include "eventstr.h"
#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
_X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
_X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
_X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi);
_X_INTERNAL int GetCoreType(InternalEvent* ev);
_X_INTERNAL int GetXIType(InternalEvent* ev);
_X_INTERNAL int GetXI2Type(InternalEvent* ev);
_X_INTERNAL int GetCoreType(enum EventType type);
_X_INTERNAL int GetXIType(enum EventType type);
_X_INTERNAL int GetXI2Type(enum EventType type);
#endif /* _EVENTCONVERT_H_ */