#include <consrv.h>
#include <coninput.h>
#include "../../concfg/font.h"
#include <debug.h>
Go to the source code of this file.
|
BOOLEAN NTAPI | ConDrvValidateConsoleState (IN PCONSOLE Console, IN CONSOLE_STATE ExpectedState) |
|
BOOLEAN NTAPI | ConDrvValidateConsoleUnsafe (IN PCONSOLE Console, IN CONSOLE_STATE ExpectedState, IN BOOLEAN LockConsole) |
|
VOID | ResetTerminal (IN PCONSOLE Console) |
|
NTSTATUS NTAPI | ConDrvInitConsole (IN OUT PCONSOLE Console, IN PCONSOLE_INFO ConsoleInfo) |
|
NTSTATUS NTAPI | ConDrvAttachTerminal (IN PCONSOLE Console, IN PTERMINAL Terminal) |
|
NTSTATUS NTAPI | ConDrvDetachTerminal (IN PCONSOLE Console) |
|
VOID NTAPI | ConDrvDeleteConsole (IN PCONSOLE Console) |
|
VOID NTAPI | ConDrvPause (PCONSOLE Console) |
|
VOID NTAPI | ConDrvUnpause (PCONSOLE Console) |
|
NTSTATUS NTAPI | ConDrvGetConsoleMode (IN PCONSOLE Console, IN PCONSOLE_IO_OBJECT Object, OUT PULONG ConsoleMode) |
|
NTSTATUS NTAPI | ConDrvSetConsoleMode (IN PCONSOLE Console, IN PCONSOLE_IO_OBJECT Object, IN ULONG ConsoleMode) |
|
NTSTATUS NTAPI | ConDrvGetConsoleCP (IN PCONSOLE Console, OUT PUINT CodePage, IN BOOLEAN OutputCP) |
|
NTSTATUS NTAPI | ConDrvSetConsoleCP (IN PCONSOLE Console, IN UINT CodePage, IN BOOLEAN OutputCP) |
|
◆ CONSOLE_VALID_INPUT_MODES
#define CONSOLE_VALID_INPUT_MODES |
Value:
#define ENABLE_ECHO_INPUT
#define ENABLE_MOUSE_INPUT
#define ENABLE_LINE_INPUT
#define ENABLE_PROCESSED_INPUT
#define ENABLE_WINDOW_INPUT
◆ CONSOLE_VALID_OUTPUT_MODES
◆ NDEBUG
◆ ConDrvAttachTerminal()
Definition at line 160 of file console.c.
162{
164
167
168
169
170
171
172
173
174 Console->TermIFace = *Terminal;
176
177
178 DPRINT(
"Finish initialization of terminal\n");
181 {
182 DPRINT1(
"Terminal initialization failed, Status = 0x%08lx\n",
Status);
183
184
185 Terminal->Console =
NULL;
188 }
189
190
191
192
193 DPRINT(
"Terminal initialization done\n");
195}
#define NT_SUCCESS(StatCode)
#define STATUS_INVALID_PARAMETER
VOID ResetTerminal(IN PCONSOLE Console)
Referenced by ConSrvInitConsole().
◆ ConDrvDeleteConsole()
Definition at line 218 of file console.c.
219{
221
222
223
224
225
226
227
228
229
230
231
234 {
235 return;
236 }
237
238
239
240
241
242
244
245
246
247
248
249
250
251
252
254
255
256 DPRINT(
"Deregister terminal\n");
258 DPRINT(
"Terminal deregistered\n");
259
260
261
262
263
264
265
267 {
268 return;
269 }
270
271
273
274
276
277
281 {
282
284 }
285
286
288
290
291 DPRINT(
"ConDrvDeleteConsole - Unlocking\n");
293 DPRINT(
"ConDrvDeleteConsole - Destroying lock\n");
295 DPRINT(
"ConDrvDeleteConsole - Lock destroyed\n");
296
297 DPRINT(
"ConDrvDeleteConsole - Console destroyed\n");
298}
VOID NTAPI ConDrvDeleteScreenBuffer(PCONSOLE_SCREEN_BUFFER Buffer)
#define IsListEmpty(ListHead)
#define ASSERTMSG(msg, exp)
BOOLEAN NTAPI ConDrvValidateConsoleUnsafe(IN PCONSOLE Console, IN CONSOLE_STATE ExpectedState, IN BOOLEAN LockConsole)
NTSTATUS NTAPI ConDrvDetachTerminal(IN PCONSOLE Console)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
Referenced by ConSrvDeleteConsole(), and ConSrvInitConsole().
◆ ConDrvDetachTerminal()
◆ ConDrvGetConsoleCP()
◆ ConDrvGetConsoleMode()
Definition at line 324 of file console.c.
327{
329
332
333
335
336 *ConsoleMode = 0;
337
339 {
342 }
344 {
346 *ConsoleMode =
Buffer->Mode;
347 }
348 else
349 {
351 }
352
354}
#define STATUS_INVALID_HANDLE
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
struct _CONSOLE_INPUT_BUFFER * PCONSOLE_INPUT_BUFFER
struct _CONSOLE_SCREEN_BUFFER * PCONSOLE_SCREEN_BUFFER
Referenced by CON_API().
◆ ConDrvInitConsole()
Definition at line 69 of file console.c.
72{
74
77
80
81
83
84
85
86
87
94
95
96
97
101
102
104
107
108
111 {
112 DPRINT1(
"ConDrvInitInputBuffer: failed, Status = 0x%08lx\n",
Status);
115 }
116
117
119 {
122 }
123
124
131
139 {
140 DPRINT1(
"ConDrvCreateScreenBuffer: failed, Status = 0x%08lx\n",
Status);
144 }
145
146 Console->ActiveBuffer = NewBuffer;
148
149 DPRINT(
"Console initialized\n");
150
151
154
155
157}
NTSTATUS ConDrvCreateScreenBuffer(OUT PCONSOLE_SCREEN_BUFFER *Buffer, IN PCONSOLE Console, IN HANDLE ProcessHandle OPTIONAL, IN ULONG BufferType, IN PVOID ScreenBufferInfo)
BOOL WINAPI IsValidCodePage(UINT codepage)
#define InitializeListHead(ListHead)
CONSOLE_SCREEN_BUFFER_INFO ScreenBufferInfo
static CONSOLE_SCREEN_BUFFER_INFO ConsoleInfo
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define RtlZeroMemory(Destination, Length)
#define CON_SET_OUTPUT_CP(Console, CodePage)
#define CONSOLE_TEXTMODE_BUFFER
Referenced by ConSrvInitConsole().
◆ ConDrvPause()
◆ ConDrvSetConsoleCP()
Definition at line 424 of file console.c.
427{
430
431 if (OutputCP)
432 {
433
436
437
440 }
441 else
442 {
443 Console->InputCodePage = CodePage;
445 }
446}
#define TermSetCodePage(Console, CodePage)
#define STATUS_UNSUCCESSFUL
Referenced by CON_API().
◆ ConDrvSetConsoleMode()
Definition at line 357 of file console.c.
360{
361#define CONSOLE_VALID_INPUT_MODES ( ENABLE_PROCESSED_INPUT | ENABLE_LINE_INPUT | \
362 ENABLE_ECHO_INPUT | ENABLE_WINDOW_INPUT | \
363 ENABLE_MOUSE_INPUT )
364#define CONSOLE_VALID_OUTPUT_MODES ( ENABLE_PROCESSED_OUTPUT | ENABLE_WRAP_AT_EOL_OUTPUT )
365
367
370
371
373
375 {
377
378
380 {
382 }
383 else
384 {
386 }
387 }
389 {
391
392
394 {
396 }
397 else
398 {
400 }
401 }
402 else
403 {
405 }
406
408}
#define CONSOLE_VALID_INPUT_MODES
#define CONSOLE_VALID_OUTPUT_MODES
Referenced by CON_API().
◆ ConDrvUnpause()
◆ ConDrvValidateConsoleState()
◆ ConDrvValidateConsoleUnsafe()
Definition at line 36 of file console.c.
39{
41
42
43
44
45
46
47
49
50
51
52
54 {
57 }
58
60}
BOOLEAN NTAPI ConDrvValidateConsoleState(IN PCONSOLE Console, IN CONSOLE_STATE ExpectedState)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
Referenced by ConDrvDeleteConsole(), ConSrvGetObject(), ConSrvValidateConsole(), GuiApplyUserSettings(), GuiConsoleShowConsoleProperties(), GuiConsoleSwitchFullScreen(), GuiPaintGraphicsBuffer(), GuiPaintTextModeBuffer(), OnClose(), OnFocus(), OnGetMinMaxInfo(), OnKey(), OnMouse(), OnScroll(), OnSize(), OnTimer(), and SendMenuEvent().
◆ ResetTerminal()