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
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.
15 #ifndef __EFI_GRAPHICS_LIB_H__
16 #define __EFI_GRAPHICS_LIB_H__
18 #include <Protocol/GraphicsOutput.h>
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
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.
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
39 GetGraphicsBitMapFromFV (
40 IN EFI_GUID
*FileNameGuid
,
46 Return the graphics image file named FileNameGuid into Image and return it's
47 size in ImageSize. All Firmware Volumes (FV) in the system are searched for the
50 @param[in] ImageHandle The driver image handle of the caller. The parameter is used to
51 optimize the loading of the image file so that the FV from which
52 the driver image is loaded will be tried first.
53 @param[in] FileNameGuid File Name of graphics file in the FV(s).
54 @param[out] Image Pointer to pointer to return graphics image. If NULL, a
55 buffer will be allocated.
56 @param[out] ImageSize Size of the graphics Image in bytes. Zero if no image found.
58 @retval EFI_INVALID_PARAMETER invalid parameter
59 @retval EFI_UNSUPPORTED Range can not be erased
60 @retval EFI_SUCCESS Image and ImageSize are valid.
61 @retval EFI_BUFFER_TOO_SMALL Image not big enough. ImageSize has required size
62 @retval EFI_NOT_FOUND FileNameGuid not found
66 GetGraphicsBitMapFromFVEx (
67 IN EFI_HANDLE ImageHandle
,
68 IN EFI_GUID
*FileNameGuid
,
74 Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer
75 is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt
76 buffer is passed in it will be used if it is big enough.
78 @param[in] BmpImage Pointer to BMP file
79 @param[in] BmpImageSize Number of bytes in BmpImage
80 @param[in,out] UgaBlt Buffer containing UGA version of BmpImage.
81 @param[in,out] UgaBltSize Size of UgaBlt in bytes.
82 @param[out] PixelHeight Height of UgaBlt/BmpImage in pixels
83 @param[out] PixelWidth Width of UgaBlt/BmpImage in pixels
85 @retval EFI_SUCCESS UgaBlt and UgaBltSize are returned.
86 @retval EFI_UNSUPPORTED BmpImage is not a valid *.BMP image
87 @retval EFI_BUFFER_TOO_SMALL The passed in UgaBlt buffer is not big enough.
88 UgaBltSize will contain the required size.
93 IN UINTN BmpImageSize
,
95 IN OUT UINTN
*UgaBltSize
,
96 OUT UINTN
*PixelHeight
,
102 Use Console Control to turn off UGA based Simple Text Out consoles from going
103 to the UGA device. Put up LogoFile on every UGA device that is a console
105 @param[in] LogoFile File name of logo to display on the center of the screen.
107 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
108 @retval EFI_UNSUPPORTED Logo not found
113 IN EFI_GUID
*LogoFile
117 Use Console Control to turn off GOP/UGA based Simple Text Out consoles from going
118 to the UGA device. Put up LogoFile on every UGA device that is a console
120 @param LogoFile File name of logo to display on the center of the screen.
121 @param ImageHandle The driver image handle of the caller. The parameter is used to
122 optimize the loading of the logo file so that the FV from which
123 the driver image is loaded will be tried first.
125 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo displayed.
126 @retval EFI_UNSUPPORTED Logo not found
131 IN EFI_GUID
*LogoFile
,
132 IN EFI_HANDLE ImageHandle
137 Use Console Control to turn on UGA based Simple Text Out consoles. The UGA
138 Simple Text Out screens will now be synced up with all non UGA output devices
140 @retval EFI_SUCCESS UGA devices are back in text mode and synced up.
150 Use Console Control Protocol to lock the Console In Spliter virtual handle.
151 This is the ConInHandle and ConIn handle in the EFI system table. All key
152 presses will be ignored until the Password is typed in. The only way to
153 disable the password is to type it in to a ConIn device.
155 @param[in] Password Password used to lock ConIn device.
157 @retval EFI_SUCCESS ConsoleControl has been flipped to graphics and logo
159 @retval EFI_UNSUPPORTED Password not found
169 Print to graphics screen at the given X,Y coordinates of the graphics screen.
170 see definition of Print to find rules for constructing Fmt.
172 @param[in] X Row to start printing at
173 @param[in] Y Column to start printing at
174 @param[in] Foreground Foreground color
175 @param[in] Background background color
176 @param[in] Fmt Print format sting. See definition of Print
177 @param[in] ... Argumnet stream defined by Fmt string
179 @retval UINTN Number of Characters printed
187 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*Foreground
, OPTIONAL
188 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL
*Background
, OPTIONAL