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