2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: condrv/dummyterm.c
5 * PURPOSE: Dummy Terminal used when no terminal
6 * is attached to the specified console.
7 * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
10 /* INCLUDES *******************************************************************/
14 /* DUMMY TERMINAL INTERFACE ***************************************************/
17 DummyInitTerminal(IN OUT PTERMINAL This
,
20 return STATUS_SUCCESS
;
24 DummyDeinitTerminal(IN OUT PTERMINAL This
)
30 /************ Line discipline ***************/
33 DummyReadStream(IN OUT PTERMINAL This
,
34 /**/IN PUNICODE_STRING ExeName
/**/OPTIONAL
/**/,/**/
38 IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl
,
39 IN ULONG NumCharsToRead
,
40 OUT PULONG NumCharsRead OPTIONAL
)
43 * We were called because the console was in cooked mode.
44 * There is nothing to read, wait until a real terminal
45 * is plugged into the console.
47 return STATUS_PENDING
;
51 DummyWriteStream(IN OUT PTERMINAL This
,
52 PTEXTMODE_SCREEN_BUFFER Buff
,
58 * We were called because the console was in cooked mode.
59 * There is nothing to write, wait until a real terminal
60 * is plugged into the console.
63 // /* Stop here if the console is paused */
64 // if (Console->UnpauseEvent != NULL) return STATUS_PENDING;
66 return STATUS_PENDING
;
69 /************ Line discipline ***************/
74 DummyDrawRegion(IN OUT PTERMINAL This
,
80 DummySetCursorInfo(IN OUT PTERMINAL This
,
81 PCONSOLE_SCREEN_BUFFER ScreenBuffer
)
87 DummySetScreenInfo(IN OUT PTERMINAL This
,
88 PCONSOLE_SCREEN_BUFFER ScreenBuffer
,
96 DummyResizeTerminal(IN OUT PTERMINAL This
)
101 DummySetActiveScreenBuffer(IN OUT PTERMINAL This
)
106 DummyReleaseScreenBuffer(IN OUT PTERMINAL This
,
107 IN PCONSOLE_SCREEN_BUFFER ScreenBuffer
)
112 DummyGetLargestConsoleWindowSize(IN OUT PTERMINAL This
,
118 DummySetPalette(IN OUT PTERMINAL This
,
119 HPALETTE PaletteHandle
,
126 DummyShowMouseCursor(IN OUT PTERMINAL This
,
132 static TERMINAL_VTBL DummyVtbl
=
144 DummySetActiveScreenBuffer
,
145 DummyReleaseScreenBuffer
,
146 DummyGetLargestConsoleWindowSize
,
148 DummyShowMouseCursor
,
152 ResetTerminal(IN PCONSOLE Console
)
154 if (!Console
) return;
156 /* Reinitialize the terminal interface */
157 RtlZeroMemory(&Console
->TermIFace
, sizeof(Console
->TermIFace
));
158 Console
->TermIFace
.Vtbl
= &DummyVtbl
;