blob: ce9ffb2e84071eae419227db364b2c2d48c86a08 [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 Sodmanbbcb0522014-09-19 10:34:07 -070012#include "dbus.h"
David Sodmanbf3f2842014-11-12 08:26:58 -080013#include "term.h"
14#include "video.h"
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070015
16struct input_key_event {
17 uint16_t code;
18 unsigned char value;
19};
20
21int input_init();
David Sodmanbf3f2842014-11-12 08:26:58 -080022int input_run(bool standalone);
23void input_set_terminal(terminal_t*);
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070024void input_close();
David Sodmanbbcb0522014-09-19 10:34:07 -070025void input_set_dbus(dbus_t* dbus);
Dominik Behr93899452014-08-18 22:16:21 -070026int input_setfds(fd_set *read_set, fd_set *exception_set);
27struct input_key_event *input_get_event(fd_set *read_fds, fd_set *exception_set);
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070028void input_put_event(struct input_key_event *event);
David Sodmanbbcb0522014-09-19 10:34:07 -070029void input_grab();
30void input_ungrab();
David Sodman8ef20062015-01-06 09:23:40 -080031terminal_t* input_create_term(int vt);
32void input_set_current(terminal_t* terminal);
33unsigned int input_get_maxterminals();
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070034
35#endif