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