1 /*
2  * Copyright (c) 2015 Cedric Hnyda <chnyda@suse.com>
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; either version 2 of
7  * the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it would be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write the Free Software Foundation,
16  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  */
18 
19 #ifndef INPUT_HELPER_H
20 #define INPUT_HELPER_H
21 
22 #include <sys/types.h>
23 #include <dirent.h>
24 
25 int open_device(void);
26 void send_rel_move(int fd, int x, int y);
27 void send_event(int fd, int event, int code, int value);
28 int open_uinput(void);
29 void create_device(int fd);
30 void setup_mouse_events(int fd);
31 void destroy_device(int fd);
32 int check_event_code(struct input_event *iev, int event, int code);
33 int check_sync_event(struct input_event *iev);
34 int no_events_queued(int fd, int stray_sync_event);
35 
36 #endif /* INPUT_HELPER_H */
37