1 #ifndef _IPXE_EDITBOX_H
2 #define _IPXE_EDITBOX_H
6 * Editable text box widget
10 FILE_LICENCE ( GPL2_OR_LATER );
13 #include <ipxe/editstring.h>
15 /** An editable text box widget */
17 /** Editable string */
18 struct edit_string string;
19 /** Containing window */
23 /** Starting column */
27 /** First displayed character */
33 /** Editable text box widget flags */
35 /** Show stars instead of contents (for password widgets) */
36 EDITBOX_STARS = 0x0001,
39 extern void init_editbox ( struct edit_box *box, char *buf, size_t len,
40 WINDOW *win, unsigned int row, unsigned int col,
41 unsigned int width, unsigned int flags )
42 __attribute__ (( nonnull (1, 2) ));
43 extern void draw_editbox ( struct edit_box *box ) __nonnull;
44 static inline int edit_editbox ( struct edit_box *box, int key ) __nonnull;
47 * Edit text box widget
49 * @v box Editable text box widget
50 * @v key Key pressed by user
51 * @ret key Key returned to application, or zero
53 * You must call draw_editbox() to update the display after calling
57 static inline int edit_editbox ( struct edit_box *box, int key ) {
58 return edit_string ( &box->string, key );
61 #endif /* _IPXE_EDITBOX_H */