Mercurial > remote-gamepad-server
annotate 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 |
rev | line source |
---|---|
0
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 #ifndef UINPUT_H |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
2 #define UINPUT_H |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
4 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 #include <linux/input.h> |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 #include <linux/uinput.h> |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 |
6
eafcd170dc6d
Add circle pad and c pad support, and provisional touch support.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
2
diff
changeset
|
8 #define PAD_MAX 156 |
eafcd170dc6d
Add circle pad and c pad support, and provisional touch support.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
2
diff
changeset
|
9 |
eafcd170dc6d
Add circle pad and c pad support, and provisional touch support.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
2
diff
changeset
|
10 #define TOUCH_MIN_X 0 |
eafcd170dc6d
Add circle pad and c pad support, and provisional touch support.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
2
diff
changeset
|
11 #define TOUCH_MAX_X 319 |
eafcd170dc6d
Add circle pad and c pad support, and provisional touch support.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
2
diff
changeset
|
12 #define TOUCH_MIN_Y 0 |
eafcd170dc6d
Add circle pad and c pad support, and provisional touch support.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
2
diff
changeset
|
13 #define TOUCH_MAX_Y 239 |
0
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
15 |
2
f362b20de51e
Remove trailing whitespaces.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
0
diff
changeset
|
16 /* |
0
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 Create a new uinput device |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 Returns: device descriptor |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 */ |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
20 extern int init_uinput_device(void); |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
21 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
22 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
23 /* |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
24 Send an event into the uinput device |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
25 Returns: TRUE, FALSE |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
26 */ |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
27 extern int do_uinput(int fd, unsigned short key, int pressed, unsigned short event_type); |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
28 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
29 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
30 /* |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
31 Synchonize events |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
32 */ |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
33 extern void flush_uinput(int fd); |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
34 |
e70ea46d6073
Initial import from http://wouhanegaine.free.fr/dev/DSPad02b_neo07.zip
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
35 #endif /* UINPUT_H */ |