Mercurial > remote-gamepad-server
view uinput.h @ 9:5e15d64a2d24 default tip
If somebody closed stdin, fd could be both valid and 0, don’t check for that.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 18 Aug 2015 02:09:55 +0100 |
parents | eafcd170dc6d |
children |
line wrap: on
line source
#ifndef UINPUT_H #define UINPUT_H #include <linux/input.h> #include <linux/uinput.h> #define PAD_MAX 156 #define TOUCH_MIN_X 0 #define TOUCH_MAX_X 319 #define TOUCH_MIN_Y 0 #define TOUCH_MAX_Y 239 /* Create a new uinput device Returns: device descriptor */ extern int init_uinput_device(void); /* Send an event into the uinput device Returns: TRUE, FALSE */ extern int do_uinput(int fd, unsigned short key, int pressed, unsigned short event_type); /* Synchonize events */ extern void flush_uinput(int fd); #endif /* UINPUT_H */