Sync with trunk r63502.
[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
10 typedef struct _WINSTATION_OBJECT
11 {
12 DWORD dwSessionId;
13
14 KSPIN_LOCK Lock;
15 UNICODE_STRING Name;
16 LIST_ENTRY DesktopListHead;
17 PRTL_ATOM_TABLE AtomTable;
18 HANDLE ShellWindow;
19 HANDLE ShellListView;
20
21 ULONG Flags;
22 struct _DESKTOP* ActiveDesktop;
23
24 PTHREADINFO ptiClipLock;
25 PTHREADINFO ptiDrawingClipboard;
26 PWND spwndClipOpen;
27 PWND spwndClipViewer;
28 PWND spwndClipOwner;
29 PCLIP pClipBase; // Not a clip object.
30 DWORD cNumClipFormats;
31 INT iClipSerialNumber;
32 INT iClipSequenceNumber;
33 INT fClipboardChanged : 1;
34 INT fInDelayedRendering : 1;
35
36 } WINSTATION_OBJECT, *PWINSTATION_OBJECT;
37
38 extern WINSTATION_OBJECT *InputWindowStation;
39 extern PPROCESSINFO LogonProcess;
40 extern HWND hwndSAS;
41 extern UNICODE_STRING gustrWindowStationsDir;
42
43 #define WINSTA_READ STANDARD_RIGHTS_READ | \
44 WINSTA_ENUMDESKTOPS | \
45 WINSTA_ENUMERATE | \
46 WINSTA_READATTRIBUTES | \
47 WINSTA_READSCREEN
48
49 #define WINSTA_WRITE STANDARD_RIGHTS_WRITE | \
50 WINSTA_ACCESSCLIPBOARD | \
51 WINSTA_CREATEDESKTOP | \
52 WINSTA_WRITEATTRIBUTES
53
54 #define WINSTA_EXECUTE STANDARD_RIGHTS_EXECUTE | \
55 WINSTA_ACCESSGLOBALATOMS | \
56 WINSTA_EXITWINDOWS
57
58 #define WINSTA_ACCESS_ALL STANDARD_RIGHTS_REQUIRED | \
59 WINSTA_ACCESSCLIPBOARD | \
60 WINSTA_ACCESSGLOBALATOMS | \
61 WINSTA_CREATEDESKTOP | \
62 WINSTA_ENUMDESKTOPS | \
63 WINSTA_ENUMERATE | \
64 WINSTA_EXITWINDOWS | \
65 WINSTA_READATTRIBUTES | \
66 WINSTA_READSCREEN | \
67 WINSTA_WRITEATTRIBUTES
68
69 INIT_FUNCTION
70 NTSTATUS
71 NTAPI
72 InitWindowStationImpl(VOID);
73
74 NTSTATUS
75 NTAPI
76 UserCreateWinstaDirectory();
77
78 NTSTATUS
79 APIENTRY
80 IntWinStaObjectDelete(
81 _In_ PVOID Parameters);
82
83 NTSTATUS
84 APIENTRY
85 IntWinStaObjectParse(
86 _In_ PVOID Parameters);
87
88 NTSTATUS
89 NTAPI
90 IntWinstaOkToClose(
91 _In_ PVOID Parameters);
92
93 NTSTATUS
94 FASTCALL
95 IntValidateWindowStationHandle(
96 HWINSTA WindowStation,
97 KPROCESSOR_MODE AccessMode,
98 ACCESS_MASK DesiredAccess,
99 PWINSTATION_OBJECT *Object);
100
101 BOOL FASTCALL UserSetProcessWindowStation(HWINSTA hWindowStation);
102
103 BOOL FASTCALL co_IntInitializeDesktopGraphics(VOID);
104 VOID FASTCALL IntEndDesktopGraphics(VOID);
105 /* EOF */