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" |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 12 | |
| 13 | struct input_key_event { |
| 14 | uint16_t code; |
| 15 | unsigned char value; |
| 16 | }; |
| 17 | |
| 18 | int input_init(); |
| 19 | void input_close(); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 20 | void input_set_dbus(dbus_t* dbus); |
Dominik Behr | 9389945 | 2014-08-18 22:16:21 -0700 | [diff] [blame] | 21 | int input_setfds(fd_set *read_set, fd_set *exception_set); |
| 22 | 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] | 23 | void input_put_event(struct input_key_event *event); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 24 | void input_grab(); |
| 25 | void input_ungrab(); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 26 | |
| 27 | #endif |