/* Interface used for both text-mode and graphics screen buffers */
VOID (NTAPI *DrawRegion)(IN OUT PTERMINAL This,
SMALL_RECT* Region);
+
+
+
+/************ Line discipline ***************/
+
/* Interface used only for text-mode screen buffers */
- VOID (NTAPI *WriteStream)(IN OUT PTERMINAL This,
- SMALL_RECT* Region,
- SHORT CursorStartX,
- SHORT CursorStartY,
- UINT ScrolledLines,
- PWCHAR Buffer,
- UINT Length);
+
+ 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);
+ NTSTATUS (NTAPI *WriteStream)(IN OUT PTERMINAL This,
+ PTEXTMODE_SCREEN_BUFFER Buff,
+ PWCHAR Buffer,
+ DWORD Length,
+ BOOL Attrib);
+
+/************ Line discipline ***************/
+
+
+
BOOL (NTAPI *SetCursorInfo)(IN OUT PTERMINAL This,
PCONSOLE_SCREEN_BUFFER ScreenBuffer);
BOOL (NTAPI *SetScreenInfo)(IN OUT PTERMINAL This,
ULONG ConsoleID; /* The ID of the console */
LIST_ENTRY ListEntry; /* Entry in the list of consoles */
-/**************************** Input buffer and data ***************************/
+ HANDLE UnpauseEvent; /* When != NULL, event for pausing the console */
+
+/******************************** Input buffer ********************************/
CONSOLE_INPUT_BUFFER InputBuffer; /* Input buffer of the console */
UINT InputCodePage;
- /** Put those things in CONSOLE_INPUT_BUFFER in PWINSRV_CONSOLE ?? **/
- PWCHAR LineBuffer; /* Current line being input, in line buffered mode */
- ULONG LineMaxSize; /* Maximum size of line in characters (including CR+LF) */
- ULONG LineSize; /* Current size of line */
- ULONG LinePos; /* Current position within line */
- BOOLEAN LineComplete; /* User pressed enter, ready to send back to client */
- BOOLEAN LineUpPressed;
- BOOLEAN LineInsertToggle; /* Replace character over cursor instead of inserting */
- ULONG LineWakeupMask; /* Bitmap of which control characters will end line input */
-
- /** In PWINSRV_CONSOLE ?? **/
- BOOLEAN InsertMode;
- /*************************************************/
-
/******************************* Screen buffers *******************************/
LIST_ENTRY BufferList; /* List of all screen buffers for this console */
PCONSOLE_SCREEN_BUFFER ActiveBuffer; /* Pointer to currently active screen buffer */
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 */
- HANDLE UnpauseEvent; /* When != NULL, event for pausing the console */
-
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);
-/* coninput.c */
-NTSTATUS
-ConioAddInputEvents(PCONSOLE Console,
- PINPUT_RECORD InputRecords,
- ULONG NumEventsToWrite,
- PULONG NumEventsWritten,
- BOOLEAN AppendToEnd);
-NTSTATUS
-ConioProcessInputEvent(PCONSOLE Console,
- PINPUT_RECORD InputEvent);
-
/* conoutput.c */
-
-/*
- * From MSDN:
- * "The lpMultiByteStr and lpWideCharStr pointers must not be the same.
- * If they are the same, the function fails, and GetLastError returns
- * ERROR_INVALID_PARAMETER."
- */
-#define ConsoleUnicodeCharToAnsiChar(Console, dChar, sWChar) \
- ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \
- WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL)
-
-#define ConsoleAnsiCharToUnicodeChar(Console, dWChar, sChar) \
- ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \
- MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1)
-
PCHAR_INFO ConioCoordToPointer(PTEXTMODE_SCREEN_BUFFER Buff, ULONG X, ULONG Y);
VOID ConioDrawConsole(PCONSOLE Console);
NTSTATUS ConioResizeBuffer(PCONSOLE Console,
PTEXTMODE_SCREEN_BUFFER ScreenBuffer,
COORD Size);
-NTSTATUS ConioWriteConsole(PCONSOLE Console,
- PTEXTMODE_SCREEN_BUFFER Buff,
- PWCHAR Buffer,
- DWORD Length,
- BOOL Attrib);
/* EOF */