|
@@ -0,0 +1,124 @@
|
|
1
|
+/*++
|
|
2
|
+
|
|
3
|
+Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR>
|
|
4
|
+This program and the accompanying materials
|
|
5
|
+are licensed and made available under the terms and conditions of the BSD License
|
|
6
|
+which accompanies this distribution. The full text of the license may be found at
|
|
7
|
+http://opensource.org/licenses/bsd-license.php
|
|
8
|
+
|
|
9
|
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
10
|
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
11
|
+
|
|
12
|
+Module Name:
|
|
13
|
+
|
|
14
|
+ ConsoleControl.h
|
|
15
|
+
|
|
16
|
+Abstract:
|
|
17
|
+
|
|
18
|
+ Abstraction of a Text mode or GOP/UGA screen
|
|
19
|
+
|
|
20
|
+--*/
|
|
21
|
+
|
|
22
|
+#ifndef __CONSOLE_CONTROL_H__
|
|
23
|
+#define __CONSOLE_CONTROL_H__
|
|
24
|
+
|
|
25
|
+FILE_LICENCE ( BSD3 );
|
|
26
|
+
|
|
27
|
+#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
|
|
28
|
+ { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
|
|
29
|
+
|
|
30
|
+typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+typedef enum {
|
|
34
|
+ EfiConsoleControlScreenText,
|
|
35
|
+ EfiConsoleControlScreenGraphics,
|
|
36
|
+ EfiConsoleControlScreenMaxValue
|
|
37
|
+} EFI_CONSOLE_CONTROL_SCREEN_MODE;
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+typedef
|
|
41
|
+EFI_STATUS
|
|
42
|
+(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
|
|
43
|
+ IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
|
44
|
+ OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
|
|
45
|
+ OUT BOOLEAN *GopUgaExists, OPTIONAL
|
|
46
|
+ OUT BOOLEAN *StdInLocked OPTIONAL
|
|
47
|
+ )
|
|
48
|
+/*++
|
|
49
|
+
|
|
50
|
+ Routine Description:
|
|
51
|
+ Return the current video mode information. Also returns info about existence
|
|
52
|
+ of Graphics Output devices or UGA Draw devices in system, and if the Std In
|
|
53
|
+ device is locked. All the arguments are optional and only returned if a non
|
|
54
|
+ NULL pointer is passed in.
|
|
55
|
+
|
|
56
|
+ Arguments:
|
|
57
|
+ This - Protocol instance pointer.
|
|
58
|
+ Mode - Are we in text of grahics mode.
|
|
59
|
+ GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device
|
|
60
|
+ StdInLocked - TRUE if StdIn device is keyboard locked
|
|
61
|
+
|
|
62
|
+ Returns:
|
|
63
|
+ EFI_SUCCESS - Mode information returned.
|
|
64
|
+
|
|
65
|
+--*/
|
|
66
|
+;
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+typedef
|
|
70
|
+EFI_STATUS
|
|
71
|
+(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
|
|
72
|
+ IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
|
73
|
+ IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
|
74
|
+ )
|
|
75
|
+/*++
|
|
76
|
+
|
|
77
|
+ Routine Description:
|
|
78
|
+ Set the current mode to either text or graphics. Graphics is
|
|
79
|
+ for Quiet Boot.
|
|
80
|
+
|
|
81
|
+ Arguments:
|
|
82
|
+ This - Protocol instance pointer.
|
|
83
|
+ Mode - Mode to set the
|
|
84
|
+
|
|
85
|
+ Returns:
|
|
86
|
+ EFI_SUCCESS - Mode information returned.
|
|
87
|
+
|
|
88
|
+--*/
|
|
89
|
+;
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+typedef
|
|
93
|
+EFI_STATUS
|
|
94
|
+(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
|
|
95
|
+ IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
|
96
|
+ IN CHAR16 *Password
|
|
97
|
+ )
|
|
98
|
+/*++
|
|
99
|
+
|
|
100
|
+ Routine Description:
|
|
101
|
+ Lock Std In devices until Password is typed.
|
|
102
|
+
|
|
103
|
+ Arguments:
|
|
104
|
+ This - Protocol instance pointer.
|
|
105
|
+ Password - Password needed to unlock screen. NULL means unlock keyboard
|
|
106
|
+
|
|
107
|
+ Returns:
|
|
108
|
+ EFI_SUCCESS - Mode information returned.
|
|
109
|
+ EFI_DEVICE_ERROR - Std In not locked
|
|
110
|
+
|
|
111
|
+--*/
|
|
112
|
+;
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+struct _EFI_CONSOLE_CONTROL_PROTOCOL {
|
|
117
|
+ EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
|
|
118
|
+ EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
|
|
119
|
+ EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
|
|
120
|
+};
|
|
121
|
+
|
|
122
|
+extern EFI_GUID gEfiConsoleControlProtocolGuid;
|
|
123
|
+
|
|
124
|
+#endif
|