]> git.proxmox.com Git - mirror_edk2.git/blob - OptionRomPkg/Include/Library/BltLib.h
ArmPkg/CompilerIntrinsicsLib: Add uread, uwrite GCC assembly sources
[mirror_edk2.git] / OptionRomPkg / Include / Library / BltLib.h
1 /** @file
2 Library for performing video blt operations
3
4 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __BLT_LIB__
10 #define __BLT_LIB__
11
12 #include <Protocol/GraphicsOutput.h>
13
14
15 /**
16 Configure the BltLib for a frame-buffer
17
18 @param[in] FrameBuffer Pointer to the start of the frame buffer
19 @param[in] FrameBufferInfo Describes the frame buffer characteristics
20
21 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
22 @retval EFI_SUCCESS - Blt operation success
23
24 **/
25 EFI_STATUS
26 EFIAPI
27 BltLibConfigure (
28 IN VOID *FrameBuffer,
29 IN EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *FrameBufferInfo
30 );
31
32
33 /**
34 Performs a UEFI Graphics Output Protocol Blt operation.
35
36 @param[in,out] BltBuffer - The data to transfer to screen
37 @param[in] BltOperation - The operation to perform
38 @param[in] SourceX - The X coordinate of the source for BltOperation
39 @param[in] SourceY - The Y coordinate of the source for BltOperation
40 @param[in] DestinationX - The X coordinate of the destination for BltOperation
41 @param[in] DestinationY - The Y coordinate of the destination for BltOperation
42 @param[in] Width - The width of a rectangle in the blt rectangle in pixels
43 @param[in] Height - The height of a rectangle in the blt rectangle in pixels
44 @param[in] Delta - Not used for EfiBltVideoFill and EfiBltVideoToVideo operation.
45 If a Delta of 0 is used, the entire BltBuffer will be operated on.
46 If a subrectangle of the BltBuffer is used, then Delta represents
47 the number of bytes in a row of the BltBuffer.
48
49 @retval EFI_DEVICE_ERROR - A hardware error occured
50 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
51 @retval EFI_SUCCESS - Blt operation success
52
53 **/
54 EFI_STATUS
55 EFIAPI
56 BltLibGopBlt (
57 IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL
58 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
59 IN UINTN SourceX,
60 IN UINTN SourceY,
61 IN UINTN DestinationX,
62 IN UINTN DestinationY,
63 IN UINTN Width,
64 IN UINTN Height,
65 IN UINTN Delta
66 );
67
68
69 /**
70 Performs a UEFI Graphics Output Protocol Blt Video Fill.
71
72 @param[in] Color Color to fill the region with
73 @param[in] DestinationX X location to start fill operation
74 @param[in] DestinationY Y location to start fill operation
75 @param[in] Width Width (in pixels) to fill
76 @param[in] Height Height to fill
77
78 @retval EFI_DEVICE_ERROR - A hardware error occured
79 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
80 @retval EFI_SUCCESS - Blt operation success
81
82 **/
83 EFI_STATUS
84 EFIAPI
85 BltLibVideoFill (
86 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *Color,
87 IN UINTN DestinationX,
88 IN UINTN DestinationY,
89 IN UINTN Width,
90 IN UINTN Height
91 );
92
93
94 /**
95 Performs a UEFI Graphics Output Protocol Blt Video to Buffer operation.
96
97 @param[out] BltBuffer Output buffer for pixel color data
98 @param[in] SourceX X location within video
99 @param[in] SourceY Y location within video
100 @param[in] Width Width (in pixels)
101 @param[in] Height Height
102
103 @retval EFI_DEVICE_ERROR - A hardware error occured
104 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
105 @retval EFI_SUCCESS - Blt operation success
106
107 **/
108 EFI_STATUS
109 EFIAPI
110 BltLibVideoToBltBuffer (
111 OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,
112 IN UINTN SourceX,
113 IN UINTN SourceY,
114 IN UINTN Width,
115 IN UINTN Height
116 );
117
118
119 /**
120 Performs a UEFI Graphics Output Protocol Blt Video to Buffer operation
121 with extended parameters.
122
123 @param[out] BltBuffer Output buffer for pixel color data
124 @param[in] SourceX X location within video
125 @param[in] SourceY Y location within video
126 @param[in] DestinationX X location within BltBuffer
127 @param[in] DestinationY Y location within BltBuffer
128 @param[in] Width Width (in pixels)
129 @param[in] Height Height
130 @param[in] Delta Number of bytes in a row of BltBuffer
131
132 @retval EFI_DEVICE_ERROR - A hardware error occured
133 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
134 @retval EFI_SUCCESS - Blt operation success
135
136 **/
137 EFI_STATUS
138 EFIAPI
139 BltLibVideoToBltBufferEx (
140 OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,
141 IN UINTN SourceX,
142 IN UINTN SourceY,
143 IN UINTN DestinationX,
144 IN UINTN DestinationY,
145 IN UINTN Width,
146 IN UINTN Height,
147 IN UINTN Delta
148 );
149
150
151 /**
152 Performs a UEFI Graphics Output Protocol Blt Buffer to Video operation.
153
154 @param[in] BltBuffer Output buffer for pixel color data
155 @param[in] DestinationX X location within video
156 @param[in] DestinationY Y location within video
157 @param[in] Width Width (in pixels)
158 @param[in] Height Height
159
160 @retval EFI_DEVICE_ERROR - A hardware error occured
161 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
162 @retval EFI_SUCCESS - Blt operation success
163
164 **/
165 EFI_STATUS
166 EFIAPI
167 BltLibBufferToVideo (
168 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,
169 IN UINTN DestinationX,
170 IN UINTN DestinationY,
171 IN UINTN Width,
172 IN UINTN Height
173 );
174
175
176 /**
177 Performs a UEFI Graphics Output Protocol Blt Buffer to Video operation
178 with extended parameters.
179
180 @param[in] BltBuffer Output buffer for pixel color data
181 @param[in] SourceX X location within BltBuffer
182 @param[in] SourceY Y location within BltBuffer
183 @param[in] DestinationX X location within video
184 @param[in] DestinationY Y location within video
185 @param[in] Width Width (in pixels)
186 @param[in] Height Height
187 @param[in] Delta Number of bytes in a row of BltBuffer
188
189 @retval EFI_DEVICE_ERROR - A hardware error occured
190 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
191 @retval EFI_SUCCESS - Blt operation success
192
193 **/
194 EFI_STATUS
195 EFIAPI
196 BltLibBufferToVideoEx (
197 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer,
198 IN UINTN SourceX,
199 IN UINTN SourceY,
200 IN UINTN DestinationX,
201 IN UINTN DestinationY,
202 IN UINTN Width,
203 IN UINTN Height,
204 IN UINTN Delta
205 );
206
207
208 /**
209 Performs a UEFI Graphics Output Protocol Blt Video to Video operation
210
211 @param[in] SourceX X location within video
212 @param[in] SourceY Y location within video
213 @param[in] DestinationX X location within video
214 @param[in] DestinationY Y location within video
215 @param[in] Width Width (in pixels)
216 @param[in] Height Height
217
218 @retval EFI_DEVICE_ERROR - A hardware error occured
219 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
220 @retval EFI_SUCCESS - Blt operation success
221
222 **/
223 EFI_STATUS
224 EFIAPI
225 BltLibVideoToVideo (
226 IN UINTN SourceX,
227 IN UINTN SourceY,
228 IN UINTN DestinationX,
229 IN UINTN DestinationY,
230 IN UINTN Width,
231 IN UINTN Height
232 );
233
234
235 /**
236 Returns the sizes related to the video device
237
238 @param[out] Width Width (in pixels)
239 @param[out] Height Height (in pixels)
240
241 @retval EFI_INVALID_PARAMETER - Invalid parameter passed in
242 @retval EFI_SUCCESS - The sizes were returned
243
244 **/
245 EFI_STATUS
246 EFIAPI
247 BltLibGetSizes (
248 OUT UINTN *Width, OPTIONAL
249 OUT UINTN *Height OPTIONAL
250 );
251
252 #endif
253