Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014 The Chromium OS Authors. All rights reserved. |
| 3 | * Use of this source code is governed by a BSD-style license that can be |
| 4 | * found in the LICENSE file. |
| 5 | */ |
| 6 | |
| 7 | #ifndef INPUT_H |
| 8 | #define INPUT_H |
| 9 | |
| 10 | #include <linux/input.h> |
David Sodman | 8ef2006 | 2015-01-06 09:23:40 -0800 | [diff] [blame] | 11 | |
David Sodman | bf3f284 | 2014-11-12 08:26:58 -0800 | [diff] [blame] | 12 | #include "term.h" |
| 13 | #include "video.h" |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 14 | |
| 15 | struct input_key_event { |
| 16 | uint16_t code; |
| 17 | unsigned char value; |
| 18 | }; |
| 19 | |
| 20 | int input_init(); |
| 21 | void input_close(); |
Dominik Behr | 4defb36 | 2016-01-13 12:36:14 -0800 | [diff] [blame^] | 22 | int input_add_fds(fd_set* read_set, fd_set* exception_set); |
Stéphane Marchesin | 00ff187 | 2015-12-14 13:40:09 -0800 | [diff] [blame] | 23 | struct input_key_event* input_get_event(fd_set* read_fds, fd_set* exception_set); |
| 24 | void input_put_event(struct input_key_event* event); |
Dominik Behr | 4defb36 | 2016-01-13 12:36:14 -0800 | [diff] [blame^] | 25 | int input_process(uint32_t usec); |
| 26 | int input_run(bool standalone); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 27 | |
| 28 | #endif |