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 21 typedef struct 22 { 23 BOOL (WINAPI* pImmIsIME) (HKL); 24 LRESULT (WINAPI* pImmEscapeA) (HKL, HIMC, UINT, LPVOID); 25 LRESULT (WINAPI* pImmEscapeW) (HKL, HIMC, UINT, LPVOID); 26 LONG (WINAPI* pImmGetCompositionStringA) (HIMC, DWORD, LPVOID, DWORD); 27 LONG (WINAPI* pImmGetCompositionStringW) (HIMC, DWORD, LPVOID, DWORD); 28 BOOL (WINAPI* pImmGetCompositionFontA) (HIMC, LPLOGFONTA); 29 BOOL (WINAPI* pImmGetCompositionFontW) (HIMC, LPLOGFONTW); 30 BOOL (WINAPI* pImmSetCompositionFontA)(HIMC, LPLOGFONTA); 31 BOOL (WINAPI* pImmSetCompositionFontW)(HIMC, LPLOGFONTW); 32 BOOL (WINAPI* pImmGetCompositionWindow) (HIMC, LPCOMPOSITIONFORM); 33 BOOL (WINAPI* pImmSetCompositionWindow) (HIMC, LPCOMPOSITIONFORM); 34 HIMC (WINAPI* pImmAssociateContext) (HWND, HIMC); 35 BOOL (WINAPI* pImmReleaseContext) (HWND, HIMC); 36 HIMC (WINAPI* pImmGetContext) (HWND); 37 HWND (WINAPI* pImmGetDefaultIMEWnd) (HWND); 38 BOOL (WINAPI* pImmNotifyIME) (HIMC, DWORD, DWORD, DWORD); 39 BOOL (WINAPI* pImmRegisterClient) (PVOID, HINSTANCE); 40 UINT (WINAPI* pImmProcessKey) (HWND, HKL, UINT, LPARAM, DWORD); 41 42 } Imm32ApiTable; 43 44 45 /* global variables */ 46 extern HINSTANCE User32Instance; 47 #define user32_module User32Instance 48 extern PPROCESSINFO g_ppi; 49 extern ULONG_PTR g_ulSharedDelta; 50 extern PSERVERINFO gpsi; 51 extern SHAREDINFO gSharedInfo; 52 extern BOOLEAN gfLogonProcess; 53 extern BOOLEAN gfServerProcess; 54 extern PUSER_HANDLE_TABLE gHandleTable; 55 extern PUSER_HANDLE_ENTRY gHandleEntries; 56 extern CRITICAL_SECTION U32AccelCacheLock; 57 extern HINSTANCE ghImm32; 58 extern RTL_CRITICAL_SECTION gcsUserApiHook; 59 extern USERAPIHOOK guah; 60 extern HINSTANCE ghmodUserApiHook; 61 extern HICON hIconSmWindows, hIconWindows; 62 extern Imm32ApiTable gImmApiEntries; 63 64 #define IS_ATOM(x) \ 65 (((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000)) 66 67 /* FIXME: move to a correct header */ 68 /* undocumented gdi32 definitions */ 69 BOOL WINAPI GdiDllInitialize(HANDLE, DWORD, LPVOID); 70 LONG WINAPI GdiGetCharDimensions(HDC, LPTEXTMETRICW, LONG *); 71 72 /* definitions for spy.c */ 73 #define SPY_DISPATCHMESSAGE 0x0101 74 #define SPY_SENDMESSAGE 0x0103 75 #define SPY_DEFWNDPROC 0x0105 76 #define SPY_RESULT_OK 0x0001 77 #define SPY_RESULT_INVALIDHWND 0x0003 78 #define SPY_RESULT_DEFWND 0x0005 79 extern const char *SPY_GetMsgName(UINT msg, HWND hWnd); 80 extern const char *SPY_GetVKeyName(WPARAM wParam); 81 extern void SPY_EnterMessage(INT iFlag, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); 82 extern void SPY_ExitMessage(INT iFlag, HWND hwnd, UINT msg, LRESULT lReturn, WPARAM wParam, LPARAM lParam); 83 84 /* definitions for usrapihk.c */ 85 BOOL FASTCALL BeginIfHookedUserApiHook(VOID); 86 BOOL FASTCALL EndUserApiHook(VOID); 87 BOOL FASTCALL IsInsideUserApiHook(VOID); 88 VOID FASTCALL ResetUserApiHook(PUSERAPIHOOK); 89 BOOL FASTCALL IsMsgOverride(UINT,PUAHOWP); 90 BOOL WINAPI InitUserApiHook(HINSTANCE hInstance, USERAPIHOOKPROC pfn); 91 BOOL WINAPI ClearUserApiHook(HINSTANCE hInstance); 92 93 /* definitions for message.c */ 94 BOOL FASTCALL MessageInit(VOID); 95 VOID FASTCALL MessageCleanup(VOID); 96 97 /* definitions for misc.c */ 98 VOID WINAPI UserSetLastError(IN DWORD dwErrCode); 99 VOID WINAPI UserSetLastNTError(IN NTSTATUS Status); 100 PCALLPROCDATA FASTCALL ValidateCallProc(HANDLE hCallProc); 101 PWND FASTCALL ValidateHwnd(HWND hwnd); 102 PWND FASTCALL ValidateHwndOrDesk(HWND hwnd); 103 PWND FASTCALL GetThreadDesktopWnd(VOID); 104 PVOID FASTCALL ValidateHandleNoErr(HANDLE handle, UINT uType); 105 PWND FASTCALL ValidateHwndNoErr(HWND hwnd); 106 BOOL FASTCALL TestWindowProcess(PWND); 107 PVOID FASTCALL ValidateHandle(HANDLE, UINT); 108 109 /* definitions for menu.c */ 110 BOOL MenuInit(VOID); 111 VOID MenuCleanup(VOID); 112 UINT MenuDrawMenuBar(HDC hDC, LPRECT Rect, HWND hWnd, BOOL Draw); 113 VOID MenuTrackMouseMenuBar(HWND hWnd, ULONG Ht, POINT Pt); 114 VOID MenuTrackKbdMenuBar(HWND hWnd, UINT wParam, WCHAR wChar); 115 116 /* definitions for logon.c */ 117 VOID FASTCALL Logon(BOOL IsLogon); 118 119 /* misc definitions */ 120 void mirror_rect( const RECT *window_rect, RECT *rect ); 121 BOOL FASTCALL DefSetText(HWND hWnd, PCWSTR String, BOOL Ansi); 122 VOID FASTCALL ScrollTrackScrollBar(HWND Wnd, INT SBType, POINT Pt); 123 HCURSOR CursorIconToCursor(HICON hIcon, BOOL SemiTransparent); 124 BOOL get_icon_size(HICON hIcon, SIZE *size); 125 VOID FASTCALL IntNotifyWinEvent(DWORD, HWND, LONG, LONG, DWORD); 126 UINT WINAPI WinPosGetMinMaxInfo(HWND hWnd, POINT* MaxSize, POINT* MaxPos, POINT* MinTrack, POINT* MaxTrack); 127 VOID UserGetWindowBorders(DWORD, DWORD, SIZE *, BOOL); 128 VOID FASTCALL GetConnected(VOID); 129 extern BOOL FASTCALL EnumNamesA(HWINSTA WindowStation, NAMEENUMPROCA EnumFunc, LPARAM Context, BOOL Desktops); 130 extern BOOL FASTCALL EnumNamesW(HWINSTA WindowStation, NAMEENUMPROCW EnumFunc, LPARAM Context, BOOL Desktops); 131 BOOL UserDrawSysMenuButton( HWND hWnd, HDC hDC, LPRECT, BOOL down ); 132 HWND* WIN_ListChildren (HWND hWndparent); 133 VOID DeleteFrameBrushes(VOID); 134 BOOL WINAPI GdiValidateHandle(HGDIOBJ); 135 HANDLE FASTCALL UserGetProp(HWND hWnd, ATOM Atom, BOOLEAN SystemProp); 136 BOOL WINAPI InitializeImmEntryTable(VOID); 137 BOOL WINAPI UpdatePerUserImmEnabling(VOID); 138 139 /* EOF */ 140