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