iPXE
|
MuCurses header file. More...
#include <stdint.h>
#include <stdbool.h>
#include <stdarg.h>
#include <ipxe/console.h>
#include <ipxe/keys.h>
Go to the source code of this file.
Data Structures | |
struct | _curses_screen |
Curses SCREEN object. More... | |
struct | _curses_window |
Curses Window struct. More... | |
Macros | |
#define | ERR (-1) |
#define | FALSE (0) |
#define | OK (0) |
#define | TRUE (1) |
#define | stdscr ( &_stdscr ) |
#define | COLS console_width |
#define | LINES console_height |
#define | MUCURSES_BITS(mask, shift) (( mask ) << (shift)) |
#define | CPAIR_SHIFT 8 |
#define | ATTRS_SHIFT 16 |
#define | WA_DEFAULT ( 0x0000 << ATTRS_SHIFT ) |
#define | WA_ALTCHARSET ( 0x0001 << ATTRS_SHIFT ) |
#define | WA_BLINK ( 0x0002 << ATTRS_SHIFT ) |
#define | WA_BOLD ( 0x0004 << ATTRS_SHIFT ) |
#define | WA_DIM ( 0x0008 << ATTRS_SHIFT ) |
#define | WA_INVIS ( 0x0010 << ATTRS_SHIFT ) |
#define | WA_PROTECT ( 0x0020 << ATTRS_SHIFT ) |
#define | WA_REVERSE ( 0x0040 << ATTRS_SHIFT ) |
#define | WA_STANDOUT ( 0x0080 << ATTRS_SHIFT ) |
#define | WA_UNDERLINE ( 0x0100 << ATTRS_SHIFT ) |
#define | WA_HORIZONTAL ( 0x0200 << ATTRS_SHIFT ) |
#define | WA_VERTICAL ( 0x0400 << ATTRS_SHIFT ) |
#define | WA_LEFT ( 0x0800 << ATTRS_SHIFT ) |
#define | WA_RIGHT ( 0x1000 << ATTRS_SHIFT ) |
#define | WA_LOW ( 0x2000 << ATTRS_SHIFT ) |
#define | WA_TOP ( 0x4000 << ATTRS_SHIFT ) |
#define | A_DEFAULT WA_DEFAULT |
#define | A_ALTCHARSET WA_ALTCHARSET |
#define | A_BLINK WA_BLINK |
#define | A_BOLD WA_BOLD |
#define | A_DIM WA_DIM |
#define | A_INVIS WA_INVIS |
#define | A_PROTECT WA_PROTECT |
#define | A_REVERSE WA_REVERSE |
#define | A_STANDOUT WA_STANDOUT |
#define | A_UNDERLINE WA_UNDERLINE |
#define | A_ATTRIBUTES ( 0xffff << ATTRS_SHIFT ) |
#define | A_CHARTEXT ( 0xff ) |
#define | A_COLOUR ( 0xff << CPAIR_SHIFT ) |
#define | A_COLOR A_COLOUR |
#define | COLOUR_PAIR(n) ( (n) << CPAIR_SHIFT ) |
#define | COLOR_PAIR(n) COLOUR_PAIR(n) |
#define | PAIR_NUMBER(attrs) ( ( (attrs) & A_COLOUR ) >> CPAIR_SHIFT ) |
#define | COLOUR_PAIRS 8 /* Arbitrary limit */ |
#define | COLOR_PAIRS COLOUR_PAIRS |
#define | ACS_ULCORNER '+' |
#define | ACS_LLCORNER '+' |
#define | ACS_URCORNER '+' |
#define | ACS_LRCORNER '+' |
#define | ACS_RTEE '+' |
#define | ACS_LTEE '+' |
#define | ACS_BTEE '+' |
#define | ACS_TTEE '+' |
#define | ACS_HLINE '-' |
#define | ACS_VLINE '|' |
#define | ACS_PLUS '+' |
#define | ACS_S1 '-' |
#define | ACS_S9 '_' |
#define | ACS_DIAMOND '+' |
#define | ACS_CKBOARD ':' |
#define | ACS_DEGREE '\'' |
#define | ACS_PLMINUS '#' |
#define | ACS_BULLET 'o' |
#define | ACS_LARROW '<' |
#define | ACS_RARROW '>' |
#define | ACS_DARROW 'v' |
#define | ACS_UARROW '^' |
#define | ACS_BOARD '#' |
#define | ACS_LANTERN '#' |
#define | ACS_BLOCK '#' |
#define | COLOUR_BLACK 0 |
#define | COLOUR_RED 1 |
#define | COLOUR_GREEN 2 |
#define | COLOUR_YELLOW 3 |
#define | COLOUR_BLUE 4 |
#define | COLOUR_MAGENTA 5 |
#define | COLOUR_CYAN 6 |
#define | COLOUR_WHITE 7 |
#define | COLOURS 7 |
#define | COLOUR_FG 30 |
#define | COLOUR_BG 40 |
#define | COLOR_FG COLOUR_FG |
#define | COLOR_BG COLOUR_BG |
#define | COLOR_BLACK COLOUR_BLACK |
#define | COLOR_BLUE COLOUR_BLUE |
#define | COLOR_GREEN COLOUR_GREEN |
#define | COLOR_CYAN COLOUR_CYAN |
#define | COLOR_RED COLOUR_RED |
#define | COLOR_MAGENTA COLOUR_MAGENTA |
#define | COLOR_YELLOW COLOUR_YELLOW |
#define | COLOR_WHITE COLOUR_WHITE |
#define | COLORS COLOURS |
#define | can_change_color() can_change_colour() |
#define | color_content(c, r, g, b) colour_content( (c), (r), (g), (b) ) |
#define | color_set(cpno, opts) colour_set( (cpno), (opts) ) |
#define | init_color ( c, r, g, b ) init_colour ( (c), (r), (g), (b) ) |
#define | slk_color(c) slk_colour( (c) ) |
#define | start_color() start_colour() |
#define | wcolor_set(w, s, v) wcolour_set((w),(s),(v)) |
#define | mvprintw(y, x, fmt, ...) |
#define | mvwprintw(win, y, x, fmt, ...) |
#define | printw(fmt, ...) wprintw(stdscr,(fmt), ## __VA_ARGS__ ) |
#define | standend() wstandend( stdscr ) |
#define | standout() wstandout( stdscr ) |
Typedefs | |
typedef uint32_t | chtype |
typedef uint32_t | attr_t |
typedef struct _curses_screen | SCREEN |
Curses SCREEN object. More... | |
typedef struct _curses_window | WINDOW |
Curses Window struct. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | baudrate (void) |
int | beep (void) |
Audible signal. More... | |
int | box (WINDOW *, chtype, chtype) __nonnull |
Draw borders from single-byte characters and renditions around a window. More... | |
int | cbreak (void) |
int | colour_content (short, short *, short *, short *) __nonnull |
Identify the RGB components of a given colour value. More... | |
int | copywin (const WINDOW *, WINDOW *, int, int, int, int, int, int, int) |
int | curs_set (int) |
Set cursor visibility. More... | |
int | def_prog_mode (void) |
int | def_shell_mode (void) |
int | delay_output (int) |
void | delscreen (SCREEN *) |
int | delwin (WINDOW *) __nonnull |
Delete a window. More... | |
WINDOW * | derwin (WINDOW *, int, int, int, int) __nonnull |
Create a new derived window. More... | |
WINDOW * | dupwin (WINDOW *) __nonnull |
Create a duplicate of the specified window. More... | |
int | echo (void) |
int | echochar (const chtype) |
int | endwin (void) |
Finalise console environment. More... | |
char | erasechar (void) |
int | erase (void) |
Completely clear the screen. More... | |
void | filter (void) |
int | flash (void) |
int | flushinp (void) |
__pure chtype | getbkgd (WINDOW *) __nonnull |
Get the background rendition attributes for a window. More... | |
int | halfdelay (int) |
bool | has_ic (void) |
bool | has_il (void) |
void | idcok (WINDOW *, bool) |
int | idlok (WINDOW *, bool) |
WINDOW * | initscr (void) |
Initialise console environment. More... | |
int | init_colour (short, short, short, short) |
int | init_pair (short, short, short) |
Initialise colour pair. More... | |
int | intrflush (WINDOW *, bool) |
bool | isendwin (void) |
char * | keyname (int) |
int | keypad (WINDOW *, bool) |
char | killchar (void) |
int | leaveok (WINDOW *, bool) |
char * | longname (void) |
int | meta (WINDOW *, bool) |
int | mvcur (int, int, int, int) |
int | mvderwin (WINDOW *, int, int) |
int | mvwin (WINDOW *, int, int) __nonnull |
Move window origin to specified coordinates. More... | |
int | napms (int) |
WINDOW * | newwin (int, int, int, int) |
Create new WINDOW. More... | |
int | nl (void) |
int | nocbreak (void) |
int | nodelay (WINDOW *, bool) |
int | noecho (void) |
int | nonl (void) |
void | noqiflush (void) |
int | noraw (void) |
int | notimeout (WINDOW *, bool) |
int | overlay (const WINDOW *, WINDOW *) |
int | overwrite (const WINDOW *, WINDOW *) |
int | pair_content (short, short *, short *) __nonnull |
Get colours of colour pair. More... | |
int | printw (char *,...) |
int | putp (const char *) |
void | qiflush (void) |
int | raw (void) |
int | reset_prog_mode (void) |
int | reset_shell_mode (void) |
int | resetty (void) |
int | ripoffline (int, int(*)(WINDOW *, int)) |
int | savetty (void) |
SCREEN * | set_term (SCREEN *) |
int | setupterm (char *, int, int *) |
int | slk_attr_off (const attr_t, void *) |
int | slk_attroff (const chtype) |
Turn off soft function key attributes. More... | |
int | slk_attr_on (const attr_t, void *) |
int | slk_attron (const chtype) |
Turn on soft function key attributes. More... | |
int | slk_attr_set (const attr_t, short, void *) |
int | slk_attrset (const chtype) |
Set soft function key attributes. More... | |
int | slk_clear (void) |
Clear the soft function key labels from the screen. More... | |
int | slk_colour (short) |
Set soft label colour pair. More... | |
int | slk_init (int) |
Initialise the soft function keys. More... | |
char * | slk_label (int) |
Return the label for the specified soft key. More... | |
int | slk_noutrefresh (void) |
int | slk_restore (void) |
Restore soft function key labels to the screen. More... | |
int | slk_set (int, const char *, int) __nonnull |
Configure specified soft key. More... | |
int | slk_touch (void) |
WINDOW * | subwin (WINDOW *, int, int, int, int) __nonnull |
Create a new sub-window. More... | |
int | syncok (WINDOW *, bool) |
chtype | termattrs (void) |
attr_t | term_attrs (void) |
char * | termname (void) |
int | tigetflag (char *) |
int | tigetnum (char *) |
char * | tigetstr (char *) |
void | timeout (int) |
char * | tparm (char *, long, long, long, long, long, long, long, long, long) |
int | typeahead (int) |
void | use_env (bool) |
int | vid_attr (attr_t, short, void *) |
int | vidattr (chtype) |
int | vid_puts (attr_t, short, void *, int(*)(int)) |
int | vidputs (chtype, int(*)(int)) |
int | vw_printw (WINDOW *, const char *, va_list) __nonnull |
Print formatted output in a window. More... | |
int | waddch (WINDOW *, const chtype) __nonnull |
Add a single-byte character and rendition to a window and advance the cursor. More... | |
int | waddchnstr (WINDOW *, const chtype *, int) __nonnull |
Add string of single-byte characters and renditions to a window. More... | |
int | waddnstr (WINDOW *, const char *, int) __nonnull |
Add string of single-byte characters to a window. More... | |
int | wattroff (WINDOW *, int) __nonnull |
Turn off attributes in a window. More... | |
int | wattron (WINDOW *, int) __nonnull |
Turn on attributes in a window. More... | |
int | wattrset (WINDOW *, int) __nonnull |
Set attributes in a window. More... | |
int | wattr_get (WINDOW *, attr_t *, short *, void *) |
int | wattr_off (WINDOW *, attr_t, void *) |
int | wattr_on (WINDOW *, attr_t, void *) |
int | wattr_set (WINDOW *, attr_t, short, void *) |
int | wborder (WINDOW *, chtype, chtype, chtype, chtype, chtype, chtype, chtype, chtype) __nonnull |
Draw borders from single-byte characters and renditions around a window. More... | |
int | wclrtobot (WINDOW *) __nonnull |
Clear a window to the bottom from current cursor position. More... | |
int | wclrtoeol (WINDOW *) __nonnull |
Clear a window to the end of the current line. More... | |
void | wcursyncup (WINDOW *) |
int | wcolour_set (WINDOW *, short, void *) |
int | wdelch (WINDOW *) __nonnull |
Delete character under the cursor in a window. More... | |
int | wdeleteln (WINDOW *) __nonnull |
Delete line under a window's cursor. More... | |
int | wechochar (WINDOW *, const chtype) |
int | werase (WINDOW *) __nonnull |
Completely clear a window. More... | |
int | wgetch (WINDOW *) |
Pop a character from the FIFO into a window. More... | |
int | wgetnstr (WINDOW *, char *, int) |
Read at most n characters from the FIFO into a window. More... | |
int | whline (WINDOW *, chtype, int) __nonnull |
Create a horizontal line in a window. More... | |
int | wmove (WINDOW *, int, int) |
Move a window's cursor to the specified position. More... | |
int | wprintw (WINDOW *, const char *,...) __nonnull |
Print formatted output to a window. More... | |
void | wsyncup (WINDOW *) |
void | wsyncdown (WINDOW *) |
void | wtimeout (WINDOW *, int) |
int | wvline (WINDOW *, chtype, int) __nonnull |
Create a vertical line in a window. More... | |
static int | addch (const chtype ch) |
static int | addchnstr (const chtype *chstr, int n) |
static int | addchstr (const chtype *chstr) |
static int | addnstr (const char *str, int n) |
static int | addstr (const char *str) |
static int | attroff (int attrs) |
static int | attron (int attrs) |
static int | attrset (int attrs) |
static int | attr_get (attr_t *attrs, short *pair, void *opts) |
static int | attr_off (attr_t attrs, void *opts) |
static int | attr_on (attr_t attrs, void *opts) |
static int | attr_set (attr_t attrs, short cpair, void *opts) |
static void | bkgdset (chtype ch) |
static int | border (chtype ls, chtype rs, chtype ts, chtype bs, chtype tl, chtype tr, chtype bl, chtype br) |
static bool | can_change_colour (void) |
static int | clrtobot (void) |
static int | clrtoeol (void) |
static int | colour_set (short colour_pair_number, void *opts) |
static int | delch (void) |
static int | deleteln (void) |
static int | getch (void) |
static int | getnstr (char *str, int n) |
static int | getstr (char *str) |
static bool | has_colors (void) |
static int | has_key (int kc __unused) |
static int | hline (chtype ch, int n) |
static int | move (int y, int x) |
static int | mvaddch (int y, int x, const chtype ch) |
static int | mvaddchnstr (int y, int x, const chtype *chstr, int n) |
static int | mvaddchstr (int y, int x, const chtype *chstr) |
static int | mvaddnstr (int y, int x, const char *str, int n) |
static int | mvaddstr (int y, int x, const char *str) |
static int | mvdelch (int y, int x) |
static int | mvgetch (int y, int x) |
static int | mvgetnstr (int y, int x, char *str, int n) |
static int | mvgetstr (int y, int x, char *str) |
static int | mvhline (int y, int x, chtype ch, int n) |
static int | mvvline (int y, int x, chtype ch, int n) |
static int | mvwaddch (WINDOW *win, int y, int x, const chtype ch) |
static int | mvwaddchnstr (WINDOW *win, int y, int x, const chtype *chstr, int n) |
static int | mvwaddchstr (WINDOW *win, int y, int x, const chtype *chstr) |
static int | mvwaddnstr (WINDOW *win, int y, int x, const char *str, int n) |
static int | mvwaddstr (WINDOW *win, int y, int x, const char *str) |
static int | mvwdelch (WINDOW *win, int y, int x) |
static int | mvwgetch (WINDOW *win, int y, int x) |
static int | mvwgetnstr (WINDOW *win, int y, int x, char *str, int n) |
static int | mvwgetstr (WINDOW *win, int y, int x, char *str) |
static int | mvwhline (WINDOW *win, int y, int x, chtype ch, int n) |
static int | mvwvline (WINDOW *win, int y, int x, chtype ch, int n) |
static int | slk_refresh (void) |
static int | start_colour (void) |
static int | vline (chtype ch, int n) |
static int | vwprintw (WINDOW *win, const char *fmt, va_list varglist) |
static int | waddchstr (WINDOW *win, const chtype *chstr) |
static int | waddstr (WINDOW *win, const char *str) |
static int | wbkgdset (WINDOW *win, chtype ch) |
static int | wgetstr (WINDOW *win, char *str) |
static int | wstandend (WINDOW *win) |
static int | wstandout (WINDOW *win) |
Variables | |
WINDOW | _stdscr |
MuCurses header file.
Definition in file curses.h.
#define COLS console_width |
#define LINES console_height |
#define MUCURSES_BITS | ( | mask, | |
shift | |||
) | (( mask ) << (shift)) |
#define A_DEFAULT WA_DEFAULT |
#define A_ALTCHARSET WA_ALTCHARSET |
#define A_PROTECT WA_PROTECT |
#define A_REVERSE WA_REVERSE |
#define A_STANDOUT WA_STANDOUT |
#define A_UNDERLINE WA_UNDERLINE |
#define COLOUR_PAIR | ( | n | ) | ( (n) << CPAIR_SHIFT ) |
#define COLOR_PAIR | ( | n | ) | COLOUR_PAIR(n) |
#define PAIR_NUMBER | ( | attrs | ) | ( ( (attrs) & A_COLOUR ) >> CPAIR_SHIFT ) |
#define COLOR_PAIRS COLOUR_PAIRS |
#define COLOR_BLACK COLOUR_BLACK |
#define COLOR_BLUE COLOUR_BLUE |
#define COLOR_GREEN COLOUR_GREEN |
#define COLOR_CYAN COLOUR_CYAN |
#define COLOR_RED COLOUR_RED |
#define COLOR_MAGENTA COLOUR_MAGENTA |
#define COLOR_YELLOW COLOUR_YELLOW |
#define COLOR_WHITE COLOUR_WHITE |
#define can_change_color | ( | ) | can_change_colour() |
#define color_content | ( | c, | |
r, | |||
g, | |||
b | |||
) | colour_content( (c), (r), (g), (b) ) |
#define color_set | ( | cpno, | |
opts | |||
) | colour_set( (cpno), (opts) ) |
#define init_color ( c, r, g, b ) init_colour ( (c), (r), (g), (b) ) |
#define slk_color | ( | c | ) | slk_colour( (c) ) |
#define start_color | ( | ) | start_colour() |
#define wcolor_set | ( | w, | |
s, | |||
v | |||
) | wcolour_set((w),(s),(v)) |
#define mvprintw | ( | y, | |
x, | |||
fmt, | |||
... | |||
) |
#define mvwprintw | ( | win, | |
y, | |||
x, | |||
fmt, | |||
... | |||
) |
typedef struct _curses_screen SCREEN |
Curses SCREEN object.
typedef struct _curses_window WINDOW |
Curses Window struct.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int baudrate | ( | void | ) |
int beep | ( | void | ) |
Audible signal.
rc | return status code |
Definition at line 17 of file alert.c.
Referenced by wgetch(), and wgetnstr().
Draw borders from single-byte characters and renditions around a window.
*win | window to be bordered |
verch | vertical chtype |
horch | horizontal chtype |
rc | return status code |
Definition at line 22 of file edging.c.
References _curses_window::attrs, and wborder().
Referenced by draw_editbox(), edit_editbox(), and init_editbox().
int cbreak | ( | void | ) |
int colour_content | ( | short | colour, |
short * | red, | ||
short * | green, | ||
short * | blue | ||
) |
Identify the RGB components of a given colour value.
colour | colour value |
*red | address to store red component |
*green | address to store green component |
*blue | address to store blue component |
rc | return status code |
Definition at line 23 of file colour.c.
References colour, COLOUR_BLUE, COLOUR_GREEN, COLOUR_RED, and OK.
int curs_set | ( | int | visibility | ) |
Set cursor visibility.
visibility | cursor visibility |
Definition at line 153 of file mucurses.c.
Referenced by endwin(), main_loop(), settings_ui(), and show_menu().
int def_prog_mode | ( | void | ) |
int def_shell_mode | ( | void | ) |
int delay_output | ( | int | ) |
void delscreen | ( | SCREEN * | ) |
int delwin | ( | WINDOW * | win | ) |
Delete a window.
*win | pointer to window being deleted |
rc | return status code |
Definition at line 20 of file windows.c.
References _wputch(), _curses_window::curs_x, _curses_window::curs_y, free, OK, stdscr, wmove(), and WRAP.
Create a new derived window.
parent | parent window |
nlines | window height |
ncols | window width |
begin_y | window y origin (relative to parent) |
begin_x | window x origin (relative to parent) |
ptr | return pointer to child window |
Definition at line 48 of file windows.c.
References _curses_window::height, malloc(), NULL, _curses_window::ori_x, _curses_window::ori_y, _curses_window::parent, _curses_window::scr, and _curses_window::width.
Create a duplicate of the specified window.
orig | original window |
ptr | pointer to duplicate window |
Definition at line 71 of file windows.c.
References _curses_window::attrs, _curses_window::curs_x, _curses_window::curs_y, _curses_window::height, malloc(), NULL, _curses_window::ori_x, _curses_window::ori_y, _curses_window::scr, and _curses_window::width.
int echo | ( | void | ) |
Definition at line 133 of file kb.c.
References m_echo, OK, and TRUE.
Referenced by fc_els_echo_detect(), fc_els_echo_rx_request(), fc_els_echo_rx_response(), fc_els_echo_tx(), icmp_rx_echo_reply(), icmp_rx_echo_request(), icmp_tx_echo(), icmp_tx_echo_reply(), icmp_tx_echo_request(), ping_deliver(), and ping_rx().
int echochar | ( | const | chtype | ) |
int endwin | ( | void | ) |
Finalise console environment.
Definition at line 31 of file wininit.c.
References attrset(), color_set, curs_set(), LINES, mvprintw, NULL, OK, and stdscr.
Referenced by pxe_menu_select(), settings_ui(), show_form(), and show_menu().
char erasechar | ( | void | ) |
int erase | ( | void | ) |
Completely clear the screen.
rc | return status code |
Definition at line 97 of file clear.c.
Referenced by draw_form(), settings_ui(), and show_menu().
void filter | ( | void | ) |
int flash | ( | void | ) |
Referenced by bnx2_init_nvram().
int flushinp | ( | void | ) |
Get the background rendition attributes for a window.
*win | subject window |
ch | chtype rendition representation |
Definition at line 17 of file winattrs.c.
References _curses_window::attrs.
int halfdelay | ( | int | ) |
bool has_ic | ( | void | ) |
bool has_il | ( | void | ) |
WINDOW* initscr | ( | void | ) |
Initialise console environment.
*win | return pointer to stdscr |
Definition at line 17 of file wininit.c.
References COLS, LINES, move(), and stdscr.
Referenced by pxe_menu_select(), settings_ui(), show_form(), and show_menu().
int init_colour | ( | short | , |
short | , | ||
short | , | ||
short | |||
) |
int init_pair | ( | short | pair, |
short | fcol, | ||
short | bcol | ||
) |
Initialise colour pair.
pair | colour pair number |
fcol | foreground colour |
bcol | background colour |
Definition at line 37 of file colour.c.
References colour_pair::bcol, COLOUR_PAIRS, cpairs, ERR, colour_pair::fcol, and OK.
bool isendwin | ( | void | ) |
char* keyname | ( | int | ) |
Referenced by usbkbd_map().
char killchar | ( | void | ) |
char* longname | ( | void | ) |
Referenced by blktrans_deliver(), dhcp_deliver(), dhcp_tx(), dhcpv6_rx(), dns_send_packet(), downloader_deliver(), efi_download_deliver_iob(), efi_pxe_tftp_deliver(), efi_pxe_udp_deliver(), efi_pxe_udp_write(), fc_els_rx(), fc_els_tx(), fc_ns_query_step(), fc_port_deliver(), fc_xchg_tx(), fcpcmd_deliver(), fcpcmd_recv_rddata(), fcpcmd_send_cmnd(), fcpcmd_send_wrdata(), http_conn_socket_deliver(), http_content_deliver(), ntp_deliver(), peerblk_deliver(), peerblk_raw_rx(), peerblk_retrieval_rx(), peerdisc_socket_tx(), peermux_block_deliver(), peermux_info_deliver(), ping_deliver(), ping_rx(), pinger_deliver(), pinger_expired(), posix_file_xfer_deliver(), pxe_tftp_xfer_deliver(), pxe_udp_deliver(), pxenv_udp_write(), slam_mc_socket_deliver(), tftp_rx(), tftp_rx_data(), tftp_send_ack(), tftp_send_error(), tftp_socket_deliver(), udp_rx(), udp_xfer_deliver(), validator_xfer_deliver(), xfer_check_order(), xfer_deliver(), xfer_deliver_raw_meta(), xfer_seek(), and xferbuf_deliver().
int mvcur | ( | int | , |
int | , | ||
int | , | ||
int | |||
) |
int mvderwin | ( | WINDOW * | , |
int | , | ||
int | |||
) |
int mvwin | ( | WINDOW * | win, |
int | y, | ||
int | x | ||
) |
Move window origin to specified coordinates.
*win | window to move |
y | Y position |
x | X position |
rc | return status code |
Definition at line 94 of file windows.c.
References COLS, ERR, _curses_window::height, LINES, OK, _curses_window::ori_x, _curses_window::ori_y, and _curses_window::width.
int napms | ( | int | ) |
WINDOW* newwin | ( | int | nlines, |
int | ncols, | ||
int | begin_y, | ||
int | begin_x | ||
) |
Create new WINDOW.
nlines | number of lines |
ncols | number of columns |
begin_y | column origin |
begin_x | line origin |
*win | return pointer to new window |
Definition at line 114 of file windows.c.
References _curses_window::height, malloc(), NULL, _curses_window::ori_x, _curses_window::ori_y, _curses_window::parent, _curses_window::scr, stdscr, and _curses_window::width.
Referenced by subwin().
int nl | ( | void | ) |
int nocbreak | ( | void | ) |
int noecho | ( | void | ) |
int nonl | ( | void | ) |
void noqiflush | ( | void | ) |
int noraw | ( | void | ) |
Referenced by efi_pxe_mtftp().
int pair_content | ( | short | pair, |
short * | fcol, | ||
short * | bcol | ||
) |
Get colours of colour pair.
pair | colour pair number |
fcol | foreground colour |
bcol | background colour |
Definition at line 56 of file colour.c.
References colour_pair::bcol, COLOUR_PAIRS, cpairs, ERR, colour_pair::fcol, and OK.
int printw | ( | char * | , |
... | |||
) |
Referenced by draw_menu_item().
int putp | ( | const char * | ) |
void qiflush | ( | void | ) |
int raw | ( | void | ) |
int reset_prog_mode | ( | void | ) |
int reset_shell_mode | ( | void | ) |
int resetty | ( | void | ) |
int ripoffline | ( | int | , |
int(*)(WINDOW *, int) | |||
) |
int savetty | ( | void | ) |
int setupterm | ( | char * | , |
int | , | ||
int * | |||
) |
int slk_attr_off | ( | const | attr_t, |
void * | |||
) |
int slk_attroff | ( | const chtype | attrs | ) |
Turn off soft function key attributes.
attrs | attribute bit mask |
rc | return status code |
Definition at line 128 of file slk.c.
References A_ATTRIBUTES, attrs, _softlabelkeys::attrs, ERR, NULL, OK, and slks.
Referenced by slk_attr_off().
int slk_attr_on | ( | const | attr_t, |
void * | |||
) |
int slk_attron | ( | const chtype | attrs | ) |
Turn on soft function key attributes.
attrs | attribute bit mask |
rc | return status code |
Definition at line 141 of file slk.c.
References A_ATTRIBUTES, attrs, _softlabelkeys::attrs, ERR, NULL, OK, and slks.
Referenced by slk_attr_on().
int slk_attr_set | ( | const | attr_t, |
short | , | ||
void * | |||
) |
int slk_attrset | ( | const chtype | attrs | ) |
Set soft function key attributes.
attrs | attribute bit mask |
rc | return status code |
Definition at line 154 of file slk.c.
References A_ATTRIBUTES, attrs, _softlabelkeys::attrs, ERR, NULL, OK, and slks.
int slk_clear | ( | void | ) |
Clear the soft function key labels from the screen.
rc | return status code |
Definition at line 209 of file slk.c.
References _enter_slk(), _leave_slk(), ERR, NULL, OK, slks, stdscr, and wclrtoeol().
Referenced by slk_refresh().
int slk_colour | ( | short | ) |
Set soft label colour pair.
Definition at line 223 of file slk.c.
References A_ATTRIBUTES, _softlabelkeys::attrs, COLORS, CPAIR_SHIFT, ERR, NULL, OK, and slks.
int slk_init | ( | int | fmt | ) |
Initialise the soft function keys.
fmt | format of keys |
rc | return status code |
Definition at line 241 of file slk.c.
References A_DEFAULT, _softlabelkeys::attrs, calloc(), COLS, ERR, _softlabelkeys::fmt, fmt, LINES, _softlabelkeys::maj_space_len, _softlabelkeys::max_label_len, MIN_SPACE_SIZE, _softlabelkeys::num_labels, _softlabelkeys::num_spaces, OK, slks, and _softlabelkeys::spaces.
char* slk_label | ( | int | labnum | ) |
Return the label for the specified soft key.
labnum | soft key identifier |
label | return label |
Definition at line 295 of file slk.c.
References _softlabelkeys::fkeys, _softlabel::label, NULL, and slks.
int slk_noutrefresh | ( | void | ) |
int slk_restore | ( | void | ) |
Restore soft function key labels to the screen.
rc | return status code |
Definition at line 307 of file slk.c.
References _enter_slk(), _leave_slk(), _print_label(), _wputch(), _softlabelkeys::attrs, COLS, ERR, _softlabelkeys::fkeys, _softlabelkeys::maj_space_len, _softlabelkeys::max_label_len, NOWRAP, NULL, _softlabelkeys::num_labels, _softlabelkeys::num_spaces, OK, slks, _softlabelkeys::spaces, and stdscr.
Referenced by slk_refresh().
int slk_set | ( | int | labnum, |
const char * | label, | ||
int | fmt | ||
) |
Configure specified soft key.
labnum | soft label position to configure |
*label | string to use as soft key label |
fmt | justification format of label |
rc | return status code |
Definition at line 352 of file slk.c.
References ERR, _softlabelkeys::fkeys, _softlabel::fmt, fmt, _softlabel::label, NULL, _softlabelkeys::num_labels, OK, slks, and strncpy().
int slk_touch | ( | void | ) |
Create a new sub-window.
orig | parent window |
nlines | window height |
ncols | window width |
begin_y | window y origin (absolute) |
begin_x | window x origin (absolute) |
ptr | return pointer to child window |
Definition at line 140 of file windows.c.
References newwin(), _curses_window::parent, and _curses_window::scr.
chtype termattrs | ( | void | ) |
attr_t term_attrs | ( | void | ) |
char* termname | ( | void | ) |
int tigetflag | ( | char * | ) |
int tigetnum | ( | char * | ) |
char* tigetstr | ( | char * | ) |
void timeout | ( | int | ) |
Referenced by ath5k_hw_eeprom_read(), ath5k_hw_set_ack_timeout(), ath5k_hw_set_cts_timeout(), ath9k_hw_wait(), atl1e_reset_hw(), b44_wait_bit(), bflush(), create_pinger(), efi_set_watchdog_timer_wrapper(), efi_usb_bulk_transfer(), efi_usb_control_transfer(), efi_usb_sync_interrupt_transfer(), efi_usb_sync_transfer(), flexboot_nodnic_complete_all_tx(), getchar_timeout(), getkey(), hfa384x_wait_for_event(), ifconf(), iflinkwait(), ifpoller_wait(), igbvf_reset_hw_vf(), imgacquire(), imgdownload(), imgdownload_string(), is_pmu_set(), menu_loop(), monojob_wait(), net80211_rx_frag(), netdev_link_block(), peerblk_open(), ping(), prompt(), readline_history(), rhine_mii_autopoll(), rhine_mii_read(), rhine_mii_write(), rhine_reload_eeprom(), rhine_reset(), show_menu(), smc_phy_configure(), start_timer(), start_timer_fixed(), sync(), velocity_autopoll_start(), velocity_autopoll_stop(), velocity_mii_read(), velocity_mii_write(), velocity_reload_eeprom(), and velocity_reset().
char* tparm | ( | char * | , |
long | , | ||
long | , | ||
long | , | ||
long | , | ||
long | , | ||
long | , | ||
long | , | ||
long | , | ||
long | |||
) |
int typeahead | ( | int | ) |
void use_env | ( | bool | ) |
int vid_attr | ( | attr_t | , |
short | , | ||
void * | |||
) |
int vidattr | ( | chtype | ) |
int vid_puts | ( | attr_t | , |
short | , | ||
void * | , | ||
int(*)(int) | |||
) |
int vidputs | ( | chtype | , |
int(*)(int) | |||
) |
Print formatted output in a window.
*win | subject window |
*fmt | formatted string |
varglist | argument list |
rc | return status code |
Definition at line 61 of file print.c.
References _printw_handler(), printw_context::ctx, fmt, printf_context::handler, OK, vcprintf(), and printw_context::win.
Referenced by vwprintw(), and wprintw().
Add a single-byte character and rendition to a window and advance the cursor.
*win | window to be rendered in |
ch | character to be added at cursor |
rc | return status code |
Definition at line 23 of file print.c.
References _wputch(), ch, OK, and WRAP.
Referenced by addch(), mvaddch(), and mvwaddch().
Add string of single-byte characters and renditions to a window.
*win | window to be rendered in |
*chstr | pointer to first chtype in "string" |
n | max number of chars from chstr to render |
rc | return status code |
Definition at line 21 of file print_nadv.c.
References _restore_curs_pos(), _store_curs_pos(), _wputchstr(), NOWRAP, and OK.
Referenced by addchnstr(), addchstr(), mvaddchnstr(), mvaddchstr(), mvwaddchnstr(), mvwaddchstr(), and waddchstr().
int waddnstr | ( | WINDOW * | win, |
const char * | str, | ||
int | n | ||
) |
Add string of single-byte characters to a window.
*win | window to be rendered in |
*str | standard c-style string |
n | max number of chars from string to render |
rc | return status code |
Definition at line 36 of file print.c.
References _wputstr(), OK, and WRAP.
Referenced by addnstr(), addstr(), mvaddnstr(), mvaddstr(), mvwaddnstr(), mvwaddstr(), and waddstr().
int wattroff | ( | WINDOW * | win, |
int | attrs | ||
) |
Turn off attributes in a window.
win | subject window |
attrs | attributes to enable |
rc | return status code |
Definition at line 28 of file winattrs.c.
References attrs, _curses_window::attrs, and OK.
Referenced by attroff(), and wattr_off().
int wattron | ( | WINDOW * | win, |
int | attrs | ||
) |
Turn on attributes in a window.
win | subject window |
attrs | attributes to enable |
rc | return status code |
Definition at line 40 of file winattrs.c.
References attrs, _curses_window::attrs, and OK.
Referenced by attron(), and wattr_on().
int wattrset | ( | WINDOW * | win, |
int | attrs | ||
) |
Set attributes in a window.
win | subject window |
attrs | attributes to enable |
rc | return status code |
Definition at line 52 of file winattrs.c.
References A_COLOR, attrs, _curses_window::attrs, and OK.
Referenced by _enter_slk(), attrset(), bkgdset(), wattr_set(), wbkgdset(), wstandend(), and wstandout().
Referenced by attr_get().
Referenced by attr_off().
Referenced by attr_set().
int wborder | ( | WINDOW * | win, |
chtype | ls, | ||
chtype | rs, | ||
chtype | ts, | ||
chtype | bs, | ||
chtype | tl, | ||
chtype | tr, | ||
chtype | bl, | ||
chtype | br | ||
) |
Draw borders from single-byte characters and renditions around a window.
*win | window to be bordered |
ls | left side |
rs | right side |
ts | top |
bs | bottom |
tl | top left corner |
tr | top right corner |
bl | bottom left corner |
br | bottom right corner |
rc | return status code |
Definition at line 43 of file edging.c.
References _restore_curs_pos(), _store_curs_pos(), _wputch(), bl, _curses_window::curs_x, _curses_window::curs_y, _curses_window::height, NOWRAP, OK, _curses_window::width, wmove(), and WRAP.
int wclrtobot | ( | WINDOW * | win | ) |
Clear a window to the bottom from current cursor position.
*win | subject window |
rc | return status code |
Definition at line 19 of file clear.c.
References _restore_curs_pos(), _store_curs_pos(), _wputc(), _curses_window::curs_x, _curses_window::curs_y, OK, and WRAP.
Referenced by clrtobot(), and werase().
int wclrtoeol | ( | WINDOW * | win | ) |
Clear a window to the end of the current line.
*win | subject window |
rc | return status code |
Definition at line 37 of file clear.c.
References _restore_curs_pos(), _store_curs_pos(), _wputc(), _curses_window::curs_y, OK, WRAP, and cursor_pos::y.
Referenced by clrtoeol(), slk_clear(), and wdeleteln().
void wcursyncup | ( | WINDOW * | ) |
int wcolour_set | ( | WINDOW * | , |
short | , | ||
void * | |||
) |
Referenced by colour_set().
int wdelch | ( | WINDOW * | win | ) |
Delete character under the cursor in a window.
*win | subject window |
rc | return status code |
Definition at line 55 of file clear.c.
References _wcursback(), _wputc(), NOWRAP, and OK.
Referenced by delch(), mvdelch(), mvwdelch(), wgetch(), and wgetnstr().
int wdeleteln | ( | WINDOW * | win | ) |
Delete line under a window's cursor.
*win | subject window |
rc | return status code |
Definition at line 68 of file clear.c.
References _restore_curs_pos(), _store_curs_pos(), _curses_window::curs_y, OK, wclrtoeol(), and wmove().
Referenced by deleteln().
int wechochar | ( | WINDOW * | , |
const | chtype | ||
) |
int werase | ( | WINDOW * | win | ) |
Completely clear a window.
*win | subject window |
rc | return status code |
Definition at line 86 of file clear.c.
References OK, wclrtobot(), and wmove().
int wgetch | ( | WINDOW * | win | ) |
Pop a character from the FIFO into a window.
*win | window in which to echo input |
c | char from input stream |
Definition at line 55 of file kb.c.
References _wcursback(), _wgetc(), _wputch(), _curses_window::attrs, beep(), c, KEY_BACKSPACE, KEY_LEFT, KEY_MIN, m_echo, wdelch(), and WRAP.
Referenced by getch(), mvgetch(), and mvwgetch().
int wgetnstr | ( | WINDOW * | win, |
char * | str, | ||
int | n | ||
) |
Read at most n characters from the FIFO into a window.
*win | window in which to echo input |
*str | pointer to string in which to store result |
n | maximum number of characters to read into string (inc. NUL) |
rc | return status code |
Definition at line 88 of file kb.c.
References _wcursback(), _wgetc(), beep(), c, ERR, KEY_BACKSPACE, KEY_ENTER, KEY_LEFT, OK, and wdelch().
Referenced by getnstr(), getstr(), mvgetnstr(), mvgetstr(), mvwgetnstr(), mvwgetstr(), and wgetstr().
Create a horizontal line in a window.
*win | subject window |
ch | rendition and character |
n | max number of chars (wide) to render |
rc | return status code |
Definition at line 82 of file edging.c.
References _restore_curs_pos(), _store_curs_pos(), _wputch(), ch, _curses_window::curs_x, NOWRAP, OK, and _curses_window::width.
Referenced by hline(), mvhline(), and mvwhline().
int wmove | ( | WINDOW * | win, |
int | y, | ||
int | x | ||
) |
Move a window's cursor to the specified position.
*win | window to be operated on |
y | Y position |
x | X position |
rc | return status code |
Definition at line 135 of file mucurses.c.
References _wupdcurs(), _curses_window::curs_x, _curses_window::curs_y, ERR, _curses_window::height, OK, _curses_window::width, cursor_pos::x, and cursor_pos::y.
Referenced by _enter_slk(), _restore_curs_pos(), delwin(), move(), mvaddch(), mvaddchnstr(), mvaddchstr(), mvaddnstr(), mvaddstr(), mvdelch(), mvgetch(), mvgetnstr(), mvgetstr(), mvhline(), mvvline(), mvwaddch(), mvwaddchnstr(), mvwaddchstr(), mvwaddnstr(), mvwaddstr(), mvwdelch(), mvwgetch(), mvwgetnstr(), mvwgetstr(), mvwhline(), mvwvline(), wborder(), wdeleteln(), werase(), and wvline().
int wprintw | ( | WINDOW * | win, |
const char * | fmt, | ||
... | |||
) |
Print formatted output to a window.
*win | subject window |
*fmt | formatted string |
... | string arguments |
rc | return status code |
Definition at line 78 of file print.c.
References fmt, va_end, va_start, vw_printw(), and printw_context::win.
void wsyncup | ( | WINDOW * | ) |
void wsyncdown | ( | WINDOW * | ) |
void wtimeout | ( | WINDOW * | , |
int | |||
) |
Create a vertical line in a window.
*win | subject window |
ch | rendition and character |
n | max number of chars (high) to render |
rc | return status code |
Definition at line 102 of file edging.c.
References _restore_curs_pos(), _store_curs_pos(), _wputch(), ch, _curses_window::curs_y, _curses_window::height, NOWRAP, OK, wmove(), and cursor_pos::x.
Referenced by mvvline(), mvwvline(), and vline().
|
inlinestatic |
Definition at line 488 of file curses.h.
|
inlinestatic |
Definition at line 492 of file curses.h.
References stdscr, and waddchnstr().
|
inlinestatic |
Definition at line 496 of file curses.h.
References stdscr, and waddchnstr().
|
inlinestatic |
Definition at line 500 of file curses.h.
References stdscr, and waddnstr().
|
inlinestatic |
Definition at line 504 of file curses.h.
References stdscr, and waddnstr().
|
inlinestatic |
Definition at line 508 of file curses.h.
References attrs, stdscr, and wattroff().
Referenced by draw_form(), draw_info_row(), draw_menu_item(), draw_setting_row(), draw_title_row(), and show_menu().
|
inlinestatic |
Definition at line 512 of file curses.h.
References attrs, stdscr, and wattron().
Referenced by draw_form(), draw_info_row(), draw_menu_item(), draw_setting_row(), draw_title_row(), and show_menu().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 540 of file curses.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 549 of file curses.h.
References stdscr, and wclrtobot().
|
inlinestatic |
Definition at line 553 of file curses.h.
References stdscr, and wclrtoeol().
Referenced by clearmsg(), and draw_menu_item().
|
inlinestatic |
Definition at line 557 of file curses.h.
References opts, stdscr, and wcolour_set().
|
inlinestatic |
Definition at line 561 of file curses.h.
|
inlinestatic |
Definition at line 565 of file curses.h.
References stdscr, and wdeleteln().
|
inlinestatic |
|
inlinestatic |
Definition at line 573 of file curses.h.
References stdscr, and wgetnstr().
|
inlinestatic |
Definition at line 577 of file curses.h.
References stdscr, and wgetnstr().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 589 of file curses.h.
|
inlinestatic |
Definition at line 593 of file curses.h.
References stdscr, and wmove().
Referenced by clearmsg(), draw_editbox(), draw_menu_item(), draw_setting_row(), form_loop(), initscr(), jump_scroll_move(), main_loop(), menu_loop(), and pxe_menu_draw_item().
|
inlinestatic |
Definition at line 597 of file curses.h.
|
inlinestatic |
Definition at line 602 of file curses.h.
References ERR, OK, stdscr, waddchnstr(), and wmove().
|
inlinestatic |
Definition at line 607 of file curses.h.
References ERR, OK, stdscr, waddchnstr(), and wmove().
|
inlinestatic |
Definition at line 612 of file curses.h.
References ERR, OK, stdscr, waddnstr(), and wmove().
|
inlinestatic |
Definition at line 617 of file curses.h.
References ERR, OK, stdscr, waddnstr(), and wmove().
Referenced by draw_menu_items(), and draw_setting_rows().
|
inlinestatic |
Definition at line 622 of file curses.h.
|
inlinestatic |
Definition at line 627 of file curses.h.
|
inlinestatic |
Definition at line 632 of file curses.h.
References ERR, OK, stdscr, wgetnstr(), and wmove().
|
inlinestatic |
Definition at line 637 of file curses.h.
References ERR, OK, stdscr, wgetnstr(), and wmove().
|
inlinestatic |
Definition at line 642 of file curses.h.
|
inlinestatic |
Definition at line 652 of file curses.h.
Definition at line 657 of file curses.h.
Definition at line 662 of file curses.h.
References ERR, OK, waddchnstr(), and wmove().
Definition at line 667 of file curses.h.
References ERR, OK, waddchnstr(), and wmove().
|
inlinestatic |
Definition at line 672 of file curses.h.
References ERR, OK, waddnstr(), and wmove().
|
inlinestatic |
Definition at line 677 of file curses.h.
References ERR, OK, waddnstr(), and wmove().
|
inlinestatic |
Definition at line 682 of file curses.h.
|
inlinestatic |
Definition at line 687 of file curses.h.
|
inlinestatic |
Definition at line 692 of file curses.h.
References ERR, OK, wgetnstr(), and wmove().
|
inlinestatic |
Definition at line 697 of file curses.h.
References ERR, OK, wgetnstr(), and wmove().
Definition at line 702 of file curses.h.
Definition at line 711 of file curses.h.
|
inlinestatic |
Definition at line 718 of file curses.h.
References ERR, OK, slk_clear(), and slk_restore().
|
inlinestatic |
|
inlinestatic |
Definition at line 732 of file curses.h.
Definition at line 737 of file curses.h.
References fmt, and vw_printw().
Definition at line 741 of file curses.h.
References waddchnstr().
|
inlinestatic |
Definition at line 745 of file curses.h.
References waddnstr().
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
WINDOW _stdscr |
Definition at line 20 of file mucurses.c.