1/*
2 * Copyright 2021, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5
6
7#include <boot/platform/generic/text_console.h>
8#include <boot/vfs.h>
9
10
11// This is set by the boot platform during console_init().
12ConsoleNode* gConsoleNode;
13
14
15void
16console_clear_screen()
17{
18	gConsoleNode->ClearScreen();
19}
20
21
22int32
23console_width()
24{
25	return gConsoleNode->Width();
26}
27
28
29int32
30console_height()
31{
32	return gConsoleNode->Height();
33}
34
35
36void
37console_set_cursor(int32 x, int32 y)
38{
39	gConsoleNode->SetCursor(x, y);
40}
41
42
43void
44console_show_cursor()
45{
46	gConsoleNode->SetCursorVisible(true);
47}
48
49
50void
51console_hide_cursor(void)
52{
53	gConsoleNode->SetCursorVisible(false);
54}
55
56
57void
58console_set_color(int32 foreground, int32 background)
59{
60	gConsoleNode->SetColors(foreground, background);
61}
62