[hci] Draw all widgets on the standard screen
The curses concept of a window has been supported but never actively used in iPXE since the mucurses library was first implemented in 2006. Simplify the code by removing the ability to place a widget set in a specified window, and instead use the standard screen for all drawing operations. This simplification allows the widget set parameter to be omitted for the draw_widget() and edit_widget() operations, since the only reason for its inclusion was to provide access to the specified window. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -36,10 +36,9 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
/**
|
||||
* Draw text label widget
|
||||
*
|
||||
* @v widgets Text widget set
|
||||
* @v widget Text widget
|
||||
*/
|
||||
static void draw_label ( struct widgets *widgets, struct widget *widget ) {
|
||||
static void draw_label ( struct widget *widget ) {
|
||||
struct label *label = container_of ( widget, struct label, widget );
|
||||
unsigned int width = widget->width;
|
||||
unsigned int col = widget->col;
|
||||
@@ -51,20 +50,18 @@ static void draw_label ( struct widgets *widgets, struct widget *widget ) {
|
||||
|
||||
/* Print label content */
|
||||
attron ( A_BOLD );
|
||||
mvwprintw ( widgets->win, widget->row, col, "%s", text );
|
||||
mvprintw ( widget->row, col, "%s", text );
|
||||
attroff ( A_BOLD );
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit text label widget
|
||||
*
|
||||
* @v widgets Text widget set
|
||||
* @v widget Text widget
|
||||
* @v key Key pressed by user
|
||||
* @ret key Key returned to application, or zero
|
||||
*/
|
||||
static int edit_label ( struct widgets *widgets __unused,
|
||||
struct widget *widget __unused, int key ) {
|
||||
static int edit_label ( struct widget *widget __unused, int key ) {
|
||||
|
||||
/* Cannot be edited */
|
||||
return key;
|
||||
|
||||
Reference in New Issue
Block a user