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