/*-1* Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.2*3* Redistribution and use in source and binary forms, with or without4* modification, are permitted provided that the following conditions5* are met:6*7* 1. Redistributions of source code must retain the above copyright8* notice, this list of conditions and the following disclaimer.9* 2. Redistributions in binary form must reproduce the above copyright10* notice, this list of conditions and the following disclaimer in the11* documentation and/or other materials provided with the distribution.12*13* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"14* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE15* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE16* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS17* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR18* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF19* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS20* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN21* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)22* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF23* THE POSSIBILITY OF SUCH DAMAGE.24*/2526/*27* Original Module Name: ConsoleControl.h28* Abstract: Abstraction of a Text mode or GOP/UGA screen29*/303132#ifndef _EFI_CONS_CTL_H33#define _EFI_CONS_CTL_H3435#define EFI_CONSOLE_CONTROL_PROTOCOL_GUID \36{ 0xf42f7782, 0x12e, 0x4c12, {0x99, 0x56, 0x49, 0xf9, 0x43, 0x4, 0xf7, 0x21} }3738typedef struct _EFI_CONSOLE_CONTROL_PROTOCOL EFI_CONSOLE_CONTROL_PROTOCOL;394041typedef enum {42EfiConsoleControlScreenText,43EfiConsoleControlScreenGraphics,44EfiConsoleControlScreenMaxValue45} EFI_CONSOLE_CONTROL_SCREEN_MODE;464748typedef49EFI_STATUS50(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE) (51IN EFI_CONSOLE_CONTROL_PROTOCOL *This,52OUT EFI_CONSOLE_CONTROL_SCREEN_MODE *Mode,53OUT BOOLEAN *GopUgaExists, OPTIONAL54OUT BOOLEAN *StdInLocked OPTIONAL55)56/*++5758Routine Description:59Return the current video mode information. Also returns info about existence60of Graphics Output devices or UGA Draw devices in system, and if the Std In61device is locked. All the arguments are optional and only returned if a non62NULL pointer is passed in.6364Arguments:65This - Protocol instance pointer.66Mode - Are we in text of grahics mode.67GopUgaExists - TRUE if Console Spliter has found a GOP or UGA device68StdInLocked - TRUE if StdIn device is keyboard locked6970Returns:71EFI_SUCCESS - Mode information returned.7273--*/74;757677typedef78EFI_STATUS79(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE) (80IN EFI_CONSOLE_CONTROL_PROTOCOL *This,81IN EFI_CONSOLE_CONTROL_SCREEN_MODE Mode82)83/*++8485Routine Description:86Set the current mode to either text or graphics. Graphics is87for Quiet Boot.8889Arguments:90This - Protocol instance pointer.91Mode - Mode to set the9293Returns:94EFI_SUCCESS - Mode information returned.9596--*/97;9899100typedef101EFI_STATUS102(EFIAPI *EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN) (103IN EFI_CONSOLE_CONTROL_PROTOCOL *This,104IN CHAR16 *Password105)106/*++107108Routine Description:109Lock Std In devices until Password is typed.110111Arguments:112This - Protocol instance pointer.113Password - Password needed to unlock screen. NULL means unlock keyboard114115Returns:116EFI_SUCCESS - Mode information returned.117EFI_DEVICE_ERROR - Std In not locked118119--*/120;121122123124struct _EFI_CONSOLE_CONTROL_PROTOCOL {125EFI_CONSOLE_CONTROL_PROTOCOL_GET_MODE GetMode;126EFI_CONSOLE_CONTROL_PROTOCOL_SET_MODE SetMode;127EFI_CONSOLE_CONTROL_PROTOCOL_LOCK_STD_IN LockStdIn;128};129130extern EFI_GUID gEfiConsoleControlProtocolGuid;131132#endif133134135