Implement BlSetConsoleAttributes() routine
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 28s
Builds / ExectOS (i686) (push) Successful in 27s

This commit is contained in:
2023-12-11 23:35:58 +01:00
parent 2434a018c4
commit 155ce1e366
4 changed files with 41 additions and 17 deletions

View File

@@ -114,6 +114,40 @@ BlConsoleQueryMode(OUT PUINT_PTR ResX,
EfiSystemTable->ConOut->QueryMode(EfiSystemTable->ConOut, EfiSystemTable->ConOut->Mode->Mode, ResX, ResY);
}
/**
* Displays the string on the device at the current cursor location.
*
* @param String
* The string to be displayed.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlConsoleWrite(IN PUSHORT String)
{
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, String);
}
/**
* Sets the foreground and background colors.
*
* @param Attribute
* Specifies the foreground and background colors (bits 0..3 are fg, and bits 4..6 are bg color).
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlSetConsoleAttributes(IN ULONGLONG Attributes)
{
EfiSystemTable->ConOut->SetAttribute(EfiSystemTable->ConOut, Attributes);
}
/**
* Sets new coordinates of the console cursor position.
*
@@ -135,23 +169,6 @@ BlSetCursorPosition(IN ULONGLONG PosX,
EfiSystemTable->ConOut->SetCursorPosition(EfiSystemTable->ConOut, PosX, PosY);
}
/**
* Displays the string on the device at the current cursor location.
*
* @param String
* The string to be displayed.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlConsoleWrite(IN PUSHORT String)
{
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, String);
}
/**
* Writes a character to the default EFI console.
*

View File

@@ -118,6 +118,10 @@ EFI_STATUS
BlSetConfigValue(IN CONST PWCHAR ConfigName,
IN CONST PWCHAR ConfigValue);
XTCDECL
VOID
BlSetConsoleAttributes(IN ULONGLONG Attributes);
XTCDECL
VOID
BlSetCursorPosition(IN ULONGLONG PosX,

View File

@@ -95,6 +95,7 @@ BlpRegisterXtLoaderProtocol()
LdrProtocol.Console.EnableCursor = BlConsoleEnableCursor;
LdrProtocol.Console.Print = BlConsolePrint;
LdrProtocol.Console.QueryMode = BlConsoleQueryMode;
LdrProtocol.Console.SetAttributes = BlSetConsoleAttributes;
LdrProtocol.Console.SetCursorPosition = BlSetCursorPosition;
LdrProtocol.Console.Write = BlConsoleWrite;
LdrProtocol.Debug.Print = BlDebugPrint;