configure: Changes from running autconf after previous patch.
[wine/hacks.git] / dlls / user.exe16 / user_private.h
blobd202bfe6e389ab6729b5a74fedd6aa6aa23181d5
1 /*
2 * USER private definitions
4 * Copyright 1993, 2009 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_USER_PRIVATE_H
22 #define __WINE_USER_PRIVATE_H
24 #include <stdarg.h>
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wingdi.h"
28 #include "winuser.h"
29 #include "winreg.h"
30 #include "winternl.h"
31 #include "wine/windef16.h"
33 /* Wow handlers */
35 /* the structures must match the corresponding ones in user32 */
36 struct wow_handlers16
38 LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
39 LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
40 LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
41 LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
42 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
43 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
44 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
45 DWORD (*wait_message)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
46 HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
47 LRESULT (*call_window_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
48 LRESULT (*call_dialog_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
49 void (*free_icon_param)(ULONG_PTR);
52 struct wow_handlers32
54 LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
55 LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
56 LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
57 LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
58 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
59 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
60 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
61 DWORD (*wait_message)(DWORD,const HANDLE*,DWORD,DWORD,DWORD);
62 HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
63 HWND (*get_win_handle)(HWND);
64 WNDPROC (*alloc_winproc)(WNDPROC,BOOL);
65 struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL);
66 INT (*dialog_box_loop)(HWND,HWND);
67 ULONG_PTR (*get_icon_param)(HICON);
68 ULONG_PTR (*set_icon_param)(HICON,ULONG_PTR);
71 extern struct wow_handlers32 wow_handlers32 DECLSPEC_HIDDEN;
73 extern HWND create_window16(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL) DECLSPEC_HIDDEN;
74 extern void free_module_classes(HINSTANCE16) DECLSPEC_HIDDEN;
75 extern void register_wow_handlers(void) DECLSPEC_HIDDEN;
76 extern void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new,
77 struct wow_handlers32 *orig );
79 static inline HWND WIN_Handle32( HWND16 hwnd16 )
81 return wow_handlers32.get_win_handle( (HWND)(ULONG_PTR)hwnd16 );
84 typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
85 LRESULT *result, void *arg );
86 typedef LRESULT (*winproc_callback16_t)( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp,
87 LRESULT *result, void *arg );
89 extern WNDPROC16 WINPROC_GetProc16( WNDPROC proc, BOOL unicode ) DECLSPEC_HIDDEN;
90 extern WNDPROC WINPROC_AllocProc16( WNDPROC16 func ) DECLSPEC_HIDDEN;
91 extern LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT16 msg,
92 WPARAM16 wParam, LPARAM lParam, LRESULT *result, void *arg ) DECLSPEC_HIDDEN;
93 extern LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT msg,
94 WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg ) DECLSPEC_HIDDEN;
96 extern LRESULT HOOK_CallHooks( INT id, INT code, WPARAM wparam, LPARAM lparam, BOOL unicode ) DECLSPEC_HIDDEN;
98 #define GET_WORD(ptr) (*(const WORD *)(ptr))
99 #define GET_DWORD(ptr) (*(const DWORD *)(ptr))
101 #define WM_SYSTIMER 0x0118
103 /* Dialog info structure (must match the user32 one) */
104 typedef struct tagDIALOGINFO
106 HWND hwndFocus; /* Current control with focus */
107 HFONT hUserFont; /* Dialog font */
108 HMENU hMenu; /* Dialog menu */
109 UINT xBaseUnit; /* Dialog units (depends on the font) */
110 UINT yBaseUnit;
111 INT idResult; /* EndDialog() result / default pushbutton ID */
112 UINT flags; /* EndDialog() called for this dialog */
113 } DIALOGINFO;
115 #define DF_END 0x0001
116 #define DF_OWNERENABLED 0x0002
118 /* HANDLE16 <-> HANDLE conversions */
119 #define HINSTANCE_16(h32) (LOWORD(h32))
120 #define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
122 extern HICON16 get_icon_16( HICON icon ) DECLSPEC_HIDDEN;
123 extern HICON get_icon_32( HICON16 icon16 ) DECLSPEC_HIDDEN;
125 extern DWORD USER16_AlertableWait DECLSPEC_HIDDEN;
126 extern WORD USER_HeapSel DECLSPEC_HIDDEN;
128 #endif /* __WINE_USER_PRIVATE_H */