Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 80 lines (69 sloc) 3.389 kB
f85eb10 @dvdhrm Add console subsystem dummy
authored
1 /*
2 * kmscon - Console Management
0d1acc5 @dvdhrm Change license to MIT license
authored
3 *
c25a2bb @dvdhrm console: make buffer code private
authored
4 * Copyright (c) 2011-2012 David Herrmann <dh.herrmann@googlemail.com>
0d1acc5 @dvdhrm Change license to MIT license
authored
5 * Copyright (c) 2011 University of Tuebingen
6 *
7 * Permission is hereby granted, free of charge, to any person obtaining
8 * a copy of this software and associated documentation files
9 * (the "Software"), to deal in the Software without restriction, including
10 * without limitation the rights to use, copy, modify, merge, publish,
11 * distribute, sublicense, and/or sell copies of the Software, and to
12 * permit persons to whom the Software is furnished to do so, subject to
13 * the following conditions:
14 *
15 * The above copyright notice and this permission notice shall be included
16 * in all copies or substantial portions of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
21 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
f85eb10 @dvdhrm Add console subsystem dummy
authored
25 */
26
27 /*
28 * Console Management
29 * This console does not emulate any terminal at all. This subsystem just
30 * provides functions to draw a console to a framebuffer and modifying the state
31 * of it.
32 */
33
55d4132 @dvdhrm console: add header protection
authored
34 #ifndef KMSCON_CONSOLE_H
35 #define KMSCON_CONSOLE_H
36
731091a @dvdhrm Add kmscon_char type
authored
37 #include <inttypes.h>
f85eb10 @dvdhrm Add console subsystem dummy
authored
38 #include <stdlib.h>
c203b3a @dvdhrm font: move font handling into new subsystem
authored
39 #include "font.h"
096f0ca @dvdhrm Move to new uterm infrastructure
authored
40 #include "gl.h"
a7128cc @dvdhrm Adjust all code to use new kmscon_symbol_t
authored
41 #include "unicode.h"
f85eb10 @dvdhrm Add console subsystem dummy
authored
42
43 struct kmscon_console;
44
45 /* console objects */
46
dab18c4 @dvdhrm console: remove old font-factory code
authored
47 int kmscon_console_new(struct kmscon_console **out);
f85eb10 @dvdhrm Add console subsystem dummy
authored
48 void kmscon_console_ref(struct kmscon_console *con);
49 void kmscon_console_unref(struct kmscon_console *con);
173d38c @dvdhrm Add console drawing-logic
authored
50
a20e5c3 @dvdhrm console: allow resizing the console
authored
51 unsigned int kmscon_console_get_width(struct kmscon_console *con);
52 unsigned int kmscon_console_get_height(struct kmscon_console *con);
53 int kmscon_console_resize(struct kmscon_console *con, unsigned int x,
4ca6eea @dvdhrm console: calculate width by font
authored
54 unsigned int y, unsigned int height);
a20e5c3 @dvdhrm console: allow resizing the console
authored
55
a220fba @dvdhrm terminal: use new font backend
authored
56 void kmscon_console_draw(struct kmscon_console *con, struct font_screen *fscr);
d754047 @dvdhrm console: support writing to console
authored
57
a7128cc @dvdhrm Adjust all code to use new kmscon_symbol_t
authored
58 void kmscon_console_write(struct kmscon_console *con, kmscon_symbol_t ch);
676b03c @dvdhrm console: add newline function
authored
59 void kmscon_console_newline(struct kmscon_console *con);
cdb3d11 @dvdhrm vte: implement backspace control
authored
60 void kmscon_console_backspace(struct kmscon_console *con);
497d384 @dvdhrm console: add *_move_to() function
authored
61 void kmscon_console_move_to(struct kmscon_console *con, unsigned int x,
62 unsigned int y);
d8ff83c @dvdhrm console: add basic cursor movements
authored
63 void kmscon_console_move_up(struct kmscon_console *con, unsigned int num,
64 bool scroll);
65 void kmscon_console_move_down(struct kmscon_console *con, unsigned int num,
66 bool scroll);
67 void kmscon_console_move_left(struct kmscon_console *con, unsigned int num);
68 void kmscon_console_move_right(struct kmscon_console *con, unsigned int num);
f0bcc37 @dvdhrm console: add to line movement helpers
authored
69 void kmscon_console_move_line_end(struct kmscon_console *con);
70 void kmscon_console_move_line_home(struct kmscon_console *con);
d3951da @dvdhrm console: add helper to erase current position
authored
71 void kmscon_console_erase_cursor(struct kmscon_console *con);
f85244e @dvdhrm console: add erase-helpers
authored
72 void kmscon_console_erase_cursor_to_end(struct kmscon_console *con);
73 void kmscon_console_erase_home_to_cursor(struct kmscon_console *con);
74 void kmscon_console_erase_current_line(struct kmscon_console *con);
75 void kmscon_console_erase_screen_to_cursor(struct kmscon_console *con);
76 void kmscon_console_erase_cursor_to_screen(struct kmscon_console *con);
77 void kmscon_console_erase_screen(struct kmscon_console *con);
55d4132 @dvdhrm console: add header protection
authored
78
79 #endif /* KMSCON_CONSOLE_H */
Something went wrong with that request. Please try again.