]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/GraphicsLib.h
UEFI HII: Merge UEFI HII support changes from branch.
[mirror_edk2.git] / MdePkg / Include / Library / GraphicsLib.h
CommitLineData
bf231ea6
A
1/** @file\r
2 Graphics Library\r
00c4901b 3\r
bf231ea6
A
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
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 38EFI_STATUS\r
39GetGraphicsBitMapFromFV (\r
40 IN EFI_GUID *FileNameGuid,\r
41 OUT VOID **Image,\r
42 OUT UINTN *ImageSize\r
bf231ea6 43 );\r
00c4901b 44\r
7d582d6b 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
65EFI_STATUS\r
66GetGraphicsBitMapFromFVEx (\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
00c4901b 72\r
bf231ea6
A
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
7d582d6b 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
bf231ea6
A
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
7d582d6b 88 UgaBltSize will contain the required size.\r
bf231ea6 89**/\r
00c4901b 90EFI_STATUS\r
91ConvertBmpToUgaBlt (\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
bf231ea6 98 );\r
00c4901b 99\r
00c4901b 100\r
bf231ea6
A
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
7d582d6b 104\r
105 @param[in] LogoFile File name of logo to display on the center of the screen.\r
106\r
bf231ea6
A
107 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r
108 @retval EFI_UNSUPPORTED Logo not found\r
00c4901b 109\r
bf231ea6 110**/\r
00c4901b 111EFI_STATUS\r
112EnableQuietBoot (\r
113 IN EFI_GUID *LogoFile\r
bf231ea6 114 );\r
00c4901b 115\r
7d582d6b 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
129EFI_STATUS\r
130EnableQuietBootEx (\r
131 IN EFI_GUID *LogoFile,\r
132 IN EFI_HANDLE ImageHandle\r
133 );\r
134\r
00c4901b 135\r
bf231ea6
A
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
7d582d6b 139\r
bf231ea6 140 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r
00c4901b 141\r
bf231ea6 142**/\r
00c4901b 143EFI_STATUS\r
144DisableQuietBoot (\r
145 VOID\r
bf231ea6 146 );\r
00c4901b 147\r
00c4901b 148\r
bf231ea6 149/**\r
00c4901b 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
7d582d6b 154\r
155 @param[in] Password Password used to lock ConIn device.\r
156\r
bf231ea6
A
157 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo\r
158 displayed.\r
159 @retval EFI_UNSUPPORTED Password not found\r
00c4901b 160\r
bf231ea6
A
161**/\r
162EFI_STATUS\r
163LockKeyboards (\r
164 IN CHAR16 *Password\r
165 );\r
166\r
167\r
168/**\r
7d582d6b 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
bf231ea6
A
179 @retval UINTN Number of Characters printed\r
180\r
181**/\r
00c4901b 182UINTN\r
183EFIAPI\r
184PrintXY (\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
bf231ea6 191 );\r
00c4901b 192\r
193\r
194#endif\r