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