mshtml: Handle protocols with no ports when checking target origin.
[wine.git] / dlls / user.exe16 / user_private.h
blob0805997246b2796290dfdf9c6e85d1ce25b7d7d2
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 "ntuser.h"
28 #include "winreg.h"
29 #include "winternl.h"
30 #include "wine/windef16.h"
32 /* Wow handlers */
34 /* the structures must match the corresponding ones in user32 */
35 struct wow_handlers16
37 LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
38 LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
39 LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
40 LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
41 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
42 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
43 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
44 HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
45 LRESULT (*call_window_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
46 LRESULT (*call_dialog_proc)(HWND,UINT,WPARAM,LPARAM,LRESULT*,void*);
49 struct wow_handlers32
51 LRESULT (*button_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
52 LRESULT (*combo_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
53 LRESULT (*edit_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
54 LRESULT (*listbox_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
55 LRESULT (*mdiclient_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
56 LRESULT (*scrollbar_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
57 LRESULT (*static_proc)(HWND,UINT,WPARAM,LPARAM,BOOL);
58 HWND (*create_window)(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL);
59 HWND (*get_win_handle)(HWND);
60 WNDPROC (*alloc_winproc)(WNDPROC,BOOL);
61 struct tagDIALOGINFO *(*get_dialog_info)(HWND,BOOL);
62 INT (*dialog_box_loop)(HWND,HWND);
65 extern struct wow_handlers32 wow_handlers32 DECLSPEC_HIDDEN;
67 extern HWND create_window16(CREATESTRUCTW*,LPCWSTR,HINSTANCE,BOOL) DECLSPEC_HIDDEN;
68 extern void free_module_classes(HINSTANCE16) DECLSPEC_HIDDEN;
69 extern void register_wow_handlers(void) DECLSPEC_HIDDEN;
70 extern void WINAPI UserRegisterWowHandlers( const struct wow_handlers16 *new,
71 struct wow_handlers32 *orig );
73 static inline HWND WIN_Handle32( HWND16 hwnd16 )
75 return wow_handlers32.get_win_handle( (HWND)(ULONG_PTR)hwnd16 );
78 typedef LRESULT (*winproc_callback_t)( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp,
79 LRESULT *result, void *arg );
80 typedef LRESULT (*winproc_callback16_t)( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp,
81 LRESULT *result, void *arg );
83 extern WNDPROC16 WINPROC_GetProc16( WNDPROC proc, BOOL unicode ) DECLSPEC_HIDDEN;
84 extern WNDPROC WINPROC_AllocProc16( WNDPROC16 func ) DECLSPEC_HIDDEN;
85 extern LRESULT WINPROC_CallProc16To32A( winproc_callback_t callback, HWND16 hwnd, UINT16 msg,
86 WPARAM16 wParam, LPARAM lParam, LRESULT *result, void *arg ) DECLSPEC_HIDDEN;
87 extern LRESULT WINPROC_CallProc32ATo16( winproc_callback16_t callback, HWND hwnd, UINT msg,
88 WPARAM wParam, LPARAM lParam, LRESULT *result, void *arg ) DECLSPEC_HIDDEN;
90 extern void call_WH_CALLWNDPROC_hook( HWND16 hwnd, UINT16 msg, WPARAM16 wp, LPARAM lp ) DECLSPEC_HIDDEN;
92 #define GET_BYTE(ptr) (*(const BYTE *)(ptr))
93 #define GET_WORD(ptr) (*(const WORD *)(ptr))
94 #define GET_DWORD(ptr) (*(const DWORD *)(ptr))
96 #define WM_SYSTIMER 0x0118
98 #define SYSTEM_TIMER_FLAG 0x10000
100 /* Dialog info structure (must match the user32 one) */
101 typedef struct tagDIALOGINFO
103 HWND hwndFocus; /* Current control with focus */
104 HFONT hUserFont; /* Dialog font */
105 HMENU hMenu; /* Dialog menu */
106 UINT xBaseUnit; /* Dialog units (depends on the font) */
107 UINT yBaseUnit;
108 INT idResult; /* EndDialog() result / default pushbutton ID */
109 UINT flags; /* EndDialog() called for this dialog */
110 } DIALOGINFO;
112 #define DF_END 0x0001
113 #define DF_OWNERENABLED 0x0002
115 /* HANDLE16 <-> HANDLE conversions */
116 #define HINSTANCE_16(h32) (LOWORD(h32))
117 #define HINSTANCE_32(h16) ((HINSTANCE)(ULONG_PTR)(h16))
119 extern HICON16 get_icon_16( HICON icon ) DECLSPEC_HIDDEN;
120 extern HICON get_icon_32( HICON16 icon16 ) DECLSPEC_HIDDEN;
122 extern DWORD USER16_AlertableWait DECLSPEC_HIDDEN;
123 extern WORD USER_HeapSel DECLSPEC_HIDDEN;
125 #endif /* __WINE_USER_PRIVATE_H */