56 struct edit_box *current_box = &username_box;
62 sizeof ( username ) );
64 sizeof ( password ) );
94 current_box = &password_box;
97 current_box = &username_box;
100 current_box = ( ( current_box == &username_box ) ?
101 &password_box : &username_box );
104 if ( current_box == &username_box ) {
105 current_box = &password_box;
130 strlen ( username ) ) ) != 0 )
133 strlen ( password ) ) ) != 0 )
int getkey(unsigned long timeout)
Get single keypress.
struct arbelprm_rc_send_wqe rc
int erase(void)
Completely clear the screen.
static int attroff(int attrs)
#define CPAIR_EDIT
Editable text.
int endwin(void)
Finalise console environment.
#define mvprintw(y, x, fmt,...)
int store_setting(struct settings *settings, const struct setting *setting, const void *data, size_t len)
Store value of setting.
#define ECANCELED
Operation canceled.
#define CPAIR_NORMAL
Normal text.
#define KEY_DOWN
Down arrow.
WINDOW * initscr(void)
Initialise console environment.
static int edit_editbox(struct edit_box *box, int key) __nonnull
Edit text box widget.
int fetch_string_setting(struct settings *settings, const struct setting *setting, char *data, size_t len)
Fetch value of string setting.
#define ESC
Escape character.
An editable text box widget.
#define EINPROGRESS
Operation in progress.
void init_editbox(struct edit_box *box, char *buf, size_t len, WINDOW *win, unsigned int row, unsigned int col, unsigned int width, unsigned int flags)
Initialise text box widget.
size_t strlen(const char *src)
Get length of string.
void draw_editbox(struct edit_box *box)
Draw text box widget.
Show stars instead of contents (for password widgets)
#define PASSWORD_LABEL_ROW
#define USERNAME_LABEL_ROW
#define color_set(cpno, opts)
#define NULL
NULL pointer (VOID *)
static int attron(int attrs)