]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | This protocol provides the interfaces to Get/Set the current video mode for GOP/UGA screen\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2008, Intel Corporation\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef __CONSOLE_CONTROL_H__\r | |
17 | #define __CONSOLE_CONTROL_H__\r | |
18 | \r | |
19 | #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \\r | |
20 | { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21 } }\r | |
21 | \r | |
22 | typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;\r | |
23 | \r | |
24 | \r | |
25 | typedef enum {\r | |
26 | EfiConsoleControlScreenText, ///> Text Mode\r | |
27 | EfiConsoleControlScreenGraphics, ///> Graphics Mode\r | |
28 | EfiConsoleControlScreenMaxValue\r | |
29 | } EFI_CONSOLE_CONTROL_SCREEN_MODE;\r | |
30 | \r | |
31 | /**\r | |
32 | Return the current video mode information. Also returns info about existence\r | |
33 | of Graphics Output devices or UGA Draw devices in system, and whether the Std\r | |
34 | In device is locked. GopUgaExists and StdInLocked parameters are optional, and\r | |
35 | only returned if a non NULL pointer is passed in.\r | |
36 | \r | |
37 | @param This Protocol instance pointer.\r | |
38 | @param Mode Current video mode.\r | |
39 | @param GopUgaExists TRUE if GOP Spliter has found a GOP/UGA device\r | |
40 | @param StdInLocked TRUE if StdIn device is keyboard locked\r | |
41 | \r | |
42 | @retval EFI_SUCCESS Video mode information is returned.\r | |
43 | @retval EFI_INVALID_PARAMETER Invalid parameters if Mode == NULL.\r | |
44 | \r | |
45 | **/\r | |
46 | typedef\r | |
47 | EFI_STATUS\r | |
48 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE)(\r | |
49 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r | |
50 | OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,\r | |
51 | OUT BOOLEAN *GopUgaExists, OPTIONAL\r | |
52 | OUT BOOLEAN *StdInLocked OPTIONAL\r | |
53 | );\r | |
54 | \r | |
55 | /**\r | |
56 | Set the current video mode to either text or graphics. Graphics is\r | |
57 | for Quiet Boot.\r | |
58 | \r | |
59 | @param This Protocol instance pointer.\r | |
60 | @param Mode Video mode is to be set.\r | |
61 | \r | |
62 | @retval EFI_SUCCESS Mode is set successfully.\r | |
63 | @retval EFI_INVALID_PARAMETER Mode is not the valid mode value.\r | |
64 | @retval EFI_UNSUPPORTED Mode is unsupported by console device.\r | |
65 | \r | |
66 | **/\r | |
67 | typedef\r | |
68 | EFI_STATUS\r | |
69 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE)(\r | |
70 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r | |
71 | OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode\r | |
72 | );\r | |
73 | \r | |
74 | /**\r | |
75 | If Password is NULL or the Password is too big, then return an error. If the\r | |
76 | Password is valid, then store the password, lock StdIn and arm the periodic timer.\r | |
77 | \r | |
78 | @param This Protocol instance pointer.\r | |
79 | @param Password The password input.\r | |
80 | \r | |
81 | @retval EFI_SUCCESS Lock the StdIn device.\r | |
82 | @retval EFI_INVALID_PARAMETER Password is NULL.\r | |
83 | @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails.\r | |
84 | \r | |
85 | **/\r | |
86 | typedef\r | |
87 | EFI_STATUS\r | |
88 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN)(\r | |
89 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r | |
90 | IN CHAR16 *Password\r | |
91 | );\r | |
92 | \r | |
93 | struct _EFI_CONSOLE_CONTROL_PROTOCOL {\r | |
94 | EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;\r | |
95 | EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;\r | |
96 | EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;\r | |
97 | };\r | |
98 | \r | |
99 | extern EFI_GUID gEfiConsoleControlProtocolGuid;\r | |
100 | \r | |
101 | #endif\r |