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