From b90bb97a5b8686ba050835724c6b299a0cfb0305 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Wed, 12 Aug 2009 16:40:09 -0700 Subject: Add GenericEvent support Allows extensions to register their own decoders for GenericEvents, though none do, since XInput isn't decoded yet Signed-off-by: Alan Coopersmith --- print11.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'print11.c') diff --git a/print11.c b/print11.c index e29ac23..7e0cc72 100644 --- a/print11.c +++ b/print11.c @@ -953,6 +953,23 @@ MappingNotifyEvent ( PrintField(buf, 6, 1, CARD8, "count"); } +void +UnknownGenericEvent ( + const unsigned char *buf) +{ + long n; + + PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* GenericEvent */; + if (Verbose < 1) + return; + PrintField(buf, 1, 1, EXTENSION, "extension"); + printfield (buf, 2, 2, CARD16, "sequence number"); + printfield (buf, 4, 4, DVALUE4(n), "event length"); + PrintField(buf, 2, 8, CARD16, "event type"); + n = ILong (&buf[4]) + 5; + (void) PrintList (&buf[12], n, CARD32, "data"); +} + void UnknownEvent ( const unsigned char *buf) -- cgit v1.2.1