]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/HiiImage.h
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Include / Protocol / HiiImage.h
index ed511c7ac0cc825dc7569269f5b90180241fd214..3e1ea99cfc2a1d7ca89c15f12f97bd643dbfa448 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   The file provides services to access to images in the images database.\r
   \r
-  Copyright (c) 2006 - 2007, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials                          \r
+  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials                          \r
   are licensed and made available under the terms and conditions of the BSD License         \r
   which accompanies this distribution.  The full text of the license may be found at        \r
   http://opensource.org/licenses/bsd-license.php                                            \r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
-  Module Name: HiiImage.h\r
-\r
 **/\r
 \r
 #ifndef __HII_IMAGE_H__\r
 #define __HII_IMAGE_H__\r
 \r
-\r
 #define EFI_HII_IMAGE_PROTOCOL_GUID \\r
   { 0x31a6406a, 0x6bdf, 0x4e46, { 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 } }\r
 \r
 typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL;\r
 \r
 \r
-//\r
-// Flags in EFI_IMAGE_INPUT\r
-// \r
+///\r
+/// Flags in EFI_IMAGE_INPUT\r
+/// \r
 #define EFI_IMAGE_TRANSPARENT 0x00000001\r
 \r
 /**\r
@@ -41,16 +38,16 @@ typedef struct _EFI_HII_IMAGE_PROTOCOL EFI_HII_IMAGE_PROTOCOL;
 \r
   @param Height Image height, in pixels.\r
 \r
-  @param Bitmap The actual bitmap, organized left-to-right,\r
+  @param Bitmap A pointer to the actual bitmap, organized left-to-right,\r
                 top-to-bottom. The size of the bitmap is\r
                 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL).\r
 \r
    \r
 **/\r
 typedef struct _EFI_IMAGE_INPUT {\r
-  UINT32  Flags;\r
-  UINT16  Width;\r
-  UINT16  Height;\r
+  UINT32                          Flags;\r
+  UINT16                          Width;\r
+  UINT16                          Height;\r
   EFI_GRAPHICS_OUTPUT_BLT_PIXEL   *Bitmap;\r
 } EFI_IMAGE_INPUT;\r
 \r
@@ -61,14 +58,14 @@ typedef struct _EFI_IMAGE_INPUT {
   owned by PackageList, and returns a new image identifier\r
   (ImageId).\r
 \r
-  @param This   A pointer to the EFI_HII_IMAGE_PROTOCOL\r
-                instance. PackageList Handle of the package list\r
-                where this image will be added.\r
+  @param This        A pointer to the EFI_HII_IMAGE_PROTOCOL instance. \r
+  \r
+  @param PackageList Handle of the package list where this image will be added.\r
 \r
-  @param ImageId  On return, contains the new image id, which is\r
-                  unique within PackageList.\r
+  @param ImageId     On return, contains the new image id, which is\r
+                     unique within PackageList.\r
 \r
-  @param Image  Points to the image.\r
+  @param Image       Points to the image.\r
 \r
   @retval EFI_SUCCESS             The new image was added\r
                                   successfully\r
@@ -82,9 +79,9 @@ typedef struct _EFI_IMAGE_INPUT {
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_NEW_IMAGE) (\r
+(EFIAPI *EFI_HII_NEW_IMAGE)(\r
   IN CONST  EFI_HII_IMAGE_PROTOCOL  *This,\r
-  IN CONST  EFI_HII_HANDLE          PackageList,\r
+  IN        EFI_HII_HANDLE          PackageList,\r
   OUT       EFI_IMAGE_ID            *ImageId,\r
   IN CONST  EFI_IMAGE_INPUT         *Image\r
 );\r
@@ -101,43 +98,34 @@ EFI_STATUS
   updated to the size of buffer actually required to hold the\r
   image.\r
 \r
-  @param This   A pointer to the EFI_HII_IMAGE_PROTOCOL\r
-                instance.\r
+  @param This         A pointer to the EFI_HII_IMAGE_PROTOCOL instance. \r
   \r
   @param PackageList  The package list in the HII database to\r
                       search for the specified image.\r
   \r
-  @param ImageId  The image's id, which is unique within\r
-                  PackageList.\r
-  \r
-  @param Image  Points to the new image.\r
-  \r
-  @param ImageSize  On entry, points to the size of the buffer\r
-                    pointed to by Image, in bytes. On return,\r
-                    points to the length of the image, in bytes.\r
+  @param ImageId      The image's id, which is unique within\r
+                      PackageList.\r
   \r
+  @param Image        Points to the new image.\r
   \r
-  @retval EFI_SUCCESS   The image was returned successfully.\r
-  \r
-  @retval EFI_NOT_FOUND The image specified by ImageId is not\r
-                        available.\r
-  \r
-  @retval EFI_BUFFER_TOO_SMALL  The buffer specified by\r
-                                ImageLength is too small to hold\r
-                                the image.\r
+  @retval EFI_SUCCESS            The image was returned successfully.\r
+\r
+  @retval EFI_NOT_FOUND          The image specified by ImageId is not\r
+                                 available. Or The specified PackageList is not in the database.\r
   \r
-  @retval EFI_INVALID_PARAMETER The Image or Langugae was NULL.\r
+  @retval EFI_INVALID_PARAMETER  The Image or Langugae was NULL.\r
+  @retval EFI_OUT_OF_RESOURCES   The bitmap could not be retrieved because there was not\r
+                                 enough memory.\r
 \r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_GET_IMAGE) (\r
+(EFIAPI *EFI_HII_GET_IMAGE)(\r
   IN CONST  EFI_HII_IMAGE_PROTOCOL  *This,\r
-  IN CONST  EFI_HII_HANDLE          PackageList,\r
-  IN CONST  EFI_IMAGE_ID            ImageId,\r
-  OUT       EFI_IMAGE_INPUT         *Image,\r
-  OUT       UINTN                   *ImageSize\r
+  IN        EFI_HII_HANDLE          PackageList,\r
+  IN        EFI_IMAGE_ID            ImageId,\r
+  OUT       EFI_IMAGE_INPUT         *Image\r
 );\r
 \r
 /**\r
@@ -146,48 +134,45 @@ EFI_STATUS
   specified PackageListHandle to the image specified by Image.\r
 \r
 \r
-  @param This   A pointer to the EFI_HII_IMAGE_PROTOCOL\r
-                instance.\r
+  @param This         A pointer to the EFI_HII_IMAGE_PROTOCOL instance. \r
 \r
   @param PackageList  The package list containing the images.\r
 \r
-  @param ImageId  The image id, which is unique within\r
-                  PackageList.\r
+  @param ImageId      The image id, which is unique within PackageList.\r
 \r
-  @param Image  Points to the image.\r
+  @param Image        Points to the image.\r
 \r
-  @retval EFI_SUCCESS The image was successfully updated.\r
+  @retval EFI_SUCCESS           The image was successfully updated.\r
   \r
-  @retval EFI_NOT_FOUND   The image specified by ImageId is not\r
-                          in the database.\r
+  @retval EFI_NOT_FOUND         The image specified by ImageId is not in the database.\r
+                                The specified PackageList is not in the database. \r
   \r
-  @retval EFI_INVALID_PARAMETER   The Image or Language was\r
-                                  NULL.\r
+  @retval EFI_INVALID_PARAMETER The Image or Language was NULL.\r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_SET_IMAGE) (\r
+(EFIAPI *EFI_HII_SET_IMAGE)(\r
   IN CONST  EFI_HII_IMAGE_PROTOCOL  *This,\r
-  IN CONST  EFI_HII_HANDLE          PackageList,\r
-  IN CONST  EFI_IMAGE_ID            ImageId,\r
-  IN CONST  EFI_IMAGE_INPUT         Image\r
+  IN        EFI_HII_HANDLE          PackageList,\r
+  IN        EFI_IMAGE_ID            ImageId,\r
+  IN CONST  EFI_IMAGE_INPUT         *Image\r
 );\r
 \r
 \r
-//\r
-// EFI_HII_DRAW_FLAGS\r
-// \r
+///\r
+/// EFI_HII_DRAW_FLAGS describes how the image is to be drawn.\r
+/// These flags are defined as EFI_HII_DRAW_FLAG_***\r
+///\r
 typedef UINT32  EFI_HII_DRAW_FLAGS;\r
 \r
 #define EFI_HII_DRAW_FLAG_CLIP          0x00000001\r
 #define EFI_HII_DRAW_FLAG_TRANSPARENT   0x00000030\r
 #define EFI_HII_DRAW_FLAG_DEFAULT       0x00000000\r
-#define EFI_HII_DRAW_FLAG_FORCE_TRANS   0x00000001\r
-#define EFI_HII_DRAW_FLAG_FORCE_OPAQUE  0x00000002\r
+#define EFI_HII_DRAW_FLAG_FORCE_TRANS   0x00000010\r
+#define EFI_HII_DRAW_FLAG_FORCE_OPAQUE  0x00000020\r
 #define EFI_HII_DIRECT_TO_SCREEN        0x00000080\r
 \r
-\r
 /**\r
    \r
   Definition of EFI_IMAGE_OUTPUT.\r
@@ -221,7 +206,7 @@ typedef struct _EFI_IMAGE_OUTPUT {
   images can be clipped. If EFI_HII_DRAW_FLAG_CLIP is set, then\r
   all pixels drawn outside the bounding box specified by Width and\r
   Height are ignored. If EFI_HII_DRAW_FLAG_TRANSPARENT is set,\r
-  then all ????off???? pixels in the images drawn will use the\r
+  then all 'off' pixels in the images drawn will use the\r
   pixel value from Blt. This flag cannot be used if Blt is NULL\r
   upon entry. If EFI_HII_DIRECT_TO_SCREEN is set, then the image\r
   will be written directly to the output device specified by\r
@@ -229,29 +214,28 @@ typedef struct _EFI_IMAGE_OUTPUT {
   specified by Bitmap.\r
 \r
 \r
-  @param This   A pointer to the EFI_HII_IMAGE_PROTOCOL\r
-                instance.\r
+  @param This       A pointer to the EFI_HII_IMAGE_PROTOCOL instance. \r
\r
+  @param Flags      Describes how the image is to be drawn.\r
+                    EFI_HII_DRAW_FLAGS is defined in Related\r
+                    Definitions, below.\r
   \r
-  @param Flags  Describes how the image is to be drawn.\r
-                EFI_HII_DRAW_FLAGS is defined in Related\r
-                Definitions, below.\r
+  @param Image      Points to the image to be displayed. \r
   \r
-  @param Image  Points to the image to be displayed. \r
-  \r
-  @param Blt  If this points to a non-NULL on entry, this points\r
-              to the image, which is Width pixels wide and\r
-              Height pixels high. The image will be drawn onto\r
-              this image and EFI_HII_DRAW_FLAG_CLIP is implied.\r
-              If this points to a NULL on entry, then a buffer\r
-              will be allocated to hold the generated image and\r
-              the pointer updated on exit. It is the caller????s\r
-              responsibility to free this buffer.\r
+  @param Blt        If this points to a non-NULL on entry, this points\r
+                    to the image, which is Width pixels wide and\r
+                    Height pixels high. The image will be drawn onto\r
+                    this image and EFI_HII_DRAW_FLAG_CLIP is implied.\r
+                    If this points to a NULL on entry, then a buffer\r
+                    will be allocated to hold the generated image and\r
+                    the pointer updated on exit. It is the caller's\r
+                    responsibility to free this buffer.\r
 \r
-  @param BltX, BltY   Specifies the offset from the left and top\r
-                      edge of the image of the first pixel in\r
-                      the image.\r
+  @param BltX, BltY Specifies the offset from the left and top\r
+                    edge of the image of the first pixel in\r
+                    the image.\r
 \r
-  @retval EFI_SUCCESS   The image was successfully updated.\r
+  @retval EFI_SUCCESS           The image was successfully updated.\r
 \r
   @retval EFI_OUT_OF_RESOURCES  Unable to allocate an output\r
                                 buffer for RowInfoArray or Blt.\r
@@ -263,13 +247,13 @@ typedef struct _EFI_IMAGE_OUTPUT {
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_DRAW_IMAGE) (\r
+(EFIAPI *EFI_HII_DRAW_IMAGE)(\r
   IN CONST  EFI_HII_IMAGE_PROTOCOL  *This,\r
-  IN CONST  EFI_HII_DRAW_FLAGS      Flags,\r
-  IN CONST  EFI_IMAGE_INPUT         Image,\r
+  IN        EFI_HII_DRAW_FLAGS      Flags,\r
+  IN CONST  EFI_IMAGE_INPUT         *Image,\r
   IN OUT    EFI_IMAGE_OUTPUT        **Blt,\r
-  IN CONST  UINTN                   BltX,\r
-  IN CONST  UINTN                   BltY\r
+  IN        UINTN                   BltX,\r
+  IN        UINTN                   BltY\r
 );\r
 \r
 /**\r
@@ -294,80 +278,67 @@ EFI_STATUS
   Height are ignored. The EFI_HII_DRAW_FLAG_TRANSPARENT flag\r
   determines whether the image will be drawn transparent or\r
   opaque. If EFI_HII_DRAW_FLAG_FORCE_TRANS is set, then the image\r
-  will be drawn so that all ????off???? pixels in the image will\r
+  will be drawn so that all 'off' pixels in the image will\r
   be drawn using the pixel value from Blt and all other pixels\r
   will be copied. If EFI_HII_DRAW_FLAG_FORCE_OPAQUE is set, then\r
-  the image????s pixels will be copied directly to the\r
+  the image's pixels will be copied directly to the\r
   destination. If EFI_HII_DRAW_FLAG_DEFAULT is set, then the image\r
   will be drawn transparently or opaque, depending on the\r
-  image????s transparency setting (see EFI_IMAGE_TRANSPARENT).\r
+  image's transparency setting (see EFI_IMAGE_TRANSPARENT).\r
   Images cannot be drawn transparently if Blt is NULL. If\r
   EFI_HII_DIRECT_TO_SCREEN is set, then the image will be written\r
   directly to the output device specified by Screen. Otherwise the\r
   image will be rendered to the bitmap specified by Bitmap.\r
 \r
-  @param This   A pointer to the EFI_HII_IMAGE_PROTOCOL\r
-                instance.\r
+  @param This         A pointer to the EFI_HII_IMAGE_PROTOCOL instance. \r
 \r
-  @param Flags  Describes how the image is to be drawn.\r
+  @param Flags        Describes how the image is to be drawn.\r
 \r
   @param PackageList  The package list in the HII database to\r
                       search for the specified image.\r
 \r
-  @param ImageId  The image's id, which is unique within\r
-                  PackageList.\r
+  @param ImageId      The image's id, which is unique within PackageList.\r
 \r
-  @param Blt  If this points to a non-NULL on entry, this points\r
-              to the image, which is Width pixels wide and\r
-              Height pixels high. The image will be drawn onto\r
-              this image and EFI_HII_DRAW_FLAG_CLIP is implied.\r
-              If this points to a NULL on entry, then a buffer\r
-              will be allocated to hold the generated image and\r
-              the pointer updated on exit. It is the caller's\r
-              responsibility to free this buffer.\r
+  @param Blt          If this points to a non-NULL on entry, this points\r
+                      to the image, which is Width pixels wide and\r
+                      Height pixels high. The image will be drawn onto\r
+                      this image and EFI_HII_DRAW_FLAG_CLIP is implied.\r
+                      If this points to a NULL on entry, then a buffer\r
+                      will be allocated to hold the generated image and\r
+                      the pointer updated on exit. It is the caller's\r
+                      responsibility to free this buffer.\r
 \r
   @param BltX, BltY   Specifies the offset from the left and top\r
                       edge of the output image of the first\r
                       pixel in the image.\r
 \r
-  @retval EFI_SUCCESS   The image was successfully updated.\r
+  @retval EFI_SUCCESS           The image was successfully updated.\r
   \r
   @retval EFI_OUT_OF_RESOURCES  Unable to allocate an output\r
                                 buffer for RowInfoArray or Blt.\r
   \r
-  @retval EFI_INVALID_PARAMETER The Image or Blt or Height or\r
-                                Width was NULL.\r
+  @retval EFI_NOT_FOUND         The image specified by ImageId is not in the database. \r
+                                Or The specified PackageList is not in the database.                            \r
+  \r
+  @retval EFI_INVALID_PARAMETER The Blt was NULL.    \r
 \r
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_HII_DRAW_IMAGE_ID) (\r
+(EFIAPI *EFI_HII_DRAW_IMAGE_ID)(\r
 IN CONST  EFI_HII_IMAGE_PROTOCOL  *This,\r
-IN CONST  EFI_HII_DRAW_FLAGS      Flags,\r
-IN CONST  EFI_HII_HANDLE          PackageList,\r
-IN CONST  EFI_IMAGE_ID            ImageId,\r
+IN        EFI_HII_DRAW_FLAGS      Flags,\r
+IN        EFI_HII_HANDLE          PackageList,\r
+IN        EFI_IMAGE_ID            ImageId,\r
 IN OUT    EFI_IMAGE_OUTPUT        **Blt,\r
-IN CONST  UINTN                   BltX,\r
-IN CONST  UINTN                   BltY\r
+IN        UINTN                   BltX,\r
+IN        UINTN                   BltY\r
 );\r
 \r
 \r
-/**\r
-  \r
-  services to access to images in the images database.\r
-\r
-  @param NewImage   Add a new image.\r
-\r
-  @param GetImage   Retrieve an image and related font\r
-                    information.\r
-\r
-  @param SetImage   Change an image. EFI_INVALID_LANGUAGE The\r
-                    language specified by FirstLanguage is not\r
-                    present in the specified package list.\r
-                    EFI_INVALID_PARAMETER FirstLanguage is NULL\r
-                    or SecondLanguage is NULL.\r
-\r
-**/\r
+///\r
+/// Services to access to images in the images database.\r
+///\r
 struct _EFI_HII_IMAGE_PROTOCOL {\r
   EFI_HII_NEW_IMAGE     NewImage;\r
   EFI_HII_GET_IMAGE     GetImage;\r
@@ -380,3 +351,4 @@ extern EFI_GUID gEfiHiiImageProtocolGuid;
 \r
 #endif\r
 \r
+\r