]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/ConsoleControl.h
remedy the comment of EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / ConsoleControl.h
CommitLineData
5f597758 1/** @file\r
88f20127 2\r
5f597758
LG
3 This protocol provides the interfaces to Get/Set the current video mode for GOP/UGA screen\r
4\r
5Copyright (c) 2006 - 2008, Intel Corporation \r
88f20127 6All rights reserved. This program and the accompanying materials \r
7are licensed and made available under the terms and conditions of the BSD License \r
8which accompanies this distribution. The full text of the license may be found at \r
9http://opensource.org/licenses/bsd-license.php \r
10 \r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
5f597758 14**/\r
88f20127 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
22typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;\r
23\r
24\r
25typedef enum {\r
346cf9ac
LG
26 EfiConsoleControlScreenText, /// Text Mode\r
27 EfiConsoleControlScreenGraphics, /// Graphics Mode\r
88f20127 28 EfiConsoleControlScreenMaxValue\r
29} EFI_CONSOLE_CONTROL_SCREEN_MODE;\r
30\r
5f597758
LG
31/**\r
32 Return the current video mode information. Also returns info about existence\r
346cf9ac
LG
33 of Graphics Output devices or UGA Draw devices in system, and whether the Std In device is locked. \r
34 GopUgaExists and StdInLocked parameters are optional.\r
5f597758
LG
35\r
36 @param This Protocol instance pointer.\r
346cf9ac 37 @param Mode Current video mode.\r
5f597758
LG
38 @param GopExists TRUE if GOP Spliter has found a GOP/UGA device\r
39 @param StdInLocked TRUE if StdIn device is keyboard locked\r
88f20127 40\r
5f597758
LG
41 @retval EFI_SUCCESS Video mode information is returned.\r
42 @retval EFI_INVALID_PARAMETER Invalid parameters if Mode == NULL.\r
43\r
44**/\r
88f20127 45typedef\r
46EFI_STATUS\r
7d839888 47(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE)(\r
88f20127 48 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r
49 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,\r
62409219 50 OUT BOOLEAN *GopUgaExists, OPTIONAL \r
51 OUT BOOLEAN *StdInLocked OPTIONAL\r
ed66e1bc 52 );\r
88f20127 53\r
5f597758
LG
54/**\r
55 Set the current video mode to either text or graphics. \r
88f20127 56\r
5f597758 57 @param This Protocol instance pointer.\r
346cf9ac 58 @param Mode Video mode is to be set.\r
88f20127 59\r
346cf9ac 60 @retval EFI_SUCCESS Mode is set successfully.\r
5f597758
LG
61 @retval EFI_INVALID_PARAMETER Mode is not the valid mode value.\r
62 @retval EFI_UNSUPPORTED Mode is unsupported by console device.\r
88f20127 63\r
5f597758 64**/\r
88f20127 65typedef\r
66EFI_STATUS\r
7d839888 67(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE)(\r
88f20127 68 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r
69 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode\r
ed66e1bc 70 );\r
88f20127 71\r
5f597758 72/**\r
346cf9ac 73 Store the password, enable state variable and arm the periodic timer.\r
aae4ad05 74 If Password is NULL unlock the password state variable and set the event\r
75 timer. If the Password is too big return an error. If the Password is valid\r
76 Copy the Password and enable state variable and then arm the periodic timer\r
77\r
78 @param This Console Control protocol pointer.\r
79 @param Password The password input.\r
5f597758 80\r
346cf9ac 81 @retval EFI_SUCCESS Lock the StdIn device successfully.\r
5f597758
LG
82 @retval EFI_INVALID_PARAMETER Password is NULL\r
83 @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the big password fails\r
88f20127 84\r
5f597758 85**/\r
88f20127 86typedef\r
87EFI_STATUS\r
7d839888 88(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN)(\r
88f20127 89 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r
aae4ad05 90 IN CHAR16 *Password\r
ed66e1bc 91 );\r
88f20127 92\r
88f20127 93struct _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
99extern EFI_GUID gEfiConsoleControlProtocolGuid;\r
100\r
101#endif\r