remove some comments introduced by tools.
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / 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 #include <PiDxe.h>
27 #include <Protocol/FrameworkHii.h>
28 #include <Protocol/SimpleTextOut.h>
29 #include <Protocol/GraphicsOutput.h>
30 #include <Protocol/UgaDraw.h>
31 #include <Protocol/DevicePath.h>
32 #include <Library/DebugLib.h>
33 #include <Library/UefiDriverEntryPoint.h>
34 #include <Library/UefiLib.h>
35 #include <Library/HiiLibFramework.h>
36 #include <Library/BaseMemoryLib.h>
37 #include <Library/MemoryAllocationLib.h>
38 #include <Library/UefiBootServicesTableLib.h>
39
40
41 extern EFI_COMPONENT_NAME_PROTOCOL gGraphicsConsoleComponentName;
42
43 //
44 // EFI Component Name Functions
45 //
46 EFI_STATUS
47 EFIAPI
48 GraphicsConsoleComponentNameGetDriverName (
49 IN EFI_COMPONENT_NAME_PROTOCOL *This,
50 IN CHAR8 *Language,
51 OUT CHAR16 **DriverName
52 );
53
54 EFI_STATUS
55 EFIAPI
56 GraphicsConsoleComponentNameGetControllerName (
57 IN EFI_COMPONENT_NAME_PROTOCOL *This,
58 IN EFI_HANDLE ControllerHandle,
59 IN EFI_HANDLE ChildHandle OPTIONAL,
60 IN CHAR8 *Language,
61 OUT CHAR16 **ControllerName
62 );
63
64 //
65 // Glyph database
66 //
67 #define GLYPH_WIDTH 8
68 #define GLYPH_HEIGHT 19
69
70 typedef union {
71 EFI_NARROW_GLYPH NarrowGlyph;
72 EFI_WIDE_GLYPH WideGlyph;
73 } GLYPH_UNION;
74
75 extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[];
76 extern EFI_WIDE_GLYPH UsStdWideGlyphData[];
77
78 //
79 // Device Structure
80 //
81 #define GRAPHICS_CONSOLE_DEV_SIGNATURE EFI_SIGNATURE_32 ('g', 's', 't', 'o')
82
83 typedef struct {
84 UINTN Columns;
85 UINTN Rows;
86 INTN DeltaX;
87 INTN DeltaY;
88 UINT32 GopWidth;
89 UINT32 GopHeight;
90 UINT32 GopModeNumber;
91 } GRAPHICS_CONSOLE_MODE_DATA;
92
93 #define GRAPHICS_MAX_MODE 3
94
95 typedef struct {
96 UINTN Signature;
97 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
98 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
99 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;
100 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
101 GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE];
102 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LineBuffer;
103 EFI_HII_HANDLE HiiHandle;
104 } GRAPHICS_CONSOLE_DEV;
105
106 #define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \
107 CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)
108
109 //
110 // Global Variables
111 //
112 extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
113
114 //
115 // Prototypes
116 //
117 UINTN
118 ReturnNarrowFontSize (
119 VOID
120 );
121
122 UINTN
123 ReturnWideFontSize (
124 VOID
125 );
126
127 EFI_STATUS
128 EFIAPI
129 GraphicsConsoleConOutReset (
130 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
131 IN BOOLEAN ExtendedVerification
132 );
133
134 EFI_STATUS
135 EFIAPI
136 GraphicsConsoleConOutOutputString (
137 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
138 IN CHAR16 *WString
139 );
140
141 EFI_STATUS
142 EFIAPI
143 GraphicsConsoleConOutTestString (
144 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
145 IN CHAR16 *WString
146 );
147
148 EFI_STATUS
149 EFIAPI
150 GraphicsConsoleConOutQueryMode (
151 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
152 IN UINTN ModeNumber,
153 OUT UINTN *Columns,
154 OUT UINTN *Rows
155 );
156
157 EFI_STATUS
158 EFIAPI
159 GraphicsConsoleConOutSetMode (
160 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
161 IN UINTN ModeNumber
162 );
163
164 EFI_STATUS
165 EFIAPI
166 GraphicsConsoleConOutSetAttribute (
167 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
168 IN UINTN Attribute
169 );
170
171 EFI_STATUS
172 EFIAPI
173 GraphicsConsoleConOutClearScreen (
174 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
175 );
176
177 EFI_STATUS
178 EFIAPI
179 GraphicsConsoleConOutSetCursorPosition (
180 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
181 IN UINTN Column,
182 IN UINTN Row
183 );
184
185 EFI_STATUS
186 EFIAPI
187 GraphicsConsoleConOutEnableCursor (
188 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
189 IN BOOLEAN Visible
190 );
191
192 EFI_STATUS
193 EfiLocateHiiProtocol (
194 VOID
195 );
196
197 EFI_STATUS
198 EFIAPI
199 GraphicsConsoleControllerDriverSupported (
200 IN EFI_DRIVER_BINDING_PROTOCOL *This,
201 IN EFI_HANDLE Controller,
202 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
203 );
204
205 EFI_STATUS
206 EFIAPI
207 GraphicsConsoleControllerDriverStart (
208 IN EFI_DRIVER_BINDING_PROTOCOL *This,
209 IN EFI_HANDLE Controller,
210 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
211 );
212
213 EFI_STATUS
214 EFIAPI
215 GraphicsConsoleControllerDriverStop (
216 IN EFI_DRIVER_BINDING_PROTOCOL *This,
217 IN EFI_HANDLE Controller,
218 IN UINTN NumberOfChildren,
219 IN EFI_HANDLE *ChildHandleBuffer
220 );
221
222 #endif