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