remove some comments introduced by tools.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.h
CommitLineData
95276127 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 GraphicsConsole.h\r
15\r
16Abstract:\r
17\r
18 \r
19Revision History\r
20\r
21--*/\r
22\r
23#ifndef _GRAPHICS_CONSOLE_H\r
24#define _GRAPHICS_CONSOLE_H\r
25\r
97a079ed
A
26#include <PiDxe.h>\r
27#include <Protocol/FrameworkHii.h>\r
28#include <Protocol/SimpleTextOut.h>\r
29#include <Protocol/GraphicsOutput.h>\r
30#include <Protocol/UgaDraw.h>\r
31#include <Protocol/DevicePath.h>\r
32#include <Library/DebugLib.h>\r
33#include <Library/UefiDriverEntryPoint.h>\r
34#include <Library/UefiLib.h>\r
35#include <Library/HiiLibFramework.h>\r
36#include <Library/BaseMemoryLib.h>\r
37#include <Library/MemoryAllocationLib.h>\r
38#include <Library/UefiBootServicesTableLib.h>\r
39\r
40\r
41extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;\r
95276127 42\r
43//\r
97a079ed 44// EFI Component Name Functions\r
95276127 45//\r
97a079ed
A
46EFI_STATUS\r
47EFIAPI\r
48GraphicsConsoleComponentNameGetDriverName (\r
49 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
50 IN CHAR8 *Language,\r
51 OUT CHAR16 **DriverName\r
52 );\r
53\r
54EFI_STATUS\r
55EFIAPI\r
56GraphicsConsoleComponentNameGetControllerName (\r
57 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
58 IN EFI_HANDLE ControllerHandle,\r
59 IN EFI_HANDLE ChildHandle OPTIONAL,\r
60 IN CHAR8 *Language,\r
61 OUT CHAR16 **ControllerName\r
62 );\r
95276127 63\r
64//\r
65// Glyph database\r
66//\r
67#define GLYPH_WIDTH 8\r
68#define GLYPH_HEIGHT 19\r
69\r
70typedef union {\r
71 EFI_NARROW_GLYPH NarrowGlyph;\r
72 EFI_WIDE_GLYPH WideGlyph;\r
73} GLYPH_UNION;\r
74\r
75extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[];\r
76extern EFI_WIDE_GLYPH UsStdWideGlyphData[];\r
77\r
78//\r
79// Device Structure\r
80//\r
81#define GRAPHICS_CONSOLE_DEV_SIGNATURE EFI_SIGNATURE_32 ('g', 's', 't', 'o')\r
82\r
83typedef struct {\r
84 UINTN Columns;\r
85 UINTN Rows;\r
86 INTN DeltaX;\r
87 INTN DeltaY;\r
88 UINT32 GopWidth;\r
89 UINT32 GopHeight;\r
90 UINT32 GopModeNumber;\r
91} GRAPHICS_CONSOLE_MODE_DATA;\r
92\r
93#define GRAPHICS_MAX_MODE 3\r
94\r
95typedef struct {\r
96 UINTN Signature;\r
97 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
98 EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
99 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;\r
100 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;\r
101 GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE];\r
102 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LineBuffer;\r
103 EFI_HII_HANDLE HiiHandle;\r
104} GRAPHICS_CONSOLE_DEV;\r
105\r
106#define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \\r
107 CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)\r
108\r
109//\r
110// Global Variables\r
111//\r
112extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;\r
113\r
114//\r
115// Prototypes\r
116//\r
117UINTN\r
118ReturnNarrowFontSize (\r
119 VOID\r
120 );\r
121\r
122UINTN\r
123ReturnWideFontSize (\r
124 VOID\r
125 );\r
126\r
127EFI_STATUS\r
128EFIAPI\r
129GraphicsConsoleConOutReset (\r
130 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
131 IN BOOLEAN ExtendedVerification\r
132 );\r
133\r
134EFI_STATUS\r
135EFIAPI\r
136GraphicsConsoleConOutOutputString (\r
137 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
138 IN CHAR16 *WString\r
139 );\r
140\r
141EFI_STATUS\r
142EFIAPI\r
143GraphicsConsoleConOutTestString (\r
144 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
145 IN CHAR16 *WString\r
146 );\r
147\r
148EFI_STATUS\r
149EFIAPI\r
150GraphicsConsoleConOutQueryMode (\r
151 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
152 IN UINTN ModeNumber,\r
153 OUT UINTN *Columns,\r
154 OUT UINTN *Rows\r
155 );\r
156\r
157EFI_STATUS\r
158EFIAPI\r
159GraphicsConsoleConOutSetMode (\r
160 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
161 IN UINTN ModeNumber\r
162 );\r
163\r
164EFI_STATUS\r
165EFIAPI\r
166GraphicsConsoleConOutSetAttribute (\r
167 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
168 IN UINTN Attribute\r
169 );\r
170\r
171EFI_STATUS\r
172EFIAPI\r
173GraphicsConsoleConOutClearScreen (\r
174 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This\r
175 );\r
176\r
177EFI_STATUS\r
178EFIAPI\r
179GraphicsConsoleConOutSetCursorPosition (\r
180 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
181 IN UINTN Column,\r
182 IN UINTN Row\r
183 );\r
184\r
185EFI_STATUS\r
186EFIAPI\r
187GraphicsConsoleConOutEnableCursor (\r
188 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
189 IN BOOLEAN Visible\r
190 );\r
191\r
192EFI_STATUS\r
193EfiLocateHiiProtocol (\r
194 VOID\r
195 );\r
196\r
197EFI_STATUS\r
198EFIAPI\r
199GraphicsConsoleControllerDriverSupported (\r
200 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
201 IN EFI_HANDLE Controller,\r
202 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
203 );\r
204\r
205EFI_STATUS\r
206EFIAPI\r
207GraphicsConsoleControllerDriverStart (\r
208 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
209 IN EFI_HANDLE Controller,\r
210 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
211 );\r
212\r
213EFI_STATUS\r
214EFIAPI\r
215GraphicsConsoleControllerDriverStop (\r
216 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
217 IN EFI_HANDLE Controller,\r
218 IN UINTN NumberOfChildren,\r
219 IN EFI_HANDLE *ChildHandleBuffer\r
220 );\r
221\r
222#endif\r