]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Support displaying and hiding cursor
authorMichael Brown <mcb30@ipxe.org>
Wed, 6 Aug 2014 14:11:18 +0000 (15:11 +0100)
committerMichael Brown <mcb30@ipxe.org>
Wed, 6 Aug 2014 14:11:18 +0000 (15:11 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/interface/efi/efi_console.c

index 331c705bdd24b1d705148e31a0d7514d0ffca58d..3b30f30972b8bea54949ecaee42949f40ccd751c 100644 (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 }
 };