]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Don't automatically redraw the edit box; this allows better inheritance.
authorMichael Brown <mcb30@etherboot.org>
Wed, 20 Dec 2006 02:09:41 +0000 (02:09 +0000)
committerMichael Brown <mcb30@etherboot.org>
Wed, 20 Dec 2006 02:09:41 +0000 (02:09 +0000)
src/hci/mucurses/widgets/editbox.c
src/include/gpxe/editbox.h

index 64c121a13b661cce78ce39ba45945376d8344c8d..ef65df3bf61af47be158b98b54fb4cbe28714bdf 100644 (file)
@@ -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;
-}
index 2c5e09690e286fa2fe8d83083f1d5de4b74aa19a..8f2bd2c46ecc42c96adb2f084e357dae7c003656 100644 (file)
@@ -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 */