44 #define USERNAME_LABEL_ROW ( ( LINES / 2U ) - 4U ) 45 #define USERNAME_ROW ( ( LINES / 2U ) - 2U ) 46 #define PASSWORD_LABEL_ROW ( ( LINES / 2U ) + 2U ) 47 #define PASSWORD_ROW ( ( LINES / 2U ) + 4U ) 48 #define LABEL_COL ( ( COLS / 2U ) - 4U ) 49 #define EDITBOX_COL ( ( COLS / 2U ) - 10U ) 50 #define EDITBOX_WIDTH 20U 57 struct edit_box *current_box = &username_box;
92 current_box = &password_box;
95 current_box = &username_box;
98 current_box = ( ( current_box == &username_box ) ?
99 &password_box : &username_box );
102 if ( current_box == &username_box ) {
103 current_box = &password_box;
int getkey(unsigned long timeout)
Get single keypress.
struct arbelprm_rc_send_wqe rc
Editable text box widget.
int erase(void)
Completely clear the screen.
int fetchf_setting_copy(struct settings *settings, const struct setting *setting, struct settings **origin, struct setting *fetched, char **value)
Fetch copy of formatted value of setting.
static int attroff(int attrs)
#define CPAIR_EDIT
Editable text.
int endwin(void)
Finalise console environment.
#define mvprintw(y, x, fmt,...)
#define ECANCELED
Operation canceled.
#define CPAIR_NORMAL
Normal text.
#define KEY_DOWN
Down arrow.
void init_editbox(struct edit_box *box, char **buf, WINDOW *win, unsigned int row, unsigned int col, unsigned int width, unsigned int flags)
Initialise text box widget.
WINDOW * initscr(void)
Initialise console environment.
static int edit_editbox(struct edit_box *box, int key) __nonnull
Edit text box widget.
#define ESC
Escape character.
An editable text box widget.
#define EINPROGRESS
Operation in progress.
int storef_setting(struct settings *settings, const struct setting *setting, const char *value)
Store formatted value of setting.
static void(* free)(struct refcnt *refcnt))
void draw_editbox(struct edit_box *box)
Draw text box widget.
Show stars instead of contents (for password widgets)
#define PASSWORD_LABEL_ROW
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
#define USERNAME_LABEL_ROW
#define color_set(cpno, opts)
#define NULL
NULL pointer (VOID *)
static int attron(int attrs)