// WORD ScreenDefaultAttrib; /* Default screen char attribute */
// WORD PopupDefaultAttrib; /* Default popup char attribute */
USHORT Mode; /* Output buffer modes */
-
- // PVOID Data; /* Private data for the frontend to use */
};
{
CONSOLE_IO_OBJECT Header; /* Object header - MUST BE IN FIRST PLACE */
- ULONG InputBufferSize; /* Size of this input buffer */
+ ULONG InputBufferSize; /* Size of this input buffer -- UNUSED!! */
LIST_ENTRY InputEvents; /* List head for input event queue */
HANDLE ActiveEvent; /* Event set when an input event is added in its queue */
/* Interface used only for text-mode screen buffers */
NTSTATUS (NTAPI *ReadStream)(IN OUT PTERMINAL This,
- /**/IN PUNICODE_STRING ExeName /**/OPTIONAL/**/,/**/
- IN BOOLEAN Unicode,
- /**PWCHAR Buffer,**/
- OUT PVOID Buffer,
- IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
- IN ULONG NumCharsToRead,
- OUT PULONG NumCharsRead OPTIONAL);
+ IN BOOLEAN Unicode,
+ /**PWCHAR Buffer,**/
+ OUT PVOID Buffer,
+ IN OUT PCONSOLE_READCONSOLE_CONTROL ReadControl,
+ IN PVOID Parameter OPTIONAL,
+ IN ULONG NumCharsToRead,
+ OUT PULONG NumCharsRead OPTIONAL);
NTSTATUS (NTAPI *WriteStream)(IN OUT PTERMINAL This,
PTEXTMODE_SCREEN_BUFFER Buff,
PWCHAR Buffer,
/*
* External interface (functions corresponding to the Console API)
*/
- VOID (NTAPI *ChangeTitle)(IN OUT PTERMINAL This);
VOID (NTAPI *GetLargestConsoleWindowSize)(IN OUT PTERMINAL This,
PCOORD pSize);
BOOL (NTAPI *SetPalette)(IN OUT PTERMINAL This,
INT (NTAPI *ShowMouseCursor)(IN OUT PTERMINAL This,
BOOL Show);
-#if 0 // Possible future front-end interface
+#if 0 // Possible future terminal interface
BOOL (NTAPI *GetTerminalProperty)(IN OUT PTERMINAL This,
ULONG Flag,
PVOID Info,
struct _TERMINAL
{
PTERMINAL_VTBL Vtbl; /* Virtual table */
- struct _CONSOLE* Console; /* Console to which the frontend is attached to */
- PVOID Data; /* Private data */
+ struct _CONSOLE* Console; /* Console to which the terminal is attached to */
+ PVOID Context; /* Private context */
};
/*
typedef struct _CONSOLE
{
/******************************* Console Set-up *******************************/
- LONG ReferenceCount; /* Is incremented each time a handle to something in the console (a screen-buffer or the input buffer of this console) gets referenced */
- CRITICAL_SECTION Lock;
#ifndef USE_NEW_CONSOLE_WAY
- /**/WINSRV_CONSOLE;/**/ // HACK HACK!!
+ WINSRV_CONSOLE; // HACK HACK!!
#endif
- CONSOLE_STATE State; /* State of the console */
- TERMINAL TermIFace; /* Frontend-specific interface */
+ LONG ReferenceCount; /* Is incremented each time a handle to something in the console (a screen-buffer or the input buffer of this console) gets referenced */
+ CRITICAL_SECTION Lock;
ULONG ConsoleID; /* The ID of the console */
LIST_ENTRY ListEntry; /* Entry in the list of consoles */
+ CONSOLE_STATE State; /* State of the console */
+ TERMINAL TermIFace; /* Terminal-specific interface */
+
HANDLE UnpauseEvent; /* When != NULL, event for pausing the console */
/******************************** Input buffer ********************************/
UINT OutputCodePage;
/****************************** Other properties ******************************/
- UNICODE_STRING OriginalTitle; /* Original title of console, the one defined when the console leader is launched; it never changes. Always NULL-terminated */
- UNICODE_STRING Title; /* Title of console. Always NULL-terminated */
-
COORD ConsoleSize; /* The current size of the console, for text-mode only */
BOOLEAN FixedSize; /* TRUE if the console is of fixed size */
ConSrvConsoleCtrlEvent(IN ULONG CtrlEvent,
IN PCONSOLE_PROCESS_DATA ProcessData);
+
+#define GetConsoleInputBufferMode(Console) \
+ (Console)->InputBuffer.Mode
+
+
/* conoutput.c */
PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y);
-VOID ConioDrawConsole(PCONSOLE /*PCONSRV_CONSOLE*/ Console);
NTSTATUS ConioResizeBuffer(PCONSOLE /*PCONSRV_CONSOLE*/ Console,
PTEXTMODE_SCREEN_BUFFER ScreenBuffer,
COORD Size);