EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

MdePkg/Include/Protocol/SimpleTextOut.h

Go to the documentation of this file.
00001 
00020 #ifndef __SIMPLE_TEXT_OUT_H__
00021 #define __SIMPLE_TEXT_OUT_H__
00022 
00023 #define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \
00024   { \
00025     0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
00026   }
00027 
00031 #define SIMPLE_TEXT_OUTPUT_PROTOCOL   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID
00032 
00033 typedef struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL;
00034 
00038 typedef EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   SIMPLE_TEXT_OUTPUT_INTERFACE;
00039 
00040 //
00041 // Define's for required EFI Unicode Box Draw characters
00042 //
00043 #define BOXDRAW_HORIZONTAL                  0x2500
00044 #define BOXDRAW_VERTICAL                    0x2502
00045 #define BOXDRAW_DOWN_RIGHT                  0x250c
00046 #define BOXDRAW_DOWN_LEFT                   0x2510
00047 #define BOXDRAW_UP_RIGHT                    0x2514
00048 #define BOXDRAW_UP_LEFT                     0x2518
00049 #define BOXDRAW_VERTICAL_RIGHT              0x251c
00050 #define BOXDRAW_VERTICAL_LEFT               0x2524
00051 #define BOXDRAW_DOWN_HORIZONTAL             0x252c
00052 #define BOXDRAW_UP_HORIZONTAL               0x2534
00053 #define BOXDRAW_VERTICAL_HORIZONTAL         0x253c
00054 #define BOXDRAW_DOUBLE_HORIZONTAL           0x2550
00055 #define BOXDRAW_DOUBLE_VERTICAL             0x2551
00056 #define BOXDRAW_DOWN_RIGHT_DOUBLE           0x2552
00057 #define BOXDRAW_DOWN_DOUBLE_RIGHT           0x2553
00058 #define BOXDRAW_DOUBLE_DOWN_RIGHT           0x2554
00059 #define BOXDRAW_DOWN_LEFT_DOUBLE            0x2555
00060 #define BOXDRAW_DOWN_DOUBLE_LEFT            0x2556
00061 #define BOXDRAW_DOUBLE_DOWN_LEFT            0x2557
00062 #define BOXDRAW_UP_RIGHT_DOUBLE             0x2558
00063 #define BOXDRAW_UP_DOUBLE_RIGHT             0x2559
00064 #define BOXDRAW_DOUBLE_UP_RIGHT             0x255a
00065 #define BOXDRAW_UP_LEFT_DOUBLE              0x255b
00066 #define BOXDRAW_UP_DOUBLE_LEFT              0x255c
00067 #define BOXDRAW_DOUBLE_UP_LEFT              0x255d
00068 #define BOXDRAW_VERTICAL_RIGHT_DOUBLE       0x255e
00069 #define BOXDRAW_VERTICAL_DOUBLE_RIGHT       0x255f
00070 #define BOXDRAW_DOUBLE_VERTICAL_RIGHT       0x2560
00071 #define BOXDRAW_VERTICAL_LEFT_DOUBLE        0x2561
00072 #define BOXDRAW_VERTICAL_DOUBLE_LEFT        0x2562
00073 #define BOXDRAW_DOUBLE_VERTICAL_LEFT        0x2563
00074 #define BOXDRAW_DOWN_HORIZONTAL_DOUBLE      0x2564
00075 #define BOXDRAW_DOWN_DOUBLE_HORIZONTAL      0x2565
00076 #define BOXDRAW_DOUBLE_DOWN_HORIZONTAL      0x2566
00077 #define BOXDRAW_UP_HORIZONTAL_DOUBLE        0x2567
00078 #define BOXDRAW_UP_DOUBLE_HORIZONTAL        0x2568
00079 #define BOXDRAW_DOUBLE_UP_HORIZONTAL        0x2569
00080 #define BOXDRAW_VERTICAL_HORIZONTAL_DOUBLE  0x256a
00081 #define BOXDRAW_VERTICAL_DOUBLE_HORIZONTAL  0x256b
00082 #define BOXDRAW_DOUBLE_VERTICAL_HORIZONTAL  0x256c
00083 
00084 //
00085 // EFI Required Block Elements Code Chart
00086 //
00087 #define BLOCKELEMENT_FULL_BLOCK   0x2588
00088 #define BLOCKELEMENT_LIGHT_SHADE  0x2591
00089 
00090 //
00091 // EFI Required Geometric Shapes Code Chart
00092 //
00093 #define GEOMETRICSHAPE_UP_TRIANGLE    0x25b2
00094 #define GEOMETRICSHAPE_RIGHT_TRIANGLE 0x25ba
00095 #define GEOMETRICSHAPE_DOWN_TRIANGLE  0x25bc
00096 #define GEOMETRICSHAPE_LEFT_TRIANGLE  0x25c4
00097 
00098 //
00099 // EFI Required Arrow shapes
00100 //
00101 #define ARROW_LEFT  0x2190
00102 #define ARROW_UP    0x2191
00103 #define ARROW_RIGHT 0x2192
00104 #define ARROW_DOWN  0x2193
00105 
00106 //
00107 // EFI Console Colours
00108 //
00109 #define EFI_BLACK                 0x00
00110 #define EFI_BLUE                  0x01
00111 #define EFI_GREEN                 0x02
00112 #define EFI_CYAN                  (EFI_BLUE | EFI_GREEN)
00113 #define EFI_RED                   0x04
00114 #define EFI_MAGENTA               (EFI_BLUE | EFI_RED)
00115 #define EFI_BROWN                 (EFI_GREEN | EFI_RED)
00116 #define EFI_LIGHTGRAY             (EFI_BLUE | EFI_GREEN | EFI_RED)
00117 #define EFI_BRIGHT                0x08
00118 #define EFI_DARKGRAY              (EFI_BRIGHT)
00119 #define EFI_LIGHTBLUE             (EFI_BLUE | EFI_BRIGHT)
00120 #define EFI_LIGHTGREEN            (EFI_GREEN | EFI_BRIGHT)
00121 #define EFI_LIGHTCYAN             (EFI_CYAN | EFI_BRIGHT)
00122 #define EFI_LIGHTRED              (EFI_RED | EFI_BRIGHT)
00123 #define EFI_LIGHTMAGENTA          (EFI_MAGENTA | EFI_BRIGHT)
00124 #define EFI_YELLOW                (EFI_BROWN | EFI_BRIGHT)
00125 #define EFI_WHITE                 (EFI_BLUE | EFI_GREEN | EFI_RED | EFI_BRIGHT)
00126 
00127 #define EFI_TEXT_ATTR(f, b)       ((f) | ((b) << 4))
00128 
00129 #define EFI_BACKGROUND_BLACK      0x00
00130 #define EFI_BACKGROUND_BLUE       0x10
00131 #define EFI_BACKGROUND_GREEN      0x20
00132 #define EFI_BACKGROUND_CYAN       (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN)
00133 #define EFI_BACKGROUND_RED        0x40
00134 #define EFI_BACKGROUND_MAGENTA    (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_RED)
00135 #define EFI_BACKGROUND_BROWN      (EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
00136 #define EFI_BACKGROUND_LIGHTGRAY  (EFI_BACKGROUND_BLUE | EFI_BACKGROUND_GREEN | EFI_BACKGROUND_RED)
00137 
00138 //
00139 // We currently define attributes from 0 - 7F for color manipulations
00140 // To internally handle the local display characteristics for a particular character, 
00141 // Bit 7 signifies the local glyph representation for a character.  If turned on, glyphs will be
00142 // pulled from the wide glyph database and will display locally as a wide character (16 X 19 versus 8 X 19)
00143 // If bit 7 is off, the narrow glyph database will be used.  This does NOT affect information that is sent to
00144 // non-local displays, such as serial or LAN consoles.
00145 //
00146 #define EFI_WIDE_ATTRIBUTE  0x80
00147 
00160 typedef
00161 EFI_STATUS
00162 (EFIAPI *EFI_TEXT_RESET)(
00163   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00164   IN BOOLEAN                                ExtendedVerification
00165   );
00166 
00185 typedef
00186 EFI_STATUS
00187 (EFIAPI *EFI_TEXT_STRING)(
00188   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00189   IN CHAR16                                 *String
00190   );
00191 
00206 typedef
00207 EFI_STATUS
00208 (EFIAPI *EFI_TEXT_TEST_STRING)(
00209   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00210   IN CHAR16                                 *String
00211   );
00212 
00229 typedef
00230 EFI_STATUS
00231 (EFIAPI *EFI_TEXT_QUERY_MODE)(
00232   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00233   IN UINTN                                  ModeNumber,
00234   OUT UINTN                                 *Columns,
00235   OUT UINTN                                 *Rows
00236   );
00237 
00249 typedef
00250 EFI_STATUS
00251 (EFIAPI *EFI_TEXT_SET_MODE)(
00252   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00253   IN UINTN                                  ModeNumber
00254   );
00255 
00270 typedef
00271 EFI_STATUS
00272 (EFIAPI *EFI_TEXT_SET_ATTRIBUTE)(
00273   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00274   IN UINTN                                  Attribute
00275   );
00276 
00288 typedef
00289 EFI_STATUS
00290 (EFIAPI *EFI_TEXT_CLEAR_SCREEN)(
00291   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *This
00292   );
00293 
00311 typedef
00312 EFI_STATUS
00313 (EFIAPI *EFI_TEXT_SET_CURSOR_POSITION)(
00314   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00315   IN UINTN                                  Column,
00316   IN UINTN                                  Row
00317   );
00318 
00333 typedef
00334 EFI_STATUS
00335 (EFIAPI *EFI_TEXT_ENABLE_CURSOR)(
00336   IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL        *This,
00337   IN BOOLEAN                                Visible
00338   );
00339 
00344 typedef struct {
00348   INT32   MaxMode;
00349 
00350   //
00351   // current settings
00352   //
00353 
00357   INT32   Mode;
00361   INT32   Attribute;
00365   INT32   CursorColumn;
00369   INT32   CursorRow;
00373   BOOLEAN CursorVisible;
00374 } EFI_SIMPLE_TEXT_OUTPUT_MODE;
00375 
00382 struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
00383   EFI_TEXT_RESET                Reset;
00384 
00385   EFI_TEXT_STRING               OutputString;
00386   EFI_TEXT_TEST_STRING          TestString;
00387 
00388   EFI_TEXT_QUERY_MODE           QueryMode;
00389   EFI_TEXT_SET_MODE             SetMode;
00390   EFI_TEXT_SET_ATTRIBUTE        SetAttribute;
00391 
00392   EFI_TEXT_CLEAR_SCREEN         ClearScreen;
00393   EFI_TEXT_SET_CURSOR_POSITION  SetCursorPosition;
00394   EFI_TEXT_ENABLE_CURSOR        EnableCursor;
00395 
00399   EFI_SIMPLE_TEXT_OUTPUT_MODE   *Mode;
00400 };
00401 
00402 extern EFI_GUID gEfiSimpleTextOutProtocolGuid;
00403 
00404 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines