Signed-off-by: Michael Brown <mcb30@ipxe.org>
return iskey();
}
+static void ansiscr_cursor ( struct _curses_screen *scr __unused,
+ int visibility ) {
+ printf ( "\033[?25%c", ( visibility ? 'h' : 'l' ) );
+}
+
SCREEN _ansi_screen = {
.init = ansiscr_init,
.exit = ansiscr_exit,
.putc = ansiscr_putc,
.getc = ansiscr_getc,
.peek = ansiscr_peek,
+ .cursor = ansiscr_cursor,
};
_wupdcurs(win);
return OK;
}
+
+/**
+ * Set cursor visibility
+ *
+ * @v visibility cursor visibility
+ */
+int curs_set ( int visibility ) {
+ stdscr->scr->cursor ( stdscr->scr, visibility );
+ return OK;
+}
int endwin ( void ) {
attrset ( 0 );
color_set ( 0, NULL );
+ curs_set ( 1 );
mvprintw ( ( LINES - 1 ), 0, "\n" );
stdscr->scr->exit( stdscr->scr );
return OK;
* @ret FALSE no character waiting in stream
*/
bool ( *peek ) ( struct _curses_screen *scr );
+ /**
+ * Set cursor visibility
+ *
+ * @v scr screen on which to operate
+ * @v visibility cursor visibility
+ */
+ void ( * cursor ) ( struct _curses_screen *scr, int visibility );
} SCREEN;
/** Curses Window struct */