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