]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/GraphicsLib.h
915c306ee15d3c87f35164da606870eeababee2c
[mirror_edk2.git] / MdePkg / Include / Library / GraphicsLib.h
1 /** @file
2 Library supports diplaying 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_INVALID_PARAMETER invalid parameter
34 @retval EFI_UNSUPPORTED Range can not be erased
35 @retval EFI_SUCCESS Image and ImageSize are valid.
36 @retval EFI_BUFFER_TOO_SMALL Image not big enough. ImageSize has required size
37 @retval EFI_NOT_FOUND FileNameGuid not found
38
39 **/
40 EFI_STATUS
41 EFIAPI
42 GetGraphicsBitMapFromFV (
43 IN EFI_GUID *FileNameGuid,
44 OUT VOID **Image,
45 OUT UINTN *ImageSize
46 );
47
48 /**
49 Return the graphics image file named FileNameGuid into Image and return it's
50 size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
51 file name.
52
53 @param[in] ImageHandle The driver image handle of the caller. The parameter is used to
54 optimize the loading of the image file so that the FV from which
55 the driver image is loaded will be tried first.
56 @param[in] FileNameGuid File Name of graphics file in the FV(s).
57 @param[out] Image Pointer to pointer to return graphics image. If NULL, a
58 buffer will be allocated.
59 @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.
60
61 @retval EFI_INVALID_PARAMETER invalid parameter
62 @retval EFI_UNSUPPORTED Range can not be erased
63 @retval EFI_SUCCESS Image and ImageSize are valid.
64 @retval EFI_BUFFER_TOO_SMALL Image not big enough. ImageSize has required size
65 @retval EFI_NOT_FOUND FileNameGuid not found
66
67 **/
68 EFI_STATUS
69 EFIAPI
70 GetGraphicsBitMapFromFVEx (
71 IN EFI_HANDLE ImageHandle,
72 IN EFI_GUID *FileNameGuid,
73 OUT VOID **Image,
74 OUT UINTN *ImageSize
75 );
76
77
78 /**
79 Use Console Control to turn off UGA based Simple Text Out consoles from going
80 to the UGA device. Put up LogoFile on every UGA device that is a console
81
82 @param[in] LogoFile File name of logo to display on the center of the screen.
83
84 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
85 @retval EFI_UNSUPPORTED Logo not found
86
87 **/
88 EFI_STATUS
89 EFIAPI
90 EnableQuietBoot (
91 IN EFI_GUID *LogoFile
92 );
93
94 /**
95 Use Console Control to turn off GOP/UGA based Simple Text Out consoles from going
96 to the UGA device. Put up LogoFile on every UGA device that is a console
97
98 @param LogoFile File name of logo to display on the center of the screen.
99 @param ImageHandle The driver image handle of the caller. The parameter is used to
100 optimize the loading of the logo file so that the FV from which
101 the driver image is loaded will be tried first.
102
103 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
104 @retval EFI_UNSUPPORTED Logo not found
105
106 **/
107 EFI_STATUS
108 EFIAPI
109 EnableQuietBootEx (
110 IN EFI_GUID *LogoFile,
111 IN EFI_HANDLE ImageHandle
112 );
113
114
115 /**
116 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
117 Simple Text Out screens will now be synced up with all non UGA output devices
118
119 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
120
121 **/
122 EFI_STATUS
123 EFIAPI
124 DisableQuietBoot (
125 VOID
126 );
127
128
129 /**
130 Use Console Control Protocol to lock the Console In Spliter virtual handle.
131 This is the ConInHandle and ConIn handle in the EFI system table. All key
132 presses will be ignored until the Password is typed in. The only way to
133 disable the password is to type it in to a ConIn device.
134
135 @param[in] Password Password used to lock ConIn device.
136
137 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo
138 displayed.
139 @retval EFI_UNSUPPORTED Password not found
140
141 **/
142 EFI_STATUS
143 EFIAPI
144 LockKeyboards (
145 IN CHAR16 *Password
146 );
147
148
149 /**
150 Print to graphics screen at the given X,Y coordinates of the graphics screen.
151 see definition of Print to find rules for constructing Fmt.
152
153 @param[in] X Row to start printing at
154 @param[in] Y Column to start printing at
155 @param[in] ForeGround Foreground color
156 @param[in] BackGround background color
157 @param[in] Fmt Print format sting. See definition of Print
158 @param[in] ... Argumnet stream defined by Fmt string
159
160 @return Number of Characters printed.
161
162 **/
163 UINTN
164 EFIAPI
165 PrintXY (
166 IN UINTN X,
167 IN UINTN Y,
168 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *ForeGround, OPTIONAL
169 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BackGround, OPTIONAL
170 IN CHAR16 *Fmt,
171 ...
172 );
173
174
175 #endif