Implement more wrappers and refactoring
This commit is contained in:
@@ -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 device’s 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 device’s 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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user