]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Graphics Library\r | |
3 | \r | |
4 | Copyright (c) 2006 - 2007, Intel Corporation.<BR>\r | |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __EFI_GRAPHICS_LIB_H__\r | |
16 | #define __EFI_GRAPHICS_LIB_H__\r | |
17 | \r | |
18 | #include <Protocol/GraphicsOutput.h>\r | |
19 | \r | |
20 | \r | |
21 | /**\r | |
22 | Return the graphics image file named FileNameGuid into Image and return it's\r | |
23 | size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r | |
24 | file name.\r | |
25 | \r | |
26 | @param[in] FileNameGuid File Name of graphics file in the FV(s).\r | |
27 | @param[out] Image Pointer to pointer to return graphics image. If NULL, a \r | |
28 | buffer will be allocated.\r | |
29 | @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.\r | |
30 | \r | |
31 | @retval EFI_INVALID_PARAMETER invalid parameter\r | |
32 | @retval EFI_UNSUPPORTED Range can not be erased\r | |
33 | @retval EFI_SUCCESS Image and ImageSize are valid. \r | |
34 | @retval EFI_BUFFER_TOO_SMALL Image not big enough. ImageSize has required size\r | |
35 | @retval EFI_NOT_FOUND FileNameGuid not found\r | |
36 | \r | |
37 | **/\r | |
38 | EFI_STATUS\r | |
39 | GetGraphicsBitMapFromFV (\r | |
40 | IN EFI_GUID *FileNameGuid,\r | |
41 | OUT VOID **Image,\r | |
42 | OUT UINTN *ImageSize\r | |
43 | );\r | |
44 | \r | |
45 | /**\r | |
46 | Return the graphics image file named FileNameGuid into Image and return it's\r | |
47 | size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r | |
48 | file name.\r | |
49 | \r | |
50 | @param[in] ImageHandle The driver image handle of the caller. The parameter is used to\r | |
51 | optimize the loading of the image file so that the FV from which\r | |
52 | the driver image is loaded will be tried first. \r | |
53 | @param[in] FileNameGuid File Name of graphics file in the FV(s).\r | |
54 | @param[out] Image Pointer to pointer to return graphics image. If NULL, a \r | |
55 | buffer will be allocated.\r | |
56 | @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.\r | |
57 | \r | |
58 | @retval EFI_INVALID_PARAMETER invalid parameter\r | |
59 | @retval EFI_UNSUPPORTED Range can not be erased\r | |
60 | @retval EFI_SUCCESS Image and ImageSize are valid. \r | |
61 | @retval EFI_BUFFER_TOO_SMALL Image not big enough. ImageSize has required size\r | |
62 | @retval EFI_NOT_FOUND FileNameGuid not found\r | |
63 | \r | |
64 | **/\r | |
65 | EFI_STATUS\r | |
66 | GetGraphicsBitMapFromFVEx (\r | |
67 | IN EFI_HANDLE ImageHandle,\r | |
68 | IN EFI_GUID *FileNameGuid,\r | |
69 | OUT VOID **Image,\r | |
70 | OUT UINTN *ImageSize\r | |
71 | );\r | |
72 | \r | |
73 | /**\r | |
74 | Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer\r | |
75 | is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt\r | |
76 | buffer is passed in it will be used if it is big enough.\r | |
77 | \r | |
78 | @param[in] BmpImage Pointer to BMP file\r | |
79 | @param[in] BmpImageSize Number of bytes in BmpImage\r | |
80 | @param[in,out] UgaBlt Buffer containing UGA version of BmpImage.\r | |
81 | @param[in,out] UgaBltSize Size of UgaBlt in bytes.\r | |
82 | @param[out] PixelHeight Height of UgaBlt/BmpImage in pixels\r | |
83 | @param[out] PixelWidth Width of UgaBlt/BmpImage in pixels\r | |
84 | \r | |
85 | @retval EFI_SUCCESS UgaBlt and UgaBltSize are returned. \r | |
86 | @retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image\r | |
87 | @retval EFI_BUFFER_TOO_SMALL The passed in UgaBlt buffer is not big enough.\r | |
88 | UgaBltSize will contain the required size.\r | |
89 | **/\r | |
90 | EFI_STATUS\r | |
91 | ConvertBmpToUgaBlt (\r | |
92 | IN VOID *BmpImage,\r | |
93 | IN UINTN BmpImageSize,\r | |
94 | IN OUT VOID **UgaBlt,\r | |
95 | IN OUT UINTN *UgaBltSize,\r | |
96 | OUT UINTN *PixelHeight,\r | |
97 | OUT UINTN *PixelWidth\r | |
98 | );\r | |
99 | \r | |
100 | \r | |
101 | /**\r | |
102 | Use Console Control to turn off UGA based Simple Text Out consoles from going\r | |
103 | to the UGA device. Put up LogoFile on every UGA device that is a console\r | |
104 | \r | |
105 | @param[in] LogoFile File name of logo to display on the center of the screen.\r | |
106 | \r | |
107 | @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r | |
108 | @retval EFI_UNSUPPORTED Logo not found\r | |
109 | \r | |
110 | **/\r | |
111 | EFI_STATUS\r | |
112 | EnableQuietBoot (\r | |
113 | IN EFI_GUID *LogoFile\r | |
114 | );\r | |
115 | \r | |
116 | /**\r | |
117 | Use Console Control to turn off GOP/UGA based Simple Text Out consoles from going\r | |
118 | to the UGA device. Put up LogoFile on every UGA device that is a console\r | |
119 | \r | |
120 | @param LogoFile File name of logo to display on the center of the screen.\r | |
121 | @param ImageHandle The driver image handle of the caller. The parameter is used to\r | |
122 | optimize the loading of the logo file so that the FV from which\r | |
123 | the driver image is loaded will be tried first.\r | |
124 | \r | |
125 | @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r | |
126 | @retval EFI_UNSUPPORTED Logo not found\r | |
127 | \r | |
128 | **/\r | |
129 | EFI_STATUS\r | |
130 | EnableQuietBootEx (\r | |
131 | IN EFI_GUID *LogoFile,\r | |
132 | IN EFI_HANDLE ImageHandle\r | |
133 | );\r | |
134 | \r | |
135 | \r | |
136 | /**\r | |
137 | Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r | |
138 | Simple Text Out screens will now be synced up with all non UGA output devices\r | |
139 | \r | |
140 | @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r | |
141 | \r | |
142 | **/\r | |
143 | EFI_STATUS\r | |
144 | DisableQuietBoot (\r | |
145 | VOID\r | |
146 | );\r | |
147 | \r | |
148 | \r | |
149 | /**\r | |
150 | Use Console Control Protocol to lock the Console In Spliter virtual handle. \r | |
151 | This is the ConInHandle and ConIn handle in the EFI system table. All key\r | |
152 | presses will be ignored until the Password is typed in. The only way to\r | |
153 | disable the password is to type it in to a ConIn device.\r | |
154 | \r | |
155 | @param[in] Password Password used to lock ConIn device.\r | |
156 | \r | |
157 | @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo\r | |
158 | displayed.\r | |
159 | @retval EFI_UNSUPPORTED Password not found\r | |
160 | \r | |
161 | **/\r | |
162 | EFI_STATUS\r | |
163 | LockKeyboards (\r | |
164 | IN CHAR16 *Password\r | |
165 | );\r | |
166 | \r | |
167 | \r | |
168 | /**\r | |
169 | Print to graphics screen at the given X,Y coordinates of the graphics screen.\r | |
170 | see definition of Print to find rules for constructing Fmt.\r | |
171 | \r | |
172 | @param[in] X Row to start printing at\r | |
173 | @param[in] Y Column to start printing at\r | |
174 | @param[in] Foreground Foreground color\r | |
175 | @param[in] Background background color\r | |
176 | @param[in] Fmt Print format sting. See definition of Print\r | |
177 | @param[in] ... Argumnet stream defined by Fmt string\r | |
178 | \r | |
179 | @retval UINTN Number of Characters printed\r | |
180 | \r | |
181 | **/\r | |
182 | UINTN\r | |
183 | EFIAPI\r | |
184 | PrintXY (\r | |
185 | IN UINTN X,\r | |
186 | IN UINTN Y,\r | |
187 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OPTIONAL\r | |
188 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, OPTIONAL\r | |
189 | IN CHAR16 *Fmt,\r | |
190 | ...\r | |
191 | );\r | |
192 | \r | |
193 | \r | |
194 | #endif\r |