ReactOS  0.4.15-dev-5640-g0dde428
userfuncs.h
Go to the documentation of this file.
1 #pragma once
2 
3 // Win: ValidateHmenu
5 {
6  PMENU pMenu = UserGetObject(gHandleTable, hMenu, TYPE_MENU);
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 
99 int
100 __cdecl
101 _scwprintf(
102  const wchar_t *format,
103  ...);
104 
107  UINT uiAction,
108  UINT uiParam,
109  PVOID pvParam,
110  UINT fWinIni);
111 
117 
118 NTSTATUS
122  OUT PLUID Luid);
123 
124 /*************** MESSAGE.C ***************/
125 
127 
128 /*************** WINDOW.C ***************/
129 
136 BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText);
138 
139 /*************** MENU.C ***************/
140 
142 BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos);
144 
145 /************** NONCLIENT **************/
146 
158 
159 /************** DEFWND **************/
160 
161 HBRUSH FASTCALL DefWndControlColor(HDC hDC,UINT ctlType);
164 
165 /************** LAYERED **************/
166 
169 
170 /************** INPUT CONTEXT **************/
171 
176 
177 /* EOF */
BOOL FASTCALL IntDdeSendMessageHook(PWND, UINT, WPARAM, LPARAM)
Definition: dde.c:386
BOOL UserDrawSysMenuButton(PWND pWnd, HDC hDC, LPRECT Rect, BOOL Down)
Definition: nonclient.c:745
void FASTCALL NC_GetInsideRect(PWND Wnd, RECT *rect)
Definition: nonclient.c:71
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define IN
Definition: typedefs.h:39
NTSTATUS FASTCALL InitSessionImpl(VOID)
Definition: session.c:18
LRESULT NC_HandleNCCalcSize(PWND wnd, WPARAM wparam, RECTL *winRect, BOOL Suspended)
Definition: nonclient.c:1282
HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId)
Definition: kbdlayout.c:857
VOID FASTCALL DefWndDoSizeMove(PWND pwnd, WORD wParam)
Definition: nonclient.c:239
PIMC FASTCALL UserCreateInputContext(ULONG_PTR dwClientImcData)
Definition: ime.c:1565
HBRUSH FASTCALL GetControlBrush(PWND, HDC, UINT)
Definition: misc.c:172
#define __cdecl
Definition: accygwin.h:79
DWORD FASTCALL UserGetKeyboardType(DWORD TypeFlag)
Definition: keyboard.c:1560
VOID FASTCALL IntClearWindowState(PWND, UINT)
Definition: misc.c:612
VOID UserDrawCaptionBar(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:933
struct @1616 Msg[]
BOOL FASTCALL UserDestroyMenu(HMENU hMenu)
Definition: menu.c:5807
NTSTATUS NTAPI InitThreadCallback(PETHREAD Thread)
Definition: main.c:457
Definition: ntuser.h:198
LONG NTSTATUS
Definition: precomp.h:26
static HDC
Definition: imagelist.c:92
PTHREADINFO FASTCALL IntTID2PTI(HANDLE)
Definition: misc.c:42
HWND hWnd
Definition: settings.c:17
HBRUSH FASTCALL GetControlColor(PWND, PWND, HDC, UINT)
Definition: misc.c:146
BOOL FASTCALL UserIsCiceroEnabled(VOID)
Definition: metric.c:32
BOOLEAN UserDestroyInputContext(PVOID Object)
Definition: ime.c:1491
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos)
Definition: menu.c:1276
HDC FASTCALL UserGetWindowDC(PWND Wnd)
Definition: windc.c:947
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
LRESULT NC_HandleNCLButtonDown(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1553
UINT_PTR WPARAM
Definition: windef.h:207
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HWND FASTCALL co_UserSetFocus(PWND Window)
Definition: focus.c:1314
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:58
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
BOOL FASTCALL UserPostMessage(HWND Wnd, UINT Msg, WPARAM wParam, LPARAM lParam)
Definition: message.c:1346
uint32_t ULONG_PTR
Definition: typedefs.h:65
FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
Definition: userfuncs.h:4
LRESULT NC_HandleNCRButtonDown(PWND wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1703
VOID UserFreeInputContext(PVOID Object)
Definition: ime.c:1464
Definition: window.c:28
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
BOOL UserPaintCaption(PWND pWnd, INT Flags)
Definition: defwnd.c:399
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2848
HWND FASTCALL UserGetShellWindow(VOID)
Definition: window.c:3679
int __cdecl _scwprintf(const wchar_t *format,...)
Definition: _scwprintf.c:13
#define ERROR_INVALID_MENU_HANDLE
Definition: winerror.h:882
BOOL APIENTRY IntDdePostMessageHook(IN PWND, IN UINT, IN WPARAM, IN OUT LPARAM *, IN OUT LONG_PTR *)
Definition: dde.c:172
unsigned char BOOLEAN
LONG_PTR LPARAM
Definition: windef.h:208
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:134
DWORD FASTCALL IntGetWindowContextHelpId(PWND pWnd)
Definition: window.c:441
DWORD FASTCALL UserGetKeyState(DWORD key)
Definition: msgqueue.c:221
BOOL FASTCALL SetLayeredStatus(PWND pWnd, BYTE set)
Definition: layered.c:34
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
const DWORD Style
Definition: appswitch.c:71
LRESULT NC_DoNCPaint(PWND, HDC, INT)
Definition: nonclient.c:1075
NTSTATUS GetProcessLuid(IN PETHREAD Thread OPTIONAL, IN PEPROCESS Process OPTIONAL, OUT PLUID Luid)
Definition: misc.c:809
_In_ WDFCOLLECTION _In_ ULONG Index
unsigned short WORD
Definition: ntddk_ex.h:93
Type
Definition: Type.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2652
BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText)
Definition: window.c:4382
HWINSTA FASTCALL UserGetProcessWindowStation(VOID)
Definition: winsta.c:1353
DWORD dwThreadId
Definition: fdebug.c:31
UINT_PTR HKL
Definition: msctf.idl:101
struct atom_table ** PRTL_ATOM_TABLE
Definition: atom.c:43
unsigned char BYTE
Definition: xxhash.c:193
HBRUSH FASTCALL DefWndControlColor(HDC hDC, UINT ctlType)
Definition: defwnd.c:33
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
HMENU FASTCALL UserCreateMenu(PDESKTOP Desktop, BOOL PopupMenu)
Definition: menu.c:5032
PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
Definition: window.c:3335
Definition: ntuser.h:688
static HDC hDC
Definition: 3dtext.c:33
ULONG_PTR SIZE_T
Definition: typedefs.h:80
VOID FASTCALL IntSetWindowState(PWND, UINT)
Definition: misc.c:591
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:495
BOOL NTAPI InitMetrics(VOID)
Definition: metric.c:39
void FASTCALL NC_GetSysPopupPos(PWND, RECT *)
Definition: nonclient.c:117
HWND FASTCALL UserGetActiveWindow(VOID)
Definition: focus.c:1429
PRTL_ATOM_TABLE gAtomTable
Definition: session.c:13
VOID NC_DrawFrame(HDC hDC, RECT *CurrentRect, BOOL Active, DWORD Style, DWORD ExStyle)
Definition: nonclient.c:887
#define FORCEINLINE
Definition: wdftypes.h:67
LRESULT NC_HandleNCActivate(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1416
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
unsigned int UINT
Definition: ndis.h:50
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint)
Definition: windc.c:918
LONG NTAPI UserGetSystemMetrics(ULONG Index)
Definition: metric.c:208
BOOL FASTCALL UserIsDBCSEnabled(VOID)
Definition: metric.c:17
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
#define OUT
Definition: typedefs.h:40
unsigned int ULONG
Definition: retypes.h:1
BOOL APIENTRY IntDdeGetMessageHook(PMSG, LONG_PTR)
Definition: dde.c:326
_In_ ULONG _In_ BOOLEAN Active
Definition: potypes.h:560
HWND FASTCALL UserGetForegroundWindow(VOID)
Definition: focus.c:1421
PVOID AllocInputContextObject(PDESKTOP pDesk, PTHREADINFO pti, SIZE_T Size, PVOID *HandleOwner)
Definition: ime.c:1435
BOOL FASTCALL UserIsIMMEnabled(VOID)
Definition: metric.c:22
PWND FASTCALL IntGetWindowObject(HWND hWnd)
Definition: window.c:73
LONG_PTR LRESULT
Definition: windef.h:209
BOOL FASTCALL GetLayeredStatus(PWND pWnd)
Definition: layered.c:23
Definition: _set.h:46
PUSER_HANDLE_TABLE gHandleTable
Definition: object.c:13
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
VOID FASTCALL co_DestroyThreadWindows(struct _ETHREAD *Thread)
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:28
#define APIENTRY
Definition: api.h:79
const DWORD ExStyle
Definition: appswitch.c:72
static UINT WPARAM wparam
Definition: combo.c:716
BOOL FASTCALL UserSystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni)
Definition: sysparams.c:2090
Definition: copy.c:22
LRESULT NC_HandleNCLButtonDblClk(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1645
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68