aboutsummaryrefslogtreecommitdiff
path: root/Src/omBrowser/browserHost.h
blob: 355aa57f41bcd1eb743f0ec96b75c367919dbccc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
#ifndef NULLSOFT_WINAMP_OMBROWSER_BROWSERHOST_HEADER
#define NULLSOFT_WINAMP_OMBROWSER_BROWSERHOST_HEADER

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

#include <wtypes.h>

class obj_ombrowser;

typedef void (CALLBACK *DISPATCHAPC)(IDispatch *pDisp, ULONG_PTR /*param*/);

HWND BrowserHost_CreateWindow(obj_ombrowser *browserManager, HWND hParent, UINT fStyle, INT x, INT y, INT cx, INT cy, INT controlId, HACCEL hAccel);

#define NBHS_POPUP				0x00000001
#define NBHS_SCRIPTMODE			0x00000002
#define NBHS_DISABLECONTEXTMENU	0x00000004
#define NBHS_DIALOGMODE			0x00000008
#define NBHS_DISABLEHOSTCSS		0x00000010

#define NBHS_BROWSERMASK		0x0000F000
#define NBHS_BROWSERREADY		0x00001000
#define NBHS_BROWSERACTIVE		0x00002000


#define NBHM_FIRST				(WM_USER + 200)
#define NBHM_DESTROY			(NBHM_FIRST + 10)	// wParam  = (WPARAM)(BOOL)fImmediate, lParam - not used. Preffered way to close it. Returns TRUE if processed

// Post this messages
#define NBHM_CONTAINERCOMMAND	(NBHM_FIRST + 11) // wParam = (WPARAM)(INT)browserCommandId, lParam - not used
#define NBHM_UPDATESKIN			(NBHM_FIRST + 12)	// wParam - not used, lParam - not used.
#define NBHM_NAVIGATE			(NBHM_FIRST + 13)	// wParam - (WPARAM)(UINT)navigateFlags, lParam = (LPARAM)(BSTR)navigateUrl. 
#define NBHM_ENABLECONTAINERUPDATE	(NBHM_FIRST + 14) // wParam - (WPARAM)(BOOL)fEnable, lParam = (WPARAM)(BOOL)fRedraw
#define NBHM_QUEUEAPC			(NBHM_FIRST + 15) // wParam = (WPARAM)userData, lParam = (LPARAM)(PAPCFUNC)pfnAPC


#define NBHM_SHOWHISTORYPOPUP	(NBHM_FIRST + 16) //wParam = (WPARAM)popupFlags, lParam =(LPARAM)MAKELPARAM(popupPos).
#define NBHM_GETDISPATCHAPC		(NBHM_FIRST + 17) // wParam = (WPARAM)param, lParam = (LPARAM)(DISPATCHAPC)callback
#define NBHM_ACTIVATE			(NBHM_FIRST + 18) // wParam - not used, lParam - not used.  Activates browser (OLEIVERB_UIACTIVATE)
#define NBHM_QUERYTITLE			(NBHM_FIRST + 19) // wParam - not used, lParam - not used.  Will query for current title and send NBHN_TITLECHANGE back
#define NBHM_TOGGLEFULLSCREEN	(NBHM_FIRST + 20) // wParam - not used, lParam - not used.

#define NBHM_WRITEDOCUMENT		(NBHM_FIRST + 21) // wParam - not used, lParam = (LPARAM)(BSTR)bstrDocument; 
#define NBHM_ENABLEWINDOW		(NBHM_FIRST + 22) // wParam - not used, lParam = (LPARAM)(BOOL)fEnabled;
#define NBHM_UPDATEEXTERNAL		(NBHM_FIRST + 23) // wParam - not used, lParam - not used.

#define NBHN_FIRST				(200)
#define NBHN_READY				(NBHN_FIRST + 0)

typedef struct __BHNNAVCOMPLETE
{
	NMHDR hdr;
	IDispatch	*pDispatch;
	VARIANT		*URL;
	BOOL		fTopFrame;
} BHNNAVCOMPLETE;

#define NBHN_DOCUMENTREADY		(NBHN_FIRST + 1)
#define NBHN_NAVIGATECOMPLETE	(NBHN_FIRST + 2)


typedef struct __BHNACTIVE
{
	NMHDR hdr;
	BOOL fActive;
} BHNACTIVE;
#define NBHN_BROWSERACTIVE		(NBHN_FIRST + 3)

typedef struct __BHNCMDSTATE
{
	NMHDR hdr;
	UINT commandId;
	BOOL fEnabled;
} BHNCMDSTATE;
#define NBHN_COMMANDSTATECHANGE	(NBHN_FIRST + 4)

typedef struct __BHNTEXTCHANGE
{
	NMHDR hdr;
	LPCWSTR pszText;
} BHNTEXTCHANGE;

#define NBHN_STATUSCHANGE			(NBHN_FIRST + 5)
#define NBHN_TITLECHANGE			(NBHN_FIRST + 6)

typedef struct __BHNSECUREICON
{
	NMHDR hdr;
	UINT iconId;
} BHNSECUREICON;
#define NBHN_SECUREICONCHANGE	(NBHN_FIRST + 7)


typedef struct __BHNSERVICE
{
	NMHDR hdr;
	void *instance;
} BHNSERVICE;
#define NBHN_GETOMSERVICE		(NBHN_FIRST + 8)  // call service->AddRef() and return TRUE if you support this

typedef struct __BHNCREATEPOPUP
{
	NMHDR		hdr;
	DISPATCHAPC	callback;
	ULONG_PTR	param;
} BHNCREATEPOPUP;

#define NBHN_CREATEPOPUP		(NBHN_FIRST + 9)

typedef struct __BHNVISIBLE
{
	NMHDR	hdr;
	BOOL	fVisible;
} BHNVISIBLE;
#define NBHN_VISIBLECHANGE		(NBHN_FIRST + 10) // send to popup

typedef struct __BHNRESIZABLE
{
	NMHDR	hdr;
	BOOL	fEnabled;
} BHNRESIZABLE;
#define NBHN_RESIZABLE		(NBHN_FIRST + 11)

typedef struct __BHNCLOSING
{
	NMHDR	hdr;
	BOOL	isChild;
	BOOL	cancel;
} BHNCLOSING;
#define NBHN_CLOSING		(NBHN_FIRST + 12)

typedef struct __BHNSHOWUI
{
	NMHDR	hdr;
	UINT	elementId;
	BOOL	fShow;
} BHNSHOWUI;
#define NBHN_SHOWUI		(NBHN_FIRST + 13)

typedef struct __BHNCLIENTTOHOST
{
	NMHDR	hdr;
	LONG	cx;
	LONG	cy;
} BHNCLIENTTOHOST;
#define NBHN_CLIENTTOHOST		(NBHN_FIRST + 14)

typedef struct __BHNSETWINDOWPOS
{
	NMHDR	hdr;
	UINT	flags;
	LONG	x;
	LONG	y;
	LONG	cx;
	LONG	cy;
} BHNSETWINDOWPOS;
#define NBHN_SETWINDOWPOS		(NBHN_FIRST + 15)

typedef struct __BHNFOCUSCHANGE
{
	NMHDR hdr;
	BOOL fAllow;
} BHNFOCUSCHANGE;
#define NBHN_FOCUSCHANGE		(NBHN_FIRST + 16)

typedef struct __BHNFULLSCREEN
{
	NMHDR	hdr;
	BOOL	fEnable;
} BHNFULLSCREEN;
#define NBHN_FULLSCREEN		(NBHN_FIRST + 17)


#define NBHN_CLOSEPOPUP		(NBHN_FIRST + 18) // param = NMHDR 




#endif // NULLSOFT_WINAMP_OMBROWSER_BROWSERHOST_HEADER