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
)
29 DummyDrawRegion(IN OUT PTERMINAL This
,
36 /************ Line discipline ***************/
39 DummyReadStream(IN OUT PTERMINAL This
,
40 /**/IN PUNICODE_STRING ExeName
/**/OPTIONAL
/**/,/**/
44 IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl
,
45 IN ULONG NumCharsToRead
,
46 OUT PULONG NumCharsRead OPTIONAL
)
49 * We were called because the console was in cooked mode.
50 * There is nothing to read, wait until a real terminal
51 * is plugged into the console.
53 return STATUS_PENDING
;
57 DummyWriteStream(IN OUT PTERMINAL This
,
58 PTEXTMODE_SCREEN_BUFFER Buff
,
64 * We were called because the console was in cooked mode.
65 * There is nothing to write, wait until a real terminal
66 * is plugged into the console.
69 // /* Stop here if the console is paused */
70 // if (Console->UnpauseEvent != NULL) return STATUS_PENDING;
72 return STATUS_PENDING
;
75 /************ Line discipline ***************/
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 DummyChangeTitle(IN OUT PTERMINAL This
)
117 DummyGetLargestConsoleWindowSize(IN OUT PTERMINAL This
,
124 DummyGetSelectionInfo(IN OUT PTERMINAL This,
125 PCONSOLE_SELECTION_INFO pSelectionInfo)
132 DummySetPalette(IN OUT PTERMINAL This
,
133 HPALETTE PaletteHandle
,
140 DummyShowMouseCursor(IN OUT PTERMINAL This
,
146 static TERMINAL_VTBL DummyVtbl
=
158 DummySetActiveScreenBuffer
,
159 DummyReleaseScreenBuffer
,
161 DummyGetLargestConsoleWindowSize
,
162 // DummyGetSelectionInfo,
164 DummyShowMouseCursor
,
168 ResetTerminal(IN PCONSOLE Console
)
170 if (!Console
) return;
172 /* Reinitialize the terminal interface */
173 RtlZeroMemory(&Console
->TermIFace
, sizeof(Console
->TermIFace
));
174 Console
->TermIFace
.Vtbl
= &DummyVtbl
;