57 unsigned int y,
unsigned int x );
111#define stdscr ( &_stdscr )
112#define COLS console_width
113#define LINES console_height
115#define MUCURSES_BITS( mask, shift ) (( mask ) << (shift))
117#define ATTRS_SHIFT 16
119#define WA_DEFAULT ( 0x0000 << ATTRS_SHIFT )
120#define WA_ALTCHARSET ( 0x0001 << ATTRS_SHIFT )
121#define WA_BLINK ( 0x0002 << ATTRS_SHIFT )
122#define WA_BOLD ( 0x0004 << ATTRS_SHIFT )
123#define WA_DIM ( 0x0008 << ATTRS_SHIFT )
124#define WA_INVIS ( 0x0010 << ATTRS_SHIFT )
125#define WA_PROTECT ( 0x0020 << ATTRS_SHIFT )
126#define WA_REVERSE ( 0x0040 << ATTRS_SHIFT )
127#define WA_STANDOUT ( 0x0080 << ATTRS_SHIFT )
128#define WA_UNDERLINE ( 0x0100 << ATTRS_SHIFT )
129#define WA_HORIZONTAL ( 0x0200 << ATTRS_SHIFT )
130#define WA_VERTICAL ( 0x0400 << ATTRS_SHIFT )
131#define WA_LEFT ( 0x0800 << ATTRS_SHIFT )
132#define WA_RIGHT ( 0x1000 << ATTRS_SHIFT )
133#define WA_LOW ( 0x2000 << ATTRS_SHIFT )
134#define WA_TOP ( 0x4000 << ATTRS_SHIFT )
136#define A_DEFAULT WA_DEFAULT
137#define A_ALTCHARSET WA_ALTCHARSET
138#define A_BLINK WA_BLINK
139#define A_BOLD WA_BOLD
141#define A_INVIS WA_INVIS
142#define A_PROTECT WA_PROTECT
143#define A_REVERSE WA_REVERSE
144#define A_STANDOUT WA_STANDOUT
145#define A_UNDERLINE WA_UNDERLINE
147#define A_ATTRIBUTES ( 0xffff << ATTRS_SHIFT )
148#define A_CHARTEXT ( 0xff )
149#define A_COLOUR ( 0xff << CPAIR_SHIFT )
150#define A_COLOR A_COLOUR
152#define COLOUR_PAIR(n) ( (n) << CPAIR_SHIFT )
153#define COLOR_PAIR(n) COLOUR_PAIR(n)
154#define PAIR_NUMBER(attrs) ( ( (attrs) & A_COLOUR ) >> CPAIR_SHIFT )
156#define COLOUR_PAIRS 8
157#define COLOR_PAIRS COLOUR_PAIRS
159#define ACS_ULCORNER '+'
160#define ACS_LLCORNER '+'
161#define ACS_URCORNER '+'
162#define ACS_LRCORNER '+'
172#define ACS_DIAMOND '+'
173#define ACS_CKBOARD ':'
174#define ACS_DEGREE '\''
175#define ACS_PLMINUS '#'
176#define ACS_BULLET 'o'
177#define ACS_LARROW '<'
178#define ACS_RARROW '>'
179#define ACS_DARROW 'v'
180#define ACS_UARROW '^'
182#define ACS_LANTERN '#'
185#define COLOUR_BLACK 0
187#define COLOUR_GREEN 2
188#define COLOUR_YELLOW 3
190#define COLOUR_MAGENTA 5
192#define COLOUR_WHITE 7
197#define COLOR_FG COLOUR_FG
198#define COLOR_BG COLOUR_BG
200#define COLOR_BLACK COLOUR_BLACK
201#define COLOR_BLUE COLOUR_BLUE
202#define COLOR_GREEN COLOUR_GREEN
203#define COLOR_CYAN COLOUR_CYAN
204#define COLOR_RED COLOUR_RED
205#define COLOR_MAGENTA COLOUR_MAGENTA
206#define COLOR_YELLOW COLOUR_YELLOW
207#define COLOR_WHITE COLOUR_WHITE
208#define COLORS COLOURS
228extern int beep (
void );
234#define can_change_color() can_change_colour()
239#define color_content( c, r, g, b ) colour_content( (c), (r), (g), (b) )
241#define color_set( cpno, opts ) colour_set( (cpno), (opts) )
243 int,
int,
int,
int );
255extern int echo (
void );
257extern int endwin (
void );
259extern int erase (
void );
260extern void filter (
void );
280#define init_color ( c, r, g, b ) init_colour ( (c), (r), (g), (b) )
281extern int init_pair (
short,
short,
short );
303extern int mvcur (
int,
int,
int,
int );
346extern int nl (
void );
349extern int noecho (
void );
361extern int putp (
const char * );
363extern int raw (
void );
386#define slk_color( c ) slk_colour( (c) )
397#define start_color() start_colour()
410extern char *
tparm (
char *,
long,
long,
long,
long,
long,
long,
long,
long,
449#define wcolor_set(w,s,v) wcolour_set((w),(s),(v))
501static inline int addnstr (
const char *str,
int n ) {
505static inline int addstr (
const char *str ) {
574static inline int getnstr (
char *str,
int n ) {
613static inline int mvaddnstr (
int y,
int x,
const char *str,
int n ) {
618static inline int mvaddstr (
int y,
int x,
const char *str ) {
649#define mvprintw( y, x, fmt, ... ) \
650 ( wmove(stdscr,(y),(x)) == OK \
651 ? wprintw( stdscr,(fmt), ## __VA_ARGS__ ) : ERR )
708#define mvwprintw( win, y, x, fmt, ... ) \
709 ( wmove((win),(y),(x)) == OK \
710 ? wprintw((win),(fmt), ## __VA_ARGS__) : ERR )
717#define printw( fmt, ... ) wprintw(stdscr,(fmt), ## __VA_ARGS__ )
726#define standend() wstandend( stdscr )
727#define standout() wstandout( stdscr )
static union @024010030001061367220137227263210031030210157031 opts
"cert<xxx>" option list
int wdelch(WINDOW *win)
Delete character under the cursor in a window.
static int attr_get(attr_t *attrs, short *pair, void *opts)
int overwrite(const WINDOW *, WINDOW *)
static int mvwgetnstr(WINDOW *win, int y, int x, char *str, int n)
static int attrset(int attrs)
int wdeleteln(WINDOW *) __nonnull
Delete line under a window's cursor.
static void bkgdset(chtype ch)
static int mvdelch(int y, int x)
int waddch(WINDOW *, const chtype) __nonnull
Add a single-byte character and rendition to a window and advance the cursor.
static int attr_set(attr_t attrs, short cpair, void *opts)
int wprintw(WINDOW *, const char *,...) __nonnull
Print formatted output to a window.
int erase(void)
Completely clear the screen.
static int getnstr(char *str, int n)
static int waddchstr(WINDOW *win, const chtype *chstr)
static int mvaddch(int y, int x, const chtype ch)
static int mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
WINDOW * derwin(WINDOW *, int, int, int, int) __nonnull
Create a new derived window.
int wattr_get(WINDOW *, attr_t *, short *, void *)
static int mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr)
static int mvgetnstr(int y, int x, char *str, int n)
int wcolour_set(WINDOW *, short, void *)
static int mvvline(int y, int x, chtype ch, int n)
int wattroff(WINDOW *, int) __nonnull
Turn off attributes in a window.
int mvwin(WINDOW *, int, int) __nonnull
Move window origin to specified coordinates.
static int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
static int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n)
static int mvwgetch(WINDOW *win, int y, int x)
int waddnstr(WINDOW *, const char *, int) __nonnull
Add string of single-byte characters to a window.
int init_colour(short, short, short, short)
void wtimeout(WINDOW *, int)
static int mvaddstr(int y, int x, const char *str)
static int start_colour(void)
WINDOW * initscr(void)
Initialise console environment.
static bool has_colors(void)
static int mvwgetstr(WINDOW *win, int y, int x, char *str)
int vw_printw(WINDOW *, const char *, va_list) __nonnull
Print formatted output in a window.
WINDOW * dupwin(WINDOW *) __nonnull
Create a duplicate of the specified window.
int reset_prog_mode(void)
int intrflush(WINDOW *, bool)
static int clrtobot(void)
static int addchnstr(const chtype *chstr, int n)
static int vline(chtype ch, int n)
struct _curses_screen SCREEN
Curses SCREEN object.
int overlay(const WINDOW *, WINDOW *)
int slk_clear(void)
Clear the soft function key labels from the screen.
int wattr_off(WINDOW *, attr_t, void *)
int colour_content(short, short *, short *, short *) __nonnull
Identify the RGB components of a given colour value.
int slk_init(int)
Initialise the soft function keys.
int init_pair(short, short, short)
Initialise colour pair.
int keypad(WINDOW *, bool)
int wattr_on(WINDOW *, attr_t, void *)
int ripoffline(int, int(*)(WINDOW *, int))
int wattrset(WINDOW *, int) __nonnull
Set attributes in a window.
static int mvhline(int y, int x, chtype ch, int n)
static int addch(const chtype ch)
static int hline(chtype ch, int n)
int slk_attr_off(const attr_t, void *)
char * slk_label(int)
Return the label for the specified soft key.
static int move(int y, int x)
static int deleteln(void)
static int wstandout(WINDOW *win)
int setupterm(char *, int, int *)
int slk_noutrefresh(void)
int wmove(WINDOW *, int, int)
Move a window's cursor to the specified position.
static int addstr(const char *str)
static int mvaddnstr(int y, int x, const char *str, int n)
int wattron(WINDOW *, int) __nonnull
Turn on attributes in a window.
int slk_colour(short)
Set soft label colour pair.
int slk_attr_on(const attr_t, void *)
int pair_content(short, short *, short *) __nonnull
Get colours of colour pair.
int wgetch(WINDOW *)
Pop a character from the FIFO into a window.
static int attr_on(attr_t attrs, void *opts)
int notimeout(WINDOW *, bool)
static int mvwdelch(WINDOW *win, int y, int x)
int wclrtoeol(WINDOW *) __nonnull
Clear a window to the end of the current line.
static int wstandend(WINDOW *win)
SCREEN * set_term(SCREEN *)
static int mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
int slk_attr_set(const attr_t, short, void *)
int endwin(void)
Finalise console environment.
int slk_set(int, const char *, int) __nonnull
Configure specified soft key.
int wattr_set(WINDOW *, attr_t, short, void *)
int whline(WINDOW *, chtype, int) __nonnull
Create a horizontal line in a window.
int wechochar(WINDOW *, const chtype)
int wvline(WINDOW *, chtype, int) __nonnull
Create a vertical line in a window.
static int mvaddchstr(int y, int x, const chtype *chstr)
static int addchstr(const chtype *chstr)
int beep(void)
Audible signal.
int vid_attr(attr_t, short, void *)
int nodelay(WINDOW *, bool)
static int vwprintw(WINDOW *win, const char *fmt, va_list varglist)
int echochar(const chtype)
void idcok(WINDOW *, bool)
static int colour_set(short colour_pair_number, void *opts)
char * tparm(char *, long, long, long, long, long, long, long, long, long)
static int attr_off(attr_t attrs, void *opts)
int wclrtobot(WINDOW *) __nonnull
Clear a window to the bottom from current cursor position.
static int wgetstr(WINDOW *win, char *str)
__pure chtype getbkgd(WINDOW *) __nonnull
Get the background rendition attributes for a window.
int vid_puts(attr_t, short, void *, int(*)(int))
WINDOW * newwin(int, int, int, int)
Create new WINDOW.
WINDOW * subwin(WINDOW *, int, int, int, int) __nonnull
Create a new sub-window.
int vidputs(chtype, int(*)(int))
int delwin(WINDOW *) __nonnull
Delete a window.
int mvderwin(WINDOW *, int, int)
static int mvwaddstr(WINDOW *win, int y, int x, const char *str)
int leaveok(WINDOW *, bool)
int copywin(const WINDOW *, WINDOW *, int, int, int, int, int, int, int)
int wdelch(WINDOW *) __nonnull
Delete character under the cursor in a window.
static int clrtoeol(void)
int wborder(WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype) __nonnull
Draw borders from single-byte characters and renditions around a window.
static int mvgetch(int y, int x)
void filter(void)
Receive packet filter.
int werase(WINDOW *) __nonnull
Completely clear a window.
static int mvaddchnstr(int y, int x, const chtype *chstr, int n)
int syncok(WINDOW *, bool)
static int waddstr(WINDOW *win, const char *str)
static int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n)
int slk_restore(void)
Restore soft function key labels to the screen.
int slk_attron(const chtype)
Turn on soft function key attributes.
static int addnstr(const char *str, int n)
static int mvwaddch(WINDOW *win, int y, int x, const chtype ch)
int wgetnstr(WINDOW *, char *, int)
Read at most n characters from the FIFO into a window.
static bool can_change_colour(void)
static int attroff(int attrs)
int reset_shell_mode(void)
static int getstr(char *str)
static int wbkgdset(WINDOW *win, chtype ch)
int waddchnstr(WINDOW *, const chtype *, int) __nonnull
Add string of single-byte characters and renditions to a window.
int mvcur(int, int, int, int)
struct _curses_window WINDOW
Curses Window struct.
int curs_set(int)
Set cursor visibility.
static int mvgetstr(int y, int x, char *str)
int slk_attrset(const chtype)
Set soft function key attributes.
static int slk_refresh(void)
int slk_attroff(const chtype)
Turn off soft function key attributes.
int box(WINDOW *, chtype, chtype) __nonnull
Draw borders from single-byte characters and renditions around a window.
static int has_key(int kc __unused)
int idlok(WINDOW *, bool)
int raw(void)
Raw version number.
void wcursyncup(WINDOW *)
static int attron(int attrs)
int wvline(WINDOW *win, chtype ch, int n)
Create a vertical line in a window.
int whline(WINDOW *win, chtype ch, int n)
Create a horizontal line in a window.
uint8_t meta
Metadata flags.
#define __nonnull
Declare a function's pointer parameters as non-null - i.e.
#define __pure
Declare a function as pure - i.e.
#define __unused
Declare a variable or data structure as unused.
#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.
int wgetch(WINDOW *win)
Pop a character from the FIFO into a window.
int wgetnstr(WINDOW *win, char *str, int n)
Read at most n characters from the FIFO into a window.
int wmove(WINDOW *win, int y, int x) __nonnull
Move a window's cursor to the specified position.
static unsigned int unsigned int y
int waddch(WINDOW *win, const chtype ch)
Add a single-byte character and rendition to a window and advance the cursor.
int waddnstr(WINDOW *win, const char *str, int n)
Add string of single-byte characters to a window.
int waddchnstr(WINDOW *win, const chtype *chstr, int n)
Add string of single-byte characters and renditions to a window.
__builtin_va_list va_list
void(* init)(struct _curses_screen *scr)
void(* putc)(struct _curses_screen *scr, chtype c)
Write character to current cursor position.
void(* erase)(struct _curses_screen *scr, attr_t attrs)
Erase screen.
attr_t attrs
Current attribute.
void(* cursor)(struct _curses_screen *scr, int visibility)
Set cursor visibility.
unsigned int curs_x
Current cursor position.
int(* getc)(struct _curses_screen *scr)
Pop a character from the keyboard input stream.
bool(* peek)(struct _curses_screen *scr)
Checks to see whether a character is waiting in the input stream.
void(* movetoyx)(struct _curses_screen *scr, unsigned int y, unsigned int x)
Move cursor to position specified by x,y coords.
void(* exit)(struct _curses_screen *scr)
unsigned int ori_x
window origin coordinates
unsigned int curs_x
window cursor position
unsigned int width
window dimensions
struct _curses_window * parent
parent window
attr_t attrs
window attributes
SCREEN * scr
screen with which window associates
int ssize_t const char * fmt