1 | /* $Id: ConsoleControl.h 106061 2024-09-16 14:03:52Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * ConsoleControl.h
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2009-2024 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * The contents of this file may alternatively be used under the terms
|
---|
26 | * of the Common Development and Distribution License Version 1.0
|
---|
27 | * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
|
---|
28 | * in the VirtualBox distribution, in which case the provisions of the
|
---|
29 | * CDDL are applicable instead of those of the GPL.
|
---|
30 | *
|
---|
31 | * You may elect to license modified versions of this file under the
|
---|
32 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
33 | *
|
---|
34 | * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
|
---|
35 | */
|
---|
36 |
|
---|
37 | /*
|
---|
38 | * This code is based on:
|
---|
39 | *
|
---|
40 | * Copyright (c) 2004 - 2006, Intel Corporation
|
---|
41 | * All rights reserved. This program and the accompanying materials
|
---|
42 | * are licensed and made available under the terms and conditions of the BSD License
|
---|
43 | * which accompanies this distribution. The full text of the license may be found at
|
---|
44 | * http://opensource.org/licenses/bsd-license.php
|
---|
45 | *
|
---|
46 | * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
47 | * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
48 | *
|
---|
49 | * Module Name:
|
---|
50 | *
|
---|
51 | * ConsoleControl.h
|
---|
52 | *
|
---|
53 | * Abstract:
|
---|
54 | *
|
---|
55 | * Abstraction of a Text mode or GOP/UGA screen
|
---|
56 | */
|
---|
57 |
|
---|
58 | #ifndef __CONSOLE_CONTROL_H__
|
---|
59 | #define __CONSOLE_CONTROL_H__
|
---|
60 |
|
---|
61 | #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
|
---|
62 | { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
|
---|
63 |
|
---|
64 | typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
|
---|
65 |
|
---|
66 |
|
---|
67 | typedef enum {
|
---|
68 | EfiConsoleControlScreenText,
|
---|
69 | EfiConsoleControlScreenGraphics,
|
---|
70 | EfiConsoleControlScreenMaxValue
|
---|
71 | } EFI_CONSOLE_CONTROL_SCREEN_MODE;
|
---|
72 |
|
---|
73 |
|
---|
74 | typedef
|
---|
75 | EFI_STATUS
|
---|
76 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
|
---|
77 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
---|
78 | OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
|
---|
79 | OUT BOOLEAN *GopUgaExists, OPTIONAL
|
---|
80 | OUT BOOLEAN *StdInLocked OPTIONAL
|
---|
81 | )
|
---|
82 | /*++
|
---|
83 |
|
---|
84 | Routine Description:
|
---|
85 | Return the current video mode information. Also returns info about existence
|
---|
86 | of Graphics Output devices or UGA Draw devices in system, and if the Std In
|
---|
87 | device is locked. All the arguments are optional and only returned if a non
|
---|
88 | NULL pointer is passed in.
|
---|
89 |
|
---|
90 | Arguments:
|
---|
91 | This - Protocol instance pointer.
|
---|
92 | Mode - Are we in text of graphics mode.
|
---|
93 | GopUgaExists - TRUE if Console Splitter has found a GOP or UGA device
|
---|
94 | StdInLocked - TRUE if StdIn device is keyboard locked
|
---|
95 |
|
---|
96 | Returns:
|
---|
97 | EFI_SUCCESS - Mode information returned.
|
---|
98 |
|
---|
99 | --*/
|
---|
100 | ;
|
---|
101 |
|
---|
102 |
|
---|
103 | typedef
|
---|
104 | EFI_STATUS
|
---|
105 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
|
---|
106 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
---|
107 | OUT EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
|
---|
108 | )
|
---|
109 | /*++
|
---|
110 |
|
---|
111 | Routine Description:
|
---|
112 | Set the current mode to either text or graphics. Graphics is
|
---|
113 | for Quiet Boot.
|
---|
114 |
|
---|
115 | Arguments:
|
---|
116 | This - Protocol instance pointer.
|
---|
117 | Mode - Mode to set the
|
---|
118 |
|
---|
119 | Returns:
|
---|
120 | EFI_SUCCESS - Mode information returned.
|
---|
121 |
|
---|
122 | --*/
|
---|
123 | ;
|
---|
124 |
|
---|
125 |
|
---|
126 | typedef
|
---|
127 | EFI_STATUS
|
---|
128 | (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
|
---|
129 | IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
|
---|
130 | IN CHAR16 *Password
|
---|
131 | )
|
---|
132 | /*++
|
---|
133 |
|
---|
134 | Routine Description:
|
---|
135 | Lock Std In devices until Password is typed.
|
---|
136 |
|
---|
137 | Arguments:
|
---|
138 | This - Protocol instance pointer.
|
---|
139 | Password - Password needed to unlock screen. NULL means unlock keyboard
|
---|
140 |
|
---|
141 | Returns:
|
---|
142 | EFI_SUCCESS - Mode information returned.
|
---|
143 | EFI_DEVICE_ERROR - Std In not locked
|
---|
144 |
|
---|
145 | --*/
|
---|
146 | ;
|
---|
147 |
|
---|
148 |
|
---|
149 |
|
---|
150 | struct _EFI_CONSOLE_CONTROL_PROTOCOL {
|
---|
151 | EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
|
---|
152 | EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
|
---|
153 | EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
|
---|
154 | };
|
---|
155 |
|
---|
156 | extern EFI_GUID gEfiConsoleControlProtocolGuid;
|
---|
157 |
|
---|
158 | #endif
|
---|