atl80: Added AtlComModuleRegisterServer implementation (based on AtlModuleRegisterSer...
[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 typedef struct PHEventSink PHEventSink;
21
22 typedef struct {
23     IOleClientSite       IOleClientSite_iface;
24     IAdviseSinkEx        IAdviseSinkEx_iface;
25     IPropertyNotifySink  IPropertyNotifySink_iface;
26     IDispatch            IDispatch_iface;
27     IOleInPlaceSiteEx    IOleInPlaceSiteEx_iface;
28     IOleControlSite      IOleControlSite_iface;
29     IBindHost            IBindHost_iface;
30     IServiceProvider     IServiceProvider_iface;
31
32     LONG ref;
33
34     IUnknown *plugin_unk;
35     IOleInPlaceObject *ip_object;
36     CLSID clsid;
37
38     IDispatch *disp;
39
40     HWND hwnd;
41     RECT rect;
42     BOOL ui_active;
43
44     HTMLDocumentNode *doc;
45     struct list entry;
46
47     PHEventSink *sink;
48     HTMLPluginContainer *element;
49 } PluginHost;
50
51 struct HTMLPluginContainer {
52     HTMLElement element;
53
54     PluginHost *plugin_host;
55
56     DISPID *props;
57     DWORD props_size;
58     DWORD props_len;
59 };
60
61 extern const IID IID_HTMLPluginContainer DECLSPEC_HIDDEN;
62
63 HRESULT create_plugin_host(HTMLDocumentNode*,nsIDOMElement*,IUnknown*,const CLSID*,PluginHost**) DECLSPEC_HIDDEN;
64 void update_plugin_window(PluginHost*,HWND,const RECT*) DECLSPEC_HIDDEN;
65 void detach_plugin_host(PluginHost*) DECLSPEC_HIDDEN;
66
67 HRESULT create_param_prop_bag(nsIDOMHTMLElement*,IPropertyBag**) DECLSPEC_HIDDEN;
68
69 HRESULT create_ip_window(IOleInPlaceUIWindow**) DECLSPEC_HIDDEN;
70 HRESULT create_ip_frame(IOleInPlaceFrame**) DECLSPEC_HIDDEN;
71
72 HRESULT get_plugin_disp(HTMLPluginContainer*,IDispatch**) DECLSPEC_HIDDEN;
73 HRESULT get_plugin_dispid(HTMLPluginContainer*,WCHAR*,DISPID*) DECLSPEC_HIDDEN;
74 HRESULT invoke_plugin_prop(HTMLPluginContainer*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*) DECLSPEC_HIDDEN;
75 void notif_container_change(HTMLPluginContainer*,DISPID);
76 void bind_activex_event(HTMLDocumentNode*,HTMLPluginContainer*,WCHAR*,IDispatch*) DECLSPEC_HIDDEN;