]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Library/GraphicsLib.h
Fixed comments to follow coding standard.
[mirror_edk2.git] / MdePkg / Include / Library / GraphicsLib.h
1 /** @file
2 Graphics Library
3
4 Copyright (c) 2006 - 2007, Intel Corporation.<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __EFI_GRAPHICS_LIB_H__
16 #define __EFI_GRAPHICS_LIB_H__
17
18 #include <Protocol/GraphicsOutput.h>
19
20
21 /**
22 Return the graphics image file named FileNameGuid into Image and return it's
23 size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
24 file name.
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
28 buffer will be allocated.
29 @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.
30
31 @retval EFI_INVALID_PARAMETER invalid parameter
32 @retval EFI_UNSUPPORTED Range can not be erased
33 @retval EFI_SUCCESS Image and ImageSize are valid.
34 @retval EFI_BUFFER_TOO_SMALL Image not big enough. ImageSize has required size
35 @retval EFI_NOT_FOUND FileNameGuid not found
36
37 **/
38 EFI_STATUS
39 GetGraphicsBitMapFromFV (
40 IN EFI_GUID *FileNameGuid,
41 OUT VOID **Image,
42 OUT UINTN *ImageSize
43 );
44
45
46 /**
47 Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer
48 is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt
49 buffer is passed in it will be used if it is big enough.
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.
59 @retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image
60 @retval EFI_BUFFER_TOO_SMALL The passed in UgaBlt buffer is not big enough.
61 UgaBltSize will contain the required size.
62 **/
63 EFI_STATUS
64 ConvertBmpToUgaBlt (
65 IN VOID *BmpImage,
66 IN UINTN BmpImageSize,
67 IN OUT VOID **UgaBlt,
68 IN OUT UINTN *UgaBltSize,
69 OUT UINTN *PixelHeight,
70 OUT UINTN *PixelWidth
71 );
72
73
74 /**
75 Use Console Control to turn off UGA based Simple Text Out consoles from going
76 to the UGA device. Put up LogoFile on every UGA device that is a console
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.
81 @retval EFI_UNSUPPORTED Logo not found
82
83 **/
84 EFI_STATUS
85 EnableQuietBoot (
86 IN EFI_GUID *LogoFile
87 );
88
89
90 /**
91 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
92 Simple Text Out screens will now be synced up with all non UGA output devices
93
94 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
95
96 **/
97 EFI_STATUS
98 DisableQuietBoot (
99 VOID
100 );
101
102
103 /**
104 Use Console Control Protocol to lock the Console In Spliter virtual handle.
105 This is the ConInHandle and ConIn handle in the EFI system table. All key
106 presses will be ignored until the Password is typed in. The only way to
107 disable the password is to type it in to a ConIn device.
108
109 @param[in] Password Password used to lock ConIn device.
110
111 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo
112 displayed.
113 @retval EFI_UNSUPPORTED Password not found
114
115 **/
116 EFI_STATUS
117 LockKeyboards (
118 IN CHAR16 *Password
119 );
120
121
122 /**
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
134
135 **/
136 UINTN
137 EFIAPI
138 PrintXY (
139 IN UINTN X,
140 IN UINTN Y,
141 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Foreground, OPTIONAL
142 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Background, OPTIONAL
143 IN CHAR16 *Fmt,
144 ...
145 );
146
147
148 #endif