editbox.h
Go to the documentation of this file.00001 #ifndef _GPXE_EDITBOX_H
00002 #define _GPXE_EDITBOX_H
00003
00004
00005
00006
00007
00008
00009
00010 FILE_LICENCE ( GPL2_OR_LATER );
00011
00012 #include <curses.h>
00013 #include <gpxe/editstring.h>
00014
00015
00016 struct edit_box {
00017
00018 struct edit_string string;
00019
00020 WINDOW *win;
00021
00022 unsigned int row;
00023
00024 unsigned int col;
00025
00026 unsigned int width;
00027
00028 unsigned int first;
00029
00030 unsigned int flags;
00031 };
00032
00033
00034 enum edit_box_flags {
00035
00036 EDITBOX_STARS = 0x0001,
00037 };
00038
00039 extern void init_editbox ( struct edit_box *box, char *buf, size_t len,
00040 WINDOW *win, unsigned int row, unsigned int col,
00041 unsigned int width, unsigned int flags )
00042 __attribute__ (( nonnull (1, 2) ));
00043 extern void draw_editbox ( struct edit_box *box ) __nonnull;
00044 static inline int edit_editbox ( struct edit_box *box, int key ) __nonnull;
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 static inline int edit_editbox ( struct edit_box *box, int key ) {
00058 return edit_string ( &box->string, key );
00059 }
00060
00061 #endif