[WIN32K]
[reactos.git] / reactos / win32ss / user / winsrv / consrv / consrv.h
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS Console Server DLL
4 * FILE: consrv/consrv.h
5 * PURPOSE: Main header - Definitions
6 * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca@sfr.fr)
7 */
8
9 #ifndef __CONSRV_H__
10 #define __CONSRV_H__
11
12 /* Main header */
13 #include "../winsrv.h"
14
15 /* PSDK/NDK Headers */
16 #define WIN32_NO_STATUS
17 #define _INC_WINDOWS
18 #define COM_NO_WINDOWS_H
19
20 #include <winnls.h>
21 #include <winreg.h>
22 #include <wincon.h>
23
24 #define NTOS_MODE_USER
25 #include <ndk/mmfuncs.h>
26
27 /* CONSOLE Headers */
28 #include <win/conmsg.h>
29
30 /* Heap Helpers */
31 #include "heap.h"
32
33 /* Globals */
34 extern HINSTANCE ConSrvDllInstance;
35
36 #define ConsoleGetPerProcessData(Process) \
37 ((PCONSOLE_PROCESS_DATA)((Process)->ServerData[CONSRV_SERVERDLL_INDEX]))
38
39 typedef struct _CONSOLE_PROCESS_DATA
40 {
41 LIST_ENTRY ConsoleLink;
42 PCSR_PROCESS Process; // Process owning this structure.
43
44 HANDLE ConsoleHandle;
45 BOOLEAN ConsoleApp; // TRUE if it is a CUI app, FALSE otherwise.
46
47 RTL_CRITICAL_SECTION HandleTableLock;
48 ULONG HandleTableSize;
49 struct _CONSOLE_IO_HANDLE* /* PCONSOLE_IO_HANDLE */ HandleTable; // Length-varying table
50
51 LPTHREAD_START_ROUTINE CtrlRoutine;
52 LPTHREAD_START_ROUTINE PropRoutine; // We hold the property dialog handler there, till all the GUI thingie moves out from CSRSS.
53 // LPTHREAD_START_ROUTINE ImeRoutine;
54 } CONSOLE_PROCESS_DATA, *PCONSOLE_PROCESS_DATA;
55
56
57 // Helper for code refactoring
58 // #define USE_NEW_CONSOLE_WAY
59
60 #ifndef USE_NEW_CONSOLE_WAY
61 #include "include/conio.h"
62 #else
63 #include "include/conio_winsrv.h"
64 #endif
65
66 #include "include/console.h"
67 #include "include/settings.h"
68 #include "include/term.h"
69 #include "console.h"
70 #include "conoutput.h"
71 #include "handle.h"
72 #include "lineinput.h"
73
74 /* shutdown.c */
75 ULONG
76 NTAPI
77 ConsoleClientShutdown(IN PCSR_PROCESS CsrProcess,
78 IN ULONG Flags,
79 IN BOOLEAN FirstPhase);
80
81 #endif /* __CONSRV_H__ */