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(); |
David Sodman | bf3f284 | 2014-11-12 08:26:58 -0800 | [diff] [blame] | 21 | int input_run(bool standalone); |
| 22 | void input_set_terminal(terminal_t*); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 23 | void input_close(); |
Stéphane Marchesin | 00ff187 | 2015-12-14 13:40:09 -0800 | [diff] [blame] | 24 | int input_setfds(fd_set* read_set, fd_set* exception_set); |
| 25 | struct input_key_event* input_get_event(fd_set* read_fds, fd_set* exception_set); |
| 26 | void input_put_event(struct input_key_event* event); |
David Sodman | 8ef2006 | 2015-01-06 09:23:40 -0800 | [diff] [blame] | 27 | terminal_t* input_create_term(int vt); |
Stéphane Marchesin | e38b8e7 | 2016-01-07 19:20:28 -0800 | [diff] [blame] | 28 | terminal_t* input_get_current_term(); |
David Sodman | 8ef2006 | 2015-01-06 09:23:40 -0800 | [diff] [blame] | 29 | void input_set_current(terminal_t* terminal); |
David Sodman | f0a925a | 2015-05-04 11:19:19 -0700 | [diff] [blame] | 30 | int input_process(terminal_t* terminal, uint32_t delay); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 31 | |
| 32 | #endif |