]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/ConsoleControl.h
refine comments for EFI_CONSOLE_CONTROL_PROTOCOL
[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
d2bc9f32 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.\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 54/**\r
d2bc9f32 55 Set the current video mode to either text or graphics. Graphics is\r
56 for Quiet Boot.\r
88f20127 57\r
5f597758 58 @param This Protocol instance pointer.\r
346cf9ac 59 @param Mode Video mode is to be set.\r
88f20127 60\r
346cf9ac 61 @retval EFI_SUCCESS Mode is set successfully.\r
5f597758
LG
62 @retval EFI_INVALID_PARAMETER Mode is not the valid mode value.\r
63 @retval EFI_UNSUPPORTED Mode is unsupported by console device.\r
88f20127 64\r
5f597758 65**/\r
88f20127 66typedef\r
67EFI_STATUS\r
7d839888 68(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE)(\r
88f20127 69 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r
70 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode\r
ed66e1bc 71 );\r
88f20127 72\r
5f597758 73/**\r
d2bc9f32 74 If Password is NULL or the Password is too big, then return an error. If the \r
75 Password is valid, then store the password, lock StdIn and arm the periodic timer.\r
aae4ad05 76\r
77 @param This Console Control protocol pointer.\r
78 @param Password The password input.\r
5f597758 79\r
d2bc9f32 80 @retval EFI_SUCCESS Lock the StdIn device\r
5f597758 81 @retval EFI_INVALID_PARAMETER Password is NULL\r
d2bc9f32 82 @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the password fails\r
88f20127 83\r
5f597758 84**/\r
88f20127 85typedef\r
86EFI_STATUS\r
7d839888 87(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN)(\r
88f20127 88 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,\r
aae4ad05 89 IN CHAR16 *Password\r
ed66e1bc 90 );\r
88f20127 91\r
88f20127 92struct _EFI_CONSOLE_CONTROL_PROTOCOL {\r
93 EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;\r
94 EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;\r
95 EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;\r
96};\r
97\r
98extern EFI_GUID gEfiConsoleControlProtocolGuid;\r
99\r
100#endif\r