46 #define MENU_ROWS ( LINES - 2U - MENU_ROW ) 47 #define MENU_COLS ( COLS - 2U ) 68 unsigned int row_offset;
94 memset ( buf,
' ', (
sizeof ( buf ) - 1 ) );
95 buf[
sizeof ( buf ) -1 ] =
'\0';
97 max_len = (
sizeof ( buf ) - 1 - ( 2 *
MENU_PAD ) );
104 snprintf ( timeout_buf,
sizeof ( timeout_buf ),
"(%ld)",
109 timeout_buf, timeout_len );
159 unsigned int previous;
235 }
while ( (
rc == 0 ) && ! chosen );
257 memset ( &ui, 0,
sizeof ( ui ) );
276 if ( ! named_count ) {
int getkey(unsigned long timeout)
Get single keypress.
struct arbelprm_rc_send_wqe rc
A dynamic user interface item.
#define TICKS_PER_SEC
Number of ticks per second.
int erase(void)
Completely clear the screen.
static int attroff(int attrs)
int endwin(void)
Finalise console environment.
#define ENOENT
No such file or directory.
#define mvprintw(y, x, fmt,...)
#define ECANCELED
Operation canceled.
#define CPAIR_NORMAL
Normal text.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
struct list_head items
Dynamic user interface items.
WINDOW * initscr(void)
Initialise console environment.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
struct dynamic_item * dynui_shortcut(struct dynamic_ui *dynui, int key)
Find dynamic user interface item by shortcut key.
#define list_for_each_entry(pos, head, member)
Iterate over entries in a list.
#define ESC
Escape character.
static int clrtoeol(void)
size_t strlen(const char *src)
Get length of string.
int select(fd_set *readfds, int wait)
Check file descriptors for readiness.
#define CPAIR_SEPARATOR
Unselectable text (e.g.
A dynamic user interface.
int curs_set(int visibility)
Set cursor visibility.
int strcmp(const char *first, const char *second)
Compare strings.
#define DYNUI_DEFAULT
Dynamic user interface item is default selection.
static int move(int y, int x)
#define CPAIR_SELECT
Highlighted text.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.
#define color_set(cpno, opts)
struct dynamic_item * dynui_item(struct dynamic_ui *dynui, unsigned int index)
Find dynamic user interface item by index.
#define NULL
NULL pointer (VOID *)
static int mvaddstr(int y, int x, const char *str)
static int attron(int attrs)
void * memset(void *dest, int character, size_t len) __nonnull