blob: 61eb7dfc77f3a527d81f207e4bb26097772f71b4 [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 Sodmanbbcb0522014-09-19 10:34:07 -070011#include "dbus.h"
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();
David Sodmanbf3f2842014-11-12 08:26:58 -080021int input_run(bool standalone);
22void input_set_terminal(terminal_t*);
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070023void input_close();
David Sodmanbbcb0522014-09-19 10:34:07 -070024void input_set_dbus(dbus_t* dbus);
Dominik Behr93899452014-08-18 22:16:21 -070025int input_setfds(fd_set *read_set, fd_set *exception_set);
26struct input_key_event *input_get_event(fd_set *read_fds, fd_set *exception_set);
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070027void input_put_event(struct input_key_event *event);
David Sodmanbbcb0522014-09-19 10:34:07 -070028void input_grab();
29void input_ungrab();
Stéphane Marchesinae37e6c2014-08-08 18:19:40 -070030
31#endif