]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Protocol/UgaDraw.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Protocol / UgaDraw.h
index b450cdc285e19c2bfc03c2280a1dac5db77a7225..18eecc059d3551480e8577c6eafdec1de1e605bd 100644 (file)
@@ -1,22 +1,23 @@
 /** @file\r
-  UGA Draw protocol from the EFI 1.1 specification.\r
+  UGA Draw protocol from the EFI 1.10 specification.\r
 \r
   Abstraction of a very simple graphics device.\r
 \r
-  Copyright (c) 2006, Intel Corporation                                                         \r
-  All rights reserved. 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
+  Copyright (c) 2006 - 2018, 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
 \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
+  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
 **/\r
 \r
 #ifndef __UGA_DRAW_H__\r
 #define __UGA_DRAW_H__\r
 \r
+\r
 #define EFI_UGA_DRAW_PROTOCOL_GUID \\r
   { \\r
     0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \\r
@@ -27,11 +28,11 @@ typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
 /**\r
   Return the current video mode information.\r
 \r
-  @param  This                  Protocol instance pointer.\r
-  @param  HorizontalResolution  Current video horizontal resolution in pixels\r
-  @param  VerticalResolution    Current video vertical resolution in pixels\r
-  @param  ColorDepth            Current video color depth in bits per pixel\r
-  @param  RefreshRate           Current video refresh rate in Hz.\r
+  @param  This                  The EFI_UGA_DRAW_PROTOCOL instance.\r
+  @param  HorizontalResolution  The size of video screen in pixels in the X dimension.\r
+  @param  VerticalResolution    The size of video screen in pixels in the Y dimension.\r
+  @param  ColorDepth            Number of bits per pixel, currently defined to be 32.\r
+  @param  RefreshRate           The refresh rate of the monitor in Hertz.\r
 \r
   @retval EFI_SUCCESS           Mode information returned.\r
   @retval EFI_NOT_STARTED       Video display is not initialized. Call SetMode ()\r
@@ -40,23 +41,22 @@ typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE) (\r
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE)(\r
   IN  EFI_UGA_DRAW_PROTOCOL *This,\r
   OUT UINT32                *HorizontalResolution,\r
   OUT UINT32                *VerticalResolution,\r
   OUT UINT32                *ColorDepth,\r
   OUT UINT32                *RefreshRate\r
-  )\r
-;\r
+  );\r
 \r
 /**\r
-  Return the current video mode information.\r
+  Set the current video mode information.\r
 \r
-  @param  This                 Protocol instance pointer.\r
-  @param  HorizontalResolution Current video horizontal resolution in pixels\r
-  @param  VerticalResolution   Current video vertical resolution in pixels\r
-  @param  ColorDepth           Current video color depth in bits per pixel\r
-  @param  RefreshRate          Current video refresh rate in Hz.\r
+  @param  This                 The EFI_UGA_DRAW_PROTOCOL instance.\r
+  @param  HorizontalResolution The size of video screen in pixels in the X dimension.\r
+  @param  VerticalResolution   The size of video screen in pixels in the Y dimension.\r
+  @param  ColorDepth           Number of bits per pixel, currently defined to be 32.\r
+  @param  RefreshRate          The refresh rate of the monitor in Hertz.\r
 \r
   @retval EFI_SUCCESS          Mode information returned.\r
   @retval EFI_NOT_STARTED      Video display is not initialized. Call SetMode ()\r
@@ -64,14 +64,13 @@ EFI_STATUS
 **/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE) (\r
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE)(\r
   IN  EFI_UGA_DRAW_PROTOCOL *This,\r
   IN  UINT32                HorizontalResolution,\r
   IN  UINT32                VerticalResolution,\r
   IN  UINT32                ColorDepth,\r
   IN  UINT32                RefreshRate\r
-  )\r
-;\r
+  );\r
 \r
 typedef struct {\r
   UINT8 Blue;\r
@@ -85,46 +84,43 @@ typedef union {
   UINT32        Raw;\r
 } EFI_UGA_PIXEL_UNION;\r
 \r
+///\r
+/// Enumration value for actions of Blt operations.\r
+///\r
 typedef enum {\r
-  EfiUgaVideoFill,\r
-  EfiUgaVideoToBltBuffer,\r
-  EfiUgaBltBufferToVideo,\r
-  EfiUgaVideoToVideo,\r
-  EfiUgaBltMax\r
+  EfiUgaVideoFill,          ///< Write data from the  BltBuffer pixel (SourceX, SourceY)\r
+                            ///< directly to every pixel of the video display rectangle\r
+                            ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).\r
+                            ///< Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
+\r
+  EfiUgaVideoToBltBuffer,   ///< Read data from the video display rectangle\r
+                            ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
+                            ///< the BltBuffer rectangle (DestinationX, DestinationY )\r
+                            ///< (DestinationX + Width, DestinationY + Height). If DestinationX or\r
+                            ///< DestinationY is not zero then Delta must be set to the length in bytes\r
+                            ///< of a row in the BltBuffer.\r
+\r
+  EfiUgaBltBufferToVideo,   ///< Write data from the  BltBuffer rectangle\r
+                            ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
+                            ///< video display rectangle (DestinationX, DestinationY)\r
+                            ///< (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
+                            ///< not zero then Delta must be set to the length in bytes of a row in the\r
+                            ///< BltBuffer.\r
+\r
+  EfiUgaVideoToVideo,       ///< Copy from the video display rectangle (SourceX, SourceY)\r
+                            ///< (SourceX + Width, SourceY + Height) .to the video display rectangle\r
+                            ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).\r
+                            ///< The BltBuffer and Delta  are not used in this mode.\r
+\r
+  EfiUgaBltMax              ///< Maxmimum value for enumration value of Blt operation. If a Blt operation\r
+                            ///< larger or equal to this enumration value, it is invalid.\r
 } EFI_UGA_BLT_OPERATION;\r
 \r
 /**\r
-  Type specifying a pointer to a function to perform an UGA Blt operation.\r
-\r
-    The following table defines actions for BltOperations:\r
-\r
-    <B>EfiUgaVideoFill</B> - Write data from the  BltBuffer pixel (SourceX, SourceY) \r
-      directly to every pixel of the video display rectangle \r
-      (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
-      Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
-\r
-    <B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle \r
-      (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in \r
-      the BltBuffer rectangle (DestinationX, DestinationY ) \r
-      (DestinationX + Width, DestinationY + Height). If DestinationX or \r
-      DestinationY is not zero then Delta must be set to the length in bytes \r
-      of a row in the BltBuffer.\r
-\r
-    <B>EfiUgaBltBufferToVideo</B> - Write data from the  BltBuffer rectangle \r
-      (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the \r
-      video display rectangle (DestinationX, DestinationY) \r
-      (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is \r
-      not zero then Delta must be set to the length in bytes of a row in the \r
-      BltBuffer.\r
-\r
-    <B>EfiUgaVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)\r
-     (SourceX + Width, SourceY + Height) .to the video display rectangle \r
-     (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
-     The BltBuffer and Delta  are not used in this mode.\r
-\r
+    Blt a rectangle of pixels on the graphics screen.\r
 \r
     @param[in] This          - Protocol instance pointer.\r
-    @param[in] BltBuffer     - Buffer containing data to blit into video buffer. This \r
+    @param[in] BltBuffer     - Buffer containing data to blit into video buffer. This\r
                                buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)\r
     @param[in] BltOperation  - Operation to perform on BlitBuffer and video memory\r
     @param[in] SourceX       - X coordinate of source for the BltBuffer.\r
@@ -134,15 +130,15 @@ typedef enum {
     @param[in] Width         - Width of rectangle in BltBuffer in pixels.\r
     @param[in] Height        - Hight of rectangle in BltBuffer in pixels.\r
     @param[in] Delta         - OPTIONAL\r
-  \r
+\r
     @retval EFI_SUCCESS           - The Blt operation completed.\r
     @retval EFI_INVALID_PARAMETER - BltOperation is not valid.\r
     @retval EFI_DEVICE_ERROR      - A hardware error occured writting to the video buffer.\r
 \r
---*/\r
+**/\r
 typedef\r
 EFI_STATUS\r
-(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT) (\r
+(EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT)(\r
   IN  EFI_UGA_DRAW_PROTOCOL                   * This,\r
   IN  EFI_UGA_PIXEL                           * BltBuffer, OPTIONAL\r
   IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
@@ -155,6 +151,10 @@ EFI_STATUS
   IN  UINTN                                   Delta         OPTIONAL\r
   );\r
 \r
+///\r
+/// This protocol provides a basic abstraction to set video modes and\r
+/// copy pixels to and from the graphics controller's frame buffer.\r
+///\r
 struct _EFI_UGA_DRAW_PROTOCOL {\r
   EFI_UGA_DRAW_PROTOCOL_GET_MODE  GetMode;\r
   EFI_UGA_DRAW_PROTOCOL_SET_MODE  SetMode;\r