ReactOS  0.4.14-dev-323-g6fe6a88
userfuncs.h
Go to the documentation of this file.
1 #pragma once
2 
4 {
5  PMENU pMenu = UserGetObject(gHandleTable, hMenu, TYPE_MENU);
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 
85 
86 /*************** KEYBOARD.C ***************/
87 
91 
92 
93 /*************** MISC.C ***************/
94 
95 int
96 __cdecl
98  const wchar_t *format,
99  ...);
100 
103  UINT uiAction,
104  UINT uiParam,
105  PVOID pvParam,
106  UINT fWinIni);
107 
113 
114 NTSTATUS
118  OUT PLUID Luid);
119 
120 /*************** MESSAGE.C ***************/
121 
123 
124 /*************** WINDOW.C ***************/
125 
132 BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText);
134 
135 /*************** MENU.C ***************/
136 
138 BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos);
140 
141 /************** NONCLIENT **************/
142 
154 
155 /************** DEFWND **************/
156 
157 HBRUSH FASTCALL DefWndControlColor(HDC hDC,UINT ctlType);
160 
161 /************** LAYERED **************/
162 
165 
166 /* 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:712
void FASTCALL NC_GetInsideRect(PWND Wnd, RECT *rect)
Definition: nonclient.c:71
const uint16_t * PCWSTR
Definition: typedefs.h:55
#define IN
Definition: typedefs.h:38
NTSTATUS FASTCALL InitSessionImpl(VOID)
Definition: session.c:18
LRESULT NC_HandleNCCalcSize(PWND wnd, WPARAM wparam, RECTL *winRect, BOOL Suspended)
Definition: nonclient.c:1248
HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId)
Definition: kbdlayout.c:453
VOID FASTCALL DefWndDoSizeMove(PWND pwnd, WORD wParam)
Definition: nonclient.c:239
Type
Definition: Type.h:6
HBRUSH FASTCALL GetControlBrush(PWND, HDC, UINT)
Definition: misc.c:171
#define __cdecl
Definition: accygwin.h:79
DWORD FASTCALL UserGetKeyboardType(DWORD TypeFlag)
Definition: keyboard.c:1516
VOID FASTCALL IntClearWindowState(PWND, UINT)
Definition: misc.c:590
VOID UserDrawCaptionBar(PWND pWnd, HDC hDC, INT Flags)
Definition: nonclient.c:900
BOOL FASTCALL UserDestroyMenu(HMENU hMenu)
Definition: menu.c:5804
NTSTATUS NTAPI InitThreadCallback(PETHREAD Thread)
Definition: main.c:438
LONG NTSTATUS
Definition: precomp.h:26
static HDC
Definition: imagelist.c:92
PTHREADINFO FASTCALL IntTID2PTI(HANDLE)
Definition: misc.c:41
HWND hWnd
Definition: settings.c:17
HBRUSH FASTCALL GetControlColor(PWND, PWND, HDC, UINT)
Definition: misc.c:145
BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos)
Definition: menu.c:1274
HDC FASTCALL UserGetWindowDC(PWND Wnd)
Definition: windc.c:946
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
LRESULT NC_HandleNCLButtonDown(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1519
UINT_PTR WPARAM
Definition: windef.h:207
BOOL WINAPI EndPaint(_In_ HWND, _In_ const PAINTSTRUCT *)
HWND FASTCALL co_UserSetFocus(PWND Window)
Definition: focus.c:1196
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:56
& 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:1181
FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
Definition: userfuncs.h:3
LRESULT NC_HandleNCRButtonDown(PWND wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1668
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
Definition: window.c:29
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:396
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
BOOLEAN co_UserDestroyWindow(PVOID Object)
Definition: window.c:2644
HWND FASTCALL UserGetShellWindow(VOID)
Definition: window.c:3491
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
#define FORCEINLINE
Definition: ntbasedef.h:221
LONG_PTR LPARAM
Definition: windef.h:208
struct @1593 Msg[]
Definition: sacdrv.h:287
PWND FASTCALL UserGetWindowObject(HWND hWnd)
Definition: window.c:103
DWORD FASTCALL IntGetWindowContextHelpId(PWND pWnd)
Definition: window.c:410
DWORD FASTCALL UserGetKeyState(DWORD key)
Definition: msgqueue.c:221
BOOL FASTCALL SetLayeredStatus(PWND pWnd, BYTE set)
Definition: layered.c:34
const DWORD Style
Definition: appswitch.c:71
LRESULT NC_DoNCPaint(PWND, HDC, INT)
Definition: nonclient.c:1042
NTSTATUS GetProcessLuid(IN PETHREAD Thread OPTIONAL, IN PEPROCESS Process OPTIONAL, OUT PLUID Luid)
Definition: misc.c:789
static const UCHAR Index[8]
Definition: usbohci.c:18
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText)
Definition: window.c:4164
static IUnknown Object
Definition: main.c:512
HWINSTA FASTCALL UserGetProcessWindowStation(VOID)
Definition: winsta.c:1317
DWORD dwThreadId
Definition: fdebug.c:31
unsigned char BYTE
Definition: mem.h:68
UINT_PTR HKL
Definition: msctf.idl:101
struct atom_table ** PRTL_ATOM_TABLE
Definition: atom.c:43
HBRUSH FASTCALL DefWndControlColor(HDC hDC, UINT ctlType)
Definition: defwnd.c:33
HMENU FASTCALL UserCreateMenu(PDESKTOP Desktop, BOOL PopupMenu)
Definition: menu.c:5029
PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type)
Definition: window.c:3144
Definition: ntuser.h:657
static HDC hDC
Definition: 3dtext.c:33
VOID FASTCALL IntSetWindowState(PWND, UINT)
Definition: misc.c:569
PVOID UserGetObject(PUSER_HANDLE_TABLE ht, HANDLE handle, HANDLE_TYPE type)
Definition: object.c:462
BOOL NTAPI InitMetrics(VOID)
Definition: metric.c:19
void FASTCALL NC_GetSysPopupPos(PWND, RECT *)
Definition: nonclient.c:117
HWND FASTCALL UserGetActiveWindow(VOID)
Definition: focus.c:1311
PRTL_ATOM_TABLE gAtomTable
Definition: session.c:13
VOID NC_DrawFrame(HDC hDC, RECT *CurrentRect, BOOL Active, DWORD Style, DWORD ExStyle)
Definition: nonclient.c:854
LRESULT NC_HandleNCActivate(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1382
__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:917
LONG NTAPI UserGetSystemMetrics(ULONG Index)
Definition: metric.c:180
_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:39
unsigned int ULONG
Definition: retypes.h:1
BOOL APIENTRY IntDdeGetMessageHook(PMSG, LONG_PTR)
Definition: dde.c:326
HWND FASTCALL UserGetForegroundWindow(VOID)
Definition: focus.c:1303
PWND FASTCALL IntGetWindowObject(HWND hWnd)
Definition: window.c:51
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:27
#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:2066
Definition: path.c:42
LRESULT NC_HandleNCLButtonDblClk(PWND Wnd, WPARAM wParam, LPARAM lParam)
Definition: nonclient.c:1610
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68