diff options
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index dd3e90ae5..c8751ce18 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -95,6 +95,7 @@ SOFTWARE. #include "exevents.h" #include "extnsionst.h" #include "exglobals.h" +#include "eventstr.h" #include "dixevents.h" /* DeliverFocusedEvent */ #include "dixgrabs.h" /* CreateGrab() */ #include "scrnintstr.h" @@ -168,6 +169,49 @@ IsTouchEvent(InternalEvent *event) return FALSE; } +Bool +IsGestureEvent(InternalEvent *event) +{ + switch (event->any.type) { + case ET_GesturePinchBegin: + case ET_GesturePinchUpdate: + case ET_GesturePinchEnd: + case ET_GestureSwipeBegin: + case ET_GestureSwipeUpdate: + case ET_GestureSwipeEnd: + return TRUE; + default: + break; + } + return FALSE; +} + +Bool +IsGestureBeginEvent(InternalEvent *event) +{ + switch (event->any.type) { + case ET_GesturePinchBegin: + case ET_GestureSwipeBegin: + return TRUE; + default: + break; + } + return FALSE; +} + +Bool +IsGestureEndEvent(InternalEvent *event) +{ + switch (event->any.type) { + case ET_GesturePinchEnd: + case ET_GestureSwipeEnd: + return TRUE; + default: + break; + } + return FALSE; +} + /** * @return the device matching the deviceid of the device set in the event, or * NULL if the event is not an XInput event. |