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 | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 11 | #include "dbus.h" |
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(); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 24 | void input_set_dbus(dbus_t* dbus); |
Dominik Behr | 9389945 | 2014-08-18 22:16:21 -0700 | [diff] [blame] | 25 | int input_setfds(fd_set *read_set, fd_set *exception_set); |
| 26 | struct input_key_event *input_get_event(fd_set *read_fds, fd_set *exception_set); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 27 | void input_put_event(struct input_key_event *event); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 28 | void input_grab(); |
| 29 | void input_ungrab(); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 30 | |
| 31 | #endif |