libefi: import efichar.c for ucs2 support
[unleashed.git] / usr / src / boot / sys / boot / efi / include / eficonsctl.h
blob68be3d69f4fd39e318a6f87d3e57fc84faacf8c7
1 /*-
2 * Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
18 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24 * THE POSSIBILITY OF SUCH DAMAGE.
28 * Original Module Name: ConsoleControl.h
29 * Abstract: Abstraction of a Text mode or GOP/UGA screen
32 /* $FreeBSD$ */
34 #ifndef _EFI_CONS_CTL_H
35 #define _EFI_CONS_CTL_H
37 #define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \
38 { 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }
40 typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;
43 typedef enum {
44 EfiConsoleControlScreenText,
45 EfiConsoleControlScreenGraphics,
46 EfiConsoleControlScreenMaxValue
47 } EFI_CONSOLE_CONTROL_SCREEN_MODE;
50 typedef
51 EFI_STATUS
52 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (
53 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
54 OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,
55 OUT BOOLEAN *GopUgaExists, OPTIONAL
56 OUT BOOLEAN *StdInLocked OPTIONAL
58 /*++
60 Routine Description:
61 Return the current video mode information. Also returns info about existence
62 of Graphics Output devices or UGA Draw devices in system, and if the Std In
63 device is locked. All the arguments are optional and only returned if a non
64 NULL pointer is passed in.
66 Arguments:
67 This - Protocol instance pointer.
68 Mode - Are we in text of grahics mode.
69 GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device
70 StdInLocked - TRUE if StdIn device is keyboard locked
72 Returns:
73 EFI_SUCCESS - Mode information returned.
75 --*/
79 typedef
80 EFI_STATUS
81 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (
82 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
83 IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode
85 /*++
87 Routine Description:
88 Set the current mode to either text or graphics. Graphics is
89 for Quiet Boot.
91 Arguments:
92 This - Protocol instance pointer.
93 Mode - Mode to set the
95 Returns:
96 EFI_SUCCESS - Mode information returned.
98 --*/
102 typedef
103 EFI_STATUS
104 (EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (
105 IN EFI_CONSOLE_CONTROL_PROTOCOL *This,
106 IN CHAR16 *Password
108 /*++
110 Routine Description:
111 Lock Std In devices until Password is typed.
113 Arguments:
114 This - Protocol instance pointer.
115 Password - Password needed to unlock screen. NULL means unlock keyboard
117 Returns:
118 EFI_SUCCESS - Mode information returned.
119 EFI_DEVICE_ERROR - Std In not locked
121 --*/
126 struct _EFI_CONSOLE_CONTROL_PROTOCOL {
127 EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;
128 EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;
129 EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;
132 extern EFI_GUID gEfiConsoleControlProtocolGuid;
134 #endif