]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | /*++\r |
2 | \r | |
4ea9375a HT |
3 | Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>\r |
4 | This program and the accompanying materials \r | |
3eb9473e | 5 | are licensed and made available under the terms and conditions of the BSD License \r |
6 | which accompanies this distribution. The full text of the license may be found at \r | |
7 | http://opensource.org/licenses/bsd-license.php \r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
11 | \r | |
12 | Module Name:\r | |
13 | \r | |
14 | GraphicsLib.h\r | |
15 | \r | |
16 | Abstract:\r | |
17 | \r | |
18 | \r | |
19 | --*/\r | |
20 | \r | |
21 | #ifndef _EFI_GRAPHICS_LIB_H_\r | |
22 | #define _EFI_GRAPHICS_LIB_H_\r | |
23 | \r | |
24 | #include EFI_PROTOCOL_DEFINITION (ConsoleControl)\r | |
25 | #include EFI_PROTOCOL_DEFINITION (FirmwareVolume)\r | |
26 | #include EFI_PROTOCOL_DEFINITION (FirmwareVolume2)\r | |
27 | #include EFI_PROTOCOL_DEFINITION (GraphicsOutput)\r | |
28 | #include EFI_PROTOCOL_DEFINITION (UgaDraw)\r | |
0dbeedde | 29 | #include EFI_PROTOCOL_DEFINITION (EfiOemBadging)\r |
3eb9473e | 30 | \r |
31 | #include EFI_GUID_DEFINITION (Bmp)\r | |
32 | \r | |
33 | EFI_STATUS\r | |
34 | GetGraphicsBitMapFromFV (\r | |
35 | IN EFI_GUID *FileNameGuid,\r | |
36 | OUT VOID **Image,\r | |
37 | OUT UINTN *ImageSize\r | |
38 | )\r | |
39 | /*++\r | |
40 | \r | |
41 | Routine Description:\r | |
42 | \r | |
43 | Return the graphics image file named FileNameGuid into Image and return it's\r | |
44 | size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r | |
45 | file name.\r | |
46 | \r | |
47 | Arguments:\r | |
48 | \r | |
49 | FileNameGuid - File Name of graphics file in the FV(s).\r | |
50 | \r | |
51 | Image - Pointer to pointer to return graphics image. If NULL, a \r | |
52 | buffer will be allocated.\r | |
53 | \r | |
54 | ImageSize - Size of the graphics Image in bytes. Zero if no image found.\r | |
55 | \r | |
56 | \r | |
57 | Returns: \r | |
58 | \r | |
59 | EFI_SUCCESS - Image and ImageSize are valid. \r | |
60 | EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size\r | |
61 | EFI_NOT_FOUND - FileNameGuid not found\r | |
62 | \r | |
63 | --*/\r | |
64 | ;\r | |
65 | \r | |
66 | EFI_STATUS\r | |
67 | GetGraphicsBitMapFromFVEx (\r | |
68 | IN EFI_HANDLE ImageHandle,\r | |
69 | IN EFI_GUID *FileNameGuid,\r | |
70 | OUT VOID **Image,\r | |
71 | OUT UINTN *ImageSize\r | |
72 | )\r | |
73 | /*++\r | |
74 | \r | |
75 | Routine Description:\r | |
76 | \r | |
77 | Return the graphics image file named FileNameGuid into Image and return it's\r | |
78 | size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r | |
79 | file name.\r | |
80 | \r | |
81 | Arguments:\r | |
82 | \r | |
83 | ImageHandle - The driver image handle of the caller. The parameter is used to\r | |
84 | optimize the loading of the image file so that the FV from which\r | |
85 | the driver image is loaded will be tried first. \r | |
86 | \r | |
87 | FileNameGuid - File Name of graphics file in the FV(s).\r | |
88 | \r | |
89 | Image - Pointer to pointer to return graphics image. If NULL, a \r | |
90 | buffer will be allocated.\r | |
91 | \r | |
92 | ImageSize - Size of the graphics Image in bytes. Zero if no image found.\r | |
93 | \r | |
94 | \r | |
95 | Returns: \r | |
96 | \r | |
97 | EFI_SUCCESS - Image and ImageSize are valid. \r | |
98 | EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size\r | |
99 | EFI_NOT_FOUND - FileNameGuid not found\r | |
100 | \r | |
101 | --*/\r | |
102 | ;\r | |
103 | \r | |
104 | \r | |
105 | EFI_STATUS\r | |
106 | ConvertBmpToGopBlt (\r | |
107 | IN VOID *BmpImage,\r | |
108 | IN UINTN BmpImageSize,\r | |
109 | IN OUT VOID **GopBlt,\r | |
110 | IN OUT UINTN *GopBltSize,\r | |
111 | OUT UINTN *PixelHeight,\r | |
112 | OUT UINTN *PixelWidth\r | |
113 | )\r | |
114 | /*++\r | |
115 | \r | |
116 | Routine Description:\r | |
117 | \r | |
118 | Convert a *.BMP graphics image to a GOP/UGA blt buffer. If a NULL Blt buffer\r | |
119 | is passed in a GopBlt buffer will be allocated by this routine. If a GopBlt\r | |
120 | buffer is passed in it will be used if it is big enough.\r | |
121 | \r | |
122 | Arguments:\r | |
123 | \r | |
124 | BmpImage - Pointer to BMP file\r | |
125 | \r | |
126 | BmpImageSize - Number of bytes in BmpImage\r | |
127 | \r | |
128 | GopBlt - Buffer containing GOP version of BmpImage.\r | |
129 | \r | |
130 | GopBltSize - Size of GopBlt in bytes.\r | |
131 | \r | |
132 | PixelHeight - Height of GopBlt/BmpImage in pixels\r | |
133 | \r | |
134 | PixelWidth - Width of GopBlt/BmpImage in pixels\r | |
135 | \r | |
136 | \r | |
137 | Returns: \r | |
138 | \r | |
139 | EFI_SUCCESS - GopBlt and GopBltSize are returned. \r | |
140 | EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image\r | |
141 | EFI_BUFFER_TOO_SMALL - The passed in GopBlt buffer is not big enough.\r | |
142 | GopBltSize will contain the required size.\r | |
143 | EFI_OUT_OF_RESOURCES - No enough buffer to allocate\r | |
144 | \r | |
145 | --*/\r | |
146 | ;\r | |
147 | \r | |
148 | EFI_STATUS\r | |
149 | EnableQuietBoot (\r | |
150 | IN EFI_GUID *LogoFile\r | |
151 | )\r | |
152 | /*++\r | |
153 | \r | |
154 | Routine Description:\r | |
155 | \r | |
156 | Use Console Control to turn off UGA based Simple Text Out consoles from going\r | |
157 | to the UGA device. Put up LogoFile on every UGA device that is a console\r | |
158 | \r | |
159 | Arguments:\r | |
160 | \r | |
161 | LogoFile - File name of logo to display on the center of the screen.\r | |
162 | \r | |
163 | \r | |
164 | Returns: \r | |
165 | \r | |
166 | EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo\r | |
167 | displayed.\r | |
168 | EFI_UNSUPPORTED - Logo not found\r | |
169 | \r | |
170 | --*/\r | |
171 | ;\r | |
172 | \r | |
173 | EFI_STATUS\r | |
174 | EnableQuietBootEx (\r | |
175 | IN EFI_GUID *LogoFile,\r | |
176 | IN EFI_HANDLE ImageHandle\r | |
177 | )\r | |
178 | /*++\r | |
179 | \r | |
180 | Routine Description:\r | |
181 | \r | |
182 | Use Console Control to turn off UGA based Simple Text Out consoles from going\r | |
183 | to the UGA device. Put up LogoFile on every UGA device that is a console\r | |
184 | \r | |
185 | Arguments:\r | |
186 | \r | |
187 | LogoFile - File name of logo to display on the center of the screen.\r | |
188 | ImageHandle - The driver image handle of the caller. The parameter is used to\r | |
189 | optimize the loading of the logo file so that the FV from which\r | |
190 | the driver image is loaded will be tried first.\r | |
191 | \r | |
192 | \r | |
193 | Returns: \r | |
194 | \r | |
195 | EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo\r | |
196 | displayed.\r | |
197 | EFI_UNSUPPORTED - Logo not found\r | |
198 | \r | |
199 | --*/\r | |
200 | ;\r | |
201 | \r | |
202 | EFI_STATUS\r | |
203 | DisableQuietBoot (\r | |
204 | VOID\r | |
205 | )\r | |
206 | /*++\r | |
207 | \r | |
208 | Routine Description:\r | |
209 | \r | |
210 | Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r | |
211 | Simple Text Out screens will now be synced up with all non UGA output devices\r | |
212 | \r | |
213 | Arguments:\r | |
214 | \r | |
215 | NONE\r | |
216 | \r | |
217 | Returns: \r | |
218 | \r | |
219 | EFI_SUCCESS - UGA devices are back in text mode and synced up.\r | |
220 | EFI_UNSUPPORTED - Logo not found\r | |
221 | \r | |
222 | --*/\r | |
223 | ;\r | |
224 | \r | |
225 | EFI_STATUS\r | |
226 | LockKeyboards (\r | |
227 | IN CHAR16 *Password\r | |
228 | )\r | |
229 | /*++\r | |
230 | \r | |
231 | Routine Description:\r | |
232 | Use Console Control Protocol to lock the Console In Spliter virtual handle. \r | |
233 | This is the ConInHandle and ConIn handle in the EFI system table. All key\r | |
234 | presses will be ignored until the Password is typed in. The only way to\r | |
235 | disable the password is to type it in to a ConIn device.\r | |
236 | \r | |
237 | Arguments:\r | |
238 | Password - Password used to lock ConIn device\r | |
239 | \r | |
240 | \r | |
241 | Returns: \r | |
242 | \r | |
243 | EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo\r | |
244 | displayed.\r | |
245 | EFI_UNSUPPORTED - Logo not found\r | |
246 | \r | |
247 | --*/\r | |
248 | ;\r | |
249 | \r | |
250 | #endif\r |