aboutsummaryrefslogtreecommitdiff
path: root/src/evdev.h
diff options
context:
space:
mode:
authorOliver McFadden <oliver.mcfadden@nokia.com>2009-08-02 12:03:04 +0300
committerPeter Hutterer <peter.hutterer@who-t.net>2009-08-04 16:07:17 +1000
commit69d6ff3e01263ce2d52ed18b08f054bf3fdb923c (patch)
tree117bd91d00a9e6e2ee572d7de40c6facddfba4e4 /src/evdev.h
parentEvdev doesn't require inputproto. (diff)
downloadxf86-input-evdev-69d6ff3e01263ce2d52ed18b08f054bf3fdb923c.tar.gz
xf86-input-evdev-69d6ff3e01263ce2d52ed18b08f054bf3fdb923c.tar.bz2
xf86-input-evdev-69d6ff3e01263ce2d52ed18b08f054bf3fdb923c.zip
evdev: Use the EvdevPost...Event() functions in the emulation code.
This is similar to commit 1f641d75edba7394201c1c53938215bae696791b. It provides the same functionality of queuing the (in this case emulated) events and waiting until an EV_SYN synchronization event is received before posting them to the server. This preserves the order of events (both real and emulated) and ensures that MotionNotify events will always be posted first. It also unifies the event posting into a few small functions which improves maintainability. From this point on, you should never use the xf86Post...Event() functions in new code, but rather the EvdevPost...Event() versions. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/evdev.h')
-rw-r--r--src/evdev.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/evdev.h b/src/evdev.h
index 23ee003..142801c 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -25,6 +25,7 @@
* Kristian Høgsberg (krh@redhat.com)
* Adam Jackson (ajax@redhat.com)
* Peter Hutterer (peter@cs.unisa.edu.au)
+ * Oliver McFadden (oliver.mcfadden@nokia.com)
*/
#ifndef EVDEV_H
@@ -179,6 +180,14 @@ typedef struct {
EventQueueRec queue[EVDEV_MAXQUEUE];
} EvdevRec, *EvdevPtr;
+/* Event posting functions */
+void EvdevPostKbdEvent(InputInfoPtr pInfo, struct input_event *ev, int value);
+void EvdevPostButtonEvent(InputInfoPtr pInfo, int button, int value);
+void EvdevPostButtonClicks(InputInfoPtr pInfo, int button, int count);
+void EvdevPostRelativeMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
+ int v[MAX_VALUATORS]);
+void EvdevPostAbsoluteMotionEvents(InputInfoPtr pInfo, int *num_v, int *first_v,
+ int v[MAX_VALUATORS]);
unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);
/* Middle Button emulation */