blob: f57fb10981c4adde7b6ceb129329259fb99dc7ec [file] [log] [blame]
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -07001/*
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 Sodman8ef20062015-01-06 09:23:40 -080011
David Sodmanbf3f2842014-11-12 08:26:58 -080012#include "term.h"
13#include "video.h"
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070014
15struct input_key_event {
16 uint16_t code;
17 unsigned char value;
18};
19
20int input_init();
21void input_close();
Dominik Behr4defb362016-01-13 12:36:14 -080022int input_add_fds(fd_set* read_set, fd_set* exception_set);
Stéphane Marchesin00ff1872015-12-14 13:40:09 -080023struct input_key_event* input_get_event(fd_set* read_fds, fd_set* exception_set);
24void input_put_event(struct input_key_event* event);
Dominik Behr4defb362016-01-13 12:36:14 -080025int input_process(uint32_t usec);
26int input_run(bool standalone);
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070027
28#endif