]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/GraphicsLib.h
Fixed comments to follow coding standard.
[mirror_edk2.git] / MdePkg / Include / Library / GraphicsLib.h
index 30b2a7c0556b34aa55741a07cbf2612867a04282..f503561708754af5a8c2e299641461241b9f0e91 100644 (file)
@@ -1,59 +1,65 @@
-/*++\r
+/** @file\r
+  Graphics Library\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
-                                                                                          \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
+  Copyright (c) 2006 - 2007, Intel Corporation.<BR>\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
 \r
-Module Name:\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
-  GraphicsLib.h\r
+**/\r
 \r
-Abstract:\r
+#ifndef __EFI_GRAPHICS_LIB_H__\r
+#define __EFI_GRAPHICS_LIB_H__\r
 \r
\r
---*/\r
+#include <Protocol/GraphicsOutput.h>\r
 \r
-#ifndef _EFI_GRAPHICS_LIB_H_\r
-#define _EFI_GRAPHICS_LIB_H_\r
 \r
+/**\r
+  Return the graphics image file named FileNameGuid into Image and return it's\r
+  size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r
+  file name.\r
+
+  @param[in]  FileNameGuid  File Name of graphics file in the FV(s).
+  @param[out] Image         Pointer to pointer to return graphics image.  If NULL, a \r
+                            buffer will be allocated.
+  @param[out] ImageSize     Size of the graphics Image in bytes. Zero if no image found.\r
+
+  @retval   EFI_INVALID_PARAMETER  invalid parameter
+  @retval   EFI_UNSUPPORTED        Range can not be erased\r
+  @retval   EFI_SUCCESS            Image and ImageSize are valid. \r
+  @retval   EFI_BUFFER_TOO_SMALL   Image not big enough. ImageSize has required size\r
+  @retval   EFI_NOT_FOUND          FileNameGuid not found\r
+
+**/\r
 EFI_STATUS\r
 GetGraphicsBitMapFromFV (\r
   IN  EFI_GUID      *FileNameGuid,\r
   OUT VOID          **Image,\r
   OUT UINTN         *ImageSize\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Return the graphics image file named FileNameGuid into Image and return it's\r
-  size in ImageSize. All Firmware Volumes (FV) in the system are searched for the\r
-  file name.\r
-\r
-Arguments:\r
+  );\r
 \r
-  FileNameGuid  - File Name of graphics file in the FV(s).\r
-\r
-  Image         - Pointer to pointer to return graphics image.  If NULL, a \r
-                  buffer will be allocated.\r
-\r
-  ImageSize     - Size of the graphics Image in bytes. Zero if no image found.\r
-\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS          - Image and ImageSize are valid. \r
-  EFI_BUFFER_TOO_SMALL - Image not big enough. ImageSize has required size\r
-  EFI_NOT_FOUND        - FileNameGuid not found\r
-\r
---*/\r
-;\r
 \r
+/**\r
+  Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer\r
+  is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt\r
+  buffer is passed in it will be used if it is big enough.\r
+
+  @param[in]      BmpImage      Pointer to BMP file
+  @param[in]      BmpImageSize  Number of bytes in BmpImage
+  @param[in,out]  UgaBlt        Buffer containing UGA version of BmpImage.
+  @param[in,out]  UgaBltSize    Size of UgaBlt in bytes.
+  @param[out]     PixelHeight   Height of UgaBlt/BmpImage in pixels
+  @param[out]     PixelWidth    Width of UgaBlt/BmpImage in pixels
+
+  @retval EFI_SUCCESS           UgaBlt and UgaBltSize are returned. \r
+  @retval EFI_UNSUPPORTED       BmpImage is not a valid *.BMP image\r
+  @retval EFI_BUFFER_TOO_SMALL  The passed in UgaBlt buffer is not big enough.\r
+                                UgaBltSize will contain the required size.
+**/\r
 EFI_STATUS\r
 ConvertBmpToUgaBlt (\r
   IN  VOID      *BmpImage,\r
@@ -62,113 +68,71 @@ ConvertBmpToUgaBlt (
   IN OUT UINTN  *UgaBltSize,\r
   OUT UINTN     *PixelHeight,\r
   OUT UINTN     *PixelWidth\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Convert a *.BMP graphics image to a UGA blt buffer. If a NULL UgaBlt buffer\r
-  is passed in a UgaBlt buffer will be allocated by this routine. If a UgaBlt\r
-  buffer is passed in it will be used if it is big enough.\r
-\r
-Arguments:\r
-\r
-  BmpImage      - Pointer to BMP file\r
+  );\r
 \r
-  BmpImageSize  - Number of bytes in BmpImage\r
 \r
-  UgaBlt        - Buffer containing UGA version of BmpImage.\r
-\r
-  UgaBltSize    - Size of UgaBlt in bytes.\r
-\r
-  PixelHeight   - Height of UgaBlt/BmpImage in pixels\r
-\r
-  PixelWidth    - Width of UgaBlt/BmpImage in pixels\r
-\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS           - UgaBlt and UgaBltSize are returned. \r
-  EFI_UNSUPPORTED       - BmpImage is not a valid *.BMP image\r
-  EFI_BUFFER_TOO_SMALL  - The passed in UgaBlt buffer is not big enough.\r
-                          UgaBltSize will contain the required size.\r
-\r
---*/\r
-;\r
+/**\r
+  Use Console Control to turn off UGA based Simple Text Out consoles from going\r
+  to the UGA device. Put up LogoFile on every UGA device that is a console\r
+
+  @param[in]  LogoFile   File name of logo to display on the center of the screen.
+
+  @retval EFI_SUCCESS     ConsoleControl has been flipped to graphics and logo displayed.\r
+  @retval EFI_UNSUPPORTED Logo not found\r
 \r
+**/\r
 EFI_STATUS\r
 EnableQuietBoot (\r
   IN  EFI_GUID  *LogoFile\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Use Console Control to turn off UGA based Simple Text Out consoles from going\r
-  to the UGA device. Put up LogoFile on every UGA device that is a console\r
+  );\r
 \r
-Arguments:\r
 \r
-  LogoFile - File name of logo to display on the center of the screen.\r
-\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS           - ConsoleControl has been flipped to graphics and logo\r
-                          displayed.\r
-  EFI_UNSUPPORTED       - Logo not found\r
-\r
---*/\r
-;\r
+/**\r
+  Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r
+  Simple Text Out screens will now be synced up with all non UGA output devices\r
+
+  @retval EFI_SUCCESS     UGA devices are back in text mode and synced up.\r
 \r
+**/\r
 EFI_STATUS\r
 DisableQuietBoot (\r
   VOID\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Use Console Control to turn on UGA based Simple Text Out consoles. The UGA \r
-  Simple Text Out screens will now be synced up with all non UGA output devices\r
-\r
-Arguments:\r
+  );\r
 \r
-  NONE\r
 \r
-Returns: \r
-\r
-  EFI_SUCCESS           - UGA devices are back in text mode and synced up.\r
-  EFI_UNSUPPORTED       - Logo not found\r
-\r
---*/\r
-;\r
-\r
-EFI_STATUS\r
-LockKeyboards (\r
-  IN  CHAR16    *Password\r
-  )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
   Use Console Control Protocol to lock the Console In Spliter virtual handle. \r
   This is the ConInHandle and ConIn handle in the EFI system table. All key\r
   presses will be ignored until the Password is typed in. The only way to\r
   disable the password is to type it in to a ConIn device.\r
+
+  @param[in]  Password   Password used to lock ConIn device.
+
+  @retval EFI_SUCCESS     ConsoleControl has been flipped to graphics and logo\r
+                          displayed.\r
+  @retval EFI_UNSUPPORTED Password not found\r
 \r
-Arguments:\r
-  Password - Password used to lock ConIn device\r
-\r
-\r
-Returns: \r
-\r
-  EFI_SUCCESS     - ConsoleControl has been flipped to graphics and logo\r
-                    displayed.\r
-  EFI_UNSUPPORTED - Logo not found\r
-\r
---*/\r
-;\r
-\r
+**/\r
+EFI_STATUS\r
+LockKeyboards (\r
+  IN  CHAR16    *Password\r
+  );\r
+\r
+\r
+/**\r
+  Print to graphics screen at the given X,Y coordinates of the graphics screen.
+  see definition of Print to find rules for constructing Fmt.
+
+  @param[in]  X            Row to start printing at
+  @param[in]  Y            Column to start printing at
+  @param[in]  Foreground   Foreground color
+  @param[in]  Background   background color
+  @param[in]  Fmt          Print format sting. See definition of Print
+  @param[in]  ...          Argumnet stream defined by Fmt string
+
+  @retval UINTN     Number of Characters printed\r
+\r
+**/\r
 UINTN\r
 EFIAPI\r
 PrintXY (\r
@@ -178,8 +142,7 @@ PrintXY (
   IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL    *Background, OPTIONAL\r
   IN CHAR16                           *Fmt,\r
   ...\r
-  )\r
-;\r
+  );\r
 \r
 \r
 #endif\r