]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Protocol/HiiImageEx.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiImageEx.h
CommitLineData
a48d0a3d
CS
1/** @file\r
2 Protocol which allows access to the images in the images database.\r
3\r
4(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
5\r
6This program and the accompanying materials are licensed and made available under\r
7the terms and conditions of the BSD License that accompanies this distribution.\r
8The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php.\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef __EFI_HII_IMAGE_EX_H__\r
17#define __EFI_HII_IMAGE_EX_H__\r
18\r
19#include <Protocol/HiiImage.h>\r
20\r
21//\r
22// Global ID for the Hii Image Ex Protocol.\r
23//\r
24#define EFI_HII_IMAGE_EX_PROTOCOL_GUID \\r
25 {0x1a1241e6, 0x8f19, 0x41a9, { 0xbc, 0xe, 0xe8, 0xef, 0x39, 0xe0, 0x65, 0x46 }}\r
26\r
27typedef struct _EFI_HII_IMAGE_EX_PROTOCOL EFI_HII_IMAGE_EX_PROTOCOL;\r
28\r
29/**\r
30 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.NewImage().\r
31 Same with EFI_HII_IMAGE_PROTOCOL.NewImage().This protocol invokes\r
32EFI_HII_IMAGE_PROTOCOL.NewImage() implicitly.\r
33\r
34 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.\r
35 @param PackageList Handle of the package list where this image will\r
36 be added.\r
37 @param ImageId On return, contains the new image id, which is\r
38 unique within PackageList.\r
39 @param Image Points to the image.\r
40\r
41 @retval EFI_SUCCESS The new image was added successfully.\r
42 @retval EFI_NOT_FOUND The specified PackageList could not be found in\r
43 database.\r
44 @retval EFI_OUT_OF_RESOURCES Could not add the image due to lack of resources.\r
45 @retval EFI_INVALID_PARAMETER Image is NULL or ImageId is NULL.\r
46\r
47**/\r
48typedef\r
49EFI_STATUS\r
50(EFIAPI *EFI_HII_NEW_IMAGE_EX)(\r
51 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,\r
52 IN EFI_HII_HANDLE PackageList,\r
53 OUT EFI_IMAGE_ID *ImageId,\r
54 IN CONST EFI_IMAGE_INPUT *Image\r
55 );\r
56\r
57/**\r
58 Return the information about the image, associated with the package list.\r
59 The prototype of this extension function is the same with EFI_HII_IMAGE_PROTOCOL.GetImage().\r
60 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(),this protocol invokes EFI_HII_IMAGE_PROTOCOL.SetImage() implicitly.\r
61\r
62 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.\r
63 @param PackageList Handle of the package list where this image will\r
64 be searched.\r
65 @param ImageId The image's id,, which is unique within\r
66 PackageList.\r
67 @param Image Points to the image.\r
68\r
69 @retval EFI_SUCCESS The new image was returned successfully.\r
70 @retval EFI_NOT_FOUND The image specified by ImageId is not in the\r
71 database. The specified PackageList is not in\r
72 the database.\r
73 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to\r
74 hold the image.\r
75 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.\r
76 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there\r
77 was not enough memory.\r
78\r
79**/\r
80typedef\r
81EFI_STATUS\r
82(EFIAPI *EFI_HII_GET_IMAGE_EX)(\r
83 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,\r
84 IN EFI_HII_HANDLE PackageList,\r
85 IN EFI_IMAGE_ID ImageId,\r
86 OUT EFI_IMAGE_INPUT *Image\r
87 );\r
88\r
89/**\r
90 Change the information about the image. The prototype of this extension\r
91 function is the same with EFI_HII_IMAGE_PROTOCOL.SetImage(). Same with\r
92 EFI_HII_IMAGE_PROTOCOL.DrawImageId(),this protocol invokes EFI_HII_IMAGE_PROTOCOL.DrawImageId() implicitly.\r
93\r
94 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.\r
95 @param PackageList The package list containing the images.\r
96 @param ImageId The image's id,, which is unique within\r
97 PackageList.\r
98 @param Image Points to the image.\r
99\r
100 @retval EFI_SUCCESS The new image was updated successfully.\r
101 @retval EFI_NOT_FOUND The image specified by ImageId is not in the\r
102 database. The specified PackageList is not in\r
103 the database.\r
104 @retval EFI_INVALID_PARAMETER The Image was NULL.\r
105\r
106**/\r
107typedef\r
108EFI_STATUS\r
109(EFIAPI *EFI_HII_SET_IMAGE_EX)(\r
110 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,\r
111 IN EFI_HII_HANDLE PackageList,\r
112 IN EFI_IMAGE_ID ImageId,\r
113 IN CONST EFI_IMAGE_INPUT *Image\r
114 );\r
115\r
116/**\r
117 Renders an image to a bitmap or to the display. The prototype of this extension\r
118 function is the same with EFI_HII_IMAGE_PROTOCOL.DrawImage().\r
119 Same with EFI_HII_IMAGE_PROTOCOL.SetImage(),this protocol invokes EFI_HII_IMAGE_PROTOCOL.SetImage() implicitly.\r
120\r
121 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.\r
122 @param Flags Describes how the image is to be drawn.\r
123 @param Image Points to the image to be displayed.\r
124 @param Blt If this points to a non-NULL on entry, this points\r
125 to the image, which is Width pixels wide and\r
126 Height pixels high. The image will be drawn onto\r
127 this image and EFI_HII_DRAW_FLAG_CLIP is implied.\r
128 If this points to a NULL on entry, then a buffer\r
129 will be allocated to hold the generated image and\r
130 the pointer updated on exit. It is the caller's\r
131 responsibility to free this buffer.\r
132 @param BltX Specifies the offset from the left and top edge of\r
133 the output image of the first pixel in the image.\r
134 @param BltY Specifies the offset from the left and top edge of\r
135 the output image of the first pixel in the image.\r
136\r
137 @retval EFI_SUCCESS The image was successfully drawn.\r
138 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.\r
139 @retval EFI_INVALID_PARAMETER The Image or Blt was NULL.\r
140 Any combination of Flags is invalid.\r
141\r
142**/\r
143typedef\r
144EFI_STATUS\r
145(EFIAPI *EFI_HII_DRAW_IMAGE_EX)(\r
146 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,\r
147 IN EFI_HII_DRAW_FLAGS Flags,\r
148 IN CONST EFI_IMAGE_INPUT *Image,\r
149 IN OUT EFI_IMAGE_OUTPUT **Blt,\r
150 IN UINTN BltX,\r
151 IN UINTN BltY\r
152 );\r
153\r
154/**\r
155 Renders an image to a bitmap or the screen containing the contents of the specified\r
156 image. The prototype of this extension function is the same with E\r
157 FI_HII_IMAGE_PROTOCOL.DrawImageId().\r
158 Same with EFI_HII_IMAGE_PROTOCOL.DrawImageId(),this protocol invokes\r
159EFI_HII_IMAGE_PROTOCOL.DrawImageId() implicitly.\r
160\r
161 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.\r
162 @param Flags Describes how the image is to be drawn.\r
163 @param PackageList The package list in the HII database to search for\r
164 the specified image.\r
165 @param ImageId The image's id, which is unique within\r
166 PackageList.\r
167 @param Blt If this points to a non-NULL on entry, this points\r
168 to the image, which is Width pixels wide and\r
169 Height pixels high. The image will be drawn onto\r
170 this image and EFI_HII_DRAW_FLAG_CLIP is implied.\r
171 If this points to a NULL on entry, then a buffer\r
172 will be allocated to hold the generated image\r
173 and the pointer updated on exit. It is the caller's\r
174 responsibility to free this buffer.\r
175 @param BltX Specifies the offset from the left and top edge of\r
176 the output image of the first pixel in the image.\r
177 @param BltY Specifies the offset from the left and top edge of\r
178 the output image of the first pixel in the image.\r
179\r
180 @retval EFI_SUCCESS The image was successfully drawn.\r
181 @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt.\r
182 @retval EFI_INVALID_PARAMETER The Blt was NULL.\r
183 @retval EFI_NOT_FOUND The image specified by ImageId is not in the database.\r
184 The specified PackageList is not in the database.\r
185\r
186**/\r
187typedef\r
188EFI_STATUS\r
189(EFIAPI *EFI_HII_DRAW_IMAGE_ID_EX)(\r
190 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,\r
191 IN EFI_HII_DRAW_FLAGS Flags,\r
192 IN EFI_HII_HANDLE PackageList,\r
193 IN EFI_IMAGE_ID ImageId,\r
194 IN OUT EFI_IMAGE_OUTPUT **Blt,\r
195 IN UINTN BltX,\r
196 IN UINTN BltY\r
197 );\r
198\r
199/**\r
200 This function returns the image information to EFI_IMAGE_OUTPUT. Only the width\r
201 and height are returned to the EFI_IMAGE_OUTPUT instead of decoding the image\r
202 to the buffer. This function is used to get the geometry of the image. This function\r
203 will try to locate all of the EFI_HII_IMAGE_DECODER_PROTOCOL installed on the\r
204 system if the decoder of image type is not supported by the EFI_HII_IMAGE_EX_PROTOCOL.\r
205\r
206 @param This A pointer to the EFI_HII_IMAGE_EX_PROTOCOL instance.\r
207 @param PackageList Handle of the package list where this image will\r
208 be searched.\r
209 @param ImageId The image's id,, which is unique within PackageList.\r
210 @param Image Points to the image.\r
211\r
212 @retval EFI_SUCCESS The new image was returned successfully.\r
213 @retval EFI_NOT_FOUND The image specified by ImageId is not in the\r
214 database. The specified PackageList is not in the database.\r
215 @retval EFI_BUFFER_TOO_SMALL The buffer specified by ImageSize is too small to\r
216 hold the image.\r
217 @retval EFI_INVALID_PARAMETER The Image or ImageSize was NULL.\r
218 @retval EFI_OUT_OF_RESOURCES The bitmap could not be retrieved because there\r
219 was not enough memory.\r
220\r
221**/\r
222typedef\r
223EFI_STATUS\r
224(EFIAPI *EFI_HII_GET_IMAGE_INFO)(\r
225 IN CONST EFI_HII_IMAGE_EX_PROTOCOL *This,\r
226 IN EFI_HII_HANDLE PackageList,\r
227 IN EFI_IMAGE_ID ImageId,\r
6e227fb5 228 OUT EFI_IMAGE_OUTPUT *Image\r
a48d0a3d
CS
229 );\r
230\r
231///\r
232/// Protocol which allows access to the images in the images database.\r
233///\r
234struct _EFI_HII_IMAGE_EX_PROTOCOL {\r
235 EFI_HII_NEW_IMAGE_EX NewImageEx;\r
236 EFI_HII_GET_IMAGE_EX GetImageEx;\r
237 EFI_HII_SET_IMAGE_EX SetImageEx;\r
238 EFI_HII_DRAW_IMAGE_EX DrawImageEx;\r
239 EFI_HII_DRAW_IMAGE_ID_EX DrawImageIdEx;\r
240 EFI_HII_GET_IMAGE_INFO GetImageInfo;\r
241};\r
242\r
243extern EFI_GUID gEfiHiiImageExProtocolGuid;\r
244\r
245#endif\r