|
RDFU
1.0
|
Screen support functions. More...
#include "EfiScannerHeaders.h"#include "Screen.h"#include "efiGraphicsOutput.h"#include "efiUgaDraw.h"#include "ConsoleControl.h"#include "logo.h"
Go to the source code of this file.
Macros | |
| #define | EFI_CONSOLE_CONTROL_PROTOCOL_GUID { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} } |
Functions | |
| EFI_STATUS | PickBestTextMode (VOID) |
| EFI_STATUS | ScreenEnableGraphicsMode (BOOLEAN Enable) |
| EFI_STATUS | ScreenGetResolution (VOID) |
| EFI_STATUS | ScreenInit (VOID) |
| EFI_STATUS | ScreenClearToColor (RGBPIXEL *Color) |
| EFI_STATUS | ScreenDrawImage (GIMAGE *Image, UINTN ScreenPosX, UINTN ScreenPosY) |
| EFI_STATUS | ScreenShowSplashLogo (VOID) |
Variables | |
| static EFI_GUID | ggConsoleControlProtocolGuid = EFI_CONSOLE_CONTROL_PROTOCOL_GUID |
| static EFI_CONSOLE_CONTROL_PROTOCOL * | gConsoleControlProt = NULL |
| static EFI_GUID | ggUgaDrawProtocolGuid = EFI_UGA_DRAW_PROTOCOL_GUID |
| static EFI_UGA_DRAW_PROTOCOL * | gUgaDrawProt = NULL |
| static EFI_GUID | ggGraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID |
| static EFI_GRAPHICS_OUTPUT_PROTOCOL * | gGraphicsOutputProt = NULL |
| UINTN | ScreenWidthProbed = 0 |
| UINTN | ScreenHeightProbed = 0 |
| BOOLEAN | GraphicsAvailable = FALSE |
Screen support functions.
Definition in file Screen.c.
| #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} } |
| EFI_STATUS PickBestTextMode | ( | VOID | ) |
following function is not used.
Definition at line 47 of file Screen.c.
References EFI_STATUS(), and LogFullAscii().

| EFI_STATUS ScreenClearToColor | ( | RGBPIXEL * | Color | ) |
Function clears screen to selected color.
Definition at line 207 of file Screen.c.
References _EFI_UGA_DRAW_PROTOCOL::Blt, _EFI_GRAPHICS_OUTPUT_PROTOCOL::Blt, EfiBltVideoFill, EfiUgaVideoFill, GraphicsAvailable, ScreenHeightProbed, and ScreenWidthProbed.
Referenced by ScreenShowSplashLogo().

| EFI_STATUS ScreenDrawImage | ( | GIMAGE * | Image, |
| UINTN | ScreenPosX, | ||
| UINTN | ScreenPosY | ||
| ) |
Function draws image on the screen at position x and y.
Definition at line 246 of file Screen.c.
References _EFI_UGA_DRAW_PROTOCOL::Blt, _EFI_GRAPHICS_OUTPUT_PROTOCOL::Blt, _GIMAGE::Data, EfiBltBufferToVideo, EfiUgaBltBufferToVideo, GraphicsAvailable, _GIMAGE::Height, and _GIMAGE::Width.
Referenced by ScreenShowSplashLogo().

| EFI_STATUS ScreenEnableGraphicsMode | ( | BOOLEAN | Enable | ) |
Functions switches to gfx or text mode
Definition at line 90 of file Screen.c.
References EfiConsoleControlScreenGraphics, EfiConsoleControlScreenText, _EFI_CONSOLE_CONTROL_PROTOCOL::GetMode, and _EFI_CONSOLE_CONTROL_PROTOCOL::SetMode.
Referenced by ScreenShowSplashLogo().

| EFI_STATUS ScreenGetResolution | ( | VOID | ) |
Function get the screen resolution and puts it into global variables. (using both UGA and GOP protocols if available)
Definition at line 114 of file Screen.c.
References EFI_STATUS(), _EFI_UGA_DRAW_PROTOCOL::GetMode, GraphicsAvailable, EFI_GRAPHICS_OUTPUT_MODE_INFORMATION::HorizontalResolution, EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE::Info, LogFullAscii(), _EFI_GRAPHICS_OUTPUT_PROTOCOL::Mode, ScreenHeightProbed, ScreenWidthProbed, and EFI_GRAPHICS_OUTPUT_MODE_INFORMATION::VerticalResolution.
Referenced by ScreenInit().


| EFI_STATUS ScreenInit | ( | VOID | ) |
Function inits the screen and resolves are necessary protocols.
In order to stay compatible we need to support Universal Graphics Adapter Protocol (UGA) and the Graphics Output Protocol (GOP) which was introduced later as an UGA replacement. The console control protocol is essential for console output.
Definition at line 168 of file Screen.c.
References EFI_STATUS(), ggConsoleControlProtocolGuid, ggGraphicsOutputProtocolGuid, ggUgaDrawProtocolGuid, LogFullAscii(), and ScreenGetResolution().
Referenced by ScreenShowSplashLogo().


| EFI_STATUS ScreenShowSplashLogo | ( | VOID | ) |
Function shows the main logo on the screen (for 5 seconds) and then switches back to console mode.
Definition at line 295 of file Screen.c.
References _GIMAGE::Data, EFI_STATUS(), _GIMAGE::Height, ImageLoadBMPFromMem(), LogFullAscii(), logo, ScreenClearToColor(), ScreenDrawImage(), ScreenEnableGraphicsMode(), ScreenHeightProbed, ScreenInit(), ScreenWidthProbed, TICKS_PER_MS, and _GIMAGE::Width.
Referenced by MainLoop(), and TestDumpHandles().


|
static |
|
static |
Definition at line 25 of file Screen.c.
Referenced by ScreenInit().
|
static |
Definition at line 31 of file Screen.c.
Referenced by ScreenInit().
|
static |
|
static |
Definition at line 28 of file Screen.c.
Referenced by ScreenInit().
| BOOLEAN GraphicsAvailable = FALSE |
Definition at line 40 of file Screen.c.
Referenced by ScreenClearToColor(), ScreenDrawImage(), and ScreenGetResolution().
|
static |
| UINTN ScreenHeightProbed = 0 |
Definition at line 37 of file Screen.c.
Referenced by ScreenClearToColor(), ScreenGetResolution(), and ScreenShowSplashLogo().
| UINTN ScreenWidthProbed = 0 |
Definition at line 36 of file Screen.c.
Referenced by ScreenClearToColor(), ScreenGetResolution(), and ScreenShowSplashLogo().