summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-06-06 11:26:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-06-06 11:26:29 +1000
commit8c20a9f09ae098ca2ef9972b728e5971d9ffde6b (patch)
tree915f21df794ae624b9bd713e2ab1e7ce5ba731e0 /include
parent2f5a1d46932838b5f8cdd696cfeb0c885e385fc6 (diff)
Add evemu-event to play a single event from the commandline
Some testing scenarios require specific events to be generated that are hard to create from a physical device (e.g. touchpad motion purely on the positive X axis with no Y axis). For those scenarios, recording a device and hacking the evemu event files is time consuming. evemu-event simply allows this scenario to be scripted.
Diffstat (limited to 'include')
-rw-r--r--include/evemu.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/evemu.h b/include/evemu.h
index 52e4297..f256176 100644
--- a/include/evemu.h
+++ b/include/evemu.h
@@ -318,6 +318,15 @@ int evemu_read(struct evemu_device *dev, FILE *fp);
int evemu_write_event(FILE *fp, const struct input_event *ev);
/**
+ * evemu_create_event() - Create a single event
+ * @ev: pointer to the kernel event to be filled
+ * @type: the event type to set
+ * @code: the event code to set
+ * @value: the event value to set
+ */
+int evemu_create_event(struct input_event *ev, int type, int code, int value);
+
+/**
* evemu_read_event() - read kernel event from file
* @fp: file pointer to read the event from
* @ev: pointer to the kernel event to be filled
@@ -360,6 +369,14 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
*/
int evemu_record(FILE *fp, int fd, int ms);
+
+/**
+ * evemu_play_one() - play one event to kernel device
+ * @fd: file descriptor of kernel device to write to
+ * @ev: pointer to the kernel event to be played
+ */
+int evemu_play_one(int fd, const struct input_event *ev);
+
/**
* evemu_play() - replay events from file to kernel device in realtime
* @fp: file pointer to read the events from