david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[efi] Support displaying and hiding cursor

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2014-08-06 15:11:18 +01:00
parent 6566690ba1
commit f1b520dbad
1 changed files with 32 additions and 0 deletions

View File

@ -152,11 +152,43 @@ static void efi_handle_sgr ( struct ansiesc_context *ctx __unused,
conout->SetAttribute ( conout, efi_attr );
}
/**
* Handle ANSI DECTCEM set (show cursor)
*
* @v ctx ANSI escape sequence context
* @v count Parameter count
* @v params List of graphic rendition aspects
*/
static void efi_handle_dectcem_set ( struct ansiesc_context *ctx __unused,
unsigned int count __unused,
int params[] __unused ) {
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *conout = efi_systab->ConOut;
conout->EnableCursor ( conout, TRUE );
}
/**
* Handle ANSI DECTCEM reset (hide cursor)
*
* @v ctx ANSI escape sequence context
* @v count Parameter count
* @v params List of graphic rendition aspects
*/
static void efi_handle_dectcem_reset ( struct ansiesc_context *ctx __unused,
unsigned int count __unused,
int params[] __unused ) {
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *conout = efi_systab->ConOut;
conout->EnableCursor ( conout, FALSE );
}
/** EFI console ANSI escape sequence handlers */
static struct ansiesc_handler efi_ansiesc_handlers[] = {
{ ANSIESC_CUP, efi_handle_cup },
{ ANSIESC_ED, efi_handle_ed },
{ ANSIESC_SGR, efi_handle_sgr },
{ ANSIESC_DECTCEM_SET, efi_handle_dectcem_set },
{ ANSIESC_DECTCEM_RESET, efi_handle_dectcem_reset },
{ 0, NULL }
};