+++ /dev/null
-/*++\r
-\r
-Copyright (c) 2006, 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
-\r
-Module Name:\r
-\r
- GraphicsOutput.h\r
-\r
-Abstract:\r
-\r
- Graphics Output Protocol from the UEFI 2.0 specification.\r
-\r
- Abstraction of a very simple graphics device.\r
-\r
---*/\r
-\r
-#ifndef __GRAPHICS_OUTPUT_H__\r
-#define __GRAPHICS_OUTPUT_H__\r
-\r
-#include EFI_PROTOCOL_DEFINITION (UgaDraw)\r
-\r
-#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \\r
- { \\r
- 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a} \\r
- }\r
-\r
-typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;\r
-\r
-typedef struct {\r
- UINT32 RedMask;\r
- UINT32 GreenMask;\r
- UINT32 BlueMask;\r
- UINT32 ReservedMask;\r
-} EFI_PIXEL_BITMASK;\r
-\r
-typedef enum {\r
- PixelRedGreenBlueReserved8BitPerColor,\r
- PixelBlueGreenRedReserved8BitPerColor,\r
- PixelBitMask,\r
- PixelBltOnly,\r
- PixelFormatMax\r
-} EFI_GRAPHICS_PIXEL_FORMAT;\r
-\r
-typedef struct {\r
- UINT32 Version;\r
- UINT32 HorizontalResolution;\r
- UINT32 VerticalResolution;\r
- EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;\r
- EFI_PIXEL_BITMASK PixelInformation;\r
- UINT32 PixelsPerScanLine;\r
-} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (\r
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
- IN UINT32 ModeNumber,\r
- OUT UINTN *SizeOfInfo,\r
- OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- Return the current video mode information.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
- ModeNumber - The mode number to return information on.\r
- SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.\r
- Info - A pointer to callee allocated buffer that returns information about ModeNumber.\r
-\r
- Returns:\r
- EFI_SUCCESS - Mode information returned.\r
- EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.\r
- EFI_NOT_STARTED - Video display is not initialized. Call SetMode () \r
- EFI_INVALID_PARAMETER - One of the input args was NULL.\r
-\r
---*/\r
-;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (\r
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,\r
- IN UINT32 ModeNumber\r
- )\r
-/*++\r
-\r
- Routine Description:\r
- Return the current video mode information.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
- ModeNumber - The mode number to be set.\r
-\r
- Returns:\r
- EFI_SUCCESS - Graphics mode was changed.\r
- EFI_DEVICE_ERROR - The device had an error and could not complete the request.\r
- EFI_UNSUPPORTED - ModeNumber is not supported by this device.\r
-\r
---*/\r
-;\r
-\r
-typedef EFI_UGA_PIXEL EFI_GRAPHICS_OUTPUT_BLT_PIXEL;\r
-\r
-typedef union {\r
- EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;\r
- UINT32 Raw;\r
-} EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;\r
-\r
-typedef enum {\r
- EfiBltVideoFill,\r
- EfiBltVideoToBltBuffer,\r
- EfiBltBufferToVideo, \r
- EfiBltVideoToVideo,\r
- EfiGraphicsOutputBltOperationMax\r
-} EFI_GRAPHICS_OUTPUT_BLT_OPERATION;\r
-\r
-typedef\r
-EFI_STATUS\r
-(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (\r
- IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,\r
- IN 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 OPTIONAL\r
- );\r
-\r
-/*++\r
-\r
- Routine Description:\r
- The following table defines actions for BltOperations:\r
- EfiBltVideoFill - 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
- EfiBltVideoToBltBuffer - 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
- EfiBltBufferToVideo - 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
- EfiBltVideoToVideo - 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
- Arguments:\r
- This - Protocol instance pointer.\r
- BltBuffer - Buffer containing data to blit into video buffer. This \r
- buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
- BltOperation - Operation to perform on BlitBuffer and video memory\r
- SourceX - X coordinate of source for the BltBuffer.\r
- SourceY - Y coordinate of source for the BltBuffer.\r
- DestinationX - X coordinate of destination for the BltBuffer.\r
- DestinationY - Y coordinate of destination for the BltBuffer.\r
- Width - Width of rectangle in BltBuffer in pixels.\r
- Height - Hight of rectangle in BltBuffer in pixels.\r
- Delta -\r
- \r
- Returns:\r
- EFI_SUCCESS - The Blt operation completed.\r
- EFI_INVALID_PARAMETER - BltOperation is not valid.\r
- EFI_DEVICE_ERROR - A hardware error occured writting to the video \r
- buffer.\r
-\r
---*/\r
-;\r
-\r
-typedef struct {\r
- UINT32 MaxMode;\r
- UINT32 Mode;\r
- EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;\r
- UINTN SizeOfInfo;\r
- EFI_PHYSICAL_ADDRESS FrameBufferBase;\r
- UINTN FrameBufferSize;\r
-} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;\r
-\r
-struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {\r
- EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode;\r
- EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode;\r
- EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt;\r
- EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;\r
-};\r
-\r
-extern EFI_GUID gEfiGraphicsOutputProtocolGuid;\r
-\r
-#endif\r