ReactOS 0.4.15-dev-6680-g8c76870
userfuncs.h
Go to the documentation of this file.
1#pragma once
2
3// Win: ValidateHmenu
5{
7 if (!pMenu)
8 {
10 }
11 return pMenu;
12}
13
14#define ASSERT_REFS_CO(_obj_) \
15{ \
16 LONG ref = ((PHEAD)_obj_)->cLockObj;\
17 if (!(ref >= 1)){ \
18 ERR_CH(UserObj, "ASSERT: obj 0x%p, refs %ld\n", _obj_, ref); \
19 ASSERT(FALSE); \
20 } \
21}
22
23#if 0
24#define ASSERT_REFS_CO(_obj_) \
25{ \
26 PSINGLE_LIST_ENTRY e; \
27 BOOL gotit=FALSE; \
28 LONG ref = ((PHEAD)_obj_)->cLockObj;\
29 if (!(ref >= 1)){ \
30 ERR_CH(UserObj, "obj 0x%p, refs %i\n", _obj_, ref); \
31 ASSERT(FALSE); \
32 } \
33 \
34 e = PsGetCurrentThreadWin32Thread()->ReferencesList.Next; \
35 while (e) \
36 { \
37 PUSER_REFERENCE_ENTRY ref = CONTAINING_RECORD(e, USER_REFERENCE_ENTRY, Entry); \
38 if (ref->obj == _obj_){ gotit=TRUE; break; } \
39 e = e->Next; \
40 } \
41 ASSERT(gotit); \
42}
43#endif
44
45#define DUMP_REFS(obj) TRACE_CH(UserObj,"obj 0x%x, refs %i\n",obj, ((PHEAD)obj)->cLockObj)
46
48
49/*************** DDE.C ****************/
50
54
55/*************** MAIN.C ***************/
56
58
59/*************** WINSTA.C ***************/
60
62
63/*************** FOCUS.C ***************/
64
66
68
70
71/*************** WINDC.C ***************/
72
76
77/*************** SESSION.C ***************/
78
81
82/*************** METRIC.C ***************/
83
89
90/*************** KEYBOARD.C ***************/
91
95
96
97/*************** MISC.C ***************/
98
99int
102 const wchar_t *format,
103 ...);
104
107 UINT uiAction,
108 UINT uiParam,
109 PVOID pvParam,
110 UINT fWinIni);
111
117
122 OUT PLUID Luid);
123
124/*************** MESSAGE.C ***************/
125
127
128/*************** WINDOW.C ***************/
129
136BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText);
138
139/*************** MENU.C ***************/
140
144
145/************** NONCLIENT **************/
146
158
159/************** DEFWND **************/
160
161HBRUSH FASTCALL DefWndControlColor(HDC hDC,UINT ctlType);
164
165/************** LAYERED **************/
166
169
170/************** INPUT CONTEXT **************/
171
176
177/* EOF */
static HDC hDC
Definition: 3dtext.c:33
unsigned char BOOLEAN
@ wparam
Definition: SystemMenu.c:30
Type
Definition: Type.h:7
#define __cdecl
Definition: accygwin.h:79
const DWORD Style
Definition: appswitch.c:71
const DWORD ExStyle
Definition: appswitch.c:72
HWND hWnd
Definition: settings.c:17
LONG NTSTATUS
Definition: precomp.h:26
Definition: _set.h:50
struct @1611 Msg[]
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define APIENTRY
Definition: api.h:79
DWORD dwThreadId
Definition: fdebug.c:31
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
_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
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
@ TYPE_MENU
Definition: ntuser.h:42
static HDC
Definition: imagelist.c:92
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:63
UINT_PTR HKL
Definition: msctf.idl:104
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
#define FASTCALL
Definition: nt_native.h:50
long LONG
Definition: pedump.c:60
& rect
Definition: startmenu.cpp:1413
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: window.c:28
Definition: ntuser.h:689
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:809
LRESULT NC_DoNCPaint(PWND, HDC, INT)
Definition: nonclient.c:1064
BOOL FASTCALL UserDestroyMenu(HMENU hMenu)
Definition: menu.c:5805
LONG NTAPI UserGetSystemMetrics(ULONG Index)
Definition: metric.c:208
BOOL FASTCALL IntDdeSendMessageHook(PWND, UINT, WPARAM, LPARAM)
Definition: dde.c:386
HBRUSH FASTCALL GetControlBrush(PWND, HDC, UINT)
Definition: misc.c:172
NTSTATUS FASTCALL InitSessionImpl(VOID)
Definition: session.c:18
VOID UserDrawCaptionBar(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:922
PRTL_ATOM_TABLE gAtomTable
Definition: session.c:13
LRESULT NC_HandleNCCalcSize(PWND wnd, WPARAM wparam, RECTL *winRect, BOOL Suspended)
Definition: nonclient.c:1271
LRESULT NC_HandleNCLButtonDblClk(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1634
DWORD FASTCALL IntGetWindowContextHelpId(PWND pWnd)
Definition: window.c:438
HWND FASTCALL co_UserSetFocus(PWND Window)
Definition: focus.c:1314
PTHREADINFO FASTCALL IntTID2PTI(HANDLE)
Definition: misc.c:42
FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
Definition: userfuncs.h:4
VOID FASTCALL IntSetWindowState(PWND, UINT)
Definition: misc.c:591
BOOL FASTCALL UserIsIMMEnabled(VOID)
Definition: metric.c:22
BOOL UserDrawSysMenuButton(PWND pWnd, HDC hDC, LPRECT Rect, BOOL Down)
Definition: nonclient.c:734
VOID FASTCALL co_DestroyThreadWindows(struct _ETHREAD *Thread)
LRESULT NC_HandleNCRButtonDown(PWND wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1692
PVOID AllocInputContextObject(PDESKTOP pDesk, PTHREADINFO pti, SIZE_T Size, PVOID *HandleOwner)
Definition: ime.c:1428
VOID FASTCALL DefWndDoSizeMove(PWND pwnd, WORD wParam)
Definition: nonclient.c:239
BOOL UserPaintCaption(PWND pWnd, INT Flags)
Definition: defwnd.c:398
DWORD FASTCALL UserGetKeyState(DWORD key)
Definition: msgqueue.c:221
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:122
DWORD FASTCALL UserGetKeyboardType(DWORD TypeFlag)
Definition: keyboard.c:1560
void FASTCALL NC_GetSysPopupPos(PWND, RECT *)
Definition: nonclient.c:117
int __cdecl _scwprintf(const wchar_t *format,...)
Definition: _scwprintf.c:13
PWND FASTCALL IntGetWindowObject(HWND hWnd)
Definition: window.c:73
LRESULT NC_HandleNCActivate(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1405
HDC FASTCALL UserGetWindowDC(PWND Wnd)
Definition: windc.c:947
PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
Definition: window.c:3349
PIMC FASTCALL UserCreateInputContext(ULONG_PTR dwClientImcData)
Definition: ime.c:1558
VOID FASTCALL IntClearWindowState(PWND, UINT)
Definition: misc.c:612
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:1542
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1345
HBRUSH FASTCALL GetControlColor(PWND, PWND, HDC, UINT)
Definition: misc.c:146
BOOL NTAPI InitMetrics(VOID)
Definition: metric.c:39
HWINSTA FASTCALL UserGetProcessWindowStation(VOID)
Definition: winsta.c:1353
NTSTATUS NTAPI InitThreadCallback(PETHREAD Thread)
Definition: main.c:456
BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos)
Definition: menu.c:1274
BOOLEAN UserDestroyInputContext(PVOID Object)
Definition: ime.c:1484
HWND FASTCALL UserGetShellWindow(VOID)
Definition: window.c:3693
HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId)
Definition: kbdlayout.c:1032
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2853
VOID UserFreeInputContext(PVOID Object)
Definition: ime.c:1457
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
Definition: windc.c:918
BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText)
Definition: window.c:4396
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:876
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:5030
BOOL APIENTRY IntDdeGetMessageHook(PMSG, LONG_PTR)
Definition: dde.c:326
HWND FASTCALL UserGetActiveWindow(VOID)
Definition: focus.c:1429
BOOL FASTCALL UserIsDBCSEnabled(VOID)
Definition: metric.c:17
BOOL FASTCALL UserIsCiceroEnabled(VOID)
Definition: metric.c:32
HWND FASTCALL UserGetForegroundWindow(VOID)
Definition: focus.c:1421
BOOL FASTCALL UserSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
Definition: sysparams.c:2104
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:4533
#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:28
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define ERROR_INVALID_MENU_HANDLE
Definition: winerror.h:882
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
@ Suspended
Definition: ketypes.h:408
_In_ ULONG _In_ BOOLEAN Active
Definition: potypes.h:561
unsigned char BYTE
Definition: xxhash.c:193