-
Notifications
You must be signed in to change notification settings - Fork 5
/
uinput.h
51 lines (45 loc) · 1.68 KB
/
uinput.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* This file is part of wdaemon.
*
* wdaemon is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wdaemon is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with wdaemon; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#if HAVE_CONFIG_H
#include <config.h>
#endif
#ifndef UINPUT_H
#define UINPUT_H
#include <linux/input.h>
#include <linux/uinput.h>
enum create_type {
WDAEMON_CREATE = 8, /* wdaemon creates uinput dev */
SELF_CREATE, /* backend creates uinput dev */
};
struct uinput_info {
int fd;
char name[UINPUT_MAX_NAME_SIZE];
int (*init_info)(struct uinput_info *info,
struct uinput_user_dev *dev);
int (*enable_events)(struct uinput_info *info,
struct uinput_user_dev *dev);
void *priv;
enum create_type create_mode;
};
int uinput_create(struct uinput_info *info);
int uinput_write_dev(struct uinput_info *info, struct uinput_user_dev *dev);
int uinput_write_event(struct uinput_info *info, struct input_event *ev);
int adonit_set_events(struct uinput_info *info);
int adonit_set_initial_values(struct uinput_info *info, struct uinput_user_dev *dev);
#endif /* UINPUT_H */
/* vim: set noexpandtab tabstop=8 shiftwidth=8: */