]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Library/GraphicsLib.h
UEFI HII: Merge UEFI HII support changes from branch.
[mirror_edk2.git] / MdePkg / Include / Library / GraphicsLib.h
... / ...
CommitLineData
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
26 @param[in] FileNameGuid File Name of graphics file in the FV(s).
27 @param[out] Image Pointer to pointer to return graphics image. If NULL, a \r
28 buffer will be allocated.
29 @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.\r
30
31 @retval EFI_INVALID_PARAMETER invalid parameter
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
37**/\r
38EFI_STATUS\r
39GetGraphicsBitMapFromFV (\r
40 IN EFI_GUID *FileNameGuid,\r
41 OUT VOID **Image,\r
42 OUT UINTN *ImageSize\r
43 );\r
44\r
45\r
46/**\r
47 Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer\r
48 is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt\r
49 buffer is passed in it will be used if it is big enough.\r
50
51 @param[in] BmpImage Pointer to BMP file
52 @param[in] BmpImageSize Number of bytes in BmpImage
53 @param[in,out] UgaBlt Buffer containing UGA version of BmpImage.
54 @param[in,out] UgaBltSize Size of UgaBlt in bytes.
55 @param[out] PixelHeight Height of UgaBlt/BmpImage in pixels
56 @param[out] PixelWidth Width of UgaBlt/BmpImage in pixels
57
58 @retval EFI_SUCCESS UgaBlt and UgaBltSize are returned. \r
59 @retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image\r
60 @retval EFI_BUFFER_TOO_SMALL The passed in UgaBlt buffer is not big enough.\r
61 UgaBltSize will contain the required size.
62**/\r
63EFI_STATUS\r
64ConvertBmpToUgaBlt (\r
65 IN VOID *BmpImage,\r
66 IN UINTN BmpImageSize,\r
67 IN OUT VOID **UgaBlt,\r
68 IN OUT UINTN *UgaBltSize,\r
69 OUT UINTN *PixelHeight,\r
70 OUT UINTN *PixelWidth\r
71 );\r
72\r
73\r
74/**\r
75 Use Console Control to turn off UGA based Simple Text Out consoles from going\r
76 to the UGA device. Put up LogoFile on every UGA device that is a console\r
77
78 @param[in] LogoFile File name of logo to display on the center of the screen.
79
80 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r
81 @retval EFI_UNSUPPORTED Logo not found\r
82\r
83**/\r
84EFI_STATUS\r
85EnableQuietBoot (\r
86 IN EFI_GUID *LogoFile\r
87 );\r
88\r
89\r
90/**\r
91 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r
92 Simple Text Out screens will now be synced up with all non UGA output devices\r
93
94 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r
95\r
96**/\r
97EFI_STATUS\r
98DisableQuietBoot (\r
99 VOID\r
100 );\r
101\r
102\r
103/**\r
104 Use Console Control Protocol to lock the Console In Spliter virtual handle. \r
105 This is the ConInHandle and ConIn handle in the EFI system table. All key\r
106 presses will be ignored until the Password is typed in. The only way to\r
107 disable the password is to type it in to a ConIn device.\r
108
109 @param[in] Password Password used to lock ConIn device.
110
111 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo\r
112 displayed.\r
113 @retval EFI_UNSUPPORTED Password not found\r
114\r
115**/\r
116EFI_STATUS\r
117LockKeyboards (\r
118 IN CHAR16 *Password\r
119 );\r
120\r
121\r
122/**\r
123 Print to graphics screen at the given X,Y coordinates of the graphics screen.
124 see definition of Print to find rules for constructing Fmt.
125
126 @param[in] X Row to start printing at
127 @param[in] Y Column to start printing at
128 @param[in] Foreground Foreground color
129 @param[in] Background background color
130 @param[in] Fmt Print format sting. See definition of Print
131 @param[in] ... Argumnet stream defined by Fmt string
132
133 @retval UINTN Number of Characters printed\r
134\r
135**/\r
136UINTN\r
137EFIAPI\r
138PrintXY (\r
139 IN UINTN X,\r
140 IN UINTN Y,\r
141 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OPTIONAL\r
142 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, OPTIONAL\r
143 IN CHAR16 *Fmt,\r
144 ...\r
145 );\r
146\r
147\r
148#endif\r