xref: /reactos/win32ss/user/ntuser/ntuser.h (revision 0c42866e)
1 #pragma once
2 
3 #define DECLARE_RETURN(type) type _ret_
4 #define RETURN(value) { _ret_ = value; goto _cleanup_; }
5 #define CLEANUP /*unreachable*/ ASSERT(FALSE); _cleanup_
6 #define END_CLEANUP return _ret_;
7 #define IS_IMM_MODE() (gpsi && (gpsi->dwSRVIFlags & SRVINFO_IMM32))
8 
9 #define UserEnterCo UserEnterExclusive
10 #define UserLeaveCo UserLeave
11 
12 extern PSERVERINFO gpsi;
13 extern PTHREADINFO gptiCurrent;
14 extern PPROCESSINFO gppiList;
15 extern PPROCESSINFO ppiScrnSaver;
16 extern PPROCESSINFO gppiInputProvider;
17 extern BOOL g_AlwaysDisplayVersion;
18 extern ATOM gaGuiConsoleWndClass;
19 extern ATOM AtomDDETrack;
20 extern ATOM AtomQOS;
21 extern ATOM AtomImeLevel;
22 extern ERESOURCE UserLock;
23 
24 CODE_SEG("INIT") NTSTATUS NTAPI InitUserImpl(VOID);
25 VOID FASTCALL CleanupUserImpl(VOID);
26 VOID FASTCALL UserEnterShared(VOID);
27 VOID FASTCALL UserEnterExclusive(VOID);
28 VOID FASTCALL UserLeave(VOID);
29 BOOL FASTCALL UserIsEntered(VOID);
30 BOOL FASTCALL UserIsEnteredExclusive(VOID);
31 DWORD FASTCALL UserGetLanguageToggle(VOID);
32 
33 _Success_(return != FALSE)
34 BOOL
35 NTAPI
36 RegReadUserSetting(
37     _In_z_ PCWSTR pwszKeyName,
38     _In_z_ PCWSTR pwszValueName,
39     _In_ ULONG ulType,
40     _Out_writes_bytes_(cjDataSize) _When_(ulType == REG_SZ, _Post_z_) PVOID pvData,
41     _In_ ULONG cjDataSize);
42 
43 _Success_(return != FALSE)
44 BOOL
45 NTAPI
46 RegWriteUserSetting(
47     _In_z_ PCWSTR pwszKeyName,
48     _In_z_ PCWSTR pwszValueName,
49     _In_ ULONG ulType,
50     _In_reads_bytes_(cjDataSize) const VOID *pvData,
51     _In_ ULONG cjDataSize);
52 
53 PGRAPHICS_DEVICE
54 NTAPI
55 InitDisplayDriver(
56     IN PWSTR pwszDeviceName,
57     IN PWSTR pwszRegKey);
58 
59 /* EOF */
60