]>
Commit | Line | Data |
---|---|---|
bf231ea6 A |
1 | /** @file\r |
2 | Graphics Library\r | |
00c4901b | 3 | \r |
bf231ea6 A |
4 | Copyright (c) 2006 - 2007, Intel Corporation.<BR>\r |
5 | All rights reserved. This program and the accompanying materials \r | |
6 | are licensed and made available under the terms and conditions of the BSD License \r | |
7 | which accompanies this distribution. The full text of the license may be found at \r | |
8 | http://opensource.org/licenses/bsd-license.php \r | |
00c4901b | 9 | \r |
bf231ea6 A |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | \r | |
13 | **/\r | |
00c4901b | 14 | \r |
7540e754 A |
15 | #ifndef __EFI_GRAPHICS_LIB_H__\r |
16 | #define __EFI_GRAPHICS_LIB_H__\r | |
17 | \r | |
18 | #include <Protocol/GraphicsOutput.h>\r | |
00c4901b | 19 | \r |
bf231ea6 A |
20 | \r |
21 | /**\r | |
22 | Return the graphics image file named FileNameGuid into Image and return it's\r | |
23 | size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r | |
24 | file name.\r | |
25 | ||
26 | @param[in] FileNameGuid File Name of graphics file in the FV(s). | |
27 | @param[out] Image Pointer to pointer to return graphics image. If NULL, a \r | |
28 | buffer will be allocated. | |
29 | @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.\r | |
30 | ||
31 | @retval EFI_INVALID_PARAMETER invalid parameter | |
32 | @retval EFI_UNSUPPORTED Range can not be erased\r | |
33 | @retval EFI_SUCCESS Image and ImageSize are valid. \r | |
34 | @retval EFI_BUFFER_TOO_SMALL Image not big enough. ImageSize has required size\r | |
35 | @retval EFI_NOT_FOUND FileNameGuid not found\r | |
36 | ||
37 | **/\r | |
00c4901b | 38 | EFI_STATUS\r |
39 | GetGraphicsBitMapFromFV (\r | |
40 | IN EFI_GUID *FileNameGuid,\r | |
41 | OUT VOID **Image,\r | |
42 | OUT UINTN *ImageSize\r | |
bf231ea6 | 43 | );\r |
00c4901b | 44 | \r |
00c4901b | 45 | \r |
bf231ea6 A |
46 | /**\r |
47 | Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer\r | |
48 | is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt\r | |
49 | buffer is passed in it will be used if it is big enough.\r | |
50 | ||
51 | @param[in] BmpImage Pointer to BMP file | |
52 | @param[in] BmpImageSize Number of bytes in BmpImage | |
53 | @param[in,out] UgaBlt Buffer containing UGA version of BmpImage. | |
54 | @param[in,out] UgaBltSize Size of UgaBlt in bytes. | |
55 | @param[out] PixelHeight Height of UgaBlt/BmpImage in pixels | |
56 | @param[out] PixelWidth Width of UgaBlt/BmpImage in pixels | |
57 | ||
58 | @retval EFI_SUCCESS UgaBlt and UgaBltSize are returned. \r | |
59 | @retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image\r | |
60 | @retval EFI_BUFFER_TOO_SMALL The passed in UgaBlt buffer is not big enough.\r | |
61 | UgaBltSize will contain the required size. | |
62 | **/\r | |
00c4901b | 63 | EFI_STATUS\r |
64 | ConvertBmpToUgaBlt (\r | |
65 | IN VOID *BmpImage,\r | |
66 | IN UINTN BmpImageSize,\r | |
67 | IN OUT VOID **UgaBlt,\r | |
68 | IN OUT UINTN *UgaBltSize,\r | |
69 | OUT UINTN *PixelHeight,\r | |
70 | OUT UINTN *PixelWidth\r | |
bf231ea6 | 71 | );\r |
00c4901b | 72 | \r |
00c4901b | 73 | \r |
bf231ea6 A |
74 | /**\r |
75 | Use Console Control to turn off UGA based Simple Text Out consoles from going\r | |
76 | to the UGA device. Put up LogoFile on every UGA device that is a console\r | |
77 | ||
78 | @param[in] LogoFile File name of logo to display on the center of the screen. | |
79 | ||
80 | @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.\r | |
81 | @retval EFI_UNSUPPORTED Logo not found\r | |
00c4901b | 82 | \r |
bf231ea6 | 83 | **/\r |
00c4901b | 84 | EFI_STATUS\r |
85 | EnableQuietBoot (\r | |
86 | IN EFI_GUID *LogoFile\r | |
bf231ea6 | 87 | );\r |
00c4901b | 88 | \r |
00c4901b | 89 | \r |
bf231ea6 A |
90 | /**\r |
91 | Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r | |
92 | Simple Text Out screens will now be synced up with all non UGA output devices\r | |
93 | ||
94 | @retval EFI_SUCCESS UGA devices are back in text mode and synced up.\r | |
00c4901b | 95 | \r |
bf231ea6 | 96 | **/\r |
00c4901b | 97 | EFI_STATUS\r |
98 | DisableQuietBoot (\r | |
99 | VOID\r | |
bf231ea6 | 100 | );\r |
00c4901b | 101 | \r |
00c4901b | 102 | \r |
bf231ea6 | 103 | /**\r |
00c4901b | 104 | Use Console Control Protocol to lock the Console In Spliter virtual handle. \r |
105 | This is the ConInHandle and ConIn handle in the EFI system table. All key\r | |
106 | presses will be ignored until the Password is typed in. The only way to\r | |
107 | disable the password is to type it in to a ConIn device.\r | |
bf231ea6 A |
108 | |
109 | @param[in] Password Password used to lock ConIn device. | |
110 | ||
111 | @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo\r | |
112 | displayed.\r | |
113 | @retval EFI_UNSUPPORTED Password not found\r | |
00c4901b | 114 | \r |
bf231ea6 A |
115 | **/\r |
116 | EFI_STATUS\r | |
117 | LockKeyboards (\r | |
118 | IN CHAR16 *Password\r | |
119 | );\r | |
120 | \r | |
121 | \r | |
122 | /**\r | |
123 | Print to graphics screen at the given X,Y coordinates of the graphics screen. | |
124 | see definition of Print to find rules for constructing Fmt. | |
125 | ||
126 | @param[in] X Row to start printing at | |
127 | @param[in] Y Column to start printing at | |
128 | @param[in] Foreground Foreground color | |
129 | @param[in] Background background color | |
130 | @param[in] Fmt Print format sting. See definition of Print | |
131 | @param[in] ... Argumnet stream defined by Fmt string | |
132 | ||
133 | @retval UINTN Number of Characters printed\r | |
134 | \r | |
135 | **/\r | |
00c4901b | 136 | UINTN\r |
137 | EFIAPI\r | |
138 | PrintXY (\r | |
139 | IN UINTN X,\r | |
140 | IN UINTN Y,\r | |
141 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OPTIONAL\r | |
142 | IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, OPTIONAL\r | |
143 | IN CHAR16 *Fmt,\r | |
144 | ...\r | |
bf231ea6 | 145 | );\r |
00c4901b | 146 | \r |
147 | \r | |
148 | #endif\r |