ReactOS 0.4.15-dev-8235-gcd88a97
dummyterm.c File Reference
#include <consrv.h>
Include dependency graph for dummyterm.c:

Go to the source code of this file.

Functions

static NTSTATUS NTAPI DummyInitTerminal (IN OUT PTERMINAL This, IN PCONSOLE Console)
 
static VOID NTAPI DummyDeinitTerminal (IN OUT PTERMINAL This)
 
static NTSTATUS NTAPI DummyReadStream (IN OUT PTERMINAL This, IN BOOLEAN Unicode, OUT PVOID Buffer, IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl, IN PVOID Parameter OPTIONAL, IN ULONG NumCharsToRead, OUT PULONG NumCharsRead OPTIONAL)
 
static NTSTATUS NTAPI DummyWriteStream (IN OUT PTERMINAL This, PTEXTMODE_SCREEN_BUFFER Buff, PWCHAR Buffer, DWORD Length, BOOL Attrib)
 
static VOID NTAPI DummyDrawRegion (IN OUT PTERMINAL This, SMALL_RECT *Region)
 
static BOOL NTAPI DummySetCursorInfo (IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer)
 
static BOOL NTAPI DummySetScreenInfo (IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer, SHORT OldCursorX, SHORT OldCursorY)
 
static VOID NTAPI DummyResizeTerminal (IN OUT PTERMINAL This)
 
static VOID NTAPI DummySetActiveScreenBuffer (IN OUT PTERMINAL This)
 
static VOID NTAPI DummyReleaseScreenBuffer (IN OUT PTERMINAL This, IN PCONSOLE_SCREEN_BUFFER ScreenBuffer)
 
static VOID NTAPI DummyGetLargestConsoleWindowSize (IN OUT PTERMINAL This, PCOORD pSize)
 
static BOOL NTAPI DummySetPalette (IN OUT PTERMINAL This, HPALETTE PaletteHandle, UINT PaletteUsage)
 
static BOOL NTAPI DummySetCodePage (IN OUT PTERMINAL This, UINT CodePage)
 
static INT NTAPI DummyShowMouseCursor (IN OUT PTERMINAL This, BOOL Show)
 
VOID ResetTerminal (IN PCONSOLE Console)
 

Variables

static TERMINAL_VTBL DummyVtbl
 

Function Documentation

◆ DummyDeinitTerminal()

static VOID NTAPI DummyDeinitTerminal ( IN OUT PTERMINAL  This)
static

Definition at line 24 of file dummyterm.c.

25{
26}

◆ DummyDrawRegion()

static VOID NTAPI DummyDrawRegion ( IN OUT PTERMINAL  This,
SMALL_RECT Region 
)
static

Definition at line 74 of file dummyterm.c.

76{
77}

◆ DummyGetLargestConsoleWindowSize()

static VOID NTAPI DummyGetLargestConsoleWindowSize ( IN OUT PTERMINAL  This,
PCOORD  pSize 
)
static

Definition at line 112 of file dummyterm.c.

114{
115 /* Return a standard size */
116 if (!pSize) return;
117 pSize->X = 80;
118 pSize->Y = 25;
119}
ULONG Y
Definition: bl.h:1340
ULONG X
Definition: bl.h:1339

◆ DummyInitTerminal()

static NTSTATUS NTAPI DummyInitTerminal ( IN OUT PTERMINAL  This,
IN PCONSOLE  Console 
)
static

Definition at line 17 of file dummyterm.c.

19{
20 return STATUS_SUCCESS;
21}
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ DummyReadStream()

static NTSTATUS NTAPI DummyReadStream ( IN OUT PTERMINAL  This,
IN BOOLEAN  Unicode,
OUT PVOID  Buffer,
IN OUT PCONSOLE_READCONSOLE_CONTROL  ReadControl,
IN PVOID Parameter  OPTIONAL,
IN ULONG  NumCharsToRead,
OUT PULONG NumCharsRead  OPTIONAL 
)
static
Parameters
BufferPWCHAR Buffer,*

Definition at line 33 of file dummyterm.c.

41{
42 /*
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.
46 */
47 return STATUS_PENDING;
48}
#define STATUS_PENDING
Definition: ntstatus.h:82

◆ DummyReleaseScreenBuffer()

static VOID NTAPI DummyReleaseScreenBuffer ( IN OUT PTERMINAL  This,
IN PCONSOLE_SCREEN_BUFFER  ScreenBuffer 
)
static

Definition at line 106 of file dummyterm.c.

108{
109}

◆ DummyResizeTerminal()

static VOID NTAPI DummyResizeTerminal ( IN OUT PTERMINAL  This)
static

Definition at line 96 of file dummyterm.c.

97{
98}

◆ DummySetActiveScreenBuffer()

static VOID NTAPI DummySetActiveScreenBuffer ( IN OUT PTERMINAL  This)
static

Definition at line 101 of file dummyterm.c.

102{
103}

◆ DummySetCodePage()

static BOOL NTAPI DummySetCodePage ( IN OUT PTERMINAL  This,
UINT  CodePage 
)
static

Definition at line 130 of file dummyterm.c.

132{
133 return TRUE;
134}
#define TRUE
Definition: types.h:120

◆ DummySetCursorInfo()

static BOOL NTAPI DummySetCursorInfo ( IN OUT PTERMINAL  This,
PCONSOLE_SCREEN_BUFFER  ScreenBuffer 
)
static

Definition at line 80 of file dummyterm.c.

82{
83 return TRUE;
84}

◆ DummySetPalette()

static BOOL NTAPI DummySetPalette ( IN OUT PTERMINAL  This,
HPALETTE  PaletteHandle,
UINT  PaletteUsage 
)
static

Definition at line 122 of file dummyterm.c.

125{
126 return TRUE;
127}

◆ DummySetScreenInfo()

static BOOL NTAPI DummySetScreenInfo ( IN OUT PTERMINAL  This,
PCONSOLE_SCREEN_BUFFER  ScreenBuffer,
SHORT  OldCursorX,
SHORT  OldCursorY 
)
static

Definition at line 87 of file dummyterm.c.

91{
92 return TRUE;
93}

◆ DummyShowMouseCursor()

static INT NTAPI DummyShowMouseCursor ( IN OUT PTERMINAL  This,
BOOL  Show 
)
static

Definition at line 137 of file dummyterm.c.

139{
140 return 0;
141}

◆ DummyWriteStream()

static NTSTATUS NTAPI DummyWriteStream ( IN OUT PTERMINAL  This,
PTEXTMODE_SCREEN_BUFFER  Buff,
PWCHAR  Buffer,
DWORD  Length,
BOOL  Attrib 
)
static

Definition at line 51 of file dummyterm.c.

56{
57 /*
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.
61 */
62
63 // /* Stop here if the console is paused */
64 // if (Console->ConsolePaused) return STATUS_PENDING;
65
66 return STATUS_PENDING;
67}

◆ ResetTerminal()

VOID ResetTerminal ( IN PCONSOLE  Console)

Definition at line 164 of file dummyterm.c.

165{
166 if (!Console) return;
167
168 /* Reinitialize the terminal interface */
169 RtlZeroMemory(&Console->TermIFace, sizeof(Console->TermIFace));
170 Console->TermIFace.Vtbl = &DummyVtbl;
171}
CConsole Console
static TERMINAL_VTBL DummyVtbl
Definition: dummyterm.c:143
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262

Referenced by ConDrvAttachTerminal(), ConDrvDetachTerminal(), and ConDrvInitConsole().

Variable Documentation

◆ DummyVtbl

TERMINAL_VTBL DummyVtbl
static
Initial value:
=
{
}
static VOID NTAPI DummyGetLargestConsoleWindowSize(IN OUT PTERMINAL This, PCOORD pSize)
Definition: dummyterm.c:112
static NTSTATUS NTAPI DummyInitTerminal(IN OUT PTERMINAL This, IN PCONSOLE Console)
Definition: dummyterm.c:17
static VOID NTAPI DummySetActiveScreenBuffer(IN OUT PTERMINAL This)
Definition: dummyterm.c:101
static VOID NTAPI DummyResizeTerminal(IN OUT PTERMINAL This)
Definition: dummyterm.c:96
static NTSTATUS NTAPI DummyReadStream(IN OUT PTERMINAL This, IN BOOLEAN Unicode, OUT PVOID Buffer, IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl, IN PVOID Parameter OPTIONAL, IN ULONG NumCharsToRead, OUT PULONG NumCharsRead OPTIONAL)
Definition: dummyterm.c:33
static NTSTATUS NTAPI DummyWriteStream(IN OUT PTERMINAL This, PTEXTMODE_SCREEN_BUFFER Buff, PWCHAR Buffer, DWORD Length, BOOL Attrib)
Definition: dummyterm.c:51
static BOOL NTAPI DummySetScreenInfo(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer, SHORT OldCursorX, SHORT OldCursorY)
Definition: dummyterm.c:87
static VOID NTAPI DummyReleaseScreenBuffer(IN OUT PTERMINAL This, IN PCONSOLE_SCREEN_BUFFER ScreenBuffer)
Definition: dummyterm.c:106
static VOID NTAPI DummyDrawRegion(IN OUT PTERMINAL This, SMALL_RECT *Region)
Definition: dummyterm.c:74
static BOOL NTAPI DummySetCodePage(IN OUT PTERMINAL This, UINT CodePage)
Definition: dummyterm.c:130
static BOOL NTAPI DummySetPalette(IN OUT PTERMINAL This, HPALETTE PaletteHandle, UINT PaletteUsage)
Definition: dummyterm.c:122
static VOID NTAPI DummyDeinitTerminal(IN OUT PTERMINAL This)
Definition: dummyterm.c:24
static BOOL NTAPI DummySetCursorInfo(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer)
Definition: dummyterm.c:80
static INT NTAPI DummyShowMouseCursor(IN OUT PTERMINAL This, BOOL Show)
Definition: dummyterm.c:137

Definition at line 143 of file dummyterm.c.

Referenced by ResetTerminal().