mshtml: HTMLWindow_item code clean up.
[wine] / dlls / mshtml / pluginhost.h
1 /*
2  * Copyright 2010 Jacek Caban for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 typedef struct HTMLPluginContainer HTMLPluginContainer;
20
21 typedef struct {
22     IOleClientSite       IOleClientSite_iface;
23     IAdviseSinkEx        IAdviseSinkEx_iface;
24     IPropertyNotifySink  IPropertyNotifySink_iface;
25     IDispatch            IDispatch_iface;
26     IOleInPlaceSiteEx    IOleInPlaceSiteEx_iface;
27     IOleControlSite      IOleControlSite_iface;
28     IBindHost            IBindHost_iface;
29     IServiceProvider     IServiceProvider_iface;
30
31     LONG ref;
32
33     IUnknown *plugin_unk;
34     IOleInPlaceObject *ip_object;
35     CLSID clsid;
36
37     IDispatch *disp;
38
39     HWND hwnd;
40     RECT rect;
41     BOOL ui_active;
42
43     HTMLDocumentNode *doc;
44     struct list entry;
45
46     HTMLPluginContainer *element;
47 } PluginHost;
48
49 struct HTMLPluginContainer {
50     HTMLElement element;
51
52     PluginHost *plugin_host;
53
54     DISPID *props;
55     DWORD props_size;
56     DWORD props_len;
57 };
58
59 extern const IID IID_HTMLPluginContainer DECLSPEC_HIDDEN;
60
61 HRESULT create_plugin_host(HTMLDocumentNode*,nsIDOMElement*,IUnknown*,const CLSID*,PluginHost**) DECLSPEC_HIDDEN;
62 void update_plugin_window(PluginHost*,HWND,const RECT*) DECLSPEC_HIDDEN;
63 void detach_plugin_host(PluginHost*) DECLSPEC_HIDDEN;
64
65 HRESULT create_param_prop_bag(nsIDOMHTMLElement*,IPropertyBag**) DECLSPEC_HIDDEN;
66
67 HRESULT create_ip_window(IOleInPlaceUIWindow**) DECLSPEC_HIDDEN;
68 HRESULT create_ip_frame(IOleInPlaceFrame**) DECLSPEC_HIDDEN;
69
70 HRESULT get_plugin_disp(HTMLPluginContainer*,IDispatch**) DECLSPEC_HIDDEN;
71 HRESULT get_plugin_dispid(HTMLPluginContainer*,WCHAR*,DISPID*) DECLSPEC_HIDDEN;
72 HRESULT invoke_plugin_prop(HTMLPluginContainer*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*) DECLSPEC_HIDDEN;