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