19b1479ec03fe41baf3ce586b0bda2503bdf81f5
[reactos.git] / win32ss / user / ntuser / winsta.h
1 #pragma once
2
3 #define WINSTA_OBJ_DIR L"\\Windows\\WindowStations"
4 #define SESSION_DIR L"\\Sessions"
5
6 /* Window Station Status Flags */
7 #define WSS_LOCKED (1)
8 #define WSS_NOINTERACTIVE (2)
9 #define WSS_NOIO (4)
10 #define WSS_SHUTDOWN (8)
11 #define WSS_DYING (16)
12 #define WSS_REALSHUTDOWN (32)
13
14 typedef struct _WINSTATION_OBJECT
15 {
16 DWORD dwSessionId;
17
18 LIST_ENTRY DesktopListHead;
19 PRTL_ATOM_TABLE AtomTable;
20 HANDLE ShellWindow;
21 HANDLE ShellListView;
22
23 ULONG Flags;
24 struct _DESKTOP* ActiveDesktop;
25
26 PTHREADINFO ptiClipLock;
27 PTHREADINFO ptiDrawingClipboard;
28 PWND spwndClipOpen;
29 PWND spwndClipViewer;
30 PWND spwndClipOwner;
31 PCLIP pClipBase; // Not a clip object.
32 DWORD cNumClipFormats;
33 INT iClipSerialNumber;
34 INT iClipSequenceNumber;
35 INT fClipboardChanged : 1;
36 INT fInDelayedRendering : 1;
37
38 PWND spwndClipboardListener;
39 LUID luidEndSession;
40 LUID luidUser;
41 PVOID psidUser;
42
43 } WINSTATION_OBJECT, *PWINSTATION_OBJECT;
44
45 extern WINSTATION_OBJECT *InputWindowStation;
46 extern HANDLE gpidLogon;
47 extern HWND hwndSAS;
48 extern UNICODE_STRING gustrWindowStationsDir;
49
50 #define WINSTA_READ STANDARD_RIGHTS_READ | \
51 WINSTA_ENUMDESKTOPS | \
52 WINSTA_ENUMERATE | \
53 WINSTA_READATTRIBUTES | \
54 WINSTA_READSCREEN
55
56 #define WINSTA_WRITE STANDARD_RIGHTS_WRITE | \
57 WINSTA_ACCESSCLIPBOARD | \
58 WINSTA_CREATEDESKTOP | \
59 WINSTA_WRITEATTRIBUTES
60
61 #define WINSTA_EXECUTE STANDARD_RIGHTS_EXECUTE | \
62 WINSTA_ACCESSGLOBALATOMS | \
63 WINSTA_EXITWINDOWS
64
65 #define WINSTA_ACCESS_ALL STANDARD_RIGHTS_REQUIRED | \
66 WINSTA_ACCESSCLIPBOARD | \
67 WINSTA_ACCESSGLOBALATOMS | \
68 WINSTA_CREATEDESKTOP | \
69 WINSTA_ENUMDESKTOPS | \
70 WINSTA_ENUMERATE | \
71 WINSTA_EXITWINDOWS | \
72 WINSTA_READATTRIBUTES | \
73 WINSTA_READSCREEN | \
74 WINSTA_WRITEATTRIBUTES
75
76 INIT_FUNCTION
77 NTSTATUS
78 NTAPI
79 InitWindowStationImpl(VOID);
80
81 NTSTATUS
82 NTAPI
83 UserCreateWinstaDirectory(VOID);
84
85 NTSTATUS
86 NTAPI
87 IntWinStaObjectDelete(
88 _In_ PVOID Parameters);
89
90 NTSTATUS
91 NTAPI
92 IntWinStaObjectParse(
93 _In_ PVOID Parameters);
94
95 NTSTATUS
96 NTAPI
97 IntWinStaOkToClose(
98 _In_ PVOID Parameters);
99
100 NTSTATUS
101 FASTCALL
102 IntValidateWindowStationHandle(
103 HWINSTA WindowStation,
104 KPROCESSOR_MODE AccessMode,
105 ACCESS_MASK DesiredAccess,
106 PWINSTATION_OBJECT *Object,
107 POBJECT_HANDLE_INFORMATION pObjectHandleInfo);
108
109 NTSTATUS
110 FASTCALL
111 IntCreateWindowStation(
112 OUT HWINSTA* phWinSta,
113 IN POBJECT_ATTRIBUTES ObjectAttributes,
114 IN KPROCESSOR_MODE AccessMode,
115 IN ACCESS_MASK dwDesiredAccess,
116 DWORD Unknown2,
117 DWORD Unknown3,
118 DWORD Unknown4,
119 DWORD Unknown5,
120 DWORD Unknown6);
121
122 BOOL FASTCALL UserSetProcessWindowStation(HWINSTA hWindowStation);
123
124 BOOL FASTCALL co_IntInitializeDesktopGraphics(VOID);
125 VOID FASTCALL IntEndDesktopGraphics(VOID);
126 BOOL FASTCALL CheckWinstaAttributeAccess(ACCESS_MASK);
127 /* EOF */