ReactOS 0.4.17-dev-37-g0bfb40d
userfuncs.h
Go to the documentation of this file.
1#pragma once
2
4{
6 if (!pMenu)
7 {
9 }
10 return pMenu;
11}
12
13#define ASSERT_REFS_CO(_obj_) \
14{ \
15 LONG ref = ((PHEAD)_obj_)->cLockObj;\
16 if (!(ref >= 1)){ \
17 ERR_CH(UserObj, "ASSERT: obj 0x%p, refs %ld\n", _obj_, ref); \
18 ASSERT(FALSE); \
19 } \
20}
21
22#if 0
23#define ASSERT_REFS_CO(_obj_) \
24{ \
25 PSINGLE_LIST_ENTRY e; \
26 BOOL gotit=FALSE; \
27 LONG ref = ((PHEAD)_obj_)->cLockObj;\
28 if (!(ref >= 1)){ \
29 ERR_CH(UserObj, "obj 0x%p, refs %i\n", _obj_, ref); \
30 ASSERT(FALSE); \
31 } \
32 \
33 e = PsGetCurrentThreadWin32Thread()->ReferencesList.Next; \
34 while (e) \
35 { \
36 PUSER_REFERENCE_ENTRY ref = CONTAINING_RECORD(e, USER_REFERENCE_ENTRY, Entry); \
37 if (ref->obj == _obj_){ gotit=TRUE; break; } \
38 e = e->Next; \
39 } \
40 ASSERT(gotit); \
41}
42#endif
43
44#define DUMP_REFS(obj) TRACE_CH(UserObj,"obj 0x%x, refs %i\n",obj, ((PHEAD)obj)->cLockObj)
45
47
48/*************** DDE.C ****************/
49
53
54/*************** MAIN.C ***************/
55
57
58/*************** WINSTA.C ***************/
59
61
62/*************** FOCUS.C ***************/
63
65
67
69
70/*************** WINDC.C ***************/
71
75
76/*************** SESSION.C ***************/
77
80
81/*************** METRIC.C ***************/
82
88
89/*************** KEYBOARD.C ***************/
90
94
95
96/*************** MISC.C ***************/
97
98int
101 const wchar_t *format,
102 ...);
103
106 UINT uiAction,
107 UINT uiParam,
108 PVOID pvParam,
109 UINT fWinIni);
110
116
121 OUT PLUID Luid);
122
123/*************** MESSAGE.C ***************/
124
126
127/*************** WINDOW.C ***************/
128
135BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText);
137
138/*************** MENU.C ***************/
139
143
144/************** NONCLIENT **************/
145
157
158/************** DEFWND **************/
159
160HBRUSH FASTCALL DefWndControlColor(HDC hDC,UINT ctlType);
164
165/************** LAYERED **************/
166
169
170/************** INPUT CONTEXT **************/
171
175
176PVOID
178 _In_ PDESKTOP pDesk,
179 _In_ PTHREADINFO pti,
181 _Out_ PVOID* HandleOwner);
182
183/* EOF */
static HDC hDC
Definition: 3dtext.c:33
@ wparam
Definition: SystemMenu.c:30
Type
Definition: Type.h:7
unsigned char BOOLEAN
Definition: actypes.h:127
const DWORD Style
Definition: appswitch.c:72
const DWORD ExStyle
Definition: appswitch.c:73
HWND hWnd
Definition: settings.c:17
LONG NTSTATUS
Definition: precomp.h:26
Definition: _set.h:50
RECT rect
Definition: combotst.c:67
struct @1767 Msg[]
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static CHAR Desktop[MAX_PATH]
Definition: dem.c:256
#define APIENTRY
Definition: api.h:79
#define __cdecl
Definition: corecrt.h:121
DWORD dwThreadId
Definition: fdebug.c:31
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
@ TYPE_MENU
Definition: ntuser.h:42
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
static HDC
Definition: imagelist.c:88
struct atom_table ** PRTL_ATOM_TABLE
Definition: atom.c:43
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
UINT_PTR HKL
Definition: msctf.idl:125
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define FASTCALL
Definition: nt_native.h:50
long LONG
Definition: pedump.c:60
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: window.c:28
Definition: ntuser.h:694
Definition: format.c:58
Definition: copy.c:22
Definition: ntuser.h:199
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define NTAPI
Definition: typedefs.h:36
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
NTSTATUS GetProcessLuid(IN PETHREAD Thread OPTIONAL, IN PEPROCESS Process OPTIONAL, OUT PLUID Luid)
Definition: misc.c:814
PIMC FASTCALL UserCreateInputContext(_In_ ULONG_PTR dwClientImcData)
Definition: ime.c:1651
LRESULT NC_DoNCPaint(PWND, HDC, INT)
Definition: nonclient.c:1097
BOOL FASTCALL UserDestroyMenu(HMENU hMenu)
Definition: menu.c:5820
LONG NTAPI UserGetSystemMetrics(ULONG Index)
Definition: metric.c:209
BOOL FASTCALL IntDdeSendMessageHook(PWND, UINT, WPARAM, LPARAM)
Definition: dde.c:386
HBRUSH FASTCALL GetControlBrush(PWND, HDC, UINT)
Definition: misc.c:179
NTSTATUS FASTCALL InitSessionImpl(VOID)
Definition: session.c:18
VOID UserDrawCaptionBar(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:955
PRTL_ATOM_TABLE gAtomTable
Definition: session.c:13
LRESULT NC_HandleNCCalcSize(PWND wnd, WPARAM wparam, RECTL *winRect, BOOL Suspended)
Definition: nonclient.c:1303
LRESULT NC_HandleNCLButtonDblClk(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1666
PVOID AllocInputContextObject(_In_ PDESKTOP pDesk, _In_ PTHREADINFO pti, _In_ SIZE_T Size, _Out_ PVOID *HandleOwner)
Definition: ime.c:1517
DWORD FASTCALL IntGetWindowContextHelpId(PWND pWnd)
Definition: window.c:439
HWND FASTCALL co_UserSetFocus(PWND Window)
Definition: focus.c:1311
BOOL FASTCALL UserIsCTFIMEEnabled(VOID)
Definition: metric.c:30
PTHREADINFO FASTCALL IntTID2PTI(HANDLE)
Definition: misc.c:41
FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
Definition: userfuncs.h:3
VOID FASTCALL IntSetWindowState(PWND, UINT)
Definition: misc.c:596
BOOL FASTCALL UserIsIMMEnabled(VOID)
Definition: metric.c:22
BOOL UserDrawSysMenuButton(PWND pWnd, HDC hDC, LPRECT Rect, BOOL Down)
Definition: nonclient.c:767
VOID FASTCALL co_DestroyThreadWindows(struct _ETHREAD *Thread)
LRESULT NC_HandleNCRButtonDown(PWND wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1724
VOID FASTCALL DefWndDoSizeMove(PWND pwnd, WORD wParam)
Definition: nonclient.c:254
BOOL UserPaintCaption(PWND pWnd, INT Flags)
Definition: defwnd.c:395
DWORD FASTCALL UserGetKeyState(DWORD key)
Definition: msgqueue.c:221
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:123
DWORD FASTCALL UserGetKeyboardType(DWORD TypeFlag)
Definition: keyboard.c:1907
void FASTCALL NC_GetSysPopupPos(PWND, RECT *)
Definition: nonclient.c:117
int __cdecl _scwprintf(const wchar_t *format,...)
Definition: wcs.c:1673
PWND FASTCALL IntGetWindowObject(HWND hWnd)
Definition: window.c:75
LRESULT NC_HandleNCActivate(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1437
HDC FASTCALL UserGetWindowDC(PWND Wnd)
Definition: windc.c:947
PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
VOID FASTCALL IntClearWindowState(PWND, UINT)
Definition: misc.c:617
BOOL APIENTRY IntDdePostMessageHook(IN PWND, IN UINT, IN WPARAM, IN OUT LPARAM *, IN OUT LONG_PTR *)
Definition: dde.c:172
void FASTCALL NC_GetInsideRect(PWND Wnd, RECT *rect)
Definition: nonclient.c:71
LRESULT NC_HandleNCLButtonDown(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1574
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1395
HBRUSH FASTCALL GetControlColor(PWND, PWND, HDC, UINT)
Definition: misc.c:153
BOOL NTAPI InitMetrics(VOID)
Definition: metric.c:40
HWINSTA FASTCALL UserGetProcessWindowStation(VOID)
Definition: winsta.c:1363
NTSTATUS NTAPI InitThreadCallback(PETHREAD Thread)
Definition: main.c:456
PWND FASTCALL DWP_GetEnabledPopup(PWND pWnd)
Definition: defwnd.c:494
BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos)
Definition: menu.c:1274
HWND FASTCALL UserGetShellWindow(VOID)
Definition: window.c:3692
HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId)
Definition: kbdlayout.c:995
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2865
BOOLEAN UserDestroyInputContext(_In_opt_ PVOID Object)
Definition: ime.c:1576
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
Definition: windc.c:918
BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText)
Definition: window.c:4385
BOOL FASTCALL SetLayeredStatus(PWND pWnd, BYTE set)
Definition: layered.c:34
VOID NC_DrawFrame(HDC hDC, RECT *CurrentRect, BOOL Active, DWORD Style, DWORD ExStyle)
Definition: nonclient.c:909
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
HBRUSH FASTCALL DefWndControlColor(HDC hDC, UINT ctlType)
Definition: defwnd.c:32
HMENU FASTCALL UserCreateMenu(PDESKTOP Desktop, BOOL PopupMenu)
Definition: menu.c:5058
BOOL APIENTRY IntDdeGetMessageHook(PMSG, LONG_PTR)
Definition: dde.c:326
HWND FASTCALL UserGetActiveWindow(VOID)
Definition: focus.c:1426
BOOL FASTCALL UserIsDBCSEnabled(VOID)
Definition: metric.c:17
VOID UserFreeInputContext(_In_opt_ PVOID Object)
Definition: ime.c:1548
HWND FASTCALL UserGetForegroundWindow(VOID)
Definition: focus.c:1418
BOOL FASTCALL UserSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
Definition: sysparams.c:2123
BOOL FASTCALL GetLayeredStatus(PWND pWnd)
Definition: layered.c:23
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4539
#define FORCEINLINE
Definition: wdftypes.h:67
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:495
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:21
#define ERROR_INVALID_MENU_HANDLE
Definition: winerror.h:1227
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
@ Suspended
Definition: ketypes.h:472
_In_ ULONG _In_ BOOLEAN Active
Definition: potypes.h:564
unsigned char BYTE
Definition: xxhash.c:193