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