Fix some cleanall issues
[mirror_edk2.git] / EdkModulePkg / Universal / Console / GraphicsConsole / Dxe / GraphicsConsole.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 GraphicsConsole.h
15
16 Abstract:
17
18
19 Revision History
20
21 --*/
22
23 #ifndef _GRAPHICS_CONSOLE_H
24 #define _GRAPHICS_CONSOLE_H
25
26
27 #include "ComponentName.h"
28
29 //
30 // Glyph database
31 //
32 #define GLYPH_WIDTH 8
33 #define GLYPH_HEIGHT 19
34
35 typedef union {
36 EFI_NARROW_GLYPH NarrowGlyph;
37 EFI_WIDE_GLYPH WideGlyph;
38 } GLYPH_UNION;
39
40 extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[];
41 extern EFI_WIDE_GLYPH UsStdWideGlyphData[];
42
43 //
44 // Device Structure
45 //
46 #define GRAPHICS_CONSOLE_DEV_SIGNATURE EFI_SIGNATURE_32 ('g', 's', 't', 'o')
47
48 typedef struct {
49 UINTN Columns;
50 UINTN Rows;
51 INTN DeltaX;
52 INTN DeltaY;
53 UINT32 UgaWidth;
54 UINT32 UgaHeight;
55 } GRAPHICS_CONSOLE_MODE_DATA;
56
57 #define GRAPHICS_MAX_MODE 3
58
59 typedef struct {
60 UINTN Signature;
61 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
62 EFI_SIMPLE_TEXT_OUT_PROTOCOL SimpleTextOutput;
63 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
64 GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE];
65 EFI_UGA_PIXEL *LineBuffer;
66 EFI_HII_HANDLE HiiHandle;
67 } GRAPHICS_CONSOLE_DEV;
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 // Global Variables
74 //
75 extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
76
77 //
78 // Prototypes
79 //
80 UINTN
81 ReturnNarrowFontSize (
82 VOID
83 );
84
85 UINTN
86 ReturnWideFontSize (
87 VOID
88 );
89
90 EFI_STATUS
91 EFIAPI
92 GraphicsConsoleConOutReset (
93 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
94 IN BOOLEAN ExtendedVerification
95 );
96
97 EFI_STATUS
98 EFIAPI
99 GraphicsConsoleConOutOutputString (
100 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
101 IN CHAR16 *WString
102 );
103
104 EFI_STATUS
105 EFIAPI
106 GraphicsConsoleConOutTestString (
107 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
108 IN CHAR16 *WString
109 );
110
111 EFI_STATUS
112 EFIAPI
113 GraphicsConsoleConOutQueryMode (
114 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
115 IN UINTN ModeNumber,
116 OUT UINTN *Columns,
117 OUT UINTN *Rows
118 );
119
120 EFI_STATUS
121 EFIAPI
122 GraphicsConsoleConOutSetMode (
123 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
124 IN UINTN ModeNumber
125 );
126
127 EFI_STATUS
128 EFIAPI
129 GraphicsConsoleConOutSetAttribute (
130 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
131 IN UINTN Attribute
132 );
133
134 EFI_STATUS
135 EFIAPI
136 GraphicsConsoleConOutClearScreen (
137 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This
138 );
139
140 EFI_STATUS
141 EFIAPI
142 GraphicsConsoleConOutSetCursorPosition (
143 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
144 IN UINTN Column,
145 IN UINTN Row
146 );
147
148 EFI_STATUS
149 EFIAPI
150 GraphicsConsoleConOutEnableCursor (
151 IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This,
152 IN BOOLEAN Visible
153 );
154
155 EFI_STATUS
156 EfiLocateHiiProtocol (
157 VOID
158 );
159
160 #endif