iPXE
UgaDraw.h File Reference

UGA Draw protocol from the EFI 1.10 specification. More...

Go to the source code of this file.

Data Structures

struct  EFI_UGA_PIXEL
union  EFI_UGA_PIXEL_UNION
struct  _EFI_UGA_DRAW_PROTOCOL
 This protocol provides a basic abstraction to set video modes and copy pixels to and from the graphics controller's frame buffer. More...

Macros

#define __UGA_DRAW_H__
#define EFI_UGA_DRAW_PROTOCOL_GUID

Typedefs

typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL
typedef EFI_STATUS(EFIAPIEFI_UGA_DRAW_PROTOCOL_GET_MODE) (IN EFI_UGA_DRAW_PROTOCOL *This, OUT UINT32 *HorizontalResolution, OUT UINT32 *VerticalResolution, OUT UINT32 *ColorDepth, OUT UINT32 *RefreshRate)
 Return the current video mode information.
typedef EFI_STATUS(EFIAPIEFI_UGA_DRAW_PROTOCOL_SET_MODE) (IN EFI_UGA_DRAW_PROTOCOL *This, IN UINT32 HorizontalResolution, IN UINT32 VerticalResolution, IN UINT32 ColorDepth, IN UINT32 RefreshRate)
 Set the current video mode information.
typedef EFI_STATUS(EFIAPIEFI_UGA_DRAW_PROTOCOL_BLT) (IN EFI_UGA_DRAW_PROTOCOL *This, IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, IN EFI_UGA_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta OPTIONAL)
 Blt a rectangle of pixels on the graphics screen.

Enumerations

enum  EFI_UGA_BLT_OPERATION {
  EfiUgaVideoFill , EfiUgaVideoToBltBuffer , EfiUgaBltBufferToVideo , EfiUgaVideoToVideo ,
  EfiUgaBltMax
}
 Enumration value for actions of Blt operations. More...

Functions

 FILE_LICENCE (BSD2_PATENT)
 FILE_SECBOOT (PERMITTED)

Variables

EFI_GUID gEfiUgaDrawProtocolGuid

Detailed Description

UGA Draw protocol from the EFI 1.10 specification.

Abstraction of a very simple graphics device.

Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file UgaDraw.h.

Macro Definition Documentation

◆ __UGA_DRAW_H__

#define __UGA_DRAW_H__

Definition at line 15 of file UgaDraw.h.

◆ EFI_UGA_DRAW_PROTOCOL_GUID

#define EFI_UGA_DRAW_PROTOCOL_GUID
Value:
{ \
0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \
}

Definition at line 20 of file UgaDraw.h.

20#define EFI_UGA_DRAW_PROTOCOL_GUID \
21 { \
22 0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \
23 }

Typedef Documentation

◆ EFI_UGA_DRAW_PROTOCOL

Definition at line 25 of file UgaDraw.h.

◆ EFI_UGA_DRAW_PROTOCOL_GET_MODE

typedef EFI_STATUS(EFIAPI * EFI_UGA_DRAW_PROTOCOL_GET_MODE) (IN EFI_UGA_DRAW_PROTOCOL *This, OUT UINT32 *HorizontalResolution, OUT UINT32 *VerticalResolution, OUT UINT32 *ColorDepth, OUT UINT32 *RefreshRate)

Return the current video mode information.

Parameters
ThisThe EFI_UGA_DRAW_PROTOCOL instance.
HorizontalResolutionThe size of video screen in pixels in the X dimension.
VerticalResolutionThe size of video screen in pixels in the Y dimension.
ColorDepthNumber of bits per pixel, currently defined to be 32.
RefreshRateThe refresh rate of the monitor in Hertz.
Return values
EFI_SUCCESSMode information returned.
EFI_NOT_STARTEDVideo display is not initialized. Call SetMode ()
EFI_INVALID_PARAMETEROne of the input args was NULL.

Definition at line 42 of file UgaDraw.h.

◆ EFI_UGA_DRAW_PROTOCOL_SET_MODE

typedef EFI_STATUS(EFIAPI * EFI_UGA_DRAW_PROTOCOL_SET_MODE) (IN EFI_UGA_DRAW_PROTOCOL *This, IN UINT32 HorizontalResolution, IN UINT32 VerticalResolution, IN UINT32 ColorDepth, IN UINT32 RefreshRate)

Set the current video mode information.

Parameters
ThisThe EFI_UGA_DRAW_PROTOCOL instance.
HorizontalResolutionThe size of video screen in pixels in the X dimension.
VerticalResolutionThe size of video screen in pixels in the Y dimension.
ColorDepthNumber of bits per pixel, currently defined to be 32.
RefreshRateThe refresh rate of the monitor in Hertz.
Return values
EFI_SUCCESSMode information returned.
EFI_NOT_STARTEDVideo display is not initialized. Call SetMode ()

Definition at line 65 of file UgaDraw.h.

◆ EFI_UGA_DRAW_PROTOCOL_BLT

typedef EFI_STATUS(EFIAPI * EFI_UGA_DRAW_PROTOCOL_BLT) (IN EFI_UGA_DRAW_PROTOCOL *This, IN EFI_UGA_PIXEL *BltBuffer OPTIONAL, IN EFI_UGA_BLT_OPERATION BltOperation, IN UINTN SourceX, IN UINTN SourceY, IN UINTN DestinationX, IN UINTN DestinationY, IN UINTN Width, IN UINTN Height, IN UINTN Delta OPTIONAL)

Blt a rectangle of pixels on the graphics screen.

Parameters
[in]This- Protocol instance pointer.
[in]BltBuffer- Buffer containing data to blit into video buffer. This buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
[in]BltOperation- Operation to perform on BlitBuffer and video memory
[in]SourceX- X coordinate of source for the BltBuffer.
[in]SourceY- Y coordinate of source for the BltBuffer.
[in]DestinationX- X coordinate of destination for the BltBuffer.
[in]DestinationY- Y coordinate of destination for the BltBuffer.
[in]Width- Width of rectangle in BltBuffer in pixels.
[in]Height- Hight of rectangle in BltBuffer in pixels.
[in]Delta- OPTIONAL
Return values
EFI_SUCCESS- The Blt operation completed.
EFI_INVALID_PARAMETER- BltOperation is not valid.
EFI_DEVICE_ERROR- A hardware error occurred writting to the video buffer.

Definition at line 139 of file UgaDraw.h.

Enumeration Type Documentation

◆ EFI_UGA_BLT_OPERATION

Enumration value for actions of Blt operations.

Enumerator
EfiUgaVideoFill 

Write data from the BltBuffer pixel (SourceX, SourceY) directly to every pixel of the video display rectangle (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).

Only one pixel will be used from the BltBuffer. Delta is NOT used.

EfiUgaVideoToBltBuffer 

Read data from the video display rectangle (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in the BltBuffer rectangle (DestinationX, DestinationY ) (DestinationX + Width, DestinationY + Height).

If DestinationX or DestinationY is not zero then Delta must be set to the length in bytes of a row in the BltBuffer.

EfiUgaBltBufferToVideo 

Write data from the BltBuffer rectangle (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the video display rectangle (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).

If SourceX or SourceY is not zero then Delta must be set to the length in bytes of a row in the BltBuffer.

EfiUgaVideoToVideo 

Copy from the video display rectangle (SourceX, SourceY) (SourceX + Width, SourceY + Height) .to the video display rectangle (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).

The BltBuffer and Delta are not used in this mode.

EfiUgaBltMax 

Maxmimum value for enumration value of Blt operation.

If a Blt operation larger or equal to this enumration value, it is invalid.

Definition at line 89 of file UgaDraw.h.

89 {
90 EfiUgaVideoFill, ///< Write data from the BltBuffer pixel (SourceX, SourceY)
91 ///< directly to every pixel of the video display rectangle
92 ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
93 ///< Only one pixel will be used from the BltBuffer. Delta is NOT used.
94
95 EfiUgaVideoToBltBuffer, ///< Read data from the video display rectangle
96 ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
97 ///< the BltBuffer rectangle (DestinationX, DestinationY )
98 ///< (DestinationX + Width, DestinationY + Height). If DestinationX or
99 ///< DestinationY is not zero then Delta must be set to the length in bytes
100 ///< of a row in the BltBuffer.
101
102 EfiUgaBltBufferToVideo, ///< Write data from the BltBuffer rectangle
103 ///< (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
104 ///< video display rectangle (DestinationX, DestinationY)
105 ///< (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
106 ///< not zero then Delta must be set to the length in bytes of a row in the
107 ///< BltBuffer.
108
109 EfiUgaVideoToVideo, ///< Copy from the video display rectangle (SourceX, SourceY)
110 ///< (SourceX + Width, SourceY + Height) .to the video display rectangle
111 ///< (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
112 ///< The BltBuffer and Delta are not used in this mode.
113
114 EfiUgaBltMax ///< Maxmimum value for enumration value of Blt operation. If a Blt operation
115 ///< larger or equal to this enumration value, it is invalid.
EFI_UGA_BLT_OPERATION
Enumration value for actions of Blt operations.
Definition UgaDraw.h:89
@ EfiUgaVideoToVideo
Copy from the video display rectangle (SourceX, SourceY) (SourceX + Width, SourceY + Height) ....
Definition UgaDraw.h:109
@ EfiUgaVideoToBltBuffer
Read data from the video display rectangle (SourceX, SourceY) (SourceX + Width, SourceY + Height) and...
Definition UgaDraw.h:95
@ EfiUgaBltBufferToVideo
Write data from the BltBuffer rectangle (SourceX, SourceY) (SourceX + Width, SourceY + Height) direct...
Definition UgaDraw.h:102
@ EfiUgaVideoFill
Write data from the BltBuffer pixel (SourceX, SourceY) directly to every pixel of the video display r...
Definition UgaDraw.h:90
@ EfiUgaBltMax
Maxmimum value for enumration value of Blt operation.
Definition UgaDraw.h:114

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( BSD2_PATENT )

◆ FILE_SECBOOT()

FILE_SECBOOT ( PERMITTED )

Variable Documentation

◆ gEfiUgaDrawProtocolGuid

EFI_GUID gEfiUgaDrawProtocolGuid
extern