Implement more wrappers and refactoring
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 27s
Builds / ExectOS (i686) (push) Successful in 25s

This commit is contained in:
2023-12-16 12:44:18 +01:00
parent 83e555043a
commit 74cac842a5
6 changed files with 160 additions and 69 deletions

View File

@@ -18,7 +18,7 @@
*/
XTCDECL
VOID
BlConsoleClearScreen()
BlClearConsoleScreen()
{
/* Clear screen */
EfiSystemTable->ConOut->ClearScreen(EfiSystemTable->ConOut);
@@ -33,7 +33,7 @@ BlConsoleClearScreen()
*/
XTCDECL
VOID
BlConsoleDisableCursor()
BlDisableConsoleCursor()
{
EfiSystemTable->ConOut->EnableCursor(EfiSystemTable->ConOut, FALSE);
}
@@ -47,7 +47,7 @@ BlConsoleDisableCursor()
*/
XTCDECL
VOID
BlConsoleEnableCursor()
BlEnableConsoleCursor()
{
EfiSystemTable->ConOut->EnableCursor(EfiSystemTable->ConOut, TRUE);
}
@@ -93,27 +93,6 @@ BlConsolePrint(IN PUINT16 Format,
VA_END(Arguments);
}
/**
* Queries information concerning the output devices supported text mode.
*
* @param ResX
* Supplies a buffer to receive the horizontal resolution.
*
* @param ResY
* Supplies a buffer to receive the vertical resolution.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlConsoleQueryMode(OUT PUINT_PTR ResX,
OUT PUINT_PTR ResY)
{
EfiSystemTable->ConOut->QueryMode(EfiSystemTable->ConOut, EfiSystemTable->ConOut->Mode->Mode, ResX, ResY);
}
/**
* Displays the string on the device at the current cursor location.
*
@@ -131,6 +110,58 @@ BlConsoleWrite(IN PUSHORT String)
EfiSystemTable->ConOut->OutputString(EfiSystemTable->ConOut, String);
}
/**
* Queries information concerning the output devices supported text mode.
*
* @param ResX
* Supplies a buffer to receive the horizontal resolution.
*
* @param ResY
* Supplies a buffer to receive the vertical resolution.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlQueryConsoleMode(OUT PUINT_PTR ResX,
OUT PUINT_PTR ResY)
{
EfiSystemTable->ConOut->QueryMode(EfiSystemTable->ConOut, EfiSystemTable->ConOut->Mode->Mode, ResX, ResY);
}
/**
* Reads a keystroke from the input device.
*
* @param Key
* Supplies a pointer to the EFI_INPUT_KEY structure that will receive the keystroke.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlReadKeyStroke(OUT PEFI_INPUT_KEY Key)
{
EfiSystemTable->ConIn->ReadKeyStroke(EfiSystemTable->ConIn, Key);
}
/**
* Resets the console input device and clears its input buffer.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlResetConsoleInputBuffer()
{
EfiSystemTable->ConIn->Reset(EfiSystemTable->ConIn, FALSE);
}
/**
* Sets the foreground and background colors.
*
@@ -208,6 +239,6 @@ BlpInitializeConsole()
EfiSystemTable->StdErr->Reset(EfiSystemTable->StdErr, TRUE);
/* Clear screen and enable cursor */
BlConsoleClearScreen();
BlConsoleEnableCursor();
BlClearConsoleScreen();
BlEnableConsoleCursor();
}