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 | f0a925a | 2015-05-04 11:19:19 -0700 | [diff] [blame] | 10 | #include "image.h" |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 11 | #include "video.h" |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 12 | |
David Sodman | f0a925a | 2015-05-04 11:19:19 -0700 | [diff] [blame] | 13 | typedef struct _terminal_t terminal_t; |
Stéphane Marchesin | 00ff187 | 2015-12-14 13:40:09 -0800 | [diff] [blame] | 14 | terminal_t* term_init(bool interactive, video_t* video); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 15 | void term_close(terminal_t* terminal); |
| 16 | void term_redraw(terminal_t* terminal); |
| 17 | void term_set_dbus(terminal_t* terminal, dbus_t* dbus); |
David Sodman | bbcb052 | 2014-09-19 10:34:07 -0700 | [diff] [blame] | 18 | void term_close(terminal_t* terminal); |
David Sodman | bf3f284 | 2014-11-12 08:26:58 -0800 | [diff] [blame] | 19 | void term_key_event(terminal_t* terminal, uint32_t keysym, int32_t unicode); |
| 20 | bool term_is_child_done(terminal_t* terminal); |
| 21 | |
| 22 | void term_page_up(terminal_t* terminal); |
| 23 | void term_page_down(terminal_t* terminal); |
| 24 | void term_line_up(terminal_t* terminal); |
| 25 | void term_line_down(terminal_t* terminal); |
| 26 | |
| 27 | bool term_is_valid(terminal_t* terminal); |
| 28 | int term_fd(terminal_t* terminal); |
| 29 | void term_dispatch_io(terminal_t* terminal, fd_set* read_set); |
| 30 | bool term_exception(terminal_t*, fd_set* exception_set); |
| 31 | bool term_is_active(terminal_t*); |
David Sodman | 8ef2006 | 2015-01-06 09:23:40 -0800 | [diff] [blame] | 32 | void term_activate(terminal_t*); |
David Sodman | f0a925a | 2015-05-04 11:19:19 -0700 | [diff] [blame] | 33 | void term_deactivate(terminal_t* terminal); |
David Sodman | bf3f284 | 2014-11-12 08:26:58 -0800 | [diff] [blame] | 34 | void term_add_fd(terminal_t* terminal, fd_set* read_set, fd_set* exception_set); |
David Sodman | 8ef2006 | 2015-01-06 09:23:40 -0800 | [diff] [blame] | 35 | const char* term_get_ptsname(terminal_t* terminal); |
David Sodman | f0a925a | 2015-05-04 11:19:19 -0700 | [diff] [blame] | 36 | void term_set_background(terminal_t* term, uint32_t bg); |
| 37 | int term_show_image(terminal_t* terminal, image_t* image); |
| 38 | void term_write_message(terminal_t* terminal, char* message); |
| 39 | void term_hide_cursor(terminal_t* terminal); |
| 40 | void term_show_cursor(terminal_t* terminal); |
David Sodman | 30a94ef | 2015-07-26 17:37:12 -0700 | [diff] [blame] | 41 | video_t* term_getvideo(terminal_t* terminal); |
Stéphane Marchesin | ae37e6c | 2014-08-08 18:19:40 -0700 | [diff] [blame] | 42 | |
| 43 | #endif |