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