ReactOS  0.4.13-dev-544-gede3fdd
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 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 X
Definition: bl.h:1340
ULONG Y
Definition: bl.h:1341

◆ 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 }
return STATUS_SUCCESS
Definition: btrfs.c:2777

◆ 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 }

◆ 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 }
#define TRUE
Definition: types.h:120

◆ 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 }
#define TRUE
Definition: types.h:120

◆ 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 }
#define TRUE
Definition: types.h:120

◆ DummyShowMouseCursor()

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

Definition at line 130 of file dummyterm.c.

132 {
133  return 0;
134 }

◆ 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->UnpauseEvent != NULL) return STATUS_PENDING;
65 
66  return STATUS_PENDING;
67 }
#define STATUS_PENDING
Definition: ntstatus.h:82

◆ ResetTerminal()

VOID ResetTerminal ( IN PCONSOLE  Console)

Definition at line 156 of file dummyterm.c.

157 {
158  if (!Console) return;
159 
160  /* Reinitialize the terminal interface */
161  RtlZeroMemory(&Console->TermIFace, sizeof(Console->TermIFace));
162  Console->TermIFace.Vtbl = &DummyVtbl;
163 }
static TERMINAL_VTBL DummyVtbl
Definition: dummyterm.c:136
CConsole Console
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261

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

Variable Documentation

◆ DummyVtbl

TERMINAL_VTBL DummyVtbl
static
Initial value:
=
{
}
static BOOL NTAPI DummySetCursorInfo(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer)
Definition: dummyterm.c:80
static BOOL NTAPI DummySetScreenInfo(IN OUT PTERMINAL This, PCONSOLE_SCREEN_BUFFER ScreenBuffer, SHORT OldCursorX, SHORT OldCursorY)
Definition: dummyterm.c:87
static NTSTATUS NTAPI DummyWriteStream(IN OUT PTERMINAL This, PTEXTMODE_SCREEN_BUFFER Buff, PWCHAR Buffer, DWORD Length, BOOL Attrib)
Definition: dummyterm.c:51
static VOID NTAPI DummyGetLargestConsoleWindowSize(IN OUT PTERMINAL This, PCOORD pSize)
Definition: dummyterm.c:112
static VOID NTAPI DummyReleaseScreenBuffer(IN OUT PTERMINAL This, IN PCONSOLE_SCREEN_BUFFER ScreenBuffer)
Definition: dummyterm.c:106
static BOOL NTAPI DummySetPalette(IN OUT PTERMINAL This, HPALETTE PaletteHandle, UINT PaletteUsage)
Definition: dummyterm.c:122
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 VOID NTAPI DummyDrawRegion(IN OUT PTERMINAL This, SMALL_RECT *Region)
Definition: dummyterm.c:74
static VOID NTAPI DummySetActiveScreenBuffer(IN OUT PTERMINAL This)
Definition: dummyterm.c:101
static NTSTATUS NTAPI DummyInitTerminal(IN OUT PTERMINAL This, IN PCONSOLE Console)
Definition: dummyterm.c:17
static INT NTAPI DummyShowMouseCursor(IN OUT PTERMINAL This, BOOL Show)
Definition: dummyterm.c:130
static VOID NTAPI DummyResizeTerminal(IN OUT PTERMINAL This)
Definition: dummyterm.c:96
static VOID NTAPI DummyDeinitTerminal(IN OUT PTERMINAL This)
Definition: dummyterm.c:24

Definition at line 136 of file dummyterm.c.

Referenced by ResetTerminal().