blob: 4bfb5a2dcfead14e0910595758947a66aac0630f [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);
Stéphane Marchesin00ff1872015-12-14 13:40:09 -080026int 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);
28void input_put_event(struct input_key_event* event);
David Sodman8ef20062015-01-06 09:23:40 -080029terminal_t* input_create_term(int vt);
David Sodmanf0a925a2015-05-04 11:19:19 -070030terminal_t* input_create_splash_term(video_t* video);
31void input_destroy_splash_term();
David Sodman8ef20062015-01-06 09:23:40 -080032void input_set_current(terminal_t* terminal);
33unsigned int input_get_maxterminals();
David Sodmanf0a925a2015-05-04 11:19:19 -070034int input_process(terminal_t* terminal, uint32_t delay);
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070035
36#endif