]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Protocol/ConsoleControl.h
b00587c8b3d165fee60662fb101d2535b7cfba53
[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,
27 EfiConsoleControlScreenGraphics,
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 if the Std In device is locked. All the
34 arguments are optional and only returned if a non NULL pointer is passed in.
35
36 @param This Protocol instance pointer.
37 @param Mode Are we in text of grahics 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 /**
56 Set the current video mode to either text or graphics.
57
58 @param This Protocol instance pointer.
59 @param Mode Mode is to be set.
60
61 @retval EFI_SUCCESS Mode is set.
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 /**
75 Copy the Password and enable state variable and then arm the periodic timer
76
77 @retval EFI_SUCCESS Lock the StdIn device
78 @retval EFI_INVALID_PARAMETER Password is NULL
79 @retval EFI_OUT_OF_RESOURCES Buffer allocation to store the big password fails
80
81 **/
82 typedef
83 EFI_STATUS
84 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN)(
85 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
86 IN CHAR16 *Password
87 )
88 ;
89
90 struct _EFI_CONSOLE_CONTROL_PROTOCOL {
91 EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
92 EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
93 EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
94 };
95
96 extern EFI_GUID gEfiConsoleControlProtocolGuid;
97
98 #endif