Fixed IWebBrowser::Navigate() parameter type.
[wine] / include / wine / obj_webbrowser.h
1 /*
2  * Defines the COM interfaces and APIs related to the IE Web browser control
3  *
4  * Copyright 2001 John R. Sheets (for CodeWeavers)
5  *
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.
10  *
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.
15  *
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  */
20
21 #ifndef __WINE_WINE_OBJ_WEBBROWSER_H
22 #define __WINE_WINE_OBJ_WEBBROWSER_H
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
27
28
29 /*****************************************************************************
30  * Predeclare the interfaces and class IDs
31  */
32 DEFINE_GUID(IID_IWebBrowser, 0xeab22ac1, 0x30c1, 0x11cf, 0xa7, 0xeb, 0x00, 0x00, 0xc0, 0x5b, 0xae, 0x0b);
33 typedef struct IWebBrowser IWebBrowser, *LPWEBBROWSER;
34
35 DEFINE_GUID(CLSID_WebBrowser, 0x8856f961, 0x340a, 0x11d0, 0xa9, 0x6b, 0x00, 0xc0, 0x4f, 0xd7, 0x05, 0xa2);
36
37 DEFINE_GUID(IID_IWebBrowserApp, 0x0002df05, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
38 typedef struct IWebBrowserApp IWebBrowserApp, *LPWEBBROWSERAPP;
39
40 /*****************************************************************************
41  * IWebBrowser* related typedefs
42  */
43
44 typedef enum BrowserNavConstants
45 {
46     navOpenInNewWindow   = 0x1,
47     navNoHistory         = 0x2,
48     navNoReadFromCache   = 0x4,
49     navNoWriteToCache    = 0x8,
50     navAllowAutosearch   = 0x10,
51     navBrowserBar        = 0x20,
52     navHyperlink         = 0x40,
53     navEnforceRestricted = 0x80
54 } BrowserNavConstants;
55
56 typedef enum RefreshConstants
57 {
58     REFRESH_NORMAL     = 0,
59     REFRESH_IFEXPIRED  = 1,
60     REFRESH_COMPLETELY = 3
61 } RefreshConstants;
62
63 /*****************************************************************************
64  * IWebBrowser interface
65  */
66 #define ICOM_INTERFACE IWebBrowser
67 #define IWebBrowser_METHODS \
68         ICOM_METHOD(HRESULT,GoBack) \
69         ICOM_METHOD(HRESULT,GoForward) \
70         ICOM_METHOD(HRESULT,GoHome) \
71         ICOM_METHOD(HRESULT,GoSearch) \
72         ICOM_METHOD5(HRESULT,Navigate, BSTR,URL, VARIANT*,Flags, VARIANT*,TargetFrameName, \
73                                        VARIANT*,PostData, VARIANT*,Headers) \
74         ICOM_METHOD(HRESULT,Refresh) \
75         ICOM_METHOD1(HRESULT,Refresh2, VARIANT*,Level) \
76         ICOM_METHOD(HRESULT,Stop) \
77         ICOM_METHOD1(HRESULT,get_Application, void**,ppDisp) \
78         ICOM_METHOD1(HRESULT,get_Parent, void**,ppDisp) \
79         ICOM_METHOD1(HRESULT,get_Container, void**,ppDisp) \
80         ICOM_METHOD1(HRESULT,get_Document, void**,ppDisp) \
81         ICOM_METHOD1(HRESULT,get_TopLevelContainer, VARIANT*,pBool) \
82         ICOM_METHOD1(HRESULT,get_Type, BSTR*,Type) \
83         ICOM_METHOD1(HRESULT,get_Left, long*,pl) \
84         ICOM_METHOD1(HRESULT,put_Left, long,Left) \
85         ICOM_METHOD1(HRESULT,get_Top, long*,pl) \
86         ICOM_METHOD1(HRESULT,put_Top, long,Top) \
87         ICOM_METHOD1(HRESULT,get_Width, long*,pl) \
88         ICOM_METHOD1(HRESULT,put_Width, long,Width) \
89         ICOM_METHOD1(HRESULT,get_Height, long*,pl) \
90         ICOM_METHOD1(HRESULT,put_Height, long,Height) \
91         ICOM_METHOD1(HRESULT,get_LocationName, BSTR*,LocationName) \
92         ICOM_METHOD1(HRESULT,get_LocationURL, BSTR*,LocationURL) \
93         ICOM_METHOD1(HRESULT,get_Busy, VARIANT*,pBool)
94 #define IWebBrowser_IMETHODS \
95         IDispatch_METHODS \
96         IWebBrowser_METHODS
97 ICOM_DEFINE(IWebBrowser,IDispatch)
98 #undef ICOM_INTERFACE
99
100 /*** IUnknown methods ***/
101 #define IWebBrowser_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
102 #define IWebBrowser_AddRef(p)                  ICOM_CALL (AddRef,p)
103 #define IWebBrowser_Release(p)                 ICOM_CALL (Release,p)
104 /*** IDispatch methods ***/
105 #define IWebBrowser_GetTypeInfoCount(p,a)      ICOM_CALL1 (GetTypeInfoCount,p,a)
106 #define IWebBrowser_GetTypeInfo(p,a,b,c)       ICOM_CALL3 (GetTypeInfo,p,a,b,c)
107 #define IWebBrowser_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
108 #define IWebBrowser_Invoke(p,a,b,c,d,e,f,g,h)  ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
109 /*** IWebBrowser methods ***/
110 #define IWebBrowser_GoBack(p,a)      ICOM_CALL1(GoBack,p,a)
111 #define IWebBrowser_GoForward(p,a)      ICOM_CALL1(GoForward,p,a)
112 #define IWebBrowser_GoHome(p,a)      ICOM_CALL1(GoHome,p,a)
113 #define IWebBrowser_GoSearch(p,a)      ICOM_CALL1(GoSearch,p,a)
114 #define IWebBrowser_Navigate(p,a)      ICOM_CALL1(Navigate,p,a)
115 #define IWebBrowser_Refresh(p,a)      ICOM_CALL1(Refresh,p,a)
116 #define IWebBrowser_Refresh2(p,a)      ICOM_CALL1(Refresh2,p,a)
117 #define IWebBrowser_Stop(p,a)      ICOM_CALL1(Stop,p,a)
118 #define IWebBrowser_get_Application(p,a)      ICOM_CALL1(get_Application,p,a)
119 #define IWebBrowser_get_Parent(p,a)      ICOM_CALL1(get_Parent,p,a)
120 #define IWebBrowser_get_Container(p,a)      ICOM_CALL1(get_Container,p,a)
121 #define IWebBrowser_get_Document(p,a)      ICOM_CALL1(get_Document,p,a)
122 #define IWebBrowser_get_TopLevelContainer(p,a)      ICOM_CALL1(get_TopLevelContainer,p,a)
123 #define IWebBrowser_get_Type(p,a)      ICOM_CALL1(get_Type,p,a)
124 #define IWebBrowser_get_Left(p,a)      ICOM_CALL1(get_Left,p,a)
125 #define IWebBrowser_put_Left(p,a)      ICOM_CALL1(put_Left,p,a)
126 #define IWebBrowser_get_Top(p,a)      ICOM_CALL1(get_Top,p,a)
127 #define IWebBrowser_put_Top(p,a)      ICOM_CALL1(put_Top,p,a)
128 #define IWebBrowser_get_Width(p,a)      ICOM_CALL1(get_Width,p,a)
129 #define IWebBrowser_put_Width(p,a)      ICOM_CALL1(put_Width,p,a)
130 #define IWebBrowser_get_Height(p,a)      ICOM_CALL1(get_Height,p,a)
131 #define IWebBrowser_put_Height(p,a)      ICOM_CALL1(put_Height,p,a)
132 #define IWebBrowser_get_LocationName(p,a)      ICOM_CALL1(get_LocationName,p,a)
133 #define IWebBrowser_get_LocationURL(p,a)      ICOM_CALL1(get_LocationURL,p,a)
134 #define IWebBrowser_get_Busy(p,a)      ICOM_CALL1(get_Busy,p,a)
135
136 #define ICOM_INTERFACE IWebBrowserApp
137 #define IWebBrowserApp_METHODS \
138     ICOM_METHOD(HRESULT,Quit) \
139     ICOM_METHOD2(HRESULT,ClientToWindow,int*,pcx,int*,pcy) \
140     ICOM_METHOD2(HRESULT,PutProperty,BSTR,szProperty,VARIANT,vtValue) \
141     ICOM_METHOD2(HRESULT,GetProperty,BSTR,szProperty,VARIANT*,pvtValue) \
142     ICOM_METHOD1(HRESULT,get_Name,BSTR*,Name) \
143     ICOM_METHOD1(HRESULT,get_HWND,long*,pHWND) \
144     ICOM_METHOD1(HRESULT,get_FullName,BSTR*,FullName) \
145     ICOM_METHOD1(HRESULT,get_Path,BSTR*,Path) \
146     ICOM_METHOD1(HRESULT,get_Visible,VARIANT_BOOL*,pBool) \
147     ICOM_METHOD1(HRESULT,put_Visible,VARIANT_BOOL,Value) \
148     ICOM_METHOD1(HRESULT,get_StatusBar,VARIANT_BOOL*,pBool) \
149     ICOM_METHOD1(HRESULT,put_StatusBar,VARIANT_BOOL,Value) \
150     ICOM_METHOD1(HRESULT,get_StatusText,BSTR*,StatusText) \
151     ICOM_METHOD1(HRESULT,put_StatusText,BSTR,StatusText) \
152     ICOM_METHOD1(HRESULT,get_ToolBar,int*,Value) \
153     ICOM_METHOD1(HRESULT,put_ToolBar,int,Value) \
154     ICOM_METHOD1(HRESULT,get_MenuBar,VARIANT_BOOL*,Value) \
155     ICOM_METHOD1(HRESULT,put_MenuBar,VARIANT_BOOL,Value) \
156     ICOM_METHOD1(HRESULT,get_FullScreen,VARIANT_BOOL*,pbFullScreen) \
157     ICOM_METHOD1(HRESULT,put_FullScreen,VARIANT_BOOL,bFullScreen)
158 #define IWebBrowserApp_IMETHODS \
159     IDispatch_METHODS \
160     IWebBrowser_METHODS \
161     IWebBrowserApp_METHODS
162 ICOM_DEFINE(IWebBrowserApp,IWebBrowser)
163 #undef ICOM_INTERFACE
164
165 /*** IUnknown methods ***/
166 #define IWebBrowserApp_QueryInterface(p,a,b)      ICOM_CALL2(QueryInterface,p,a,b)
167 #define IWebBrowserApp_AddRef(p)                  ICOM_CALL (AddRef,p)
168 #define IWebBrowserApp_Release(p)                 ICOM_CALL (Release,p)
169 /*** IDispatch methods ***/
170 #define IWebBrowserApp_GetTypeInfoCount(p,a)      ICOM_CALL1 (GetTypeInfoCount,p,a)
171 #define IWebBrowserApp_GetTypeInfo(p,a,b,c)       ICOM_CALL3 (GetTypeInfo,p,a,b,c)
172 #define IWebBrowserApp_GetIDsOfNames(p,a,b,c,d,e) ICOM_CALL5 (GetIDsOfNames,p,a,b,c,d,e)
173 #define IWebBrowserApp_Invoke(p,a,b,c,d,e,f,g,h)  ICOM_CALL8 (Invoke,p,a,b,c,d,e,f,g,h)
174 /*** IWebBrowser methods ***/
175 #define IWebBrowserApp_GoBack(p,a)                ICOM_CALL1(GoBack,p,a)
176 #define IWebBrowserApp_GoForward(p,a)             ICOM_CALL1(GoForward,p,a)
177 #define IWebBrowserApp_GoHome(p,a)                ICOM_CALL1(GoHome,p,a)
178 #define IWebBrowserApp_GoSearch(p,a)              ICOM_CALL1(GoSearch,p,a)
179 #define IWebBrowserApp_Navigate(p,a)              ICOM_CALL1(Navigate,p,a)
180 #define IWebBrowserApp_Refresh(p,a)               ICOM_CALL1(Refresh,p,a)
181 #define IWebBrowserApp_Refresh2(p,a)              ICOM_CALL1(Refresh2,p,a)
182 #define IWebBrowserApp_Stop(p,a)                  ICOM_CALL1(Stop,p,a)
183 #define IWebBrowserApp_get_Application(p,a)       ICOM_CALL1(get_Application,p,a)
184 #define IWebBrowserApp_get_Parent(p,a)            ICOM_CALL1(get_Parent,p,a)
185 #define IWebBrowserApp_get_Container(p,a)         ICOM_CALL1(get_Container,p,a)
186 #define IWebBrowserApp_get_Document(p,a)          ICOM_CALL1(get_Document,p,a)
187 #define IWebBrowserApp_get_TopLevelContainer(p,a) ICOM_CALL1(get_TopLevelContainer,p,a)
188 #define IWebBrowserApp_get_Type(p,a)              ICOM_CALL1(get_Type,p,a)
189 #define IWebBrowserApp_get_Left(p,a)              ICOM_CALL1(get_Left,p,a)
190 #define IWebBrowserApp_put_Left(p,a)              ICOM_CALL1(put_Left,p,a)
191 #define IWebBrowserApp_get_Top(p,a)               ICOM_CALL1(get_Top,p,a)
192 #define IWebBrowserApp_put_Top(p,a)               ICOM_CALL1(put_Top,p,a)
193 #define IWebBrowserApp_get_Width(p,a)             ICOM_CALL1(get_Width,p,a)
194 #define IWebBrowserApp_put_Width(p,a)             ICOM_CALL1(put_Width,p,a)
195 #define IWebBrowserApp_get_Height(p,a)            ICOM_CALL1(get_Height,p,a)
196 #define IWebBrowserApp_put_Height(p,a)            ICOM_CALL1(put_Height,p,a)
197 #define IWebBrowserApp_get_LocationName(p,a)      ICOM_CALL1(get_LocationName,p,a)
198 #define IWebBrowserApp_get_LocationURL(p,a)       ICOM_CALL1(get_LocationURL,p,a)
199 #define IWebBrowserApp_get_Busy(p,a)              ICOM_CALL1(get_Busy,p,a)
200 /*** IWebBrowserApp methods ***/
201 #define IWebBrowserApp_Quit(p)                    ICOM_CALL(Quit,p,a)
202 #define IWebBrowserApp_ClientToWindow(p,a,b)      ICOM_CALL2(ClientToWindow,p,a,b)
203 #define IWebBrowserApp_PutProperty(p,a,b)         ICOM_CALL2(PutProperty,p,a,b)
204 #define IWebBrowserApp_GetProperty(p,a,b)         ICOM_CALL2(GetProperty,p,a,b)
205 #define IWebBrowserApp_get_Name(p,a)              ICOM_CALL1(get_Name,p,a)
206 #define IWebBrowserApp_get_HWND(p,a)              ICOM_CALL1(get_HWND,p,a)
207 #define IWebBrowserApp_get_FullName(p,a)          ICOM_CALL1(get_FullName,p,a)
208 #define IWebBrowserApp_get_Path(p,a)              ICOM_CALL1(get_Path,p,a)
209 #define IWebBrowserApp_get_Visible(p,a)           ICOM_CALL1(get_Visible,p,a)
210 #define IWebBrowserApp_put_Visible(p,a)           ICOM_CALL1(put_Visible,p,a)
211 #define IWebBrowserApp_get_StatusBar(p,a)         ICOM_CALL1(get_StatusBar,p,a)
212 #define IWebBrowserApp_put_StatusBar(p,a)         ICOM_CALL1(put_StatusBar,p,a)
213 #define IWebBrowserApp_get_StatusText(p,a)        ICOM_CALL1(get_StatusText,p,a)
214 #define IWebBrowserApp_put_StatusText(p,a)        ICOM_CALL1(put_StatusText,p,a)
215 #define IWebBrowserApp_get_ToolBar(p,a)           ICOM_CALL1(get_ToolBar,p,a)
216 #define IWebBrowserApp_put_ToolBar(p,a)           ICOM_CALL1(put_ToolBar,p,a)
217 #define IWebBrowserApp_get_MenuBar(p,a)           ICOM_CALL1(get_MenuBar,p,a)
218 #define IWebBrowserApp_put_MenuBar(p,a)           ICOM_CALL1(put_MenuBar,p,a)
219 #define IWebBrowserApp_get_FullScreen(p,a)        ICOM_CALL1(get_FullScreen,p,a)
220 #define IWebBrowserApp_put_FullScreen(p,a)        ICOM_CALL1(put_FullScreen,p,a)
221
222 #ifdef __cplusplus
223 } /* extern "C" */
224 #endif /* defined(__cplusplus) */
225
226 #endif /* __WINE_WINE_OBJ_WEBBROWSER_H */