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 TERM_H |
| 8 | #define TERM_H |
| 9 | |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 10 | #include "video.h" |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 11 | #include "input.h" |
| 12 | |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 13 | typedef struct _terminal_t { |
| 14 | video_t *video; |
| 15 | dbus_t *dbus; |
| 16 | struct term *term; |
| 17 | bool active; |
| 18 | } terminal_t; |
| 19 | |
Dominik Behr | 580462b | 2014-11-20 13:50:05 -0800 | [diff] [blame] | 20 | terminal_t *term_init(unsigned int term_id); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 21 | void term_close(terminal_t* terminal); |
| 22 | void term_redraw(terminal_t* terminal); |
| 23 | void term_set_dbus(terminal_t* terminal, dbus_t* dbus); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 24 | void term_close(terminal_t* terminal); |
David Sodman | bf3f284 | 2014-11-12 08:26:58 -0800 | [diff] [blame] | 25 | void term_key_event(terminal_t* terminal, uint32_t keysym, int32_t unicode); |
| 26 | bool term_is_child_done(terminal_t* terminal); |
| 27 | |
| 28 | void term_page_up(terminal_t* terminal); |
| 29 | void term_page_down(terminal_t* terminal); |
| 30 | void term_line_up(terminal_t* terminal); |
| 31 | void term_line_down(terminal_t* terminal); |
| 32 | |
| 33 | bool term_is_valid(terminal_t* terminal); |
| 34 | int term_fd(terminal_t* terminal); |
| 35 | void term_dispatch_io(terminal_t* terminal, fd_set* read_set); |
| 36 | bool term_exception(terminal_t*, fd_set* exception_set); |
| 37 | bool term_is_active(terminal_t*); |
| 38 | void term_add_fd(terminal_t* terminal, fd_set* read_set, fd_set* exception_set); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 39 | |
| 40 | #endif |