]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/GraphicsLib.h
b1b9898c1477916b0615876c9e3ce37d1682a02c
[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
13 --*/
14
15 #ifndef __EFI_GRAPHICS_LIB_H__
16 #define __EFI_GRAPHICS_LIB_H__
17
18 #include <Protocol/GraphicsOutput.h>
19
20 EFI_STATUS
21 GetGraphicsBitMapFromFV (
22 IN EFI_GUID *FileNameGuid,
23 OUT VOID **Image,
24 OUT UINTN *ImageSize
25 )
26 /*++
27
28 Routine Description:
29
30 Return the graphics image file named FileNameGuid into Image and return it's
31 size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
32 file name.
33
34 Arguments:
35
36 FileNameGuid - File Name of graphics file in the FV(s).
37
38 Image - Pointer to pointer to return graphics image. If NULL, a
39 buffer will be allocated.
40
41 ImageSize - Size of the graphics Image in bytes. Zero if no image found.
42
43
44 Returns:
45
46 EFI_SUCCESS - Image and ImageSize are valid.
47 EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size
48 EFI_NOT_FOUND - FileNameGuid not found
49
50 --*/
51 ;
52
53 EFI_STATUS
54 ConvertBmpToUgaBlt (
55 IN VOID *BmpImage,
56 IN UINTN BmpImageSize,
57 IN OUT VOID **UgaBlt,
58 IN OUT UINTN *UgaBltSize,
59 OUT UINTN *PixelHeight,
60 OUT UINTN *PixelWidth
61 )
62 /*++
63
64 Routine Description:
65
66 Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer
67 is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt
68 buffer is passed in it will be used if it is big enough.
69
70 Arguments:
71
72 BmpImage - Pointer to BMP file
73
74 BmpImageSize - Number of bytes in BmpImage
75
76 UgaBlt - Buffer containing UGA version of BmpImage.
77
78 UgaBltSize - Size of UgaBlt in bytes.
79
80 PixelHeight - Height of UgaBlt/BmpImage in pixels
81
82 PixelWidth - Width of UgaBlt/BmpImage in pixels
83
84
85 Returns:
86
87 EFI_SUCCESS - UgaBlt and UgaBltSize are returned.
88 EFI_UNSUPPORTED - BmpImage is not a valid *.BMP image
89 EFI_BUFFER_TOO_SMALL - The passed in UgaBlt buffer is not big enough.
90 UgaBltSize will contain the required size.
91
92 --*/
93 ;
94
95 EFI_STATUS
96 EnableQuietBoot (
97 IN EFI_GUID *LogoFile
98 )
99 /*++
100
101 Routine Description:
102
103 Use Console Control to turn off UGA based Simple Text Out consoles from going
104 to the UGA device. Put up LogoFile on every UGA device that is a console
105
106 Arguments:
107
108 LogoFile - File name of logo to display on the center of the screen.
109
110
111 Returns:
112
113 EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
114 displayed.
115 EFI_UNSUPPORTED - Logo not found
116
117 --*/
118 ;
119
120 EFI_STATUS
121 DisableQuietBoot (
122 VOID
123 )
124 /*++
125
126 Routine Description:
127
128 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
129 Simple Text Out screens will now be synced up with all non UGA output devices
130
131 Arguments:
132
133 NONE
134
135 Returns:
136
137 EFI_SUCCESS - UGA devices are back in text mode and synced up.
138 EFI_UNSUPPORTED - Logo not found
139
140 --*/
141 ;
142
143 EFI_STATUS
144 LockKeyboards (
145 IN CHAR16 *Password
146 )
147 /*++
148
149 Routine Description:
150 Use Console Control Protocol to lock the Console In Spliter virtual handle.
151 This is the ConInHandle and ConIn handle in the EFI system table. All key
152 presses will be ignored until the Password is typed in. The only way to
153 disable the password is to type it in to a ConIn device.
154
155 Arguments:
156 Password - Password used to lock ConIn device
157
158
159 Returns:
160
161 EFI_SUCCESS - ConsoleControl has been flipped to graphics and logo
162 displayed.
163 EFI_UNSUPPORTED - Logo not found
164
165 --*/
166 ;
167
168 UINTN
169 EFIAPI
170 PrintXY (
171 IN UINTN X,
172 IN UINTN Y,
173 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OPTIONAL
174 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, OPTIONAL
175 IN CHAR16 *Fmt,
176 ...
177 )
178 ;
179
180
181 #endif