17 int bold = ( attrs &
A_BOLD );
20 if ( scr->
attrs != attrs ) {
23 printf (
"\033[0;%dm", ( bold ? 1 : 22 ) );
55 unsigned int y,
unsigned int x ) {
58 printf (
"\033[%d;%dH", (
y + 1 ), (
x + 1 ) );
91 printf (
"\033[?25%c", ( visibility ?
'h' :
'l' ) );
static void ansiscr_movetoyx(struct _curses_screen *scr, unsigned int y, unsigned int x) __nonnull
static void ansiscr_attrs(struct _curses_screen *scr, attr_t attrs)
static int ansiscr_getc(struct _curses_screen *scr __unused)
static bool ansiscr_peek(struct _curses_screen *scr __unused)
static void ansiscr_exit(struct _curses_screen *scr)
static unsigned int saved_usage
static void ansiscr_erase(struct _curses_screen *scr, attr_t attrs)
static void ansiscr_putc(struct _curses_screen *scr, chtype c) __nonnull
static void ansiscr_reset(struct _curses_screen *scr) __nonnull
static void ansiscr_cursor(struct _curses_screen *scr __unused, int visibility)
static void ansiscr_init(struct _curses_screen *scr)
void ansicol_set_pair(unsigned int cpair)
Set ANSI foreground and background colour.
int getchar(void)
Read a single character from any console.
int iskey(void)
Check for available input on any console.
int putchar(int character)
Write a single character to each console device.
#define PAIR_NUMBER(attrs)
struct _curses_screen SCREEN
Curses SCREEN object.
#define CPAIR_DEFAULT
Default colour pair.
#define __nonnull
Declare a function's pointer parameters as non-null - i.e.
#define __unused
Declare a variable or data structure as unused.
#define CONSOLE_USAGE_TUI
Text-based user interface.
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
static int console_set_usage(int usage)
Set console usage.
static unsigned int unsigned int y
attr_t attrs
Current attribute.
unsigned int curs_x
Current cursor position.
int printf(const char *fmt,...)
Write a formatted string to the console.