summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hci/mucurses/widgets/editbox.c19
-rw-r--r--src/include/gpxe/editbox.h16
2 files changed, 15 insertions, 20 deletions
diff --git a/src/hci/mucurses/widgets/editbox.c b/src/hci/mucurses/widgets/editbox.c
index 64c121a13..ef65df3bf 100644
--- a/src/hci/mucurses/widgets/editbox.c
+++ b/src/hci/mucurses/widgets/editbox.c
@@ -94,22 +94,3 @@ void draw_editbox ( struct edit_box *box ) {
mvwprintw ( box->win, box->row, box->col, "%s", buf );
wmove ( box->win, box->row, ( box->col + cursor_offset ) );
}
-
-/**
- * Edit text box widget
- *
- * @v box Editable text box widget
- * @v key Key pressed by user
- * @ret key Key returned to application, or zero
- *
- */
-int edit_editbox ( struct edit_box *box, int key ) {
-
- /* Update the string itself */
- key = edit_string ( &box->string, key );
-
- /* Update the display */
- draw_editbox ( box );
-
- return key;
-}
diff --git a/src/include/gpxe/editbox.h b/src/include/gpxe/editbox.h
index 2c5e09690..8f2bd2c46 100644
--- a/src/include/gpxe/editbox.h
+++ b/src/include/gpxe/editbox.h
@@ -30,6 +30,20 @@ extern void init_editbox ( struct edit_box *box, char *buf, size_t len,
WINDOW *win, unsigned int row, unsigned int col,
unsigned int width );
extern void draw_editbox ( struct edit_box *box );
-extern int edit_editbox ( struct edit_box *box, int key );
+
+/**
+ * Edit text box widget
+ *
+ * @v box Editable text box widget
+ * @v key Key pressed by user
+ * @ret key Key returned to application, or zero
+ *
+ * You must call draw_editbox() to update the display after calling
+ * edit_editbox().
+ *
+ */
+static inline int edit_editbox ( struct edit_box *box, int key ) {
+ return edit_string ( &box->string, key );
+}
#endif /* _GPXE_EDITBOX_H */