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