Check in following modules,
[mirror_edk2.git] / MdeModulePkg / Universal / Console / GraphicsConsoleDxe / GraphicsConsole.h
1 /*++
2
3 Copyright (c) 2006, 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 GraphicsConsole.h
15
16 Abstract:
17
18
19 Revision History
20
21 --*/
22
23 #ifndef _GRAPHICS_CONSOLE_H
24 #define _GRAPHICS_CONSOLE_H
25
26
27 //
28 // Include common header file for this module.
29 //
30 #include "CommonHeader.h"
31
32 #include "ComponentName.h"
33
34 //
35 // Glyph database
36 //
37 #define GLYPH_WIDTH 8
38 #define GLYPH_HEIGHT 19
39
40 typedef union {
41 EFI_NARROW_GLYPH NarrowGlyph;
42 EFI_WIDE_GLYPH WideGlyph;
43 } GLYPH_UNION;
44
45 extern EFI_NARROW_GLYPH UsStdNarrowGlyphData[];
46 extern EFI_WIDE_GLYPH UsStdWideGlyphData[];
47
48 //
49 // Device Structure
50 //
51 #define GRAPHICS_CONSOLE_DEV_SIGNATURE EFI_SIGNATURE_32 ('g', 's', 't', 'o')
52
53 typedef struct {
54 UINTN Columns;
55 UINTN Rows;
56 INTN DeltaX;
57 INTN DeltaY;
58 UINT32 GopWidth;
59 UINT32 GopHeight;
60 UINT32 GopModeNumber;
61 } GRAPHICS_CONSOLE_MODE_DATA;
62
63 #define GRAPHICS_MAX_MODE 3
64
65 typedef struct {
66 UINTN Signature;
67 EFI_GRAPHICS_OUTPUT_PROTOCOL *GraphicsOutput;
68 EFI_UGA_DRAW_PROTOCOL *UgaDraw;
69 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL SimpleTextOutput;
70 EFI_SIMPLE_TEXT_OUTPUT_MODE SimpleTextOutputMode;
71 GRAPHICS_CONSOLE_MODE_DATA ModeData[GRAPHICS_MAX_MODE];
72 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *LineBuffer;
73 EFI_HII_HANDLE HiiHandle;
74 } GRAPHICS_CONSOLE_DEV;
75
76 #define GRAPHICS_CONSOLE_CON_OUT_DEV_FROM_THIS(a) \
77 CR (a, GRAPHICS_CONSOLE_DEV, SimpleTextOutput, GRAPHICS_CONSOLE_DEV_SIGNATURE)
78
79 //
80 // Global Variables
81 //
82 extern EFI_DRIVER_BINDING_PROTOCOL gGraphicsConsoleDriverBinding;
83
84 //
85 // Prototypes
86 //
87 UINTN
88 ReturnNarrowFontSize (
89 VOID
90 );
91
92 UINTN
93 ReturnWideFontSize (
94 VOID
95 );
96
97 EFI_STATUS
98 EFIAPI
99 GraphicsConsoleConOutReset (
100 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
101 IN BOOLEAN ExtendedVerification
102 );
103
104 EFI_STATUS
105 EFIAPI
106 GraphicsConsoleConOutOutputString (
107 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
108 IN CHAR16 *WString
109 );
110
111 EFI_STATUS
112 EFIAPI
113 GraphicsConsoleConOutTestString (
114 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
115 IN CHAR16 *WString
116 );
117
118 EFI_STATUS
119 EFIAPI
120 GraphicsConsoleConOutQueryMode (
121 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
122 IN UINTN ModeNumber,
123 OUT UINTN *Columns,
124 OUT UINTN *Rows
125 );
126
127 EFI_STATUS
128 EFIAPI
129 GraphicsConsoleConOutSetMode (
130 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
131 IN UINTN ModeNumber
132 );
133
134 EFI_STATUS
135 EFIAPI
136 GraphicsConsoleConOutSetAttribute (
137 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
138 IN UINTN Attribute
139 );
140
141 EFI_STATUS
142 EFIAPI
143 GraphicsConsoleConOutClearScreen (
144 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This
145 );
146
147 EFI_STATUS
148 EFIAPI
149 GraphicsConsoleConOutSetCursorPosition (
150 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
151 IN UINTN Column,
152 IN UINTN Row
153 );
154
155 EFI_STATUS
156 EFIAPI
157 GraphicsConsoleConOutEnableCursor (
158 IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
159 IN BOOLEAN Visible
160 );
161
162 EFI_STATUS
163 EfiLocateHiiProtocol (
164 VOID
165 );
166
167 EFI_STATUS
168 EFIAPI
169 GraphicsConsoleControllerDriverSupported (
170 IN EFI_DRIVER_BINDING_PROTOCOL *This,
171 IN EFI_HANDLE Controller,
172 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
173 );
174
175 EFI_STATUS
176 EFIAPI
177 GraphicsConsoleControllerDriverStart (
178 IN EFI_DRIVER_BINDING_PROTOCOL *This,
179 IN EFI_HANDLE Controller,
180 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
181 );
182
183 EFI_STATUS
184 EFIAPI
185 GraphicsConsoleControllerDriverStop (
186 IN EFI_DRIVER_BINDING_PROTOCOL *This,
187 IN EFI_HANDLE Controller,
188 IN UINTN NumberOfChildren,
189 IN EFI_HANDLE *ChildHandleBuffer
190 );
191
192 #endif