[CONSRV]
[reactos.git] / win32ss / user / consrv / conio.h
index f6558a5..9e34231 100644 (file)
 
 #define CSR_DEFAULT_CURSOR_SIZE 25
 
-/* Object type magic numbers */
-
-#define CONIO_CONSOLE_MAGIC         0x00000001
-#define CONIO_SCREEN_BUFFER_MAGIC   0x00000002
-
 /************************************************************************
  * Screen buffer structure represents the win32 screen buffer object.   *
  * Internally, the portion of the buffer being shown CAN loop past the  *
@@ -29,7 +24,7 @@
  * being printed causes another line to scroll down, that the buffer IS *
  * memcpy()'s up, and the bottom of the buffer is still displayed, but  *
  * internally, I just wrap back to the top of the buffer.               *
- ***********************************************************************/
+ ************************************************************************/
 
 typedef struct tagCSRSS_SCREEN_BUFFER
 {
@@ -51,9 +46,16 @@ typedef struct tagCSRSS_CONSOLE
     Object_t Header;                      /* Object header */
     LONG ReferenceCount;
     CRITICAL_SECTION Lock;
+
     struct tagCSRSS_CONSOLE *Prev, *Next; /* Next and Prev consoles in console wheel */
-    HANDLE ActiveEvent;
+    struct tagCSRSS_CONSOLE_VTBL *Vtbl;   /* Using CUI or GUI consoles */
+
+    LIST_ENTRY ProcessList;
+
     LIST_ENTRY InputEvents;               /* List head for input event queue */
+    HANDLE ActiveEvent;                   /* Event set when an input event is added in its queue */
+    LIST_ENTRY ReadWaitQueue;             /* List head for the queue of read wait blocks */
+
     PWCHAR LineBuffer;                    /* current line being input, in line buffered mode */
     WORD LineMaxSize;                     /* maximum size of line in characters (including CR+LF) */
     WORD LineSize;                        /* current size of line */
@@ -62,26 +64,30 @@ typedef struct tagCSRSS_CONSOLE
     BOOLEAN LineUpPressed;
     BOOLEAN LineInsertToggle;             /* replace character over cursor instead of inserting */
     ULONG LineWakeupMask;                 /* bitmap of which control characters will end line input */
+
+    struct tagALIAS_HEADER *Aliases;
     LIST_ENTRY HistoryBuffers;
     UINT HistoryBufferSize;               /* size for newly created history buffers */
     UINT NumberOfHistoryBuffers;          /* maximum number of history buffers allowed */
     BOOLEAN HistoryNoDup;                 /* remove old duplicate history entries */
+
     LIST_ENTRY BufferList;                /* List of all screen buffers for this console */
     PCSRSS_SCREEN_BUFFER ActiveBuffer;    /* Pointer to currently active screen buffer */
+    BYTE PauseFlags;
+    HANDLE UnpauseEvent;
+    LIST_ENTRY WriteWaitQueue;            /* List head for the queue of write wait blocks */
+
     WORD Mode;                            /* Console mode flags */
     UNICODE_STRING Title;                 /* Title of console */
     DWORD HardwareState;                  /* _GDI_MANAGED, _DIRECT */
     HWND hWindow;
     COORD Size;
     PVOID PrivateData;
+
     UINT CodePage;
     UINT OutputCodePage;
-    struct tagCSRSS_CONSOLE_VTBL *Vtbl;
-    LIST_ENTRY ProcessList;
-    struct tagALIAS_HEADER *Aliases;
+
     CONSOLE_SELECTION_INFO Selection;
-    BYTE PauseFlags;
-    HANDLE UnpauseEvent;
 } CSRSS_CONSOLE, *PCSRSS_CONSOLE;
 
 typedef struct tagCSRSS_CONSOLE_VTBL
@@ -138,7 +144,7 @@ typedef struct ConsoleInput_t
 /* console.c */
 NTSTATUS FASTCALL ConioConsoleFromProcessData(PCONSOLE_PROCESS_DATA ProcessData,
                                               PCSRSS_CONSOLE *Console);
-VOID WINAPI ConioDeleteConsole(Object_t *Object);
+VOID WINAPI ConioDeleteConsole(PCSRSS_CONSOLE Console);
 VOID WINAPI CsrInitConsoleSupport(VOID);
 VOID FASTCALL ConioPause(PCSRSS_CONSOLE Console, UINT Flags);
 VOID FASTCALL ConioUnpause(PCSRSS_CONSOLE Console, UINT Flags);