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)) 116 #define CPAIR_SHIFT 8 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 '+' 167 #define ACS_HLINE '-' 168 #define ACS_VLINE '|' 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 '^' 181 #define ACS_BOARD '#' 182 #define ACS_LANTERN '#' 183 #define ACS_BLOCK '#' 185 #define COLOUR_BLACK 0 187 #define COLOUR_GREEN 2 188 #define COLOUR_YELLOW 3 189 #define COLOUR_BLUE 4 190 #define COLOUR_MAGENTA 5 191 #define COLOUR_CYAN 6 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 228 extern int beep (
void );
234 #define can_change_color() can_change_colour() 235 extern int cbreak (
void );
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 );
255 extern int echo (
void );
257 extern int endwin (
void );
259 extern int erase (
void );
260 extern void filter (
void );
261 extern int flash (
void );
269 extern bool has_ic (
void );
270 extern bool has_il (
void );
279 extern int init_colour (
short,
short,
short,
short );
280 #define init_color ( c, r, g, b ) init_colour ( (c), (r), (g), (b) ) 281 extern int init_pair (
short,
short,
short );
303 extern int mvcur (
int,
int,
int,
int );
343 extern int napms (
int );
346 extern int nl (
void );
349 extern int noecho (
void );
350 extern int nonl (
void );
352 extern int noraw (
void );
360 extern int printw (
char *, ... );
361 extern int putp (
const char * );
363 extern int raw (
void );
377 extern int setupterm (
char *,
int,
int * );
386 #define slk_color( c ) slk_colour( (c) ) 397 #define start_color() start_colour() 410 extern char *
tparm (
char *,
long,
long,
long,
long,
long,
long,
long,
long,
449 #define wcolor_set(w,s,v) wcolour_set((w),(s),(v)) 501 static inline int addnstr (
const char *str,
int n ) {
505 static inline int addstr (
const char *str ) {
574 static inline int getnstr (
char *str,
int n ) {
594 static inline int move (
int y,
int x ) {
613 static inline int mvaddnstr (
int y,
int x,
const char *str,
int n ) {
618 static 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 ) int vid_attr(attr_t, short, void *)
static int mvaddchstr(int y, int x, const chtype *chstr)
int overlay(const WINDOW *, WINDOW *)
int slk_attr_on(const attr_t, void *)
int reset_shell_mode(void)
int mvwin(WINDOW *, int, int) __nonnull
Move window origin to specified coordinates.
#define __pure
Declare a function as pure - i.e.
int beep(void)
Audible signal.
int wvline(WINDOW *, chtype, int) __nonnull
Create a vertical line in a window.
int slk_colour(short)
Set soft label colour pair.
static int wgetstr(WINDOW *win, char *str)
static int attrset(int attrs)
WINDOW * subwin(WINDOW *, int, int, int, int) __nonnull
Create a new sub-window.
static int attr_off(attr_t attrs, void *opts)
int wcolour_set(WINDOW *, short, void *)
int wattr_on(WINDOW *, attr_t, void *)
static int mvaddchnstr(int y, int x, const chtype *chstr, int n)
void idcok(WINDOW *, bool)
int syncok(WINDOW *, bool)
static int slk_refresh(void)
int reset_prog_mode(void)
static int addch(const chtype ch)
int wgetnstr(WINDOW *, char *, int)
Read at most n characters from the FIFO into a window.
static int mvwgetch(WINDOW *win, int y, int x)
static int attroff(int attrs)
static int mvaddnstr(int y, int x, const char *str, int n)
int wmove(WINDOW *, int, int)
Move a window's cursor to the specified position.
int init_pair(short, short, short)
Initialise colour pair.
int wprintw(WINDOW *, const char *,...) __nonnull
Print formatted output to a window.
static int border(chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br)
static int vline(chtype ch, int n)
void(* exit)(struct _curses_screen *scr)
int setupterm(char *, int, int *)
static int vwprintw(WINDOW *win, const char *fmt, va_list varglist)
static int mvvline(int y, int x, chtype ch, int n)
void(* cursor)(struct _curses_screen *scr, int visibility)
Set cursor visibility.
int idlok(WINDOW *, bool)
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 wstandout(WINDOW *win)
int endwin(void)
Finalise console environment.
void wcursyncup(WINDOW *)
static int mvgetch(int y, int x)
static int mvwgetstr(WINDOW *win, int y, int x, char *str)
WINDOW * dupwin(WINDOW *) __nonnull
Create a duplicate of the specified window.
unsigned int width
window dimensions
int echochar(const chtype)
int intrflush(WINDOW *, bool)
static int mvaddch(int y, int x, const chtype ch)
static int deleteln(void)
static int waddstr(WINDOW *win, const char *str)
int wclrtoeol(WINDOW *) __nonnull
Clear a window to the end of the current line.
#define __nonnull
Declare a function's pointer parameters as non-null - i.e.
int wattrset(WINDOW *, int) __nonnull
Set attributes in a window.
int slk_set(int, const char *, int) __nonnull
Configure specified soft key.
static int wstandend(WINDOW *win)
static void bkgdset(chtype ch)
static int hline(chtype ch, int n)
static int mvdelch(int y, int x)
static int mvgetstr(int y, int x, char *str)
WINDOW * initscr(void)
Initialise console environment.
int wattr_off(WINDOW *, attr_t, void *)
static int mvwdelch(WINDOW *win, int y, int x)
int colour_content(short, short *, short *, short *) __nonnull
Identify the RGB components of a given colour value.
#define __unused
Declare a variable or data structure as unused.
bool(* peek)(struct _curses_screen *scr)
Checks to see whether a character is waiting in the input stream.
void(* init)(struct _curses_screen *scr)
static int attr_set(attr_t attrs, short cpair, void *opts)
int waddch(WINDOW *, const chtype) __nonnull
Add a single-byte character and rendition to a window and advance the cursor.
int wattr_get(WINDOW *, attr_t *, short *, void *)
int vid_puts(attr_t, short, void *, int(*)(int))
static int mvwaddstr(WINDOW *win, int y, int x, const char *str)
int notimeout(WINDOW *, bool)
int keypad(WINDOW *, bool)
static int waddchstr(WINDOW *win, const chtype *chstr)
int wattroff(WINDOW *, int) __nonnull
Turn off attributes in a window.
static int mvwgetnstr(WINDOW *win, int y, int x, char *str, int n)
static int colour_set(short colour_pair_number, void *opts)
int wclrtobot(WINDOW *) __nonnull
Clear a window to the bottom from current cursor position.
static int mvwaddch(WINDOW *win, int y, int x, const chtype ch)
int wechochar(WINDOW *, const chtype)
SCREEN * scr
screen with which window associates
int mvcur(int, int, int, int)
attr_t attrs
window attributes
static int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n)
int slk_clear(void)
Clear the soft function key labels from the screen.
static int clrtoeol(void)
int curs_set(int)
Set cursor visibility.
int waddchnstr(WINDOW *, const chtype *, int) __nonnull
Add string of single-byte characters and renditions to a window.
static int addstr(const char *str)
char * tparm(char *, long, long, long, long, long, long, long, long, long)
int nodelay(WINDOW *, bool)
int init_colour(short, short, short, short)
int vw_printw(WINDOW *, const char *, va_list) __nonnull
Print formatted output in a window.
static int attr_get(attr_t *attrs, short *pair, void *opts)
int pair_content(short, short *, short *) __nonnull
Get colours of colour pair.
int vidputs(chtype, int(*)(int))
static int start_colour(void)
unsigned int curs_x
Current cursor position.
void(* erase)(struct _curses_screen *scr, attr_t attrs)
Erase screen.
__pure chtype getbkgd(WINDOW *) __nonnull
Get the background rendition attributes for a window.
int(* getc)(struct _curses_screen *scr)
Pop a character from the keyboard input stream.
static int getnstr(char *str, int n)
void(* movetoyx)(struct _curses_screen *scr, unsigned int y, unsigned int x)
Move cursor to position specified by x,y coords.
struct _curses_window * parent
parent window
static int mvgetnstr(int y, int x, char *str, int n)
int slk_attrset(const chtype)
Set soft function key attributes.
static bool has_colors(void)
attr_t attrs
Current attribute.
SCREEN * set_term(SCREEN *)
int werase(WINDOW *) __nonnull
Completely clear a window.
int waddnstr(WINDOW *, const char *, int) __nonnull
Add string of single-byte characters to a window.
WINDOW * newwin(int, int, int, int)
Create new WINDOW.
static int mvhline(int y, int x, chtype ch, int n)
int slk_restore(void)
Restore soft function key labels to the screen.
static int getstr(char *str)
int leaveok(WINDOW *, bool)
char * slk_label(int)
Return the label for the specified soft key.
static int mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr)
int whline(WINDOW *, chtype, int) __nonnull
Create a horizontal line in a window.
static int mvwhline(WINDOW *win, int y, int x, chtype ch, int n)
__builtin_va_list va_list
struct _curses_window WINDOW
Curses Window struct.
int ripoffline(int, int(*)(WINDOW *, int))
static int attr_on(attr_t attrs, void *opts)
int wgetch(WINDOW *)
Pop a character from the FIFO into a window.
static unsigned int unsigned int y
static int move(int y, int x)
void(* putc)(struct _curses_screen *scr, chtype c)
Write character to current cursor position.
int erase(void)
Completely clear the screen.
static bool can_change_colour(void)
static int mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n)
int ssize_t const char * fmt
static union @447 opts
"cert<xxx>" option list
static int wbkgdset(WINDOW *win, chtype ch)
static int has_key(int kc __unused)
static int addchstr(const chtype *chstr)
static int addnstr(const char *str, int n)
int wattron(WINDOW *, int) __nonnull
Turn on attributes in a window.
static int clrtobot(void)
int box(WINDOW *, chtype, chtype) __nonnull
Draw borders from single-byte characters and renditions around a window.
int wdelch(WINDOW *) __nonnull
Delete character under the cursor in a window.
int slk_attr_set(const attr_t, short, void *)
int slk_noutrefresh(void)
int delwin(WINDOW *) __nonnull
Delete a window.
int slk_init(int)
Initialise the soft function keys.
int overwrite(const WINDOW *, WINDOW *)
unsigned int curs_x
window cursor position
WINDOW * derwin(WINDOW *, int, int, int, int) __nonnull
Create a new derived window.
int wdeleteln(WINDOW *) __nonnull
Delete line under a window's cursor.
static int addchnstr(const chtype *chstr, int n)
unsigned int ori_x
window origin coordinates
struct _curses_screen SCREEN
Curses SCREEN object.
void wtimeout(WINDOW *, int)
int slk_attroff(const chtype)
Turn off soft function key attributes.
int slk_attron(const chtype)
Turn on soft function key attributes.
int slk_attr_off(const attr_t, void *)
static int mvaddstr(int y, int x, const char *str)
static int attron(int attrs)
static int mvwvline(WINDOW *win, int y, int x, chtype ch, int n)
int wattr_set(WINDOW *, attr_t, short, void *)
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
int mvderwin(WINDOW *, int, int)
int copywin(const WINDOW *, WINDOW *, int, int, int, int, int, int, int)