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