Implement BlConsoleQueryMode() and BlSetCursorPosition()
This commit is contained in:
parent
02cc0cd522
commit
9aa2efe17f
@ -36,6 +36,8 @@ typedef VOID (*PBL_CONSOLE_CLEAR_SCREEN)();
|
|||||||
typedef VOID (*PBL_CONSOLE_DISABLE_CURSOR)();
|
typedef VOID (*PBL_CONSOLE_DISABLE_CURSOR)();
|
||||||
typedef VOID (*PBL_CONSOLE_ENABLE_CURSOR)();
|
typedef VOID (*PBL_CONSOLE_ENABLE_CURSOR)();
|
||||||
typedef VOID (*PBL_CONSOLE_PRINT)(IN PUINT16 Format, IN ...);
|
typedef VOID (*PBL_CONSOLE_PRINT)(IN PUINT16 Format, IN ...);
|
||||||
|
typedef VOID (*PBL_CONSOLE_QUERY_MODE)(OUT PUINT_PTR ResX, OUT PUINT_PTR ResY);
|
||||||
|
typedef VOID (*PBL_CONSOLE_SET_CURSOR_POSITION)(IN ULONGLONG PosX, IN ULONGLONG PosY);
|
||||||
typedef VOID (*PBL_CONSOLE_WRITE)(IN PUSHORT String);
|
typedef VOID (*PBL_CONSOLE_WRITE)(IN PUSHORT String);
|
||||||
typedef VOID (*PBL_DEBUG_PRINT)(IN PUINT16 Format, IN ...);
|
typedef VOID (*PBL_DEBUG_PRINT)(IN PUINT16 Format, IN ...);
|
||||||
typedef EFI_STATUS (*PBL_EXIT_BOOT_SERVICES)(IN UINT_PTR MapKey);
|
typedef EFI_STATUS (*PBL_EXIT_BOOT_SERVICES)(IN UINT_PTR MapKey);
|
||||||
@ -78,8 +80,10 @@ typedef struct _XTBL_LOADER_PROTOCOL
|
|||||||
PBL_CONSOLE_CLEAR_SCREEN ClearScreen;
|
PBL_CONSOLE_CLEAR_SCREEN ClearScreen;
|
||||||
PBL_CONSOLE_DISABLE_CURSOR DisableCursor;
|
PBL_CONSOLE_DISABLE_CURSOR DisableCursor;
|
||||||
PBL_CONSOLE_ENABLE_CURSOR EnableCursor;
|
PBL_CONSOLE_ENABLE_CURSOR EnableCursor;
|
||||||
PBL_CONSOLE_WRITE Write;
|
|
||||||
PBL_CONSOLE_PRINT Print;
|
PBL_CONSOLE_PRINT Print;
|
||||||
|
PBL_CONSOLE_QUERY_MODE QueryMode;
|
||||||
|
PBL_CONSOLE_SET_CURSOR_POSITION SetCursorPosition;
|
||||||
|
PBL_CONSOLE_WRITE Write;
|
||||||
} Console;
|
} Console;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
|
@ -93,6 +93,48 @@ BlConsolePrint(IN PUINT16 Format,
|
|||||||
VA_END(Arguments);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets new coordinates of the console cursor position.
|
||||||
|
*
|
||||||
|
* @param PosX
|
||||||
|
* Specifies the new X coordinate of the cursor.
|
||||||
|
*
|
||||||
|
* @param PosY
|
||||||
|
* Specifies the new Y coordinate of the cursor.
|
||||||
|
*
|
||||||
|
* @return This routine does not return any value.
|
||||||
|
*
|
||||||
|
* @since XT 1.0
|
||||||
|
*/
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
BlSetCursorPosition(IN ULONGLONG PosX,
|
||||||
|
IN ULONGLONG PosY)
|
||||||
|
{
|
||||||
|
EfiSystemTable->ConOut->SetCursorPosition(EfiSystemTable->ConOut, PosX, PosY);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays the string on the device at the current cursor location.
|
* Displays the string on the device at the current cursor location.
|
||||||
*
|
*
|
||||||
|
@ -37,6 +37,11 @@ VOID
|
|||||||
BlConsolePrint(IN PUINT16 Format,
|
BlConsolePrint(IN PUINT16 Format,
|
||||||
IN ...);
|
IN ...);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
BlConsoleQueryMode(OUT PUINT_PTR ResX,
|
||||||
|
OUT PUINT_PTR ResY);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
BlConsoleWrite(IN PUSHORT String);
|
BlConsoleWrite(IN PUSHORT String);
|
||||||
@ -113,6 +118,11 @@ EFI_STATUS
|
|||||||
BlSetConfigValue(IN CONST PWCHAR ConfigName,
|
BlSetConfigValue(IN CONST PWCHAR ConfigName,
|
||||||
IN CONST PWCHAR ConfigValue);
|
IN CONST PWCHAR ConfigValue);
|
||||||
|
|
||||||
|
XTCDECL
|
||||||
|
VOID
|
||||||
|
BlSetCursorPosition(IN ULONGLONG PosX,
|
||||||
|
IN ULONGLONG PosY);
|
||||||
|
|
||||||
XTCDECL
|
XTCDECL
|
||||||
VOID
|
VOID
|
||||||
BlSleepExecution(IN ULONG_PTR Milliseconds);
|
BlSleepExecution(IN ULONG_PTR Milliseconds);
|
||||||
|
@ -94,6 +94,8 @@ BlpRegisterXtLoaderProtocol()
|
|||||||
LdrProtocol.Console.DisableCursor = BlConsoleDisableCursor;
|
LdrProtocol.Console.DisableCursor = BlConsoleDisableCursor;
|
||||||
LdrProtocol.Console.EnableCursor = BlConsoleEnableCursor;
|
LdrProtocol.Console.EnableCursor = BlConsoleEnableCursor;
|
||||||
LdrProtocol.Console.Print = BlConsolePrint;
|
LdrProtocol.Console.Print = BlConsolePrint;
|
||||||
|
LdrProtocol.Console.QueryMode = BlConsoleQueryMode;
|
||||||
|
LdrProtocol.Console.SetCursorPosition = BlSetCursorPosition;
|
||||||
LdrProtocol.Console.Write = BlConsoleWrite;
|
LdrProtocol.Console.Write = BlConsoleWrite;
|
||||||
LdrProtocol.Debug.Print = BlDebugPrint;
|
LdrProtocol.Debug.Print = BlDebugPrint;
|
||||||
LdrProtocol.Disk.CloseVolume = BlCloseVolume;
|
LdrProtocol.Disk.CloseVolume = BlCloseVolume;
|
||||||
|
Loading…
Reference in New Issue
Block a user