2010-02-26 11:43:19 +00:00
|
|
|
#pragma once
|
2006-11-08 11:47:44 +00:00
|
|
|
|
2014-05-06 18:09:07 +00:00
|
|
|
FORCEINLINE PMENU UserGetMenuObject(HMENU hMenu)
|
|
|
|
{
|
2015-09-01 22:10:13 +00:00
|
|
|
PMENU pMenu = UserGetObject(gHandleTable, hMenu, TYPE_MENU);
|
|
|
|
if (!pMenu)
|
|
|
|
{
|
|
|
|
EngSetLastError(ERROR_INVALID_MENU_HANDLE);
|
|
|
|
}
|
|
|
|
return pMenu;
|
2014-05-06 18:09:07 +00:00
|
|
|
}
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
#define ASSERT_REFS_CO(_obj_) \
|
|
|
|
{ \
|
2010-01-15 13:47:25 +00:00
|
|
|
LONG ref = ((PHEAD)_obj_)->cLockObj;\
|
2006-11-08 11:47:44 +00:00
|
|
|
if (!(ref >= 1)){ \
|
2012-07-31 18:40:52 +00:00
|
|
|
ERR_CH(UserObj, "ASSERT: obj 0x%p, refs %ld\n", _obj_, ref); \
|
2006-11-08 11:47:44 +00:00
|
|
|
ASSERT(FALSE); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
#define ASSERT_REFS_CO(_obj_) \
|
|
|
|
{ \
|
|
|
|
PSINGLE_LIST_ENTRY e; \
|
|
|
|
BOOL gotit=FALSE; \
|
2010-01-15 13:47:25 +00:00
|
|
|
LONG ref = ((PHEAD)_obj_)->cLockObj;\
|
2006-11-08 11:47:44 +00:00
|
|
|
if (!(ref >= 1)){ \
|
2012-07-31 18:40:52 +00:00
|
|
|
ERR_CH(UserObj, "obj 0x%p, refs %i\n", _obj_, ref); \
|
2006-11-08 11:47:44 +00:00
|
|
|
ASSERT(FALSE); \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
e = PsGetCurrentThreadWin32Thread()->ReferencesList.Next; \
|
|
|
|
while (e) \
|
|
|
|
{ \
|
|
|
|
PUSER_REFERENCE_ENTRY ref = CONTAINING_RECORD(e, USER_REFERENCE_ENTRY, Entry); \
|
|
|
|
if (ref->obj == _obj_){ gotit=TRUE; break; } \
|
|
|
|
e = e->Next; \
|
|
|
|
} \
|
|
|
|
ASSERT(gotit); \
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2011-08-21 12:38:52 +00:00
|
|
|
#define DUMP_REFS(obj) TRACE_CH(UserObj,"obj 0x%x, refs %i\n",obj, ((PHEAD)obj)->cLockObj)
|
2006-11-08 11:47:44 +00:00
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND FASTCALL IntGetWindowObject(HWND hWnd);
|
2006-11-08 11:47:44 +00:00
|
|
|
|
2015-01-05 19:44:49 +00:00
|
|
|
/*************** DDE.C ****************/
|
|
|
|
|
|
|
|
BOOL FASTCALL IntDdeSendMessageHook(PWND,UINT,WPARAM,LPARAM);
|
2015-01-08 00:56:51 +00:00
|
|
|
BOOL APIENTRY IntDdePostMessageHook(IN PWND,IN UINT,IN WPARAM,IN OUT LPARAM*,IN OUT LONG_PTR*);
|
2015-01-08 22:57:09 +00:00
|
|
|
BOOL APIENTRY IntDdeGetMessageHook(PMSG,LONG_PTR);
|
2015-01-05 19:44:49 +00:00
|
|
|
|
2013-01-04 00:41:10 +00:00
|
|
|
/*************** MAIN.C ***************/
|
|
|
|
|
2014-12-29 13:56:28 +00:00
|
|
|
NTSTATUS NTAPI InitThreadCallback(PETHREAD Thread);
|
2013-01-04 00:41:10 +00:00
|
|
|
|
2006-11-08 11:47:44 +00:00
|
|
|
/*************** WINSTA.C ***************/
|
|
|
|
|
|
|
|
HWINSTA FASTCALL UserGetProcessWindowStation(VOID);
|
|
|
|
|
|
|
|
/*************** FOCUS.C ***************/
|
|
|
|
|
2009-08-24 20:09:58 +00:00
|
|
|
HWND FASTCALL UserGetActiveWindow(VOID);
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
HWND FASTCALL UserGetForegroundWindow(VOID);
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
HWND FASTCALL co_UserSetFocus(PWND Window);
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
/*************** WINDC.C ***************/
|
|
|
|
|
2011-08-27 12:38:23 +00:00
|
|
|
INT FASTCALL UserReleaseDC(PWND Window, HDC hDc, BOOL EndPaint);
|
|
|
|
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags);
|
|
|
|
HDC FASTCALL UserGetWindowDC(PWND Wnd);
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
/*************** SESSION.C ***************/
|
|
|
|
|
|
|
|
extern PRTL_ATOM_TABLE gAtomTable;
|
|
|
|
NTSTATUS FASTCALL InitSessionImpl(VOID);
|
|
|
|
|
|
|
|
/*************** METRIC.C ***************/
|
|
|
|
|
2012-03-04 11:32:43 +00:00
|
|
|
BOOL NTAPI InitMetrics(VOID);
|
|
|
|
LONG NTAPI UserGetSystemMetrics(ULONG Index);
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
/*************** KEYBOARD.C ***************/
|
|
|
|
|
|
|
|
DWORD FASTCALL UserGetKeyState(DWORD key);
|
|
|
|
DWORD FASTCALL UserGetKeyboardType(DWORD TypeFlag);
|
|
|
|
HKL FASTCALL UserGetKeyboardLayout(DWORD dwThreadId);
|
|
|
|
|
|
|
|
|
|
|
|
/*************** MISC.C ***************/
|
|
|
|
|
2018-07-16 23:47:59 +00:00
|
|
|
int
|
|
|
|
__cdecl
|
|
|
|
_scwprintf(
|
|
|
|
const wchar_t *format,
|
|
|
|
...);
|
|
|
|
|
2006-11-08 11:47:44 +00:00
|
|
|
BOOL FASTCALL
|
|
|
|
UserSystemParametersInfo(
|
|
|
|
UINT uiAction,
|
|
|
|
UINT uiParam,
|
|
|
|
PVOID pvParam,
|
|
|
|
UINT fWinIni);
|
2007-10-19 23:21:45 +00:00
|
|
|
|
2012-05-28 04:49:15 +00:00
|
|
|
VOID FASTCALL IntSetWindowState(PWND, UINT);
|
|
|
|
VOID FASTCALL IntClearWindowState(PWND, UINT);
|
2013-05-11 19:33:40 +00:00
|
|
|
PTHREADINFO FASTCALL IntTID2PTI(HANDLE);
|
2017-02-22 17:45:19 +00:00
|
|
|
HBRUSH FASTCALL GetControlBrush(PWND,HDC,UINT);
|
|
|
|
HBRUSH FASTCALL GetControlColor(PWND,PWND,HDC,UINT);
|
2012-05-28 04:49:15 +00:00
|
|
|
|
2018-06-16 17:44:15 +00:00
|
|
|
NTSTATUS
|
|
|
|
GetProcessLuid(
|
|
|
|
IN PETHREAD Thread OPTIONAL,
|
2018-06-16 17:44:27 +00:00
|
|
|
IN PEPROCESS Process OPTIONAL,
|
2018-06-16 17:44:15 +00:00
|
|
|
OUT PLUID Luid);
|
|
|
|
|
2006-11-08 11:47:44 +00:00
|
|
|
/*************** MESSAGE.C ***************/
|
2007-10-19 23:21:45 +00:00
|
|
|
|
2015-09-01 22:10:13 +00:00
|
|
|
BOOL FASTCALL UserPostMessage(HWND Wnd,UINT Msg, WPARAM wParam, LPARAM lParam);
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
/*************** WINDOW.C ***************/
|
|
|
|
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND FASTCALL UserGetWindowObject(HWND hWnd);
|
2011-08-27 12:38:23 +00:00
|
|
|
VOID FASTCALL co_DestroyThreadWindows(struct _ETHREAD *Thread);
|
2009-08-24 20:09:58 +00:00
|
|
|
HWND FASTCALL UserGetShellWindow(VOID);
|
2011-08-27 12:38:23 +00:00
|
|
|
HDC FASTCALL UserGetDCEx(PWND Window OPTIONAL, HANDLE ClipRegion, ULONG Flags);
|
2014-09-21 17:44:40 +00:00
|
|
|
BOOLEAN co_UserDestroyWindow(PVOID Object);
|
2010-10-11 03:41:41 +00:00
|
|
|
PWND FASTCALL UserGetAncestor(PWND Wnd, UINT Type);
|
2015-09-01 22:10:13 +00:00
|
|
|
BOOL APIENTRY DefSetText(PWND Wnd, PCWSTR WindowText);
|
|
|
|
DWORD FASTCALL IntGetWindowContextHelpId( PWND pWnd );
|
2006-11-08 11:47:44 +00:00
|
|
|
|
|
|
|
/*************** MENU.C ***************/
|
|
|
|
|
2014-09-21 17:44:40 +00:00
|
|
|
HMENU FASTCALL UserCreateMenu(PDESKTOP Desktop, BOOL PopupMenu);
|
2014-04-28 03:55:23 +00:00
|
|
|
BOOL FASTCALL UserSetMenuDefaultItem(PMENU Menu, UINT uItem, UINT fByPos);
|
2006-11-08 11:47:44 +00:00
|
|
|
BOOL FASTCALL UserDestroyMenu(HMENU hMenu);
|
|
|
|
|
2015-07-30 07:49:09 +00:00
|
|
|
/************** NONCLIENT **************/
|
|
|
|
|
|
|
|
VOID FASTCALL DefWndDoSizeMove(PWND pwnd, WORD wParam);
|
2015-09-01 22:10:13 +00:00
|
|
|
LRESULT NC_DoNCPaint(PWND,HDC,INT);
|
|
|
|
void FASTCALL NC_GetSysPopupPos(PWND, RECT *);
|
|
|
|
LRESULT NC_HandleNCActivate( PWND Wnd, WPARAM wParam, LPARAM lParam );
|
2015-10-21 00:13:23 +00:00
|
|
|
LRESULT NC_HandleNCCalcSize( PWND wnd, WPARAM wparam, RECTL *winRect, BOOL Suspended );
|
2015-09-01 22:10:13 +00:00
|
|
|
VOID NC_DrawFrame( HDC hDC, RECT *CurrentRect, BOOL Active, DWORD Style, DWORD ExStyle);
|
|
|
|
VOID UserDrawCaptionBar( PWND pWnd, HDC hDC, INT Flags);
|
2016-02-12 22:10:29 +00:00
|
|
|
void FASTCALL NC_GetInsideRect(PWND Wnd, RECT *rect);
|
2015-09-01 22:10:13 +00:00
|
|
|
LRESULT NC_HandleNCLButtonDown(PWND Wnd, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT NC_HandleNCLButtonDblClk(PWND Wnd, WPARAM wParam, LPARAM lParam);
|
|
|
|
LRESULT NC_HandleNCRButtonDown( PWND wnd, WPARAM wParam, LPARAM lParam );
|
|
|
|
|
|
|
|
/************** DEFWND **************/
|
|
|
|
|
|
|
|
HBRUSH FASTCALL DefWndControlColor(HDC hDC,UINT ctlType);
|
|
|
|
BOOL UserDrawSysMenuButton(PWND pWnd, HDC hDC, LPRECT Rect, BOOL Down);
|
|
|
|
BOOL UserPaintCaption(PWND pWnd, INT Flags);
|
2006-11-08 11:47:44 +00:00
|
|
|
|
2015-09-11 02:34:11 +00:00
|
|
|
/************** LAYERED **************/
|
|
|
|
|
|
|
|
BOOL FASTCALL SetLayeredStatus(PWND pWnd, BYTE set);
|
|
|
|
BOOL FASTCALL GetLayeredStatus(PWND pWnd);
|
|
|
|
|
2006-11-08 11:47:44 +00:00
|
|
|
/* EOF */
|