]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.h
MdeModulePkg: Use EfiEventEmptyFunction from UefiLib
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConSplitterDxe / ConSplitter.h
CommitLineData
a4d608d1 1/** @file\r
95276127 2 Private data structures for the Console Splitter driver\r
3\r
ac72474d 4Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
e5eed7d3 5This program and the accompanying materials\r
95276127 6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef _CON_SPLITTER_H_\r
16#define _CON_SPLITTER_H_\r
17\r
60c93673 18#include <Uefi.h>\r
838a9c58 19#include <PiDxe.h>\r
20\r
fc753d3b 21#include <Protocol/DevicePath.h>\r
22#include <Protocol/ComponentName.h>\r
23#include <Protocol/DriverBinding.h>\r
97a079ed 24#include <Protocol/SimplePointer.h>\r
8ae0b360 25#include <Protocol/AbsolutePointer.h>\r
97a079ed 26#include <Protocol/SimpleTextOut.h>\r
97a079ed 27#include <Protocol/SimpleTextIn.h>\r
66aa04e4 28#include <Protocol/SimpleTextInEx.h>\r
fc753d3b 29#include <Protocol/GraphicsOutput.h>\r
30#include <Protocol/UgaDraw.h>\r
31\r
fc753d3b 32#include <Guid/ConsoleInDevice.h>\r
97a079ed
A
33#include <Guid/StandardErrorDevice.h>\r
34#include <Guid/ConsoleOutDevice.h>\r
f58f3de0 35#include <Guid/ConnectConInEvent.h>\r
fc753d3b 36\r
d0c64728 37#include <Library/PcdLib.h>\r
97a079ed
A
38#include <Library/DebugLib.h>\r
39#include <Library/UefiDriverEntryPoint.h>\r
40#include <Library/UefiLib.h>\r
41#include <Library/BaseLib.h>\r
42#include <Library/BaseMemoryLib.h>\r
43#include <Library/MemoryAllocationLib.h>\r
44#include <Library/UefiBootServicesTableLib.h>\r
189eac21 45#include <Library/UefiRuntimeServicesTableLib.h>\r
97a079ed 46\r
95276127 47//\r
97a079ed 48// Driver Binding Externs\r
95276127 49//\r
5bca971e 50extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConInDriverBinding;\r
51extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConInComponentName;\r
52extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConInComponentName2;\r
53extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterSimplePointerDriverBinding;\r
54extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterSimplePointerComponentName;\r
55extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterSimplePointerComponentName2;\r
b71f6b3c 56extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterAbsolutePointerDriverBinding;\r
8ae0b360 57extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterAbsolutePointerComponentName;\r
58extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterAbsolutePointerComponentName2;\r
5bca971e 59extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterConOutDriverBinding;\r
60extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterConOutComponentName;\r
61extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterConOutComponentName2;\r
62extern EFI_DRIVER_BINDING_PROTOCOL gConSplitterStdErrDriverBinding;\r
63extern EFI_COMPONENT_NAME_PROTOCOL gConSplitterStdErrComponentName;\r
64extern EFI_COMPONENT_NAME2_PROTOCOL gConSplitterStdErrComponentName2;\r
97a079ed 65\r
66aa04e4 66\r
fc753d3b 67//\r
97a079ed
A
68// These definitions were in the old Hii protocol, but are not in the new UEFI\r
69// version. So they are defined locally.\r
fc753d3b 70//\r
97a079ed 71#define UNICODE_NARROW_CHAR 0xFFF0\r
d0c64728 72#define UNICODE_WIDE_CHAR 0xFFF1\r
97a079ed 73\r
95276127 74\r
75//\r
76// Private Data Structures\r
77//\r
a9746199 78#define CONSOLE_SPLITTER_ALLOC_UNIT 32\r
95276127 79\r
189eac21 80\r
81typedef struct {\r
82 UINTN Column;\r
83 UINTN Row;\r
84} CONSOLE_OUT_MODE;\r
85\r
95276127 86typedef struct {\r
2da292f6 87 UINTN Columns;\r
88 UINTN Rows;\r
95276127 89} TEXT_OUT_SPLITTER_QUERY_DATA;\r
90\r
cf88579c 91#define KEY_STATE_VALID_EXPOSED (EFI_TOGGLE_STATE_VALID | EFI_KEY_STATE_EXPOSED)\r
95276127 92\r
fc753d3b 93#define TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'n')\r
66aa04e4 94\r
fc753d3b 95//\r
96// Private data for Text In Ex Splitter Notify\r
97//\r
66aa04e4 98typedef struct _TEXT_IN_EX_SPLITTER_NOTIFY {\r
99 UINTN Signature;\r
402e4a9d 100 VOID **NotifyHandleList;\r
66aa04e4 101 EFI_KEY_DATA KeyData;\r
102 EFI_KEY_NOTIFY_FUNCTION KeyNotificationFn;\r
103 LIST_ENTRY NotifyEntry;\r
104} TEXT_IN_EX_SPLITTER_NOTIFY;\r
8ae0b360 105\r
fc753d3b 106#define TEXT_IN_EX_SPLITTER_NOTIFY_FROM_THIS(a) \\r
107 CR ((a), \\r
108 TEXT_IN_EX_SPLITTER_NOTIFY, \\r
109 NotifyEntry, \\r
110 TEXT_IN_EX_SPLITTER_NOTIFY_SIGNATURE \\r
111 )\r
112\r
113#define TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'i', 'S', 'p')\r
114\r
115//\r
116// Private data for the Console In splitter\r
117//\r
95276127 118typedef struct {\r
db9d722d 119 UINT64 Signature;\r
120 EFI_HANDLE VirtualHandle;\r
121\r
122 EFI_SIMPLE_TEXT_INPUT_PROTOCOL TextIn;\r
123 UINTN CurrentNumberOfConsoles;\r
124 EFI_SIMPLE_TEXT_INPUT_PROTOCOL **TextInList;\r
125 UINTN TextInListCount;\r
126\r
127 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL TextInEx;\r
128 UINTN CurrentNumberOfExConsoles;\r
129 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL **TextInExList;\r
130 UINTN TextInExListCount;\r
aec072ad 131 LIST_ENTRY NotifyList;\r
cf88579c
SZ
132 //\r
133 // It will be initialized and synced between console input devices\r
134 // for toggle state sync.\r
135 //\r
136 EFI_KEY_TOGGLE_STATE PhysicalKeyToggleState;\r
137 //\r
138 // It will be initialized and used to record if virtual KeyState\r
139 // has been required to be exposed.\r
140 //\r
141 BOOLEAN VirtualKeyStateExported;\r
db9d722d 142\r
143\r
144 EFI_SIMPLE_POINTER_PROTOCOL SimplePointer;\r
145 EFI_SIMPLE_POINTER_MODE SimplePointerMode;\r
146 UINTN CurrentNumberOfPointers;\r
147 EFI_SIMPLE_POINTER_PROTOCOL **PointerList;\r
148 UINTN PointerListCount;\r
149\r
150 EFI_ABSOLUTE_POINTER_PROTOCOL AbsolutePointer;\r
151 EFI_ABSOLUTE_POINTER_MODE AbsolutePointerMode;\r
152 UINTN CurrentNumberOfAbsolutePointers;\r
153 EFI_ABSOLUTE_POINTER_PROTOCOL **AbsolutePointerList;\r
154 UINTN AbsolutePointerListCount;\r
aec072ad 155 BOOLEAN AbsoluteInputEventSignalState;\r
db9d722d 156\r
db9d722d 157 BOOLEAN KeyEventSignalState;\r
158 BOOLEAN InputEventSignalState;\r
89b5f4b3 159 EFI_EVENT ConnectConInEvent;\r
95276127 160} TEXT_IN_SPLITTER_PRIVATE_DATA;\r
161\r
162#define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \\r
fc753d3b 163 CR ((a), \\r
95276127 164 TEXT_IN_SPLITTER_PRIVATE_DATA, \\r
165 TextIn, \\r
166 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
167 )\r
168\r
169#define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_SIMPLE_POINTER_THIS(a) \\r
fc753d3b 170 CR ((a), \\r
95276127 171 TEXT_IN_SPLITTER_PRIVATE_DATA, \\r
172 SimplePointer, \\r
173 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
174 )\r
66aa04e4 175#define TEXT_IN_EX_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \\r
fc753d3b 176 CR (a, \\r
177 TEXT_IN_SPLITTER_PRIVATE_DATA, \\r
178 TextInEx, \\r
179 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
66aa04e4 180 )\r
181\r
182#define TEXT_IN_SPLITTER_PRIVATE_DATA_FROM_ABSOLUTE_POINTER_THIS(a) \\r
fc753d3b 183 CR (a, \\r
184 TEXT_IN_SPLITTER_PRIVATE_DATA, \\r
185 AbsolutePointer, \\r
186 TEXT_IN_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
66aa04e4 187 )\r
95276127 188\r
fc753d3b 189\r
f3f2e05d 190#define TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('T', 'o', 'S', 'p')\r
95276127 191\r
192typedef struct {\r
193 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;\r
194 EFI_UGA_DRAW_PROTOCOL *UgaDraw;\r
195 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut;\r
95276127 196} TEXT_OUT_AND_GOP_DATA;\r
197\r
fc753d3b 198//\r
199// Private data for the Console Out splitter\r
200//\r
95276127 201typedef struct {\r
4b5c4fba 202 UINT64 Signature;\r
203 EFI_HANDLE VirtualHandle;\r
204 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL TextOut;\r
205 EFI_SIMPLE_TEXT_OUTPUT_MODE TextOutMode;\r
ed055f1b 206\r
4b5c4fba 207 EFI_UGA_DRAW_PROTOCOL UgaDraw;\r
208 UINT32 UgaHorizontalResolution;\r
209 UINT32 UgaVerticalResolution;\r
210 UINT32 UgaColorDepth;\r
211 UINT32 UgaRefreshRate;\r
ed055f1b 212\r
4b5c4fba 213 EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;\r
aec072ad 214 EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *GraphicsOutputModeBuffer;\r
4b5c4fba 215 UINTN CurrentNumberOfGraphicsOutput;\r
216 UINTN CurrentNumberOfUgaDraw;\r
ed055f1b 217\r
4b5c4fba 218 UINTN CurrentNumberOfConsoles;\r
219 TEXT_OUT_AND_GOP_DATA *TextOutList;\r
220 UINTN TextOutListCount;\r
221 TEXT_OUT_SPLITTER_QUERY_DATA *TextOutQueryData;\r
222 UINTN TextOutQueryDataCount;\r
223 INT32 *TextOutModeMap;\r
ed055f1b 224\r
95276127 225} TEXT_OUT_SPLITTER_PRIVATE_DATA;\r
226\r
227#define TEXT_OUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \\r
fc753d3b 228 CR ((a), \\r
95276127 229 TEXT_OUT_SPLITTER_PRIVATE_DATA, \\r
230 TextOut, \\r
231 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
232 )\r
233\r
234#define GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \\r
fc753d3b 235 CR ((a), \\r
95276127 236 TEXT_OUT_SPLITTER_PRIVATE_DATA, \\r
237 GraphicsOutput, \\r
238 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
239 )\r
240\r
241#define UGA_DRAW_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \\r
fc753d3b 242 CR ((a), \\r
95276127 243 TEXT_OUT_SPLITTER_PRIVATE_DATA, \\r
244 UgaDraw, \\r
245 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
246 )\r
247\r
248#define CONSOLE_CONTROL_SPLITTER_PRIVATE_DATA_FROM_THIS(a) \\r
fc753d3b 249 CR ((a), \\r
95276127 250 TEXT_OUT_SPLITTER_PRIVATE_DATA, \\r
251 ConsoleControl, \\r
252 TEXT_OUT_SPLITTER_PRIVATE_DATA_SIGNATURE \\r
253 )\r
254\r
255//\r
256// Function Prototypes\r
257//\r
415df2a3 258\r
259/**\r
260 The user Entry Point for module ConSplitter. The user code starts with this function.\r
261\r
262 Installs driver module protocols and. Creates virtual device handles for ConIn,\r
263 ConOut, and StdErr. Installs Simple Text In protocol, Simple Text In Ex protocol,\r
ed055f1b 264 Simple Pointer protocol, Absolute Pointer protocol on those virtual handlers.\r
415df2a3 265 Installs Graphics Output protocol and/or UGA Draw protocol if needed.\r
266\r
267 @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
268 @param[in] SystemTable A pointer to the EFI System Table.\r
269\r
270 @retval EFI_SUCCESS The entry point is executed successfully.\r
271 @retval other Some error occurs when executing this entry point.\r
272\r
273**/\r
95276127 274EFI_STATUS\r
275EFIAPI\r
276ConSplitterDriverEntry (\r
277 IN EFI_HANDLE ImageHandle,\r
278 IN EFI_SYSTEM_TABLE *SystemTable\r
ed66e1bc 279 );\r
95276127 280\r
a4d608d1 281/**\r
4b5c4fba 282 Construct console input devices' private data.\r
a4d608d1 283\r
284 @param ConInPrivate A pointer to the TEXT_IN_SPLITTER_PRIVATE_DATA\r
285 structure.\r
286\r
287 @retval EFI_OUT_OF_RESOURCES Out of resources.\r
fc753d3b 288 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.\r
4b5c4fba 289 @retval other Failed to construct private data.\r
a4d608d1 290\r
291**/\r
95276127 292EFI_STATUS\r
293ConSplitterTextInConstructor (\r
fc753d3b 294 TEXT_IN_SPLITTER_PRIVATE_DATA *ConInPrivate\r
ed66e1bc 295 );\r
95276127 296\r
415df2a3 297/**\r
298 Construct console output devices' private data.\r
299\r
fc753d3b 300 @param ConOutPrivate A pointer to the TEXT_OUT_SPLITTER_PRIVATE_DATA\r
415df2a3 301 structure.\r
302\r
303 @retval EFI_OUT_OF_RESOURCES Out of resources.\r
4b5c4fba 304 @retval EFI_SUCCESS Text Input Devcie's private data has been constructed.\r
415df2a3 305\r
306**/\r
95276127 307EFI_STATUS\r
308ConSplitterTextOutConstructor (\r
fc753d3b 309 TEXT_OUT_SPLITTER_PRIVATE_DATA *ConOutPrivate\r
ed66e1bc 310 );\r
95276127 311\r
a4d608d1 312\r
313/**\r
ed055f1b 314 Test to see if Console In Device could be supported on the Controller.\r
a4d608d1 315\r
fc753d3b 316 @param This Driver Binding protocol instance pointer.\r
4b5c4fba 317 @param ControllerHandle Handle of device to test.\r
318 @param RemainingDevicePath Optional parameter use to pick a specific child\r
319 device to start.\r
a4d608d1 320\r
4b5c4fba 321 @retval EFI_SUCCESS This driver supports this device.\r
322 @retval other This driver does not support this device.\r
a4d608d1 323\r
324**/\r
95276127 325EFI_STATUS\r
326EFIAPI\r
327ConSplitterConInDriverBindingSupported (\r
328 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
329 IN EFI_HANDLE ControllerHandle,\r
330 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 331 );\r
95276127 332\r
a4d608d1 333/**\r
ed055f1b 334 Test to see if Simple Pointer protocol could be supported on the Controller.\r
a4d608d1 335\r
fc753d3b 336 @param This Driver Binding protocol instance pointer.\r
4b5c4fba 337 @param ControllerHandle Handle of device to test.\r
338 @param RemainingDevicePath Optional parameter use to pick a specific child\r
339 device to start.\r
a4d608d1 340\r
4b5c4fba 341 @retval EFI_SUCCESS This driver supports this device.\r
342 @retval other This driver does not support this device.\r
a4d608d1 343\r
344**/\r
95276127 345EFI_STATUS\r
346EFIAPI\r
347ConSplitterSimplePointerDriverBindingSupported (\r
348 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
349 IN EFI_HANDLE ControllerHandle,\r
350 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 351 );\r
95276127 352\r
a4d608d1 353/**\r
ed055f1b 354 Test to see if Console Out Device could be supported on the Controller.\r
a4d608d1 355\r
fc753d3b 356 @param This Driver Binding protocol instance pointer.\r
4b5c4fba 357 @param ControllerHandle Handle of device to test.\r
358 @param RemainingDevicePath Optional parameter use to pick a specific child\r
359 device to start.\r
a4d608d1 360\r
4b5c4fba 361 @retval EFI_SUCCESS This driver supports this device.\r
362 @retval other This driver does not support this device.\r
a4d608d1 363\r
364**/\r
95276127 365EFI_STATUS\r
366EFIAPI\r
367ConSplitterConOutDriverBindingSupported (\r
368 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
369 IN EFI_HANDLE ControllerHandle,\r
370 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 371 );\r
95276127 372\r
a4d608d1 373/**\r
ed055f1b 374 Test to see if Standard Error Device could be supported on the Controller.\r
a4d608d1 375\r
fc753d3b 376 @param This Driver Binding protocol instance pointer.\r
4b5c4fba 377 @param ControllerHandle Handle of device to test.\r
378 @param RemainingDevicePath Optional parameter use to pick a specific child\r
379 device to start.\r
a4d608d1 380\r
4b5c4fba 381 @retval EFI_SUCCESS This driver supports this device.\r
382 @retval other This driver does not support this device.\r
a4d608d1 383\r
384**/\r
95276127 385EFI_STATUS\r
386EFIAPI\r
387ConSplitterStdErrDriverBindingSupported (\r
388 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
389 IN EFI_HANDLE ControllerHandle,\r
390 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 391 );\r
95276127 392\r
415df2a3 393/**\r
ed055f1b 394 Start Console In Consplitter on device handle.\r
395\r
fc753d3b 396 @param This Driver Binding protocol instance pointer.\r
415df2a3 397 @param ControllerHandle Handle of device to bind driver to.\r
398 @param RemainingDevicePath Optional parameter use to pick a specific child\r
399 device to start.\r
400\r
401 @retval EFI_SUCCESS Console In Consplitter is added to ControllerHandle.\r
402 @retval other Console In Consplitter does not support this device.\r
403\r
404**/\r
95276127 405EFI_STATUS\r
406EFIAPI\r
407ConSplitterConInDriverBindingStart (\r
408 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
409 IN EFI_HANDLE ControllerHandle,\r
410 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 411 );\r
95276127 412\r
415df2a3 413/**\r
ed055f1b 414 Start Simple Pointer Consplitter on device handle.\r
415\r
fc753d3b 416 @param This Driver Binding protocol instance pointer.\r
415df2a3 417 @param ControllerHandle Handle of device to bind driver to.\r
418 @param RemainingDevicePath Optional parameter use to pick a specific child\r
419 device to start.\r
420\r
421 @retval EFI_SUCCESS Simple Pointer Consplitter is added to ControllerHandle.\r
422 @retval other Simple Pointer Consplitter does not support this device.\r
423\r
424**/\r
95276127 425EFI_STATUS\r
426EFIAPI\r
427ConSplitterSimplePointerDriverBindingStart (\r
428 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
429 IN EFI_HANDLE ControllerHandle,\r
430 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 431 );\r
95276127 432\r
415df2a3 433/**\r
ed055f1b 434 Start Console Out Consplitter on device handle.\r
435\r
fc753d3b 436 @param This Driver Binding protocol instance pointer.\r
415df2a3 437 @param ControllerHandle Handle of device to bind driver to.\r
438 @param RemainingDevicePath Optional parameter use to pick a specific child\r
439 device to start.\r
440\r
441 @retval EFI_SUCCESS Console Out Consplitter is added to ControllerHandle.\r
442 @retval other Console Out Consplitter does not support this device.\r
443\r
444**/\r
95276127 445EFI_STATUS\r
446EFIAPI\r
447ConSplitterConOutDriverBindingStart (\r
448 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
449 IN EFI_HANDLE ControllerHandle,\r
450 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 451 );\r
95276127 452\r
415df2a3 453/**\r
ed055f1b 454 Start Standard Error Consplitter on device handle.\r
455\r
fc753d3b 456 @param This Driver Binding protocol instance pointer.\r
415df2a3 457 @param ControllerHandle Handle of device to bind driver to.\r
458 @param RemainingDevicePath Optional parameter use to pick a specific child\r
459 device to start.\r
460\r
461 @retval EFI_SUCCESS Standard Error Consplitter is added to ControllerHandle.\r
462 @retval other Standard Error Consplitter does not support this device.\r
463\r
464**/\r
95276127 465EFI_STATUS\r
466EFIAPI\r
467ConSplitterStdErrDriverBindingStart (\r
468 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
469 IN EFI_HANDLE ControllerHandle,\r
470 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 471 );\r
95276127 472\r
415df2a3 473/**\r
474 Stop Console In ConSplitter on ControllerHandle by closing Console In Devcice GUID.\r
475\r
fc753d3b 476 @param This Driver Binding protocol instance pointer.\r
415df2a3 477 @param ControllerHandle Handle of device to stop driver on\r
478 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
479 children is zero stop the entire bus driver.\r
480 @param ChildHandleBuffer List of Child Handles to Stop.\r
481\r
482 @retval EFI_SUCCESS This driver is removed ControllerHandle\r
483 @retval other This driver was not removed from this device\r
484\r
485**/\r
95276127 486EFI_STATUS\r
487EFIAPI\r
488ConSplitterConInDriverBindingStop (\r
489 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
490 IN EFI_HANDLE ControllerHandle,\r
491 IN UINTN NumberOfChildren,\r
492 IN EFI_HANDLE *ChildHandleBuffer\r
ed66e1bc 493 );\r
95276127 494\r
415df2a3 495/**\r
496 Stop Simple Pointer protocol ConSplitter on ControllerHandle by closing\r
497 Simple Pointer protocol.\r
498\r
fc753d3b 499 @param This Driver Binding protocol instance pointer.\r
415df2a3 500 @param ControllerHandle Handle of device to stop driver on\r
501 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
502 children is zero stop the entire bus driver.\r
503 @param ChildHandleBuffer List of Child Handles to Stop.\r
504\r
505 @retval EFI_SUCCESS This driver is removed ControllerHandle\r
506 @retval other This driver was not removed from this device\r
507\r
508**/\r
95276127 509EFI_STATUS\r
510EFIAPI\r
511ConSplitterSimplePointerDriverBindingStop (\r
512 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
513 IN EFI_HANDLE ControllerHandle,\r
514 IN UINTN NumberOfChildren,\r
515 IN EFI_HANDLE *ChildHandleBuffer\r
ed66e1bc 516 );\r
95276127 517\r
415df2a3 518/**\r
fc753d3b 519 Stop Console Out ConSplitter on device handle by closing Console Out Devcice GUID.\r
415df2a3 520\r
fc753d3b 521 @param This Driver Binding protocol instance pointer.\r
415df2a3 522 @param ControllerHandle Handle of device to stop driver on\r
523 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
524 children is zero stop the entire bus driver.\r
525 @param ChildHandleBuffer List of Child Handles to Stop.\r
526\r
527 @retval EFI_SUCCESS This driver is removed ControllerHandle\r
528 @retval other This driver was not removed from this device\r
529\r
530**/\r
95276127 531EFI_STATUS\r
532EFIAPI\r
533ConSplitterConOutDriverBindingStop (\r
534 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
535 IN EFI_HANDLE ControllerHandle,\r
536 IN UINTN NumberOfChildren,\r
537 IN EFI_HANDLE *ChildHandleBuffer\r
ed66e1bc 538 );\r
95276127 539\r
415df2a3 540/**\r
541 Stop Standard Error ConSplitter on ControllerHandle by closing Standard Error GUID.\r
542\r
fc753d3b 543 @param This Driver Binding protocol instance pointer.\r
415df2a3 544 @param ControllerHandle Handle of device to stop driver on\r
545 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
546 children is zero stop the entire bus driver.\r
547 @param ChildHandleBuffer List of Child Handles to Stop.\r
548\r
549 @retval EFI_SUCCESS This driver is removed ControllerHandle\r
550 @retval other This driver was not removed from this device\r
551\r
552**/\r
95276127 553EFI_STATUS\r
554EFIAPI\r
555ConSplitterStdErrDriverBindingStop (\r
556 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
557 IN EFI_HANDLE ControllerHandle,\r
558 IN UINTN NumberOfChildren,\r
559 IN EFI_HANDLE *ChildHandleBuffer\r
ed66e1bc 560 );\r
95276127 561\r
8ae0b360 562\r
415df2a3 563/**\r
ed055f1b 564 Test to see if Absolute Pointer protocol could be supported on the Controller.\r
415df2a3 565\r
fc753d3b 566 @param This Driver Binding protocol instance pointer.\r
415df2a3 567 @param ControllerHandle Handle of device to test.\r
568 @param RemainingDevicePath Optional parameter use to pick a specific child\r
569 device to start.\r
570\r
4b5c4fba 571 @retval EFI_SUCCESS This driver supports this device.\r
572 @retval other This driver does not support this device.\r
415df2a3 573\r
574**/\r
8ae0b360 575EFI_STATUS\r
576EFIAPI\r
577ConSplitterAbsolutePointerDriverBindingSupported (\r
578 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
579 IN EFI_HANDLE ControllerHandle,\r
580 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 581 );\r
8ae0b360 582\r
415df2a3 583/**\r
ed055f1b 584 Start Absolute Pointer Consplitter on device handle.\r
585\r
fc753d3b 586 @param This Driver Binding protocol instance pointer.\r
415df2a3 587 @param ControllerHandle Handle of device to bind driver to.\r
588 @param RemainingDevicePath Optional parameter use to pick a specific child\r
589 device to start.\r
590\r
591 @retval EFI_SUCCESS Absolute Pointer Consplitter is added to ControllerHandle.\r
592 @retval other Absolute Pointer Consplitter does not support this device.\r
593\r
594**/\r
8ae0b360 595EFI_STATUS\r
596EFIAPI\r
597ConSplitterAbsolutePointerDriverBindingStart (\r
598 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
599 IN EFI_HANDLE ControllerHandle,\r
600 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
ed66e1bc 601 );\r
8ae0b360 602\r
415df2a3 603/**\r
604 Stop Absolute Pointer protocol ConSplitter on ControllerHandle by closing\r
605 Absolute Pointer protocol.\r
606\r
fc753d3b 607 @param This Driver Binding protocol instance pointer.\r
415df2a3 608 @param ControllerHandle Handle of device to stop driver on\r
609 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
610 children is zero stop the entire bus driver.\r
611 @param ChildHandleBuffer List of Child Handles to Stop.\r
612\r
613 @retval EFI_SUCCESS This driver is removed ControllerHandle\r
614 @retval other This driver was not removed from this device\r
615\r
616**/\r
8ae0b360 617EFI_STATUS\r
618EFIAPI\r
619ConSplitterAbsolutePointerDriverBindingStop (\r
620 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
621 IN EFI_HANDLE ControllerHandle,\r
622 IN UINTN NumberOfChildren,\r
623 IN EFI_HANDLE *ChildHandleBuffer\r
ed66e1bc 624 );\r
8ae0b360 625\r
415df2a3 626/**\r
627 Add Absolute Pointer Device in Consplitter Absolute Pointer list.\r
628\r
629 @param Private Text In Splitter pointer.\r
630 @param AbsolutePointer Absolute Pointer protocol pointer.\r
631\r
632 @retval EFI_SUCCESS Absolute Pointer Device added successfully.\r
633 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
634\r
635**/\r
8ae0b360 636EFI_STATUS\r
637ConSplitterAbsolutePointerAddDevice (\r
638 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
639 IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer\r
ed66e1bc 640 );\r
8ae0b360 641\r
415df2a3 642/**\r
fc753d3b 643 Remove Absolute Pointer Device from Consplitter Absolute Pointer list.\r
415df2a3 644\r
645 @param Private Text In Splitter pointer.\r
646 @param AbsolutePointer Absolute Pointer protocol pointer.\r
647\r
648 @retval EFI_SUCCESS Absolute Pointer Device removed successfully.\r
649 @retval EFI_NOT_FOUND No Absolute Pointer Device found.\r
650\r
651**/\r
8ae0b360 652EFI_STATUS\r
653ConSplitterAbsolutePointerDeleteDevice (\r
654 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
655 IN EFI_ABSOLUTE_POINTER_PROTOCOL *AbsolutePointer\r
ed66e1bc 656 );\r
8ae0b360 657\r
658//\r
659// Absolute Pointer protocol interfaces\r
660//\r
661\r
a4d608d1 662\r
663/**\r
664 Resets the pointer device hardware.\r
665\r
666 @param This Protocol instance pointer.\r
667 @param ExtendedVerification Driver may perform diagnostics on reset.\r
668\r
669 @retval EFI_SUCCESS The device was reset.\r
670 @retval EFI_DEVICE_ERROR The device is not functioning correctly and\r
671 could not be reset.\r
672\r
673**/\r
8ae0b360 674EFI_STATUS\r
675EFIAPI\r
676ConSplitterAbsolutePointerReset (\r
677 IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r
678 IN BOOLEAN ExtendedVerification\r
ed66e1bc 679 );\r
8ae0b360 680\r
8ae0b360 681\r
a4d608d1 682/**\r
683 Retrieves the current state of a pointer device.\r
8ae0b360 684\r
a4d608d1 685 @param This Protocol instance pointer.\r
686 @param State A pointer to the state information on the\r
687 pointer device.\r
aec072ad 688\r
a4d608d1 689 @retval EFI_SUCCESS The state of the pointer device was returned in\r
690 State..\r
691 @retval EFI_NOT_READY The state of the pointer device has not changed\r
692 since the last call to GetState().\r
693 @retval EFI_DEVICE_ERROR A device error occurred while attempting to\r
694 retrieve the pointer device's current state.\r
8ae0b360 695\r
a4d608d1 696**/\r
8ae0b360 697EFI_STATUS\r
aec072ad 698EFIAPI\r
8ae0b360 699ConSplitterAbsolutePointerGetState (\r
700 IN EFI_ABSOLUTE_POINTER_PROTOCOL *This,\r
701 IN OUT EFI_ABSOLUTE_POINTER_STATE *State\r
ed66e1bc 702 );\r
8ae0b360 703\r
415df2a3 704/**\r
705 This event agregates all the events of the pointer devices in the splitter.\r
9937b365 706\r
415df2a3 707 If any events of physical pointer devices are signaled, signal the pointer\r
708 splitter event. This will cause the calling code to call\r
709 ConSplitterAbsolutePointerGetState ().\r
710\r
711 @param Event The Event assoicated with callback.\r
712 @param Context Context registered when Event was created.\r
713\r
415df2a3 714**/\r
8ae0b360 715VOID\r
716EFIAPI\r
717ConSplitterAbsolutePointerWaitForInput (\r
718 IN EFI_EVENT Event,\r
719 IN VOID *Context\r
ed66e1bc 720 );\r
8ae0b360 721\r
5bca971e 722/**\r
723 Retrieves a Unicode string that is the user readable name of the driver.\r
724\r
725 This function retrieves the user readable name of a driver in the form of a\r
726 Unicode string. If the driver specified by This has a user readable name in\r
727 the language specified by Language, then a pointer to the driver name is\r
728 returned in DriverName, and EFI_SUCCESS is returned. If the driver specified\r
729 by This does not support the language specified by Language,\r
730 then EFI_UNSUPPORTED is returned.\r
731\r
732 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
733 EFI_COMPONENT_NAME_PROTOCOL instance.\r
734\r
735 @param Language[in] A pointer to a Null-terminated ASCII string\r
736 array indicating the language. This is the\r
737 language of the driver name that the caller is\r
738 requesting, and it must match one of the\r
739 languages specified in SupportedLanguages. The\r
740 number of languages supported by a driver is up\r
741 to the driver writer. Language is specified\r
0254efc0 742 in RFC 4646 or ISO 639-2 language code format.\r
5bca971e 743\r
744 @param DriverName[out] A pointer to the Unicode string to return.\r
745 This Unicode string is the name of the\r
746 driver specified by This in the language\r
747 specified by Language.\r
748\r
749 @retval EFI_SUCCESS The Unicode string for the Driver specified by\r
750 This and the language specified by Language was\r
751 returned in DriverName.\r
752\r
753 @retval EFI_INVALID_PARAMETER Language is NULL.\r
754\r
755 @retval EFI_INVALID_PARAMETER DriverName is NULL.\r
756\r
757 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
758 the language specified by Language.\r
759\r
760**/\r
95276127 761EFI_STATUS\r
762EFIAPI\r
763ConSplitterComponentNameGetDriverName (\r
764 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
765 IN CHAR8 *Language,\r
766 OUT CHAR16 **DriverName\r
767 );\r
768\r
5bca971e 769\r
770/**\r
771 Retrieves a Unicode string that is the user readable name of the controller\r
772 that is being managed by a driver.\r
773\r
774 This function retrieves the user readable name of the controller specified by\r
775 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
776 driver specified by This has a user readable name in the language specified by\r
777 Language, then a pointer to the controller name is returned in ControllerName,\r
778 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
779 managing the controller specified by ControllerHandle and ChildHandle,\r
780 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
781 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
782\r
783 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
784 EFI_COMPONENT_NAME_PROTOCOL instance.\r
785\r
786 @param ControllerHandle[in] The handle of a controller that the driver\r
787 specified by This is managing. This handle\r
788 specifies the controller whose name is to be\r
789 returned.\r
790\r
791 @param ChildHandle[in] The handle of the child controller to retrieve\r
792 the name of. This is an optional parameter that\r
793 may be NULL. It will be NULL for device\r
794 drivers. It will also be NULL for a bus drivers\r
795 that wish to retrieve the name of the bus\r
796 controller. It will not be NULL for a bus\r
797 driver that wishes to retrieve the name of a\r
798 child controller.\r
799\r
800 @param Language[in] A pointer to a Null-terminated ASCII string\r
801 array indicating the language. This is the\r
802 language of the driver name that the caller is\r
803 requesting, and it must match one of the\r
804 languages specified in SupportedLanguages. The\r
805 number of languages supported by a driver is up\r
806 to the driver writer. Language is specified in\r
0254efc0 807 RFC 4646 or ISO 639-2 language code format.\r
5bca971e 808\r
809 @param ControllerName[out] A pointer to the Unicode string to return.\r
810 This Unicode string is the name of the\r
811 controller specified by ControllerHandle and\r
812 ChildHandle in the language specified by\r
813 Language from the point of view of the driver\r
814 specified by This.\r
815\r
816 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
817 the language specified by Language for the\r
818 driver specified by This was returned in\r
819 DriverName.\r
820\r
284ee2e8 821 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
5bca971e 822\r
823 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
824 EFI_HANDLE.\r
825\r
826 @retval EFI_INVALID_PARAMETER Language is NULL.\r
827\r
828 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
829\r
830 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
831 managing the controller specified by\r
832 ControllerHandle and ChildHandle.\r
833\r
834 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
835 the language specified by Language.\r
836\r
837**/\r
95276127 838EFI_STATUS\r
839EFIAPI\r
840ConSplitterConInComponentNameGetControllerName (\r
841 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
842 IN EFI_HANDLE ControllerHandle,\r
843 IN EFI_HANDLE ChildHandle OPTIONAL,\r
844 IN CHAR8 *Language,\r
845 OUT CHAR16 **ControllerName\r
846 );\r
847\r
5bca971e 848\r
849/**\r
850 Retrieves a Unicode string that is the user readable name of the controller\r
851 that is being managed by a driver.\r
852\r
853 This function retrieves the user readable name of the controller specified by\r
854 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
855 driver specified by This has a user readable name in the language specified by\r
856 Language, then a pointer to the controller name is returned in ControllerName,\r
857 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
858 managing the controller specified by ControllerHandle and ChildHandle,\r
859 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
860 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
861\r
862 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
863 EFI_COMPONENT_NAME_PROTOCOL instance.\r
864\r
865 @param ControllerHandle[in] The handle of a controller that the driver\r
866 specified by This is managing. This handle\r
867 specifies the controller whose name is to be\r
868 returned.\r
869\r
870 @param ChildHandle[in] The handle of the child controller to retrieve\r
871 the name of. This is an optional parameter that\r
872 may be NULL. It will be NULL for device\r
873 drivers. It will also be NULL for a bus drivers\r
874 that wish to retrieve the name of the bus\r
875 controller. It will not be NULL for a bus\r
876 driver that wishes to retrieve the name of a\r
877 child controller.\r
878\r
879 @param Language[in] A pointer to a Null-terminated ASCII string\r
880 array indicating the language. This is the\r
881 language of the driver name that the caller is\r
882 requesting, and it must match one of the\r
883 languages specified in SupportedLanguages. The\r
884 number of languages supported by a driver is up\r
885 to the driver writer. Language is specified in\r
0254efc0 886 RFC 4646 or ISO 639-2 language code format.\r
5bca971e 887\r
888 @param ControllerName[out] A pointer to the Unicode string to return.\r
889 This Unicode string is the name of the\r
890 controller specified by ControllerHandle and\r
891 ChildHandle in the language specified by\r
892 Language from the point of view of the driver\r
893 specified by This.\r
894\r
895 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
896 the language specified by Language for the\r
897 driver specified by This was returned in\r
898 DriverName.\r
899\r
284ee2e8 900 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
5bca971e 901\r
902 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
903 EFI_HANDLE.\r
904\r
905 @retval EFI_INVALID_PARAMETER Language is NULL.\r
906\r
907 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
908\r
909 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
910 managing the controller specified by\r
911 ControllerHandle and ChildHandle.\r
912\r
913 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
914 the language specified by Language.\r
915\r
916**/\r
95276127 917EFI_STATUS\r
918EFIAPI\r
919ConSplitterSimplePointerComponentNameGetControllerName (\r
920 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
921 IN EFI_HANDLE ControllerHandle,\r
922 IN EFI_HANDLE ChildHandle OPTIONAL,\r
923 IN CHAR8 *Language,\r
924 OUT CHAR16 **ControllerName\r
925 );\r
926\r
415df2a3 927/**\r
928 Retrieves a Unicode string that is the user readable name of the controller\r
929 that is being managed by an EFI Driver.\r
930\r
931 @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL\r
932 instance.\r
933 @param ControllerHandle The handle of a controller that the driver\r
934 specified by This is managing. This handle\r
935 specifies the controller whose name is to be\r
936 returned.\r
937 @param ChildHandle The handle of the child controller to retrieve the\r
938 name of. This is an optional parameter that may\r
939 be NULL. It will be NULL for device drivers. It\r
940 will also be NULL for a bus drivers that wish to\r
941 retrieve the name of the bus controller. It will\r
942 not be NULL for a bus driver that wishes to\r
943 retrieve the name of a child controller.\r
0254efc0 944 @param Language A pointer to RFC4646 language identifier. This is\r
415df2a3 945 the language of the controller name that that the\r
946 caller is requesting, and it must match one of the\r
947 languages specified in SupportedLanguages. The\r
948 number of languages supported by a driver is up to\r
949 the driver writer.\r
950 @param ControllerName A pointer to the Unicode string to return. This\r
951 Unicode string is the name of the controller\r
952 specified by ControllerHandle and ChildHandle in\r
953 the language specified by Language from the point\r
954 of view of the driver specified by This.\r
955\r
956 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
957 the language specified by Language for the driver\r
958 specified by This was returned in DriverName.\r
284ee2e8 959 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
415df2a3 960 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
961 EFI_HANDLE.\r
962 @retval EFI_INVALID_PARAMETER Language is NULL.\r
963 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
964 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
965 managing the controller specified by\r
966 ControllerHandle and ChildHandle.\r
967 @retval EFI_UNSUPPORTED The driver specified by This does not support the\r
968 language specified by Language.\r
969\r
970**/\r
8ae0b360 971EFI_STATUS\r
972EFIAPI\r
973ConSplitterAbsolutePointerComponentNameGetControllerName (\r
974 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
975 IN EFI_HANDLE ControllerHandle,\r
976 IN EFI_HANDLE ChildHandle OPTIONAL,\r
977 IN CHAR8 *Language,\r
978 OUT CHAR16 **ControllerName\r
ed66e1bc 979 );\r
5bca971e 980\r
981/**\r
982 Retrieves a Unicode string that is the user readable name of the controller\r
983 that is being managed by a driver.\r
984\r
985 This function retrieves the user readable name of the controller specified by\r
986 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
987 driver specified by This has a user readable name in the language specified by\r
988 Language, then a pointer to the controller name is returned in ControllerName,\r
989 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
990 managing the controller specified by ControllerHandle and ChildHandle,\r
991 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
992 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
993\r
994 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
995 EFI_COMPONENT_NAME_PROTOCOL instance.\r
996\r
997 @param ControllerHandle[in] The handle of a controller that the driver\r
998 specified by This is managing. This handle\r
999 specifies the controller whose name is to be\r
1000 returned.\r
1001\r
1002 @param ChildHandle[in] The handle of the child controller to retrieve\r
1003 the name of. This is an optional parameter that\r
1004 may be NULL. It will be NULL for device\r
1005 drivers. It will also be NULL for a bus drivers\r
1006 that wish to retrieve the name of the bus\r
1007 controller. It will not be NULL for a bus\r
1008 driver that wishes to retrieve the name of a\r
1009 child controller.\r
1010\r
1011 @param Language[in] A pointer to a Null-terminated ASCII string\r
1012 array indicating the language. This is the\r
1013 language of the driver name that the caller is\r
1014 requesting, and it must match one of the\r
1015 languages specified in SupportedLanguages. The\r
1016 number of languages supported by a driver is up\r
1017 to the driver writer. Language is specified in\r
0254efc0 1018 RFC 4646 or ISO 639-2 language code format.\r
5bca971e 1019\r
1020 @param ControllerName[out] A pointer to the Unicode string to return.\r
1021 This Unicode string is the name of the\r
1022 controller specified by ControllerHandle and\r
1023 ChildHandle in the language specified by\r
1024 Language from the point of view of the driver\r
1025 specified by This.\r
1026\r
1027 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
1028 the language specified by Language for the\r
1029 driver specified by This was returned in\r
1030 DriverName.\r
1031\r
284ee2e8 1032 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
5bca971e 1033\r
1034 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
1035 EFI_HANDLE.\r
1036\r
1037 @retval EFI_INVALID_PARAMETER Language is NULL.\r
1038\r
1039 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
1040\r
1041 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
1042 managing the controller specified by\r
1043 ControllerHandle and ChildHandle.\r
1044\r
1045 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
1046 the language specified by Language.\r
1047\r
1048**/\r
95276127 1049EFI_STATUS\r
1050EFIAPI\r
1051ConSplitterConOutComponentNameGetControllerName (\r
1052 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
1053 IN EFI_HANDLE ControllerHandle,\r
1054 IN EFI_HANDLE ChildHandle OPTIONAL,\r
1055 IN CHAR8 *Language,\r
1056 OUT CHAR16 **ControllerName\r
1057 );\r
1058\r
5bca971e 1059\r
1060/**\r
1061 Retrieves a Unicode string that is the user readable name of the controller\r
1062 that is being managed by a driver.\r
1063\r
1064 This function retrieves the user readable name of the controller specified by\r
1065 ControllerHandle and ChildHandle in the form of a Unicode string. If the\r
1066 driver specified by This has a user readable name in the language specified by\r
1067 Language, then a pointer to the controller name is returned in ControllerName,\r
1068 and EFI_SUCCESS is returned. If the driver specified by This is not currently\r
1069 managing the controller specified by ControllerHandle and ChildHandle,\r
1070 then EFI_UNSUPPORTED is returned. If the driver specified by This does not\r
1071 support the language specified by Language, then EFI_UNSUPPORTED is returned.\r
1072\r
1073 @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or\r
1074 EFI_COMPONENT_NAME_PROTOCOL instance.\r
1075\r
1076 @param ControllerHandle[in] The handle of a controller that the driver\r
1077 specified by This is managing. This handle\r
1078 specifies the controller whose name is to be\r
1079 returned.\r
1080\r
1081 @param ChildHandle[in] The handle of the child controller to retrieve\r
1082 the name of. This is an optional parameter that\r
1083 may be NULL. It will be NULL for device\r
1084 drivers. It will also be NULL for a bus drivers\r
1085 that wish to retrieve the name of the bus\r
1086 controller. It will not be NULL for a bus\r
1087 driver that wishes to retrieve the name of a\r
1088 child controller.\r
1089\r
1090 @param Language[in] A pointer to a Null-terminated ASCII string\r
1091 array indicating the language. This is the\r
1092 language of the driver name that the caller is\r
1093 requesting, and it must match one of the\r
1094 languages specified in SupportedLanguages. The\r
1095 number of languages supported by a driver is up\r
1096 to the driver writer. Language is specified in\r
0254efc0 1097 RFC 4646 or ISO 639-2 language code format.\r
5bca971e 1098\r
1099 @param ControllerName[out] A pointer to the Unicode string to return.\r
1100 This Unicode string is the name of the\r
1101 controller specified by ControllerHandle and\r
1102 ChildHandle in the language specified by\r
1103 Language from the point of view of the driver\r
1104 specified by This.\r
1105\r
1106 @retval EFI_SUCCESS The Unicode string for the user readable name in\r
1107 the language specified by Language for the\r
1108 driver specified by This was returned in\r
1109 DriverName.\r
1110\r
284ee2e8 1111 @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.\r
5bca971e 1112\r
1113 @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid\r
1114 EFI_HANDLE.\r
1115\r
1116 @retval EFI_INVALID_PARAMETER Language is NULL.\r
1117\r
1118 @retval EFI_INVALID_PARAMETER ControllerName is NULL.\r
1119\r
1120 @retval EFI_UNSUPPORTED The driver specified by This is not currently\r
1121 managing the controller specified by\r
1122 ControllerHandle and ChildHandle.\r
1123\r
1124 @retval EFI_UNSUPPORTED The driver specified by This does not support\r
1125 the language specified by Language.\r
1126\r
1127**/\r
95276127 1128EFI_STATUS\r
1129EFIAPI\r
1130ConSplitterStdErrComponentNameGetControllerName (\r
1131 IN EFI_COMPONENT_NAME_PROTOCOL *This,\r
1132 IN EFI_HANDLE ControllerHandle,\r
1133 IN EFI_HANDLE ChildHandle OPTIONAL,\r
1134 IN CHAR8 *Language,\r
1135 OUT CHAR16 **ControllerName\r
1136 );\r
1137\r
5bca971e 1138\r
95276127 1139//\r
1140// TextIn Constructor/Destructor functions\r
1141//\r
415df2a3 1142\r
1143/**\r
1144 Add Text Input Device in Consplitter Text Input list.\r
1145\r
1146 @param Private Text In Splitter pointer.\r
1147 @param TextIn Simple Text Input protocol pointer.\r
1148\r
1149 @retval EFI_SUCCESS Text Input Device added successfully.\r
1150 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
1151\r
1152**/\r
95276127 1153EFI_STATUS\r
1154ConSplitterTextInAddDevice (\r
fc753d3b 1155 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
1156 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn\r
ed66e1bc 1157 );\r
95276127 1158\r
415df2a3 1159/**\r
fc753d3b 1160 Remove Text Input Device from Consplitter Text Input list.\r
415df2a3 1161\r
1162 @param Private Text In Splitter pointer.\r
1163 @param TextIn Simple Text protocol pointer.\r
1164\r
1165 @retval EFI_SUCCESS Simple Text Device removed successfully.\r
1166 @retval EFI_NOT_FOUND No Simple Text Device found.\r
1167\r
1168**/\r
95276127 1169EFI_STATUS\r
1170ConSplitterTextInDeleteDevice (\r
fc753d3b 1171 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
1172 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *TextIn\r
ed66e1bc 1173 );\r
95276127 1174\r
1175//\r
1176// SimplePointer Constuctor/Destructor functions\r
1177//\r
415df2a3 1178\r
1179/**\r
1180 Add Simple Pointer Device in Consplitter Simple Pointer list.\r
1181\r
1182 @param Private Text In Splitter pointer.\r
1183 @param SimplePointer Simple Pointer protocol pointer.\r
1184\r
1185 @retval EFI_SUCCESS Simple Pointer Device added successfully.\r
1186 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
1187\r
1188**/\r
95276127 1189EFI_STATUS\r
1190ConSplitterSimplePointerAddDevice (\r
1191 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
1192 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer\r
ed66e1bc 1193 );\r
95276127 1194\r
415df2a3 1195/**\r
fc753d3b 1196 Remove Simple Pointer Device from Consplitter Simple Pointer list.\r
415df2a3 1197\r
1198 @param Private Text In Splitter pointer.\r
1199 @param SimplePointer Simple Pointer protocol pointer.\r
1200\r
1201 @retval EFI_SUCCESS Simple Pointer Device removed successfully.\r
1202 @retval EFI_NOT_FOUND No Simple Pointer Device found.\r
1203\r
1204**/\r
95276127 1205EFI_STATUS\r
1206ConSplitterSimplePointerDeleteDevice (\r
1207 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
1208 IN EFI_SIMPLE_POINTER_PROTOCOL *SimplePointer\r
ed66e1bc 1209 );\r
95276127 1210\r
1211//\r
1212// TextOut Constuctor/Destructor functions\r
1213//\r
415df2a3 1214\r
1215/**\r
1216 Add Text Output Device in Consplitter Text Output list.\r
1217\r
1218 @param Private Text Out Splitter pointer.\r
1219 @param TextOut Simple Text Output protocol pointer.\r
1220 @param GraphicsOutput Graphics Output protocol pointer.\r
1221 @param UgaDraw UGA Draw protocol pointer.\r
1222\r
1223 @retval EFI_SUCCESS Text Output Device added successfully.\r
1224 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
1225\r
1226**/\r
95276127 1227EFI_STATUS\r
1228ConSplitterTextOutAddDevice (\r
1229 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
1230 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut,\r
1231 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput,\r
1232 IN EFI_UGA_DRAW_PROTOCOL *UgaDraw\r
ed66e1bc 1233 );\r
95276127 1234\r
415df2a3 1235/**\r
1236 Remove Text Out Device in Consplitter Text Out list.\r
1237\r
1238 @param Private Text Out Splitter pointer.\r
1239 @param TextOut Simple Text Output Pointer protocol pointer.\r
1240\r
1241 @retval EFI_SUCCESS Text Out Device removed successfully.\r
1242 @retval EFI_NOT_FOUND No Text Out Device found.\r
1243\r
1244**/\r
95276127 1245EFI_STATUS\r
1246ConSplitterTextOutDeleteDevice (\r
1247 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
1248 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *TextOut\r
ed66e1bc 1249 );\r
95276127 1250\r
1251//\r
1252// TextIn I/O Functions\r
1253//\r
415df2a3 1254\r
1255/**\r
1256 Reset the input device and optionaly run diagnostics\r
1257\r
1258 @param This Protocol instance pointer.\r
1259 @param ExtendedVerification Driver may perform diagnostics on reset.\r
1260\r
1261 @retval EFI_SUCCESS The device was reset.\r
1262 @retval EFI_DEVICE_ERROR The device is not functioning properly and could\r
1263 not be reset.\r
1264\r
1265**/\r
95276127 1266EFI_STATUS\r
1267EFIAPI\r
1268ConSplitterTextInReset (\r
fc753d3b 1269 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,\r
1270 IN BOOLEAN ExtendedVerification\r
ed66e1bc 1271 );\r
95276127 1272\r
415df2a3 1273/**\r
1274 Reads the next keystroke from the input device. The WaitForKey Event can\r
1275 be used to test for existance of a keystroke via WaitForEvent () call.\r
415df2a3 1276\r
1277 @param This Protocol instance pointer.\r
1278 @param Key Driver may perform diagnostics on reset.\r
1279\r
1280 @retval EFI_SUCCESS The keystroke information was returned.\r
1281 @retval EFI_NOT_READY There was no keystroke data availiable.\r
1282 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due\r
1283 to hardware errors.\r
1284\r
1285**/\r
95276127 1286EFI_STATUS\r
1287EFIAPI\r
1288ConSplitterTextInReadKeyStroke (\r
fc753d3b 1289 IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,\r
1290 OUT EFI_INPUT_KEY *Key\r
ed66e1bc 1291 );\r
415df2a3 1292\r
1293/**\r
1294 Add Text Input Ex Device in Consplitter Text Input Ex list.\r
1295\r
1296 @param Private Text In Splitter pointer.\r
fc753d3b 1297 @param TextInEx Simple Text Input Ex Input protocol pointer.\r
415df2a3 1298\r
1299 @retval EFI_SUCCESS Text Input Ex Device added successfully.\r
1300 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
1301\r
1302**/\r
66aa04e4 1303EFI_STATUS\r
1304ConSplitterTextInExAddDevice (\r
1305 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
1306 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx\r
ed66e1bc 1307 );\r
66aa04e4 1308\r
415df2a3 1309/**\r
fc753d3b 1310 Remove Text Ex Device from Consplitter Text Input Ex list.\r
415df2a3 1311\r
1312 @param Private Text In Splitter pointer.\r
1313 @param TextInEx Simple Text Ex protocol pointer.\r
1314\r
fc753d3b 1315 @retval EFI_SUCCESS Simple Text Input Ex Device removed successfully.\r
1316 @retval EFI_NOT_FOUND No Simple Text Input Ex Device found.\r
415df2a3 1317\r
1318**/\r
66aa04e4 1319EFI_STATUS\r
1320ConSplitterTextInExDeleteDevice (\r
1321 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
1322 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *TextInEx\r
ed66e1bc 1323 );\r
66aa04e4 1324\r
1325//\r
1326// Simple Text Input Ex protocol function prototypes\r
1327//\r
1328\r
a4d608d1 1329/**\r
1330 Reset the input device and optionaly run diagnostics\r
1331\r
1332 @param This Protocol instance pointer.\r
1333 @param ExtendedVerification Driver may perform diagnostics on reset.\r
1334\r
1335 @retval EFI_SUCCESS The device was reset.\r
1336 @retval EFI_DEVICE_ERROR The device is not functioning properly and could\r
1337 not be reset.\r
1338\r
1339**/\r
66aa04e4 1340EFI_STATUS\r
1341EFIAPI\r
1342ConSplitterTextInResetEx (\r
1343 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
1344 IN BOOLEAN ExtendedVerification\r
ed66e1bc 1345 );\r
66aa04e4 1346\r
66aa04e4 1347\r
a4d608d1 1348/**\r
1349 Reads the next keystroke from the input device. The WaitForKey Event can\r
1350 be used to test for existance of a keystroke via WaitForEvent () call.\r
66aa04e4 1351\r
a4d608d1 1352 @param This Protocol instance pointer.\r
1353 @param KeyData A pointer to a buffer that is filled in with the\r
1354 keystroke state data for the key that was\r
1355 pressed.\r
66aa04e4 1356\r
a4d608d1 1357 @retval EFI_SUCCESS The keystroke information was returned.\r
1358 @retval EFI_NOT_READY There was no keystroke data availiable.\r
1359 @retval EFI_DEVICE_ERROR The keystroke information was not returned due\r
1360 to hardware errors.\r
1361 @retval EFI_INVALID_PARAMETER KeyData is NULL.\r
66aa04e4 1362\r
a4d608d1 1363**/\r
66aa04e4 1364EFI_STATUS\r
1365EFIAPI\r
1366ConSplitterTextInReadKeyStrokeEx (\r
1367 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
1368 OUT EFI_KEY_DATA *KeyData\r
ed66e1bc 1369 );\r
66aa04e4 1370\r
66aa04e4 1371\r
a4d608d1 1372/**\r
1373 Set certain state for the input device.\r
66aa04e4 1374\r
a4d608d1 1375 @param This Protocol instance pointer.\r
1376 @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the\r
1377 state for the input device.\r
66aa04e4 1378\r
a4d608d1 1379 @retval EFI_SUCCESS The device state was set successfully.\r
1380 @retval EFI_DEVICE_ERROR The device is not functioning correctly and\r
1381 could not have the setting adjusted.\r
1382 @retval EFI_UNSUPPORTED The device does not have the ability to set its\r
1383 state.\r
1384 @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.\r
66aa04e4 1385\r
a4d608d1 1386**/\r
66aa04e4 1387EFI_STATUS\r
1388EFIAPI\r
1389ConSplitterTextInSetState (\r
1390 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
1391 IN EFI_KEY_TOGGLE_STATE *KeyToggleState\r
ed66e1bc 1392 );\r
aec072ad 1393\r
66aa04e4 1394\r
a4d608d1 1395/**\r
1396 Register a notification function for a particular keystroke for the input device.\r
1397\r
1398 @param This Protocol instance pointer.\r
1399 @param KeyData A pointer to a buffer that is filled in with the\r
1400 keystroke information data for the key that was\r
1401 pressed.\r
1402 @param KeyNotificationFunction Points to the function to be called when the key\r
1403 sequence is typed specified by KeyData.\r
1404 @param NotifyHandle Points to the unique handle assigned to the\r
1405 registered notification.\r
1406\r
1407 @retval EFI_SUCCESS The notification function was registered\r
1408 successfully.\r
1409 @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data\r
1410 structures.\r
f890b1e0 1411 @retval EFI_INVALID_PARAMETER KeyData or KeyNotificationFunction or NotifyHandle is NULL.\r
95276127 1412\r
a4d608d1 1413**/\r
66aa04e4 1414EFI_STATUS\r
1415EFIAPI\r
1416ConSplitterTextInRegisterKeyNotify (\r
1417 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
1418 IN EFI_KEY_DATA *KeyData,\r
1419 IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,\r
402e4a9d 1420 OUT VOID **NotifyHandle\r
ed66e1bc 1421 );\r
66aa04e4 1422\r
66aa04e4 1423\r
a4d608d1 1424/**\r
1425 Remove a registered notification function from a particular keystroke.\r
66aa04e4 1426\r
a4d608d1 1427 @param This Protocol instance pointer.\r
1428 @param NotificationHandle The handle of the notification function being\r
1429 unregistered.\r
aec072ad 1430\r
a4d608d1 1431 @retval EFI_SUCCESS The notification function was unregistered\r
1432 successfully.\r
1433 @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.\r
1434 @retval EFI_NOT_FOUND Can not find the matching entry in database.\r
66aa04e4 1435\r
a4d608d1 1436**/\r
66aa04e4 1437EFI_STATUS\r
1438EFIAPI\r
1439ConSplitterTextInUnregisterKeyNotify (\r
1440 IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
402e4a9d 1441 IN VOID *NotificationHandle\r
ed66e1bc 1442 );\r
415df2a3 1443\r
1444/**\r
f890b1e0 1445 This event aggregates all the events of the ConIn devices in the spliter.\r
1446\r
415df2a3 1447 If any events of physical ConIn devices are signaled, signal the ConIn\r
1448 spliter event. This will cause the calling code to call\r
1449 ConSplitterTextInReadKeyStroke ().\r
1450\r
1451 @param Event The Event assoicated with callback.\r
1452 @param Context Context registered when Event was created.\r
1453\r
415df2a3 1454**/\r
95276127 1455VOID\r
1456EFIAPI\r
1457ConSplitterTextInWaitForKey (\r
1458 IN EFI_EVENT Event,\r
1459 IN VOID *Context\r
ed66e1bc 1460 );\r
ed055f1b 1461\r
95276127 1462\r
415df2a3 1463/**\r
1464 Reads the next keystroke from the input device. The WaitForKey Event can\r
1465 be used to test for existance of a keystroke via WaitForEvent () call.\r
1466\r
33019a71 1467 @param Private Protocol instance pointer.\r
415df2a3 1468 @param Key Driver may perform diagnostics on reset.\r
1469\r
1470 @retval EFI_SUCCESS The keystroke information was returned.\r
1471 @retval EFI_NOT_READY There was no keystroke data availiable.\r
1472 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due\r
1473 to hardware errors.\r
1474\r
1475**/\r
95276127 1476EFI_STATUS\r
1477EFIAPI\r
1478ConSplitterTextInPrivateReadKeyStroke (\r
1479 IN TEXT_IN_SPLITTER_PRIVATE_DATA *Private,\r
1480 OUT EFI_INPUT_KEY *Key\r
ed66e1bc 1481 );\r
95276127 1482\r
415df2a3 1483/**\r
1484 Reset the input device and optionaly run diagnostics\r
1485\r
1486 @param This Protocol instance pointer.\r
1487 @param ExtendedVerification Driver may perform diagnostics on reset.\r
1488\r
1489 @retval EFI_SUCCESS The device was reset.\r
1490 @retval EFI_DEVICE_ERROR The device is not functioning properly and could\r
1491 not be reset.\r
1492\r
1493**/\r
95276127 1494EFI_STATUS\r
1495EFIAPI\r
1496ConSplitterSimplePointerReset (\r
1497 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
1498 IN BOOLEAN ExtendedVerification\r
ed66e1bc 1499 );\r
95276127 1500\r
415df2a3 1501/**\r
1502 Reads the next keystroke from the input device. The WaitForKey Event can\r
1503 be used to test for existance of a keystroke via WaitForEvent () call.\r
415df2a3 1504\r
1505 @param This A pointer to protocol instance.\r
1506 @param State A pointer to state information on the pointer device\r
1507\r
1508 @retval EFI_SUCCESS The keystroke information was returned in State.\r
1509 @retval EFI_NOT_READY There was no keystroke data availiable.\r
1510 @retval EFI_DEVICE_ERROR The keydtroke information was not returned due\r
1511 to hardware errors.\r
1512\r
1513**/\r
95276127 1514EFI_STATUS\r
1515EFIAPI\r
1516ConSplitterSimplePointerGetState (\r
1517 IN EFI_SIMPLE_POINTER_PROTOCOL *This,\r
1518 IN OUT EFI_SIMPLE_POINTER_STATE *State\r
ed66e1bc 1519 );\r
95276127 1520\r
a4d608d1 1521/**\r
1522 This event agregates all the events of the ConIn devices in the spliter.\r
a4d608d1 1523 If any events of physical ConIn devices are signaled, signal the ConIn\r
1524 spliter event. This will cause the calling code to call\r
1525 ConSplitterTextInReadKeyStroke ().\r
1526\r
1527 @param Event The Event assoicated with callback.\r
1528 @param Context Context registered when Event was created.\r
1529\r
a4d608d1 1530**/\r
95276127 1531VOID\r
1532EFIAPI\r
1533ConSplitterSimplePointerWaitForInput (\r
1534 IN EFI_EVENT Event,\r
1535 IN VOID *Context\r
ed66e1bc 1536 );\r
95276127 1537\r
1538//\r
1539// TextOut I/O Functions\r
1540//\r
95276127 1541\r
415df2a3 1542/**\r
1543 Reset the text output device hardware and optionaly run diagnostics\r
1544\r
1545 @param This Protocol instance pointer.\r
1546 @param ExtendedVerification Driver may perform more exhaustive verfication\r
1547 operation of the device during reset.\r
1548\r
1549 @retval EFI_SUCCESS The text output device was reset.\r
1550 @retval EFI_DEVICE_ERROR The text output device is not functioning\r
1551 correctly and could not be reset.\r
1552\r
1553**/\r
95276127 1554EFI_STATUS\r
1555EFIAPI\r
1556ConSplitterTextOutReset (\r
1557 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1558 IN BOOLEAN ExtendedVerification\r
ed66e1bc 1559 );\r
95276127 1560\r
415df2a3 1561/**\r
1562 Write a Unicode string to the output device.\r
1563\r
1564 @param This Protocol instance pointer.\r
33019a71 1565 @param WString The NULL-terminated Unicode string to be\r
415df2a3 1566 displayed on the output device(s). All output\r
1567 devices must also support the Unicode drawing\r
1568 defined in this file.\r
1569\r
1570 @retval EFI_SUCCESS The string was output to the device.\r
1571 @retval EFI_DEVICE_ERROR The device reported an error while attempting to\r
1572 output the text.\r
1573 @retval EFI_UNSUPPORTED The output device's mode is not currently in a\r
1574 defined text mode.\r
1575 @retval EFI_WARN_UNKNOWN_GLYPH This warning code indicates that some of the\r
1576 characters in the Unicode string could not be\r
1577 rendered and were skipped.\r
1578\r
1579**/\r
95276127 1580EFI_STATUS\r
1581EFIAPI\r
1582ConSplitterTextOutOutputString (\r
1583 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1584 IN CHAR16 *WString\r
ed66e1bc 1585 );\r
95276127 1586\r
415df2a3 1587/**\r
1588 Verifies that all characters in a Unicode string can be output to the\r
1589 target device.\r
1590\r
1591 @param This Protocol instance pointer.\r
33019a71 1592 @param WString The NULL-terminated Unicode string to be\r
415df2a3 1593 examined for the output device(s).\r
1594\r
1595 @retval EFI_SUCCESS The device(s) are capable of rendering the\r
1596 output string.\r
1597 @retval EFI_UNSUPPORTED Some of the characters in the Unicode string\r
1598 cannot be rendered by one or more of the output\r
1599 devices mapped by the EFI handle.\r
1600\r
1601**/\r
95276127 1602EFI_STATUS\r
1603EFIAPI\r
1604ConSplitterTextOutTestString (\r
1605 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1606 IN CHAR16 *WString\r
ed66e1bc 1607 );\r
95276127 1608\r
415df2a3 1609/**\r
1610 Returns information for an available text mode that the output device(s)\r
1611 supports.\r
1612\r
1613 @param This Protocol instance pointer.\r
1614 @param ModeNumber The mode number to return information on.\r
33019a71 1615 @param Columns Returns the columns of the text output device\r
1616 for the requested ModeNumber.\r
1617 @param Rows Returns the rows of the text output device\r
415df2a3 1618 for the requested ModeNumber.\r
1619\r
1620 @retval EFI_SUCCESS The requested mode information was returned.\r
1621 @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
1622 the request.\r
1623 @retval EFI_UNSUPPORTED The mode number was not valid.\r
1624\r
1625**/\r
95276127 1626EFI_STATUS\r
1627EFIAPI\r
1628ConSplitterTextOutQueryMode (\r
1629 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1630 IN UINTN ModeNumber,\r
1631 OUT UINTN *Columns,\r
1632 OUT UINTN *Rows\r
ed66e1bc 1633 );\r
95276127 1634\r
415df2a3 1635/**\r
1636 Sets the output device(s) to a specified mode.\r
1637\r
1638 @param This Protocol instance pointer.\r
1639 @param ModeNumber The mode number to set.\r
1640\r
1641 @retval EFI_SUCCESS The requested text mode was set.\r
1642 @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
1643 the request.\r
1644 @retval EFI_UNSUPPORTED The mode number was not valid.\r
1645\r
1646**/\r
95276127 1647EFI_STATUS\r
1648EFIAPI\r
1649ConSplitterTextOutSetMode (\r
1650 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1651 IN UINTN ModeNumber\r
ed66e1bc 1652 );\r
95276127 1653\r
415df2a3 1654/**\r
1655 Sets the background and foreground colors for the OutputString () and\r
1656 ClearScreen () functions.\r
1657\r
1658 @param This Protocol instance pointer.\r
1659 @param Attribute The attribute to set. Bits 0..3 are the\r
1660 foreground color, and bits 4..6 are the\r
1661 background color. All other bits are undefined\r
1662 and must be zero. The valid Attributes are\r
1663 defined in this file.\r
1664\r
1665 @retval EFI_SUCCESS The attribute was set.\r
1666 @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
1667 the request.\r
1668 @retval EFI_UNSUPPORTED The attribute requested is not defined.\r
1669\r
1670**/\r
95276127 1671EFI_STATUS\r
1672EFIAPI\r
1673ConSplitterTextOutSetAttribute (\r
1674 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1675 IN UINTN Attribute\r
ed66e1bc 1676 );\r
95276127 1677\r
415df2a3 1678/**\r
1679 Clears the output device(s) display to the currently selected background\r
1680 color.\r
1681\r
1682 @param This Protocol instance pointer.\r
1683\r
1684 @retval EFI_SUCCESS The operation completed successfully.\r
1685 @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
1686 the request.\r
1687 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.\r
1688\r
1689**/\r
95276127 1690EFI_STATUS\r
1691EFIAPI\r
1692ConSplitterTextOutClearScreen (\r
1693 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This\r
ed66e1bc 1694 );\r
95276127 1695\r
415df2a3 1696/**\r
1697 Sets the current coordinates of the cursor position\r
1698\r
1699 @param This Protocol instance pointer.\r
33019a71 1700 @param Column The column position to set the cursor to. Must be\r
415df2a3 1701 greater than or equal to zero and less than the\r
33019a71 1702 number of columns by QueryMode ().\r
1703 @param Row The row position to set the cursor to. Must be\r
1704 greater than or equal to zero and less than the\r
1705 number of rows by QueryMode ().\r
415df2a3 1706\r
1707 @retval EFI_SUCCESS The operation completed successfully.\r
1708 @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
1709 the request.\r
1710 @retval EFI_UNSUPPORTED The output device is not in a valid text mode,\r
1711 or the cursor position is invalid for the\r
1712 current mode.\r
1713\r
1714**/\r
95276127 1715EFI_STATUS\r
1716EFIAPI\r
1717ConSplitterTextOutSetCursorPosition (\r
1718 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1719 IN UINTN Column,\r
1720 IN UINTN Row\r
ed66e1bc 1721 );\r
95276127 1722\r
415df2a3 1723\r
1724/**\r
1725 Makes the cursor visible or invisible\r
1726\r
1727 @param This Protocol instance pointer.\r
1728 @param Visible If TRUE, the cursor is set to be visible. If\r
1729 FALSE, the cursor is set to be invisible.\r
1730\r
1731 @retval EFI_SUCCESS The operation completed successfully.\r
1732 @retval EFI_DEVICE_ERROR The device had an error and could not complete\r
1733 the request, or the device does not support\r
1734 changing the cursor mode.\r
1735 @retval EFI_UNSUPPORTED The output device is not in a valid text mode.\r
1736\r
1737**/\r
95276127 1738EFI_STATUS\r
1739EFIAPI\r
1740ConSplitterTextOutEnableCursor (\r
1741 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,\r
1742 IN BOOLEAN Visible\r
ed66e1bc 1743 );\r
95276127 1744\r
415df2a3 1745/**\r
a9746199
RN
1746 Take the passed in Buffer of size ElementSize and grow the buffer\r
1747 by CONSOLE_SPLITTER_ALLOC_UNIT * ElementSize bytes.\r
1748 Copy the current data in Buffer to the new version of Buffer and\r
1749 free the old version of buffer.\r
415df2a3 1750\r
a9746199 1751 @param ElementSize Size of element in array.\r
fc753d3b 1752 @param Count Current number of elements in array.\r
415df2a3 1753 @param Buffer Bigger version of passed in Buffer with all the\r
fc753d3b 1754 data.\r
415df2a3 1755\r
fc753d3b 1756 @retval EFI_SUCCESS Buffer size has grown.\r
415df2a3 1757 @retval EFI_OUT_OF_RESOURCES Could not grow the buffer size.\r
1758\r
1759**/\r
95276127 1760EFI_STATUS\r
1761ConSplitterGrowBuffer (\r
a9746199 1762 IN UINTN ElementSize,\r
406ddad3 1763 IN OUT UINTN *Count,\r
95276127 1764 IN OUT VOID **Buffer\r
ed66e1bc 1765 );\r
95276127 1766\r
415df2a3 1767/**\r
2da292f6 1768 Returns information for an available graphics mode that the graphics device\r
1769 and the set of active video output devices supports.\r
415df2a3 1770\r
2da292f6 1771 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.\r
1772 @param ModeNumber The mode number to return information on.\r
1773 @param SizeOfInfo A pointer to the size, in bytes, of the Info buffer.\r
1774 @param Info A pointer to callee allocated buffer that returns information about ModeNumber.\r
415df2a3 1775\r
2da292f6 1776 @retval EFI_SUCCESS Mode information returned.\r
1777 @retval EFI_BUFFER_TOO_SMALL The Info buffer was too small.\r
1778 @retval EFI_DEVICE_ERROR A hardware error occurred trying to retrieve the video mode.\r
2da292f6 1779 @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
1780 @retval EFI_OUT_OF_RESOURCES No resource available.\r
415df2a3 1781\r
1782**/\r
95276127 1783EFI_STATUS\r
1784EFIAPI\r
d6e11f22 1785ConSplitterGraphicsOutputQueryMode (\r
fc753d3b 1786 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
1787 IN UINT32 ModeNumber,\r
1788 OUT UINTN *SizeOfInfo,\r
66aa04e4 1789 OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info\r
ed66e1bc 1790 );\r
95276127 1791\r
415df2a3 1792/**\r
ed055f1b 1793 Set the video device into the specified mode and clears the visible portions of\r
2da292f6 1794 the output display to black.\r
415df2a3 1795\r
2da292f6 1796 @param This The EFI_GRAPHICS_OUTPUT_PROTOCOL instance.\r
1797 @param ModeNumber Abstraction that defines the current video mode.\r
415df2a3 1798\r
2da292f6 1799 @retval EFI_SUCCESS The graphics mode specified by ModeNumber was selected.\r
1800 @retval EFI_DEVICE_ERROR The device had an error and could not complete the request.\r
1801 @retval EFI_UNSUPPORTED ModeNumber is not supported by this device.\r
1802 @retval EFI_OUT_OF_RESOURCES No resource available.\r
415df2a3 1803\r
1804**/\r
95276127 1805EFI_STATUS\r
1806EFIAPI\r
d6e11f22 1807ConSplitterGraphicsOutputSetMode (\r
95276127 1808 IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,\r
1809 IN UINT32 ModeNumber\r
ed66e1bc 1810 );\r
95276127 1811\r
415df2a3 1812/**\r
1813 The following table defines actions for BltOperations.\r
1814\r
1815 EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)\r
1816 directly to every pixel of the video display rectangle\r
1817 (DestinationX, DestinationY)\r
1818 (DestinationX + Width, DestinationY + Height).\r
1819 Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
1820 EfiBltVideoToBltBuffer - Read data from the video display rectangle\r
1821 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
1822 the BltBuffer rectangle (DestinationX, DestinationY )\r
1823 (DestinationX + Width, DestinationY + Height). If DestinationX or\r
1824 DestinationY is not zero then Delta must be set to the length in bytes\r
1825 of a row in the BltBuffer.\r
1826 EfiBltBufferToVideo - Write data from the BltBuffer rectangle\r
1827 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
1828 video display rectangle (DestinationX, DestinationY)\r
1829 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
1830 not zero then Delta must be set to the length in bytes of a row in the\r
1831 BltBuffer.\r
1832 EfiBltVideoToVideo - Copy from the video display rectangle\r
1833 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
1834 to the video display rectangle (DestinationX, DestinationY)\r
1835 (DestinationX + Width, DestinationY + Height).\r
1836 The BltBuffer and Delta are not used in this mode.\r
1837\r
1838 @param This Protocol instance pointer.\r
1839 @param BltBuffer Buffer containing data to blit into video buffer.\r
1840 This buffer has a size of\r
1841 Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)\r
1842 @param BltOperation Operation to perform on BlitBuffer and video\r
1843 memory\r
1844 @param SourceX X coordinate of source for the BltBuffer.\r
1845 @param SourceY Y coordinate of source for the BltBuffer.\r
1846 @param DestinationX X coordinate of destination for the BltBuffer.\r
1847 @param DestinationY Y coordinate of destination for the BltBuffer.\r
1848 @param Width Width of rectangle in BltBuffer in pixels.\r
ed055f1b 1849 @param Height Hight of rectangle in BltBuffer in pixels.\r
33019a71 1850 @param Delta OPTIONAL.\r
415df2a3 1851\r
1852 @retval EFI_SUCCESS The Blt operation completed.\r
1853 @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
1854 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video\r
1855 buffer.\r
1856\r
1857**/\r
95276127 1858EFI_STATUS\r
1859EFIAPI\r
d6e11f22 1860ConSplitterGraphicsOutputBlt (\r
95276127 1861 IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,\r
1862 IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer, OPTIONAL\r
1863 IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,\r
1864 IN UINTN SourceX,\r
1865 IN UINTN SourceY,\r
1866 IN UINTN DestinationX,\r
1867 IN UINTN DestinationY,\r
1868 IN UINTN Width,\r
1869 IN UINTN Height,\r
1870 IN UINTN Delta OPTIONAL\r
ed66e1bc 1871 );\r
95276127 1872\r
95276127 1873\r
415df2a3 1874/**\r
1875 Return the current video mode information.\r
1876\r
2da292f6 1877 @param This The EFI_UGA_DRAW_PROTOCOL instance.\r
1878 @param HorizontalResolution The size of video screen in pixels in the X dimension.\r
1879 @param VerticalResolution The size of video screen in pixels in the Y dimension.\r
1880 @param ColorDepth Number of bits per pixel, currently defined to be 32.\r
1881 @param RefreshRate The refresh rate of the monitor in Hertz.\r
415df2a3 1882\r
2da292f6 1883 @retval EFI_SUCCESS Mode information returned.\r
1884 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
1885 @retval EFI_INVALID_PARAMETER One of the input args was NULL.\r
415df2a3 1886\r
1887**/\r
d0c64728 1888EFI_STATUS\r
1889EFIAPI\r
d6e11f22 1890ConSplitterUgaDrawGetMode (\r
d0c64728 1891 IN EFI_UGA_DRAW_PROTOCOL *This,\r
1892 OUT UINT32 *HorizontalResolution,\r
1893 OUT UINT32 *VerticalResolution,\r
1894 OUT UINT32 *ColorDepth,\r
1895 OUT UINT32 *RefreshRate\r
ed66e1bc 1896 );\r
d0c64728 1897\r
415df2a3 1898/**\r
2da292f6 1899 Set the current video mode information.\r
415df2a3 1900\r
2da292f6 1901 @param This The EFI_UGA_DRAW_PROTOCOL instance.\r
1902 @param HorizontalResolution The size of video screen in pixels in the X dimension.\r
1903 @param VerticalResolution The size of video screen in pixels in the Y dimension.\r
1904 @param ColorDepth Number of bits per pixel, currently defined to be 32.\r
1905 @param RefreshRate The refresh rate of the monitor in Hertz.\r
415df2a3 1906\r
2da292f6 1907 @retval EFI_SUCCESS Mode information returned.\r
1908 @retval EFI_NOT_STARTED Video display is not initialized. Call SetMode ()\r
1909 @retval EFI_OUT_OF_RESOURCES Out of resources.\r
415df2a3 1910\r
1911**/\r
d0c64728 1912EFI_STATUS\r
1913EFIAPI\r
d6e11f22 1914ConSplitterUgaDrawSetMode (\r
d0c64728 1915 IN EFI_UGA_DRAW_PROTOCOL *This,\r
1916 IN UINT32 HorizontalResolution,\r
1917 IN UINT32 VerticalResolution,\r
1918 IN UINT32 ColorDepth,\r
1919 IN UINT32 RefreshRate\r
ed66e1bc 1920 );\r
d0c64728 1921\r
415df2a3 1922/**\r
2da292f6 1923 Blt a rectangle of pixels on the graphics screen.\r
415df2a3 1924\r
2da292f6 1925 The following table defines actions for BltOperations.\r
415df2a3 1926\r
2da292f6 1927 EfiUgaVideoFill:\r
1928 Write data from the BltBuffer pixel (SourceX, SourceY)\r
1929 directly to every pixel of the video display rectangle\r
1930 (DestinationX, DestinationY)\r
1931 (DestinationX + Width, DestinationY + Height).\r
1932 Only one pixel will be used from the BltBuffer. Delta is NOT used.\r
ed055f1b 1933 EfiUgaVideoToBltBuffer:\r
2da292f6 1934 Read data from the video display rectangle\r
1935 (SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in\r
1936 the BltBuffer rectangle (DestinationX, DestinationY )\r
1937 (DestinationX + Width, DestinationY + Height). If DestinationX or\r
1938 DestinationY is not zero then Delta must be set to the length in bytes\r
1939 of a row in the BltBuffer.\r
1940 EfiUgaBltBufferToVideo:\r
1941 Write data from the BltBuffer rectangle\r
1942 (SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the\r
1943 video display rectangle (DestinationX, DestinationY)\r
1944 (DestinationX + Width, DestinationY + Height). If SourceX or SourceY is\r
1945 not zero then Delta must be set to the length in bytes of a row in the\r
1946 BltBuffer.\r
1947 EfiUgaVideoToVideo:\r
1948 Copy from the video display rectangle\r
1949 (SourceX, SourceY) (SourceX + Width, SourceY + Height) .\r
1950 to the video display rectangle (DestinationX, DestinationY)\r
1951 (DestinationX + Width, DestinationY + Height).\r
1952 The BltBuffer and Delta are not used in this mode.\r
1953\r
1954 @param This Protocol instance pointer.\r
1955 @param BltBuffer Buffer containing data to blit into video buffer. This\r
1956 buffer has a size of Width*Height*sizeof(EFI_UGA_PIXEL)\r
1957 @param BltOperation Operation to perform on BlitBuffer and video memory\r
1958 @param SourceX X coordinate of source for the BltBuffer.\r
1959 @param SourceY Y coordinate of source for the BltBuffer.\r
1960 @param DestinationX X coordinate of destination for the BltBuffer.\r
1961 @param DestinationY Y coordinate of destination for the BltBuffer.\r
1962 @param Width Width of rectangle in BltBuffer in pixels.\r
1963 @param Height Hight of rectangle in BltBuffer in pixels.\r
1964 @param Delta OPTIONAL\r
1965\r
1966 @retval EFI_SUCCESS The Blt operation completed.\r
1967 @retval EFI_INVALID_PARAMETER BltOperation is not valid.\r
1968 @retval EFI_DEVICE_ERROR A hardware error occured writting to the video buffer.\r
415df2a3 1969\r
1970**/\r
d0c64728 1971EFI_STATUS\r
1972EFIAPI\r
d6e11f22 1973ConSplitterUgaDrawBlt (\r
d0c64728 1974 IN EFI_UGA_DRAW_PROTOCOL *This,\r
1975 IN EFI_UGA_PIXEL *BltBuffer, OPTIONAL\r
1976 IN EFI_UGA_BLT_OPERATION BltOperation,\r
1977 IN UINTN SourceX,\r
1978 IN UINTN SourceY,\r
1979 IN UINTN DestinationX,\r
1980 IN UINTN DestinationY,\r
1981 IN UINTN Width,\r
1982 IN UINTN Height,\r
1983 IN UINTN Delta OPTIONAL\r
ed66e1bc 1984 );\r
d0c64728 1985\r
415df2a3 1986/**\r
1987 Sets the output device(s) to a specified mode.\r
1988\r
2da292f6 1989 @param Private Text Out Splitter pointer.\r
415df2a3 1990 @param ModeNumber The mode number to set.\r
1991\r
415df2a3 1992**/\r
9937b365 1993VOID\r
1994TextOutSetMode (\r
95276127 1995 IN TEXT_OUT_SPLITTER_PRIVATE_DATA *Private,\r
1996 IN UINTN ModeNumber\r
ed66e1bc 1997 );\r
95276127 1998\r
95276127 1999#endif\r