X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FSimpleTextOut.h;h=b75e52a69605c9c7298c1e593f237e7b6e880973;hb=fa3e7746bb6cda21a9e8c600d19b8228ec7bcc34;hp=b568865f18f23015308657556165d4c08446d902;hpb=d1f950002362305fcd4c30f108ef7b76679f5843;p=mirror_edk2.git diff --git a/MdePkg/Include/Protocol/SimpleTextOut.h b/MdePkg/Include/Protocol/SimpleTextOut.h index b568865f18..b75e52a696 100644 --- a/MdePkg/Include/Protocol/SimpleTextOut.h +++ b/MdePkg/Include/Protocol/SimpleTextOut.h @@ -1,12 +1,12 @@ /** @file - Simple Text Out protocol from the EFI 1.0 specification. + Simple Text Out protocol from the UEFI 2.0 specification. Abstraction of a very simple text based output device like VGA text mode or a serial terminal. The Simple Text Out protocol instance can represent - a single hardware device or a virtual device that is an agregation + a single hardware device or a virtual device that is an aggregation of multiple physical devices. - Copyright (c) 2006, Intel Corporation + Copyright (c) 2006 - 2008, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,22 +15,27 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - Module Name: SimpleTextOut.h - **/ #ifndef __SIMPLE_TEXT_OUT_H__ #define __SIMPLE_TEXT_OUT_H__ -#define EFI_SIMPLE_TEXT_OUT_PROTOCOL_GUID \ +#define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \ { \ 0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -#define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID EFI_SIMPLE_TEXT_OUT_PROTOCOL_GUID +/// +/// Protocol GUID defined in EFI1.1. +/// +#define SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID + +typedef struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL; -typedef struct _EFI_SIMPLE_TEXT_OUT_PROTOCOL EFI_SIMPLE_TEXT_OUT_PROTOCOL; -typedef struct _EFI_SIMPLE_TEXT_OUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL; +/// +/// Backward-compatible with EFI1.1. +/// +typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SIMPLE_TEXT_OUTPUT_INTERFACE; // // Define's for required EFI Unicode Box Draw characters @@ -132,11 +137,11 @@ typedef struct _EFI_SIMPLE_TEXT_OUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL; // // We currently define attributes from 0 - 7F for color manipulations -// To internally handle the local display characteristics for a particular character, we are defining -// Bit 7 to signify the local glyph representation for a character. If turned on, glyphs will be +// To internally handle the local display characteristics for a particular character, +// Bit 7 signifies the local glyph representation for a character. If turned on, glyphs will be // pulled from the wide glyph database and will display locally as a wide character (16 X 19 versus 8 X 19) // If bit 7 is off, the narrow glyph database will be used. This does NOT affect information that is sent to -// non-local displays (e.g. serial or LAN consoles). +// non-local displays, such as serial or LAN consoles. // #define EFI_WIDE_ATTRIBUTE 0x80 @@ -154,11 +159,10 @@ typedef struct _EFI_SIMPLE_TEXT_OUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL; **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_RESET) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_RESET)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification - ) -; + ); /** Write a Unicode string to the output device. @@ -180,11 +184,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_STRING) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_STRING)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *String - ) -; + ); /** Verifies that all characters in a Unicode string can be output to the @@ -202,11 +205,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_TEST_STRING) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_TEST_STRING)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN CHAR16 *String - ) -; + ); /** Returns information for an available text mode that the output device(s) @@ -226,13 +228,12 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_QUERY_MODE) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_QUERY_MODE)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber, OUT UINTN *Columns, OUT UINTN *Rows - ) -; + ); /** Sets the output device(s) to a specified mode. @@ -247,11 +248,10 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_SET_MODE) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_SET_MODE)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN ModeNumber - ) -; + ); /** Sets the background and foreground colors for the OutputString () and @@ -262,18 +262,17 @@ EFI_STATUS bits 4..6 are the background color. All other bits are undefined and must be zero. The valid Attributes are defined in this file. - @retval EFI_SUCCESS The attribute was set. - @retval EFI_DEVICE_ ERROR The device had an error and could not complete the request. - @retval EFI_UNSUPPORTED The attribute requested is not defined. + @retval EFI_SUCCESS The attribute was set. + @retval EFI_DEVICE_ERROR The device had an error and could not complete the request. + @retval EFI_UNSUPPORTED The attribute requested is not defined. **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_SET_ATTRIBUTE) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_SET_ATTRIBUTE)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Attribute - ) -; + ); /** Clears the output device(s) display to the currently selected background @@ -288,10 +287,9 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_CLEAR_SCREEN) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This - ) -; +(EFIAPI *EFI_TEXT_CLEAR_SCREEN)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This + ); /** Sets the current coordinates of the cursor position @@ -312,12 +310,11 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN UINTN Column, IN UINTN Row - ) -; + ); /** Makes the cursor visible or invisible @@ -335,37 +332,54 @@ EFI_STATUS **/ typedef EFI_STATUS -(EFIAPI *EFI_TEXT_ENABLE_CURSOR) ( - IN EFI_SIMPLE_TEXT_OUT_PROTOCOL *This, +(EFIAPI *EFI_TEXT_ENABLE_CURSOR)( + IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, IN BOOLEAN Visible - ) -; + ); /** + @par Data Structure Description: Mode Structure pointed to by Simple Text Out protocol. - - MaxMode - The number of modes supported by QueryMode () and SetMode (). - Mode - The text mode of the output device(s). - Attribute - The current character output attribute - CursorColumn - The cursor's column. - CursorRow - The cursor's row. - CursorVisible - The cursor is currently visbile or not. - **/ typedef struct { + /// + /// The number of modes supported by QueryMode () and SetMode (). + /// INT32 MaxMode; // // current settings // + + /// + /// The text mode of the output device(s). + /// INT32 Mode; + /// + /// The current character output attribute + /// INT32 Attribute; + /// + /// The cursor's column. + /// INT32 CursorColumn; + /// + /// The cursor's row. + /// INT32 CursorRow; + /// + /// The cursor is currently visbile or not. + /// BOOLEAN CursorVisible; } EFI_SIMPLE_TEXT_OUTPUT_MODE; -struct _EFI_SIMPLE_TEXT_OUT_PROTOCOL { +/// +/// The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices. +/// It is the minimum required protocol for any handle supplied as the ConsoleOut +/// or StandardError device. In addition, the minimum supported text mode of such +/// devices is at least 80 x 25 characters. +/// +struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL { EFI_TEXT_RESET Reset; EFI_TEXT_STRING OutputString; @@ -379,9 +393,9 @@ struct _EFI_SIMPLE_TEXT_OUT_PROTOCOL { EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition; EFI_TEXT_ENABLE_CURSOR EnableCursor; - // - // Current mode - // + /// + /// Pointer to SIMPLE_TEXT_OUTPUT_MODE data. + /// EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode; };