OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcConsoleLib.c File Reference
#include "OcConsoleLibInternal.h"
#include <Protocol/ConsoleControl.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/OcForceResolution.h>
#include <Protocol/SimpleTextOut.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcMiscLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>

Go to the source code of this file.

Functions

EFI_STATUS OcSetConsoleResolutionForProtocol (IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput, IN UINT32 Width OPTIONAL, IN UINT32 Height OPTIONAL, IN UINT32 Bpp OPTIONAL)
 
EFI_STATUS OcSetConsoleModeForProtocol (IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut, IN UINT32 Width, IN UINT32 Height)
 
EFI_STATUS OcSetConsoleResolution (IN UINT32 Width OPTIONAL, IN UINT32 Height OPTIONAL, IN UINT32 Bpp OPTIONAL, IN BOOLEAN Force)
 
EFI_STATUS OcSetConsoleMode (IN UINT32 Width, IN UINT32 Height)
 
VOID OcSetupConsole (IN EFI_CONSOLE_CONTROL_SCREEN_MODE InitialMode, IN OC_CONSOLE_RENDERER Renderer, IN OC_STORAGE_CONTEXT *Storage OPTIONAL, IN CONST CHAR8 *Font OPTIONAL, IN BOOLEAN IgnoreTextOutput, IN BOOLEAN SanitiseClearScreen, IN BOOLEAN ClearScreenOnModeSwitch, IN BOOLEAN ReplaceTabWithSpace, IN UINT32 Width, IN UINT32 Height)
 

Detailed Description

Copyright (C) 2019, vit9696. All rights reserved.

All rights reserved.

This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file OcConsoleLib.c.

Function Documentation

◆ OcSetConsoleMode()

EFI_STATUS OcSetConsoleMode ( IN UINT32 Width,
IN UINT32 Height )

Set console mode.

Parameters
[in]WidthResolution width or 0 for Max.
[in]HeightResolution height or 0 for Max.
Return values
EFI_SUCCESSon success.

Definition at line 380 of file OcConsoleLib.c.

◆ OcSetConsoleModeForProtocol()

EFI_STATUS OcSetConsoleModeForProtocol ( IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * TextOut,
IN UINT32 Width,
IN UINT32 Height )

Definition at line 173 of file OcConsoleLib.c.

◆ OcSetConsoleResolution()

EFI_STATUS OcSetConsoleResolution ( IN UINT32 Width OPTIONAL,
IN UINT32 Height OPTIONAL,
IN UINT32 Bpp OPTIONAL,
IN BOOLEAN Force )

Set screen resolution on console handle.

Parameters
[in]WidthResolution width or 0 for Max.
[in]HeightResolution height or 0 for Max.
[in]BppResolution bpp or 0 for automatic.
[in]ForceForce the specified resolution using the OC_FORCE_RESOLUTION protocol.
Return values
EFI_SUCCESSon success.

Definition at line 289 of file OcConsoleLib.c.

◆ OcSetConsoleResolutionForProtocol()

EFI_STATUS OcSetConsoleResolutionForProtocol ( IN EFI_GRAPHICS_OUTPUT_PROTOCOL * GraphicsOutput,
IN UINT32 Width OPTIONAL,
IN UINT32 Height OPTIONAL,
IN UINT32 Bpp OPTIONAL )

Definition at line 34 of file OcConsoleLib.c.

◆ OcSetupConsole()

VOID OcSetupConsole ( IN EFI_CONSOLE_CONTROL_SCREEN_MODE InitialMode,
IN OC_CONSOLE_RENDERER Renderer,
IN OC_STORAGE_CONTEXT *Storage OPTIONAL,
IN CONST CHAR8 *Font OPTIONAL,
IN BOOLEAN IgnoreTextOutput,
IN BOOLEAN SanitiseClearScreen,
IN BOOLEAN ClearScreenOnModeSwitch,
IN BOOLEAN ReplaceTabWithSpace,
IN UINT32 Width,
IN UINT32 Height )

Configure console control protocol with given options.

Parameters
[in]InitialModeInitial mode to use, or set max. value to use existing mode.
[in]RendererRenderer to use.
[in]StorageStorage context - only required if Font parameter is used.
[in]FontFont file to load. Use builtin font if NULL or empty string.
[in]IgnoreTextOutputSkip console output in text mode.
[in]SanitiseClearScreenWorkaround ClearScreen breaking resolution.
[in]ClearScreenOnModeSwitchClear graphic screen when switching to text mode.
[in]ReplaceTabWithSpaceReplace invisible tab characters with spaces in OutputString.
[in]WidthWidth to set - applies to builtin renderer only.
[in]HeightHeight to set - applies to builtin renderer only.

Definition at line 389 of file OcConsoleLib.c.