1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS System Libraries 4 * FILE: win32ss/user/user32/include/user32p.h 5 * PURPOSE: Win32 User Library Private Headers 6 * PROGRAMMER: Alex Ionescu (alex@relsoft.net) 7 */ 8 9 /* INCLUDES ******************************************************************/ 10 11 #pragma once 12 13 /* Private User32 Headers */ 14 #include "controls.h" 15 #include "dde_private.h" 16 #include "regcontrol.h" 17 #include "resource.h" 18 #include "ntwrapper.h" 19 20 #define IMM_RETURN_VOID(retval) /* empty */ 21 #define IMM_RETURN_NONVOID(retval) return (retval) 22 23 /* typedef FN_... */ 24 #undef DEFINE_IMM_ENTRY 25 #define DEFINE_IMM_ENTRY(type, name, params, retval, retkind) \ 26 typedef type (WINAPI *FN_##name)params; 27 #include "immtable.h" 28 29 /* define Imm32ApiTable */ 30 typedef struct 31 { 32 #undef DEFINE_IMM_ENTRY 33 #define DEFINE_IMM_ENTRY(type, name, params, retval, retkind) \ 34 FN_##name p##name; 35 #include "immtable.h" 36 } Imm32ApiTable; 37 38 /* global variables */ 39 extern HINSTANCE User32Instance; 40 #define user32_module User32Instance 41 extern PPROCESSINFO g_ppi; 42 extern SHAREDINFO gSharedInfo; 43 extern PSERVERINFO gpsi; 44 extern PUSER_HANDLE_TABLE gHandleTable; 45 extern PUSER_HANDLE_ENTRY gHandleEntries; 46 extern BOOLEAN gfLogonProcess; 47 extern BOOLEAN gfServerProcess; 48 extern CRITICAL_SECTION U32AccelCacheLock; 49 extern HINSTANCE ghImm32; 50 extern RTL_CRITICAL_SECTION gcsUserApiHook; 51 extern USERAPIHOOK guah; 52 extern HINSTANCE ghmodUserApiHook; 53 extern HICON hIconSmWindows, hIconWindows; 54 extern Imm32ApiTable gImmApiEntries; 55 56 #define IMM_FN(name) gImmApiEntries.p##name 57 58 #define IS_ATOM(x) \ 59 (((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000)) 60 61 /* FIXME: move to a correct header */ 62 /* undocumented gdi32 definitions */ 63 BOOL WINAPI GdiDllInitialize(HANDLE, DWORD, LPVOID); 64 LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *); 65 66 /* definitions for spy.c */ 67 #define SPY_DISPATCHMESSAGE 0x0101 68 #define SPY_SENDMESSAGE 0x0103 69 #define SPY_DEFWNDPROC 0x0105 70 #define SPY_RESULT_OK 0x0001 71 #define SPY_RESULT_INVALIDHWND 0x0003 72 #define SPY_RESULT_DEFWND 0x0005 73 extern const char *SPY_GetMsgName(UINT msg, HWND hWnd); 74 extern const char *SPY_GetVKeyName(WPARAM wParam); 75 extern void SPY_EnterMessage(INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 76 extern void SPY_ExitMessage(INT iFlag, HWND hwnd, UINT msg, LRESULT lReturn, WPARAM wParam, LPARAM lParam); 77 78 /* definitions for usrapihk.c */ 79 BOOL FASTCALL BeginIfHookedUserApiHook(VOID); 80 BOOL FASTCALL EndUserApiHook(VOID); 81 BOOL FASTCALL IsInsideUserApiHook(VOID); 82 VOID FASTCALL ResetUserApiHook(PUSERAPIHOOK); 83 BOOL FASTCALL IsMsgOverride(UINT,PUAHOWP); 84 BOOL WINAPI InitUserApiHook(HINSTANCE hInstance, USERAPIHOOKPROC pfn); 85 BOOL WINAPI ClearUserApiHook(HINSTANCE hInstance); 86 87 /* definitions for message.c */ 88 BOOL FASTCALL MessageInit(VOID); 89 VOID FASTCALL MessageCleanup(VOID); 90 91 /* definitions for misc.c */ 92 VOID WINAPI UserSetLastError(IN DWORD dwErrCode); 93 VOID WINAPI UserSetLastNTError(IN NTSTATUS Status); 94 PCALLPROCDATA FASTCALL ValidateCallProc(HANDLE hCallProc); 95 PWND FASTCALL ValidateHwnd(HWND hwnd); 96 PWND FASTCALL ValidateHwndOrDesk(HWND hwnd); 97 PWND FASTCALL GetThreadDesktopWnd(VOID); 98 PVOID FASTCALL ValidateHandleNoErr(HANDLE handle, UINT uType); 99 PWND FASTCALL ValidateHwndNoErr(HWND hwnd); 100 BOOL FASTCALL TestWindowProcess(PWND); 101 PVOID FASTCALL ValidateHandle(HANDLE, UINT); 102 103 /* definitions for menu.c */ 104 BOOL MenuInit(VOID); 105 VOID MenuCleanup(VOID); 106 UINT MenuDrawMenuBar(HDC hDC, LPRECT Rect, HWND hWnd, BOOL Draw); 107 VOID MenuTrackMouseMenuBar(HWND hWnd, ULONG Ht, POINT Pt); 108 VOID MenuTrackKbdMenuBar(HWND hWnd, UINT wParam, WCHAR wChar); 109 110 /* definitions for logon.c */ 111 VOID FASTCALL Logon(BOOL IsLogon); 112 113 /* misc definitions */ 114 void mirror_rect( const RECT *window_rect, RECT *rect ); 115 BOOL FASTCALL DefSetText(HWND hWnd, PCWSTR String, BOOL Ansi); 116 VOID FASTCALL ScrollTrackScrollBar(HWND Wnd, INT SBType, POINT Pt); 117 HCURSOR CursorIconToCursor(HICON hIcon, BOOL SemiTransparent); 118 BOOL get_icon_size(HICON hIcon, SIZE *size); 119 VOID FASTCALL IntNotifyWinEvent(DWORD, HWND, LONG, LONG, DWORD); 120 UINT WINAPI WinPosGetMinMaxInfo(HWND hWnd, POINT* MaxSize, POINT* MaxPos, POINT* MinTrack, POINT* MaxTrack); 121 VOID UserGetWindowBorders(DWORD, DWORD, SIZE *, BOOL); 122 VOID FASTCALL GetConnected(VOID); 123 extern BOOL FASTCALL EnumNamesA(HWINSTA WindowStation, NAMEENUMPROCA EnumFunc, LPARAM Context, BOOL Desktops); 124 extern BOOL FASTCALL EnumNamesW(HWINSTA WindowStation, NAMEENUMPROCW EnumFunc, LPARAM Context, BOOL Desktops); 125 BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down ); 126 HWND* WIN_ListChildren (HWND hWndparent); 127 VOID DeleteFrameBrushes(VOID); 128 BOOL WINAPI GdiValidateHandle(HGDIOBJ); 129 HANDLE FASTCALL UserGetProp(HWND hWnd, ATOM Atom, BOOLEAN SystemProp); 130 BOOL WINAPI InitializeImmEntryTable(VOID); 131 HRESULT User32GetImmFileName(_Out_ LPWSTR lpBuffer, _In_ size_t cchBuffer); 132 BOOL WINAPI UpdatePerUserImmEnabling(VOID); 133 134 /* EOF */ 135