]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiPrintLib.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / Dxe / Include / EfiPrintLib.h
CommitLineData
3eb9473e 1/*++\r
2\r
4ea9375a
HT
3Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 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 EfiPrintLib.h\r
15\r
16Abstract:\r
17\r
18 Light weight lib to support EFI drivers.\r
19\r
20--*/\r
21\r
22#ifndef _EFI_PRINT_LIB_H_\r
23#define _EFI_PRINT_LIB_H_\r
24\r
25#include EFI_PROTOCOL_DEFINITION(GraphicsOutput)\r
26#include EFI_PROTOCOL_DEFINITION(UgaDraw)\r
27#include EFI_PROTOCOL_DEFINITION(Print)\r
28\r
29UINTN\r
30ErrorPrint (\r
31 IN CONST CHAR16 *ErrorString,\r
32 IN CONST CHAR8 *Format,\r
33 ...\r
34 )\r
35/*++\r
36\r
37Routine Description:\r
38\r
39 Print function for a maximum of EFI_DRIVER_LIB_MAX_PRINT_BUFFER ascii \r
40 characters.\r
41\r
42Arguments:\r
43\r
44 ErrorString - Error message printed first\r
45\r
46 Format - Ascii format string see file header for more details.\r
47\r
48 ... - Vararg list consumed by processing Format.\r
49\r
50Returns: \r
51\r
52 Number of characters printed.\r
53\r
54--*/\r
55;\r
56\r
57VOID\r
58ErrorDumpHex (\r
59 IN UINTN Indent,\r
60 IN UINTN Offset,\r
61 IN UINTN DataSize,\r
62 IN VOID *UserData\r
63 )\r
64/*++\r
65\r
66Routine Description:\r
67\r
68 Dump error info by hex.\r
69\r
70Arguments:\r
71\r
72 Indent - Indent number\r
73 Offset - Offset number\r
74 DataSize - Size of user data\r
75 UserData - User data to dump\r
76\r
77Returns:\r
78\r
79 None\r
80\r
81--*/\r
82;\r
83\r
84UINTN\r
85Print (\r
86 IN CONST CHAR16 *Format,\r
87 ...\r
88 )\r
89/*++\r
90\r
91Routine Description:\r
92\r
93 Prints a formatted unicode string to the default console\r
94\r
95Arguments:\r
96\r
97 fmt - Format string\r
98\r
99Returns:\r
100\r
101 Length of string printed to the console\r
102\r
103--*/\r
104;\r
105\r
106UINTN\r
107PrintXY (\r
108 IN UINTN X,\r
109 IN UINTN Y,\r
110 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OPTIONAL\r
111 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, OPTIONAL\r
112 IN CHAR16 *Fmt,\r
113 ...\r
114 )\r
115/*++\r
116\r
117Routine Description:\r
118\r
119 Prints a formatted unicode string to the default console\r
120\r
121Arguments:\r
122\r
123 X - X coordinate to start printing\r
124 \r
125 Y - Y coordinate to start printing\r
126 \r
127 ForeGround - Foreground color\r
128 \r
129 BackGround - Background color\r
130\r
131 Fmt - Format string\r
132 \r
133 ... - Print arguments\r
134\r
135Returns:\r
136\r
137 Length of string printed to the console\r
138\r
139--*/\r
140;\r
141\r
142UINTN\r
143Aprint (\r
144 IN CONST CHAR8 *Format,\r
145 ...\r
146 )\r
147/*++\r
148\r
149Routine Description:\r
150\r
151 Print function for a maximum of EFI_DRIVER_LIB_MAX_PRINT_BUFFER ascii \r
152 characters.\r
153\r
154Arguments:\r
155\r
156 Format - Ascii format string see file header for more details.\r
157\r
158 ... - Vararg list consumed by processing Format.\r
159\r
160Returns: \r
161\r
162 Number of characters printed.\r
163\r
164--*/\r
165;\r
166\r
167UINTN\r
168UPrint (\r
169 IN CONST CHAR16 *Format,\r
170 ...\r
171 )\r
172/*++\r
173\r
174Routine Description:\r
175\r
176 Print function for a maximum of EFI_DRIVER_LIB_MAX_PRINT_BUFFER ascii \r
177 characters.\r
178\r
179Arguments:\r
180\r
181 Format - Ascii format string see file header for more details.\r
182\r
183 ... - Vararg list consumed by processing Format.\r
184\r
185Returns: \r
186\r
187 Number of characters printed.\r
188\r
189--*/\r
190;\r
191\r
192UINTN\r
c7f33ca4 193EFIAPI\r
3eb9473e 194VSPrint (\r
195 OUT CHAR16 *StartOfBuffer,\r
196 IN UINTN StrLen,\r
197 IN CONST CHAR16 *Format,\r
198 IN VA_LIST Marker\r
199 )\r
200/*++\r
201\r
202Routine Description:\r
203\r
204 Prints a formatted unicode string to a buffer\r
205\r
206Arguments:\r
207\r
208 StartOfBuffer - Output buffer to print the formatted string into\r
209 StrLen - Size of Str. String is truncated to this size.\r
210 A size of 0 means there is no limit\r
211 Format - The format string\r
212 Marker - Vararg list consumed by processing Format.\r
213\r
214Returns:\r
215\r
216 String length returned in buffer\r
217\r
218--*/\r
219;\r
220\r
221UINTN\r
222SPrint (\r
223 OUT CHAR16 *Buffer,\r
224 IN UINTN BufferSize,\r
225 IN CONST CHAR16 *Format,\r
226 ...\r
227 )\r
228/*++\r
229\r
230Routine Description:\r
231\r
232 SPrint function to process format and place the results in Buffer.\r
233\r
234Arguments:\r
235\r
236 Buffer - Wide char buffer to print the results of the parsing of Format into.\r
237\r
238 BufferSize - Maximum number of characters to put into buffer. Zero means no \r
239 limit.\r
240\r
241 Format - Format string see file header for more details.\r
242\r
243 ... - Vararg list consumed by processing Format.\r
244\r
245Returns: \r
246\r
247 Number of characters printed.\r
248\r
249--*/\r
250;\r
251\r
252//\r
253// BoxDraw support\r
254//\r
255BOOLEAN\r
256IsValidEfiCntlChar (\r
257 IN CHAR16 CharC\r
258 )\r
259/*++\r
260\r
261Routine Description:\r
262\r
263 Test whether a wide char is a valid control char.\r
264\r
265Arguments:\r
266\r
267 CharC - A char\r
268\r
269Returns:\r
270\r
271 TRUE - A control char\r
272 \r
273 FALSE - Not a control char\r
274\r
275--*/\r
276;\r
277\r
278BOOLEAN\r
279IsValidAscii (\r
280 IN CHAR16 Ascii\r
281 )\r
282/*++\r
283\r
284Routine Description:\r
285\r
286 Test whether a wide char is a normal printable char\r
287\r
288Arguments:\r
289\r
290 Ascii - A char\r
291\r
292Returns:\r
293\r
294 True - A normal, printable char\r
295 FALSE - Not a normal, printable char\r
296\r
297--*/\r
298;\r
299\r
300BOOLEAN\r
301LibIsValidTextGraphics (\r
302 IN CHAR16 Graphic,\r
303 OUT CHAR8 *PcAnsi, OPTIONAL\r
304 OUT CHAR8 *Ascii OPTIONAL\r
305 )\r
306/*++\r
307\r
308Routine Description:\r
309\r
310 Detects if a Unicode char is for Box Drawing text graphics.\r
311\r
312Arguments:\r
313\r
314 Graphic - Unicode char to test.\r
315\r
316 PcAnsi - Optional pointer to return PCANSI equivalent of Graphic.\r
317\r
318 Ascii - Optional pointer to return Ascii equivalent of Graphic.\r
319\r
320Returns:\r
321\r
322 TRUE if Gpaphic is a supported Unicode Box Drawing character.\r
323\r
324--*/\r
325;\r
326\r
327#endif\r