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