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