Support a.out format in nlist only on i386
[freebsd-src.git] / sys / boot / efi / include / efiuga.h
blobe5dec921628a6430081e080a64b08f5c446c30e7
1 /* $FreeBSD$ */
2 /** @file
3 UGA Draw protocol from the EFI 1.1 specification.
5 Abstraction of a very simple graphics device.
7 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
9 This program and the accompanying materials are licensed and made available
10 under the terms and conditions of the BSD License which accompanies this
11 distribution. The full text of the license may be found at:
12 http://opensource.org/licenses/bsd-license.php
14 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
17 File name: UgaDraw.h
19 **/
21 #ifndef __UGA_DRAW_H__
22 #define __UGA_DRAW_H__
24 #define EFI_UGA_DRAW_PROTOCOL_GUID \
25 { \
26 0x982c298b, 0xf4fa, 0x41cb, {0xb8, 0x38, 0x77, 0xaa, 0x68, 0x8f, 0xb8, 0x39 } \
29 typedef struct _EFI_UGA_DRAW_PROTOCOL EFI_UGA_DRAW_PROTOCOL;
31 /**
32 Return the current video mode information.
34 @param This Protocol instance pointer.
35 @param HorizontalResolution Current video horizontal resolution in pixels
36 @param VerticalResolution Current video vertical resolution in pixels
37 @param ColorDepth Current video color depth in bits per pixel
38 @param RefreshRate Current video refresh rate in Hz.
40 @retval EFI_SUCCESS Mode information returned.
41 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
42 @retval EFI_INVALID_PARAMETER One of the input args was NULL.
44 **/
45 typedef
46 EFI_STATUS
47 (EFIAPI *EFI_UGA_DRAW_PROTOCOL_GET_MODE) (
48 IN EFI_UGA_DRAW_PROTOCOL *This,
49 OUT UINT32 *HorizontalResolution,
50 OUT UINT32 *VerticalResolution,
51 OUT UINT32 *ColorDepth,
52 OUT UINT32 *RefreshRate
56 /**
57 Return the current video mode information.
59 @param This Protocol instance pointer.
60 @param HorizontalResolution Current video horizontal resolution in pixels
61 @param VerticalResolution Current video vertical resolution in pixels
62 @param ColorDepth Current video color depth in bits per pixel
63 @param RefreshRate Current video refresh rate in Hz.
65 @retval EFI_SUCCESS Mode information returned.
66 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()
68 **/
69 typedef
70 EFI_STATUS
71 (EFIAPI *EFI_UGA_DRAW_PROTOCOL_SET_MODE) (
72 IN EFI_UGA_DRAW_PROTOCOL *This,
73 IN UINT32 HorizontalResolution,
74 IN UINT32 VerticalResolution,
75 IN UINT32 ColorDepth,
76 IN UINT32 RefreshRate
80 typedef struct {
81 UINT8 Blue;
82 UINT8 Green;
83 UINT8 Red;
84 UINT8 Reserved;
85 } EFI_UGA_PIXEL;
87 typedef union {
88 EFI_UGA_PIXEL Pixel;
89 UINT32 Raw;
90 } EFI_UGA_PIXEL_UNION;
92 typedef enum {
93 EfiUgaVideoFill,
94 EfiUgaVideoToBltBuffer,
95 EfiUgaBltBufferToVideo,
96 EfiUgaVideoToVideo,
97 EfiUgaBltMax
98 } EFI_UGA_BLT_OPERATION;
101 Type specifying a pointer to a function to perform an UGA Blt operation.
103 The following table defines actions for BltOperations:
105 <B>EfiUgaVideoFill</B> - Write data from the BltBuffer pixel (SourceX, SourceY)
106 directly to every pixel of the video display rectangle
107 (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
108 Only one pixel will be used from the BltBuffer. Delta is NOT used.
110 <B>EfiUgaVideoToBltBuffer</B> - Read data from the video display rectangle
111 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
112 the BltBuffer rectangle (DestinationX, DestinationY )
113 (DestinationX + Width, DestinationY + Height). If DestinationX or
114 DestinationY is not zero then Delta must be set to the length in bytes
115 of a row in the BltBuffer.
117 <B>EfiUgaBltBufferToVideo</B> - Write data from the BltBuffer rectangle
118 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
119 video display rectangle (DestinationX, DestinationY)
120 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
121 not zero then Delta must be set to the length in bytes of a row in the
122 BltBuffer.
124 <B>EfiUgaVideoToVideo</B> - Copy from the video display rectangle (SourceX, SourceY)
125 (SourceX + Width, SourceY + Height) .to the video display rectangle
126 (DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
127 The BltBuffer and Delta are not used in this mode.
130 @param[in] This - Protocol instance pointer.
131 @param[in] BltBuffer - Buffer containing data to blit into video buffer. This
132 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)
133 @param[in] BltOperation - Operation to perform on BlitBuffer and video memory
134 @param[in] SourceX - X coordinate of source for the BltBuffer.
135 @param[in] SourceY - Y coordinate of source for the BltBuffer.
136 @param[in] DestinationX - X coordinate of destination for the BltBuffer.
137 @param[in] DestinationY - Y coordinate of destination for the BltBuffer.
138 @param[in] Width - Width of rectangle in BltBuffer in pixels.
139 @param[in] Height - Hight of rectangle in BltBuffer in pixels.
140 @param[in] Delta - OPTIONAL
142 @retval EFI_SUCCESS - The Blt operation completed.
143 @retval EFI_INVALID_PARAMETER - BltOperation is not valid.
144 @retval EFI_DEVICE_ERROR - A hardware error occured writting to the video buffer.
146 --*/
147 typedef
148 EFI_STATUS
149 (EFIAPI *EFI_UGA_DRAW_PROTOCOL_BLT) (
150 IN EFI_UGA_DRAW_PROTOCOL * This,
151 IN EFI_UGA_PIXEL * BltBuffer, OPTIONAL
152 IN EFI_UGA_BLT_OPERATION BltOperation,
153 IN UINTN SourceX,
154 IN UINTN SourceY,
155 IN UINTN DestinationX,
156 IN UINTN DestinationY,
157 IN UINTN Width,
158 IN UINTN Height,
159 IN UINTN Delta OPTIONAL
162 struct _EFI_UGA_DRAW_PROTOCOL {
163 EFI_UGA_DRAW_PROTOCOL_GET_MODE GetMode;
164 EFI_UGA_DRAW_PROTOCOL_SET_MODE SetMode;
165 EFI_UGA_DRAW_PROTOCOL_BLT Blt;
168 extern EFI_GUID gEfiUgaDrawProtocolGuid;
170 #endif