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