]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Include/Library/FrameBufferBltLib.h
MdeModulePkg: Add FrameBufferBltLib library class
[mirror_edk2.git] / MdeModulePkg / Include / Library / FrameBufferBltLib.h
diff --git a/MdeModulePkg/Include/Library/FrameBufferBltLib.h b/MdeModulePkg/Include/Library/FrameBufferBltLib.h
new file mode 100644 (file)
index 0000000..c92eb94
--- /dev/null
@@ -0,0 +1,94 @@
+/** @file\r
+  Library for performing UEFI GOP Blt operations on a framebuffer\r
+\r
+  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+\r
+  This program and the accompanying materials are licensed and made available\r
+  under the terms and conditions of the BSD License which accompanies this\r
+  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\r
+  IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef __FRAMEBUFFER_BLT_LIB__\r
+#define __FRAMEBUFFER_BLT_LIB__\r
+\r
+#include <Protocol/GraphicsOutput.h>\r
+\r
+//\r
+// Opaque structure for the frame buffer configure.\r
+//\r
+typedef struct FRAME_BUFFER_CONFIGURE FRAME_BUFFER_CONFIGURE;\r
+\r
+/**\r
+  Create the configuration for a video frame buffer.\r
+\r
+  The configuration is returned in the caller provided buffer.\r
+\r
+  @param[in] FrameBuffer       Pointer to the start of the frame buffer.\r
+  @param[in] FrameBufferInfo   Describes the frame buffer characteristics.\r
+  @param[in,out] Configure     The created configuration information.\r
+  @param[in,out] ConfigureSize Size of the configuration information.\r
+\r
+  @retval RETURN_SUCCESS            The configuration was successful created.\r
+  @retval RETURN_BUFFER_TOO_SMALL   The Configure is to too small. The required\r
+                                    size is returned in ConfigureSize.\r
+  @retval RETURN_UNSUPPORTED        The requested mode is not supported by\r
+                                    this implementaion.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+FrameBufferBltConfigure (\r
+  IN      VOID                                  *FrameBuffer,\r
+  IN      EFI_GRAPHICS_OUTPUT_MODE_INFORMATION  *FrameBufferInfo,\r
+  IN OUT  FRAME_BUFFER_CONFIGURE                *Configure,\r
+  IN OUT  UINTN                                 *ConfigureSize\r
+  );\r
+\r
+/**\r
+  Performs a UEFI Graphics Output Protocol Blt operation.\r
+\r
+  @param[in]     Configure    Pointer to a configuration which was successfully\r
+                              created by FrameBufferBltConfigure ().\r
+  @param[in,out] BltBuffer    The data to transfer to screen.\r
+  @param[in]     BltOperation The operation to perform.\r
+  @param[in]     SourceX      The X coordinate of the source for BltOperation.\r
+  @param[in]     SourceY      The Y coordinate of the source for BltOperation.\r
+  @param[in]     DestinationX The X coordinate of the destination for\r
+                              BltOperation.\r
+  @param[in]     DestinationY The Y coordinate of the destination for\r
+                              BltOperation.\r
+  @param[in]     Width        The width of a rectangle in the blt rectangle\r
+                              in pixels.\r
+  @param[in]     Height       The height of a rectangle in the blt rectangle\r
+                              in pixels.\r
+  @param[in]     Delta        Not used for EfiBltVideoFill and\r
+                              EfiBltVideoToVideo operation. If a Delta of 0\r
+                              is used, the entire BltBuffer will be operated\r
+                              on. If a subrectangle of the BltBuffer is\r
+                              used, then Delta represents the number of\r
+                              bytes in a row of the BltBuffer.\r
+\r
+  @retval RETURN_INVALID_PARAMETER Invalid parameter were passed in.\r
+  @retval RETURN_SUCCESS           The Blt operation was performed successfully.\r
+**/\r
+RETURN_STATUS\r
+EFIAPI\r
+FrameBufferBlt (\r
+  IN     FRAME_BUFFER_CONFIGURE             *Configure,\r
+  IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL      *BltBuffer, OPTIONAL\r
+  IN     EFI_GRAPHICS_OUTPUT_BLT_OPERATION  BltOperation,\r
+  IN     UINTN                              SourceX,\r
+  IN     UINTN                              SourceY,\r
+  IN     UINTN                              DestinationX,\r
+  IN     UINTN                              DestinationY,\r
+  IN     UINTN                              Width,\r
+  IN     UINTN                              Height,\r
+  IN     UINTN                              Delta\r
+  );\r
+\r
+#endif\r