]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Efi/Protocol/GraphicsOutput/GraphicsOutput.h
Update Guid Value format.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Efi / Protocol / GraphicsOutput / GraphicsOutput.h
CommitLineData
3eb9473e 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 GraphicsOutput.h\r
15\r
16Abstract:\r
17\r
18 Graphics Output Protocol from the UEFI 2.0 specification.\r
19\r
20 Abstraction of a very simple graphics device.\r
21\r
22--*/\r
23\r
24#ifndef __GRAPHICS_OUTPUT_H__\r
25#define __GRAPHICS_OUTPUT_H__\r
26\r
27#include EFI_PROTOCOL_DEFINITION (UgaDraw)\r
28\r
29#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \\r
30 { \\r
7ccf38a3 31 0x9042a9de, 0x23dc, 0x4a38, {0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a} \\r
3eb9473e 32 }\r
33\r
34typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;\r
35\r
36typedef struct {\r
37 UINT32 RedMask;\r
38 UINT32 GreenMask;\r
39 UINT32 BlueMask;\r
40 UINT32 ReservedMask;\r
41} EFI_PIXEL_BITMASK;\r
42\r
43typedef enum {\r
44 PixelRedGreenBlueReserved8BitPerColor,\r
45 PixelBlueGreenRedReserved8BitPerColor,\r
46 PixelBitMask,\r
47 PixelBltOnly,\r
48 PixelFormatMax\r
49} EFI_GRAPHICS_PIXEL_FORMAT;\r
50\r
51typedef struct {\r
52 UINT32 Version;\r
53 UINT32 HorizontalResolution;\r
54 UINT32 VerticalResolution;\r
55 EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;\r
56 EFI_PIXEL_BITMASK PixelInformation;\r
57 UINT32 PixelsPerScanLine;\r
58} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;\r
59\r
60typedef\r
61EFI_STATUS\r
62(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (\r
63 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
64 IN UINT32 ModeNumber,\r
65 OUT UINTN *SizeOfInfo,\r
66 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info\r
67 )\r
68/*++\r
69\r
70 Routine Description:\r
71 Return the current video mode information.\r
72\r
73 Arguments:\r
74 This - Protocol instance pointer.\r
75 ModeNumber - The mode number to return information on.\r
76 SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.\r
77 Info - A pointer to callee allocated buffer that returns information about ModeNumber.\r
78\r
79 Returns:\r
80 EFI_SUCCESS - Mode information returned.\r
81 EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.\r
82 EFI_NOT_STARTED - Video display is not initialized. Call SetMode () \r
83 EFI_INVALID_PARAMETER - One of the input args was NULL.\r
84\r
85--*/\r
86;\r
87\r
88typedef\r
89EFI_STATUS\r
90(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (\r
91 IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,\r
92 IN UINT32 ModeNumber\r
93 )\r
94/*++\r
95\r
96 Routine Description:\r
97 Return the current video mode information.\r
98\r
99 Arguments:\r
100 This - Protocol instance pointer.\r
101 ModeNumber - The mode number to be set.\r
102\r
103 Returns:\r
104 EFI_SUCCESS - Graphics mode was changed.\r
105 EFI_DEVICE_ERROR - The device had an error and could not complete the request.\r
106 EFI_UNSUPPORTED - ModeNumber is not supported by this device.\r
107\r
108--*/\r
109;\r
110\r
111typedef EFI_UGA_PIXEL EFI_GRAPHICS_OUTPUT_BLT_PIXEL;\r
112\r
113typedef union {\r
114 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;\r
115 UINT32 Raw;\r
116} EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;\r
117\r
118typedef enum {\r
119 EfiBltVideoFill,\r
120 EfiBltVideoToBltBuffer,\r
121 EfiBltBufferToVideo, \r
122 EfiBltVideoToVideo,\r
123 EfiGraphicsOutputBltOperationMax\r
124} EFI_GRAPHICS_OUTPUT_BLT_OPERATION;\r
125\r
126typedef\r
127EFI_STATUS\r
128(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (\r
129 IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,\r
130 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL * BltBuffer, OPTIONAL\r
131 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
132 IN UINTN SourceX,\r
133 IN UINTN SourceY,\r
134 IN UINTN DestinationX,\r
135 IN UINTN DestinationY,\r
136 IN UINTN Width,\r
137 IN UINTN Height,\r
138 IN UINTN Delta OPTIONAL\r
139 );\r
140\r
141/*++\r
142\r
143 Routine Description:\r
144 The following table defines actions for BltOperations:\r
145 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY) \r
146 directly to every pixel of the video display rectangle \r
147 (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
148 Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
149 EfiBltVideoToBltBuffer - Read data from the video display rectangle \r
150 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in \r
151 the BltBuffer rectangle (DestinationX, DestinationY ) \r
152 (DestinationX + Width, DestinationY + Height). If DestinationX or \r
153 DestinationY is not zero then Delta must be set to the length in bytes \r
154 of a row in the BltBuffer.\r
155 EfiBltBufferToVideo - Write data from the BltBuffer rectangle \r
156 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the \r
157 video display rectangle (DestinationX, DestinationY) \r
158 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is \r
159 not zero then Delta must be set to the length in bytes of a row in the \r
160 BltBuffer.\r
161 EfiBltVideoToVideo - Copy from the video display rectangle (SourceX, SourceY)\r
162 (SourceX + Width, SourceY + Height) .to the video display rectangle \r
163 (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height). \r
164 The BltBuffer and Delta are not used in this mode.\r
165\r
166 Arguments:\r
167 This - Protocol instance pointer.\r
168 BltBuffer - Buffer containing data to blit into video buffer. This \r
169 buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
170 BltOperation - Operation to perform on BlitBuffer and video memory\r
171 SourceX - X coordinate of source for the BltBuffer.\r
172 SourceY - Y coordinate of source for the BltBuffer.\r
173 DestinationX - X coordinate of destination for the BltBuffer.\r
174 DestinationY - Y coordinate of destination for the BltBuffer.\r
175 Width - Width of rectangle in BltBuffer in pixels.\r
176 Height - Hight of rectangle in BltBuffer in pixels.\r
177 Delta -\r
178 \r
179 Returns:\r
180 EFI_SUCCESS - The Blt operation completed.\r
181 EFI_INVALID_PARAMETER - BltOperation is not valid.\r
182 EFI_DEVICE_ERROR - A hardware error occured writting to the video \r
183 buffer.\r
184\r
185--*/\r
186;\r
187\r
188typedef struct {\r
189 UINT32 MaxMode;\r
190 UINT32 Mode;\r
191 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;\r
192 UINTN SizeOfInfo;\r
193 EFI_PHYSICAL_ADDRESS FrameBufferBase;\r
194 UINTN FrameBufferSize;\r
195} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;\r
196\r
e5bce275 197struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {\r
3eb9473e 198 EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode;\r
199 EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode;\r
200 EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt;\r
201 EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;\r
e5bce275 202};\r
3eb9473e 203\r
204extern EFI_GUID gEfiGraphicsOutputProtocolGuid;\r
205\r
206#endif\r