]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/GraphicsLib.h
da7786da027dc1ab72e41bf02d06cc7e0b41ec5d
[mirror_edk2.git] / MdePkg / Include / Library / GraphicsLib.h
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 GraphicsLib.h
15
16 Abstract:
17
18
19 --*/
20
21 #ifndef __EFI_GRAPHICS_LIB_H__
22 #define __EFI_GRAPHICS_LIB_H__
23
24 #include <Protocol/GraphicsOutput.h>
25
26 EFI_STATUS
27 GetGraphicsBitMapFromFV (
28 IN EFI_GUID *FileNameGuid,
29 OUT VOID **Image,
30 OUT UINTN *ImageSize
31 )
32 /*++
33
34 Routine Description:
35
36 Return the graphics image file named FileNameGuid into Image and return it's
37 size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
38 file name.
39
40 Arguments:
41
42 FileNameGuid - File Name of graphics file in the FV(s).
43
44 Image - Pointer to pointer to return graphics image. If NULL, a
45 buffer will be allocated.
46
47 ImageSize - Size of the graphics Image in bytes. Zero if no image found.
48
49
50 Returns:
51
52 EFI_SUCCESS - Image and ImageSize are valid.
53 EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
54 EFI_NOT_FOUND - FileNameGuid not found
55
56 --*/
57 ;
58
59 EFI_STATUS
60 ConvertBmpToUgaBlt (
61 IN VOID *BmpImage,
62 IN UINTN BmpImageSize,
63 IN OUT VOID **UgaBlt,
64 IN OUT UINTN *UgaBltSize,
65 OUT UINTN *PixelHeight,
66 OUT UINTN *PixelWidth
67 )
68 /*++
69
70 Routine Description:
71
72 Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer
73 is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt
74 buffer is passed in it will be used if it is big enough.
75
76 Arguments:
77
78 BmpImage - Pointer to BMP file
79
80 BmpImageSize - Number of bytes in BmpImage
81
82 UgaBlt - Buffer containing UGA version of BmpImage.
83
84 UgaBltSize - Size of UgaBlt in bytes.
85
86 PixelHeight - Height of UgaBlt/BmpImage in pixels
87
88 PixelWidth - Width of UgaBlt/BmpImage in pixels
89
90
91 Returns:
92
93 EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
94 EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
95 EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
96 UgaBltSize will contain the required size.
97
98 --*/
99 ;
100
101 EFI_STATUS
102 EnableQuietBoot (
103 IN EFI_GUID *LogoFile
104 )
105 /*++
106
107 Routine Description:
108
109 Use Console Control to turn off UGA based Simple Text Out consoles from going
110 to the UGA device. Put up LogoFile on every UGA device that is a console
111
112 Arguments:
113
114 LogoFile - File name of logo to display on the center of the screen.
115
116
117 Returns:
118
119 EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
120 displayed.
121 EFI_UNSUPPORTED - Logo not found
122
123 --*/
124 ;
125
126 EFI_STATUS
127 DisableQuietBoot (
128 VOID
129 )
130 /*++
131
132 Routine Description:
133
134 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
135 Simple Text Out screens will now be synced up with all non UGA output devices
136
137 Arguments:
138
139 NONE
140
141 Returns:
142
143 EFI_SUCCESS - UGA devices are back in text mode and synced up.
144 EFI_UNSUPPORTED - Logo not found
145
146 --*/
147 ;
148
149 EFI_STATUS
150 LockKeyboards (
151 IN CHAR16 *Password
152 )
153 /*++
154
155 Routine Description:
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 Arguments:
162 Password - Password used to lock ConIn device
163
164
165 Returns:
166
167 EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
168 displayed.
169 EFI_UNSUPPORTED - Logo not found
170
171 --*/
172 ;
173
174 UINTN
175 EFIAPI
176 PrintXY (
177 IN UINTN X,
178 IN UINTN Y,
179 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OPTIONAL
180 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, OPTIONAL
181 IN CHAR16 *Fmt,
182 ...
183 )
184 ;
185
186
187 #endif