1 /** @file
2   The OEM Badging Protocol defines the interface to get the OEM badging
3   image with the display attribute. This protocol can be produced based on OEM badging images.
4 
5 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7 
8 **/
9 
10 #ifndef __EFI_OEM_BADGING_H__
11 #define __EFI_OEM_BADGING_H__
12 
13 //
14 // GUID for EFI OEM Badging Protocol
15 //
16 #define EFI_OEM_BADGING_PROTOCOL_GUID \
17   { 0x170e13c0, 0xbf1b, 0x4218, {0x87, 0x1d, 0x2a, 0xbd, 0xc6, 0xf8, 0x87, 0xbc } }
18 
19 
20 typedef struct _EFI_OEM_BADGING_PROTOCOL EFI_OEM_BADGING_PROTOCOL;
21 
22 typedef enum {
23   EfiBadgingFormatBMP,
24   EfiBadgingFormatJPEG,
25   EfiBadgingFormatTIFF,
26   EfiBadgingFormatGIF,
27   EfiBadgingFormatUnknown
28 } EFI_BADGING_FORMAT;
29 
30 typedef enum {
31   EfiBadgingDisplayAttributeLeftTop,
32   EfiBadgingDisplayAttributeCenterTop,
33   EfiBadgingDisplayAttributeRightTop,
34   EfiBadgingDisplayAttributeCenterRight,
35   EfiBadgingDisplayAttributeRightBottom,
36   EfiBadgingDisplayAttributeCenterBottom,
37   EfiBadgingDisplayAttributeLeftBottom,
38   EfiBadgingDisplayAttributeCenterLeft,
39   EfiBadgingDisplayAttributeCenter,
40   EfiBadgingDisplayAttributeCustomized
41 } EFI_BADGING_DISPLAY_ATTRIBUTE;
42 
43 /**
44 
45   Load an OEM badge image and return its data and attributes.
46 
47   @param This              The pointer to this protocol instance.
48   @param Instance          The visible image instance is found.
49   @param Format            The format of the image. Examples: BMP, JPEG.
50   @param ImageData         The image data for the badge file. Currently only
51                            supports the .bmp file format.
52   @param ImageSize         The size of the image returned.
53   @param Attribute         The display attributes of the image returned.
54   @param CoordinateX       The X coordinate of the image.
55   @param CoordinateY       The Y coordinate of the image.
56 
57   @retval EFI_SUCCESS      The image was fetched successfully.
58   @retval EFI_NOT_FOUND    The specified image could not be found.
59 
60 **/
61 typedef
62 EFI_STATUS
63 (EFIAPI *EFI_BADGING_GET_IMAGE)(
64   IN     EFI_OEM_BADGING_PROTOCOL          *This,
65   IN OUT UINT32                            *Instance,
66      OUT EFI_BADGING_FORMAT                *Format,
67      OUT UINT8                             **ImageData,
68      OUT UINTN                             *ImageSize,
69      OUT EFI_BADGING_DISPLAY_ATTRIBUTE     *Attribute,
70      OUT UINTN                             *CoordinateX,
71      OUT UINTN                             *CoordinateY
72 );
73 
74 
75 struct _EFI_OEM_BADGING_PROTOCOL {
76   EFI_BADGING_GET_IMAGE       GetImage;
77 };
78 
79 
80 extern EFI_GUID gEfiOEMBadgingProtocolGuid;
81 
82 #endif
83