Imported Upstream version 3.12
[debian/elilo] / efi110 / efiConsoleControl.h
1 /*++ 
2
3 Copyright (c) 2004, Intel Corporation                                                         
4 All rights reserved. This program and the accompanying materials                          
5 are licensed and made available under the terms and conditions of the BSD License         
6 which accompanies this distribution.  The full text of the license may be found at        
7 http://opensource.org/licenses/bsd-license.php                                            
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             
11
12 Module Name:
13
14 ConsoleControl.h
15
16 Abstract:
17
18 Abstraction of a Text mode or UGA screen
19
20 --*/
21
22 #ifndef __CONSOLE_CONTROL_H__
23 #define __CONSOLE_CONTROL_H__
24
25 #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
26 { 0xf42f7782, 0x12e, 0x4c12, { 0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21 } }
27
28 /* typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL   EFI_CONSOLE_CONTROL_PROTOCOL; */
29 struct _EFI_CONSOLE_CONTROL_PROTOCOL;
30
31
32 typedef enum {
33     EfiConsoleControlScreenText,
34     EfiConsoleControlScreenGraphics,
35     EfiConsoleControlScreenMaxValue
36 } EFI_CONSOLE_CONTROL_SCREEN_MODE;
37
38
39 typedef
40 EFI_STATUS
41 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
42                                                  IN  struct _EFI_CONSOLE_CONTROL_PROTOCOL *This,
43                                                  OUT EFI_CONSOLE_CONTROL_SCREEN_MODE   *Mode,
44                                                  OUT BOOLEAN                           *UgaExists,   OPTIONAL  
45                                                  OUT BOOLEAN                           *StdInLocked  OPTIONAL
46                                                  )
47 /*++
48
49 Routine Description:
50 Return the current video mode information. Also returns info about existence
51 of UGA Draw devices in system, and if the Std In device is locked. All the
52 arguments are optional and only returned if a non NULL pointer is passed in.
53
54 Arguments:
55 This - Protocol instance pointer.
56 Mode        - Are we in text of grahics mode.
57 UgaExists   - TRUE if UGA Spliter has found a UGA device
58 StdInLocked - TRUE if StdIn device is keyboard locked
59
60 Returns:
61 EFI_SUCCESS     - Mode information returned.
62
63 --*/
64 ;
65
66
67 typedef
68 EFI_STATUS
69 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
70                                                  IN  struct _EFI_CONSOLE_CONTROL_PROTOCOL *This,
71                                                  OUT EFI_CONSOLE_CONTROL_SCREEN_MODE   Mode
72                                                  )
73 /*++
74
75 Routine Description:
76 Set the current mode to either text or graphics. Graphics is
77 for Quiet Boot.
78
79 Arguments:
80 This  - Protocol instance pointer.
81 Mode  - Mode to set the 
82
83 Returns:
84 EFI_SUCCESS     - Mode information returned.
85
86 --*/
87 ;
88
89
90 typedef
91 EFI_STATUS
92 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
93                                                     IN  struct _EFI_CONSOLE_CONTROL_PROTOCOL *This,
94                                                     IN CHAR16                             *Password
95                                                     )
96 /*++
97
98 Routine Description:
99 Lock Std In devices until Password is typed.
100
101 Arguments:
102 This     - Protocol instance pointer.
103 Password - Password needed to unlock screen. NULL means unlock keyboard
104
105 Returns:
106 EFI_SUCCESS      - Mode information returned.
107 EFI_DEVICE_ERROR - Std In not locked
108
109 --*/
110 ;
111
112
113
114 typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL {
115     EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE           GetMode;
116     EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE           SetMode;
117     EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN        LockStdIn;
118 } EFI_CONSOLE_CONTROL_PROTOCOL;
119
120 extern EFI_GUID gEfiConsoleControlProtocolGuid;
121
122 #endif