TianoCore EDK2 master
Loading...
Searching...
No Matches
GraphicsConsole.h
Go to the documentation of this file.
1
9#ifndef _GRAPHICS_CONSOLE_H_
10#define _GRAPHICS_CONSOLE_H_
11
12#include <Uefi.h>
15#include <Protocol/UgaDraw.h>
16#include <Protocol/DevicePath.h>
17#include <Library/DebugLib.h>
19#include <Library/UefiLib.h>
23#include <Library/HiiLib.h>
24#include <Library/BaseLib.h>
25#include <Library/PcdLib.h>
26
27#include <Guid/MdeModuleHii.h>
28
29#include <Protocol/HiiFont.h>
31
32extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
33extern EFI_COMPONENT_NAME2_PROTOCOL gGraphicsConsoleComponentName2;
34extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
35extern EFI_NARROW_GLYPH gUsStdNarrowGlyphData[];
36
37extern UINT32 mNarrowFontSize;
38
39typedef union {
40 EFI_NARROW_GLYPH NarrowGlyph;
41 EFI_WIDE_GLYPH WideGlyph;
43
44//
45// Device Structure
46//
47#define GRAPHICS_CONSOLE_DEV_SIGNATURE SIGNATURE_32 ('g', 's', 't', 'o')
48
49typedef struct {
50 UINTN Columns;
51 UINTN Rows;
52 INTN DeltaX;
53 INTN DeltaY;
54 UINT32 GopWidth;
55 UINT32 GopHeight;
56 UINT32 GopModeNumber;
58
59typedef struct {
60 UINTN Signature;
61 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
62 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
63 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;
64 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
68
69#define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \
70 CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)
71
72//
73// EFI Component Name Functions
74//
75
116EFIAPI
119 IN CHAR8 *Language,
120 OUT CHAR16 **DriverName
121 );
122
192EFIAPI
195 IN EFI_HANDLE ControllerHandle,
196 IN EFI_HANDLE ChildHandle OPTIONAL,
197 IN CHAR8 *Language,
198 OUT CHAR16 **ControllerName
199 );
200
220EFIAPI
223 IN BOOLEAN ExtendedVerification
224 );
225
249EFIAPI
252 IN CHAR16 *WString
253 );
254
275EFIAPI
278 IN CHAR16 *WString
279 );
280
299EFIAPI
302 IN UINTN ModeNumber,
303 OUT UINTN *Columns,
304 OUT UINTN *Rows
305 );
306
323EFIAPI
326 IN UINTN ModeNumber
327 );
328
346EFIAPI
349 IN UINTN Attribute
350 );
351
366EFIAPI
369 );
370
391EFIAPI
394 IN UINTN Column,
395 IN UINTN Row
396 );
397
411EFIAPI
414 IN BOOLEAN Visible
415 );
416
434EFIAPI
437 IN EFI_HANDLE Controller,
438 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
439 );
440
456EFIAPI
459 IN EFI_HANDLE Controller,
460 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
461 );
462
482EFIAPI
485 IN EFI_HANDLE Controller,
486 IN UINTN NumberOfChildren,
487 IN EFI_HANDLE *ChildHandleBuffer
488 );
489
501 VOID
502 );
503
519 );
520
537 IN CHAR16 *UnicodeWeight,
538 IN UINTN Count
539 );
540
557 );
558
580 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,
581 IN UINT32 HorizontalResolution,
582 IN UINT32 VerticalResolution,
583 OUT UINT32 *CurrentModeNumber
584 );
585
586#endif
UINT64 UINTN
INT64 INTN
EFI_STATUS EFIAPI GraphicsConsoleConOutQueryMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber, OUT UINTN *Columns, OUT UINTN *Rows)
EFI_STATUS EFIAPI GraphicsConsoleConOutSetAttribute(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Attribute)
EFI_STATUS EFIAPI GraphicsConsoleComponentNameGetDriverName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN CHAR8 *Language, OUT CHAR16 **DriverName)
Definition: ComponentName.c:81
EFI_STATUS DrawUnicodeWeightAtCursorN(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *UnicodeWeight, IN UINTN Count)
EFI_STATUS EFIAPI GraphicsConsoleConOutClearScreen(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This)
EFI_STATUS EFIAPI GraphicsConsoleConOutSetMode(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber)
EFI_STATUS EFIAPI GraphicsConsoleConOutEnableCursor(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN Visible)
EFI_STATUS EFIAPI GraphicsConsoleControllerDriverStop(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer)
EFI_STATUS EFIAPI GraphicsConsoleConOutTestString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
EFI_STATUS EfiLocateHiiProtocol(VOID)
EFI_STATUS EFIAPI GraphicsConsoleControllerDriverStart(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI GraphicsConsoleConOutReset(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
EFI_STATUS EFIAPI GraphicsConsoleConOutSetCursorPosition(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Column, IN UINTN Row)
EFI_STATUS EFIAPI GraphicsConsoleControllerDriverSupported(IN EFI_DRIVER_BINDING_PROTOCOL *This, IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath)
EFI_STATUS EFIAPI GraphicsConsoleConOutOutputString(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *WString)
EFI_STATUS CheckModeSupported(EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput, IN UINT32 HorizontalResolution, IN UINT32 VerticalResolution, OUT UINT32 *CurrentModeNumber)
EFI_STATUS EFIAPI GraphicsConsoleComponentNameGetControllerName(IN EFI_COMPONENT_NAME_PROTOCOL *This, IN EFI_HANDLE ControllerHandle, IN EFI_HANDLE ChildHandle OPTIONAL, IN CHAR8 *Language, OUT CHAR16 **ControllerName)
EFI_STATUS GetTextColors(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background)
EFI_STATUS FlushCursor(IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This)
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33