]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Library/GraphicsLib.h
Detab
[mirror_edk2.git] / MdePkg / Include / Library / GraphicsLib.h
CommitLineData
bf231ea6 1/** @file\r
8517ee51 2 Library supports displaying graphical splash screen,\r
91496a54 3 locking of keyboard input and printing character on\r
4 screen.\r
00c4901b 5\r
2f50ef83 6 Copyright (c) 2006 - 2008, Intel Corporation.<BR>\r
bf231ea6
A
7 All rights reserved. This program and the accompanying materials \r
8 are licensed and made available under the terms and conditions of the BSD License \r
9 which accompanies this distribution. The full text of the license may be found at \r
10 http://opensource.org/licenses/bsd-license.php \r
00c4901b 11\r
bf231ea6
A
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
14\r
15**/\r
00c4901b 16\r
7540e754
A
17#ifndef __EFI_GRAPHICS_LIB_H__\r
18#define __EFI_GRAPHICS_LIB_H__\r
19\r
20#include <Protocol/GraphicsOutput.h>\r
00c4901b 21\r
bf231ea6
A
22\r
23/**\r
24 Return the graphics image file named FileNameGuid into Image and return it's\r
25 size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r
26 file name.\r
7d582d6b 27\r
28 @param[in] FileNameGuid File Name of graphics file in the FV(s).\r
bf231ea6 29 @param[out] Image Pointer to pointer to return graphics image. If NULL, a \r
7d582d6b 30 buffer will be allocated.\r
bf231ea6 31 @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.\r
7d582d6b 32\r
8517ee51 33 @retval EFI_SUCCESS The image is found and data and size is returned.\r
34 @retval EFI_UNSUPPORTED FvHandle does not support EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
35 @retval EFI_NOT_FOUND The image specified by NameGuid and SectionType can't be found.\r
36 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the output data buffer or complete the operations.\r
ee6c452c 37 @retval EFI_DEVICE_ERROR A hardware error occurs during reading from the Firmware Volume.\r
8517ee51 38 @retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads.\r
7d582d6b 39\r
bf231ea6 40**/\r
00c4901b 41EFI_STATUS\r
2f50ef83 42EFIAPI\r
00c4901b 43GetGraphicsBitMapFromFV (\r
44 IN EFI_GUID *FileNameGuid,\r
45 OUT VOID **Image,\r
46 OUT UINTN *ImageSize\r
bf231ea6 47 );\r
00c4901b 48\r
7d582d6b 49/**\r
50 Return the graphics image file named FileNameGuid into Image and return it's\r
51 size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r
52 file name.\r
53\r
54 @param[in] ImageHandle The driver image handle of the caller. The parameter is used to\r
55 optimize the loading of the image file so that the FV from which\r
56 the driver image is loaded will be tried first. \r
57 @param[in] FileNameGuid File Name of graphics file in the FV(s).\r
58 @param[out] Image Pointer to pointer to return graphics image. If NULL, a \r
59 buffer will be allocated.\r
60 @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.\r
61\r
8517ee51 62 @retval EFI_SUCCESS The image is found and data and size is returned.\r
63 @retval EFI_UNSUPPORTED FvHandle does not support EFI_FIRMWARE_VOLUME2_PROTOCOL.\r
64 @retval EFI_NOT_FOUND The image specified by NameGuid and SectionType can't be found.\r
65 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate the output data buffer or complete the operations.\r
ee6c452c 66 @retval EFI_DEVICE_ERROR A hardware error occurs during reading from the Firmware Volume.\r
8517ee51 67 @retval EFI_ACCESS_DENIED The firmware volume containing the searched Firmware File is configured to disallow reads.\r
7d582d6b 68\r
69**/\r
70EFI_STATUS\r
2f50ef83 71EFIAPI\r
7d582d6b 72GetGraphicsBitMapFromFVEx (\r
73 IN EFI_HANDLE ImageHandle,\r
74 IN EFI_GUID *FileNameGuid,\r
75 OUT VOID **Image,\r
76 OUT UINTN *ImageSize\r
77 );\r
00c4901b 78\r
00c4901b 79\r
bf231ea6
A
80/**\r
81 Use Console Control to turn off UGA based Simple Text Out consoles from going\r
82 to the UGA device. Put up LogoFile on every UGA device that is a console\r
7d582d6b 83\r
84 @param[in] LogoFile File name of logo to display on the center of the screen.\r
85\r
bf231ea6
A
86 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r
87 @retval EFI_UNSUPPORTED Logo not found\r
00c4901b 88\r
bf231ea6 89**/\r
00c4901b 90EFI_STATUS\r
2f50ef83 91EFIAPI\r
00c4901b 92EnableQuietBoot (\r
93 IN EFI_GUID *LogoFile\r
bf231ea6 94 );\r
00c4901b 95\r
7d582d6b 96/**\r
97 Use Console Control to turn off GOP/UGA based Simple Text Out consoles from going\r
98 to the UGA device. Put up LogoFile on every UGA device that is a console\r
99\r
100 @param LogoFile File name of logo to display on the center of the screen.\r
101 @param ImageHandle The driver image handle of the caller. The parameter is used to\r
102 optimize the loading of the logo file so that the FV from which\r
103 the driver image is loaded will be tried first.\r
104\r
105 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r
106 @retval EFI_UNSUPPORTED Logo not found\r
107\r
108**/\r
109EFI_STATUS\r
2f50ef83 110EFIAPI\r
7d582d6b 111EnableQuietBootEx (\r
112 IN EFI_GUID *LogoFile,\r
113 IN EFI_HANDLE ImageHandle\r
114 );\r
115\r
00c4901b 116\r
bf231ea6
A
117/**\r
118 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r
119 Simple Text Out screens will now be synced up with all non UGA output devices\r
7d582d6b 120\r
bf231ea6 121 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r
00c4901b 122\r
bf231ea6 123**/\r
00c4901b 124EFI_STATUS\r
2f50ef83 125EFIAPI\r
00c4901b 126DisableQuietBoot (\r
127 VOID\r
bf231ea6 128 );\r
00c4901b 129\r
00c4901b 130\r
bf231ea6 131/**\r
00c4901b 132 Use Console Control Protocol to lock the Console In Spliter virtual handle. \r
133 This is the ConInHandle and ConIn handle in the EFI system table. All key\r
134 presses will be ignored until the Password is typed in. The only way to\r
135 disable the password is to type it in to a ConIn device.\r
7d582d6b 136\r
137 @param[in] Password Password used to lock ConIn device.\r
138\r
8517ee51 139 @retval EFI_SUCCESS lock the Console In Spliter virtual handle successfully.\r
bf231ea6 140 @retval EFI_UNSUPPORTED Password not found\r
00c4901b 141\r
bf231ea6
A
142**/\r
143EFI_STATUS\r
2f50ef83 144EFIAPI\r
bf231ea6
A
145LockKeyboards (\r
146 IN CHAR16 *Password\r
147 );\r
148\r
149\r
150/**\r
8517ee51 151 Print Unicode string to graphics screen at the given X,Y coordinates of the graphics screen.\r
7d582d6b 152 see definition of Print to find rules for constructing Fmt.\r
153\r
154 @param[in] X Row to start printing at\r
155 @param[in] Y Column to start printing at\r
2f50ef83 156 @param[in] ForeGround Foreground color\r
65e3009c 157 @param[in] BackGround background color\r
7d582d6b 158 @param[in] Fmt Print format sting. See definition of Print\r
285010e7 159 @param ... Variable argument list whose contents are accessed based on \r
160 the format string specified by Format.\r
7d582d6b 161\r
7d9333a9 162 @return Number of Characters printed.\r
bf231ea6
A
163\r
164**/\r
00c4901b 165UINTN\r
166EFIAPI\r
167PrintXY (\r
168 IN UINTN X,\r
169 IN UINTN Y,\r
2f50ef83 170 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround, OPTIONAL\r
65e3009c 171 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround, OPTIONAL\r
00c4901b 172 IN CHAR16 *Fmt,\r
173 ...\r
bf231ea6 174 );\r
00c4901b 175\r
176\r
177#endif\r