2005-03-31 12:08:02 +02:00
|
|
|
/*
|
2009-09-16 22:05:24 +02:00
|
|
|
* Copyright 2005-2009 Jacek Caban for CodeWeavers
|
2005-03-31 12:08:02 +02:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-03-31 12:08:02 +02:00
|
|
|
*/
|
|
|
|
|
2007-10-17 15:16:21 +02:00
|
|
|
#include "wingdi.h"
|
2005-08-11 12:30:30 +02:00
|
|
|
#include "docobj.h"
|
2009-11-20 00:00:41 +01:00
|
|
|
#include "comcat.h"
|
2005-08-11 12:30:30 +02:00
|
|
|
#include "mshtml.h"
|
|
|
|
#include "mshtmhst.h"
|
2005-08-27 11:25:56 +02:00
|
|
|
#include "hlink.h"
|
2009-04-15 19:58:05 +02:00
|
|
|
#include "perhist.h"
|
2008-04-17 02:31:43 +02:00
|
|
|
#include "dispex.h"
|
2011-01-19 21:31:43 +01:00
|
|
|
#include "objsafe.h"
|
2005-08-11 12:30:30 +02:00
|
|
|
|
2006-12-08 12:38:19 +01:00
|
|
|
#include "wine/list.h"
|
2007-12-31 01:32:48 +01:00
|
|
|
#include "wine/unicode.h"
|
2006-12-08 12:38:19 +01:00
|
|
|
|
2005-08-11 12:30:30 +02:00
|
|
|
#ifdef INIT_GUID
|
|
|
|
#include "initguid.h"
|
|
|
|
#endif
|
|
|
|
|
2005-08-01 12:59:45 +02:00
|
|
|
#include "nsiface.h"
|
|
|
|
|
2010-10-06 21:35:22 +02:00
|
|
|
#define NS_ERROR_GENERATE_FAILURE(module,code) \
|
|
|
|
((nsresult) (((PRUint32)(1<<31)) | ((PRUint32)(module+0x45)<<16) | ((PRUint32)(code))))
|
|
|
|
|
2005-08-01 12:59:45 +02:00
|
|
|
#define NS_OK ((nsresult)0x00000000L)
|
2005-12-09 11:51:02 +01:00
|
|
|
#define NS_ERROR_FAILURE ((nsresult)0x80004005L)
|
2010-08-18 13:37:32 +02:00
|
|
|
#define NS_ERROR_OUT_OF_MEMORY ((nsresult)0x8007000EL)
|
2005-08-01 12:59:45 +02:00
|
|
|
#define NS_NOINTERFACE ((nsresult)0x80004002L)
|
|
|
|
#define NS_ERROR_NOT_IMPLEMENTED ((nsresult)0x80004001L)
|
2010-04-03 00:31:42 +02:00
|
|
|
#define NS_ERROR_NOT_AVAILABLE ((nsresult)0x80040111L)
|
2005-08-25 21:24:58 +02:00
|
|
|
#define NS_ERROR_INVALID_ARG ((nsresult)0x80070057L)
|
2006-02-09 12:19:33 +01:00
|
|
|
#define NS_ERROR_UNEXPECTED ((nsresult)0x8000ffffL)
|
2010-10-06 21:35:22 +02:00
|
|
|
|
|
|
|
#define NS_ERROR_MODULE_NETWORK 6
|
|
|
|
|
|
|
|
#define NS_BINDING_ABORTED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 2)
|
|
|
|
#define NS_ERROR_UNKNOWN_PROTOCOL NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_NETWORK, 18)
|
2005-08-01 12:59:45 +02:00
|
|
|
|
|
|
|
#define NS_FAILED(res) ((res) & 0x80000000)
|
|
|
|
#define NS_SUCCEEDED(res) (!NS_FAILED(res))
|
|
|
|
|
2005-08-25 21:24:58 +02:00
|
|
|
#define NSAPI WINAPI
|
|
|
|
|
2007-08-17 02:38:00 +02:00
|
|
|
#define MSHTML_E_NODOC 0x800a025c
|
|
|
|
|
2006-03-05 20:38:30 +01:00
|
|
|
typedef struct HTMLDOMNode HTMLDOMNode;
|
2006-04-28 20:01:07 +02:00
|
|
|
typedef struct ConnectionPoint ConnectionPoint;
|
2006-06-03 00:37:58 +02:00
|
|
|
typedef struct BSCallback BSCallback;
|
2008-04-18 20:16:35 +02:00
|
|
|
typedef struct event_target_t event_target_t;
|
2005-08-01 12:59:45 +02:00
|
|
|
|
2010-11-08 12:49:07 +01:00
|
|
|
#define TID_LIST \
|
|
|
|
XIID(NULL) \
|
|
|
|
XDIID(DispCEventObj) \
|
|
|
|
XDIID(DispCPlugins) \
|
|
|
|
XDIID(DispDOMChildrenCollection) \
|
|
|
|
XDIID(DispHTMLAnchorElement) \
|
|
|
|
XDIID(DispHTMLBody) \
|
|
|
|
XDIID(DispHTMLCommentElement) \
|
|
|
|
XDIID(DispHTMLCurrentStyle) \
|
|
|
|
XDIID(DispHTMLDocument) \
|
|
|
|
XDIID(DispHTMLDOMTextNode) \
|
|
|
|
XDIID(DispHTMLElementCollection) \
|
|
|
|
XDIID(DispHTMLEmbed) \
|
|
|
|
XDIID(DispHTMLFormElement) \
|
|
|
|
XDIID(DispHTMLGenericElement) \
|
|
|
|
XDIID(DispHTMLFrameElement) \
|
|
|
|
XDIID(DispHTMLIFrame) \
|
|
|
|
XDIID(DispHTMLImg) \
|
|
|
|
XDIID(DispHTMLInputElement) \
|
|
|
|
XDIID(DispHTMLLocation) \
|
|
|
|
XDIID(DispHTMLNavigator) \
|
|
|
|
XDIID(DispHTMLObjectElement) \
|
|
|
|
XDIID(DispHTMLOptionElement) \
|
|
|
|
XDIID(DispHTMLScreen) \
|
|
|
|
XDIID(DispHTMLScriptElement) \
|
|
|
|
XDIID(DispHTMLSelectElement) \
|
|
|
|
XDIID(DispHTMLStyle) \
|
2010-11-12 12:31:24 +01:00
|
|
|
XDIID(DispHTMLStyleElement) \
|
2010-11-08 12:49:07 +01:00
|
|
|
XDIID(DispHTMLStyleSheetsCollection) \
|
|
|
|
XDIID(DispHTMLTable) \
|
|
|
|
XDIID(DispHTMLTableRow) \
|
|
|
|
XDIID(DispHTMLTextAreaElement) \
|
|
|
|
XDIID(DispHTMLUnknownElement) \
|
|
|
|
XDIID(DispHTMLWindow2) \
|
|
|
|
XDIID(HTMLDocumentEvents) \
|
|
|
|
XIID(IHTMLAnchorElement) \
|
|
|
|
XIID(IHTMLBodyElement) \
|
|
|
|
XIID(IHTMLBodyElement2) \
|
|
|
|
XIID(IHTMLCommentElement) \
|
|
|
|
XIID(IHTMLCurrentStyle) \
|
|
|
|
XIID(IHTMLCurrentStyle2) \
|
|
|
|
XIID(IHTMLCurrentStyle3) \
|
|
|
|
XIID(IHTMLCurrentStyle4) \
|
|
|
|
XIID(IHTMLDocument2) \
|
|
|
|
XIID(IHTMLDocument3) \
|
|
|
|
XIID(IHTMLDocument4) \
|
|
|
|
XIID(IHTMLDocument5) \
|
|
|
|
XIID(IHTMLDOMChildrenCollection) \
|
|
|
|
XIID(IHTMLDOMNode) \
|
|
|
|
XIID(IHTMLDOMNode2) \
|
|
|
|
XIID(IHTMLDOMTextNode) \
|
|
|
|
XIID(IHTMLElement) \
|
|
|
|
XIID(IHTMLElement2) \
|
|
|
|
XIID(IHTMLElement3) \
|
|
|
|
XIID(IHTMLElement4) \
|
|
|
|
XIID(IHTMLElementCollection) \
|
|
|
|
XIID(IHTMLEmbedElement) \
|
|
|
|
XIID(IHTMLEventObj) \
|
|
|
|
XIID(IHTMLFiltersCollection) \
|
|
|
|
XIID(IHTMLFormElement) \
|
|
|
|
XIID(IHTMLFrameBase) \
|
|
|
|
XIID(IHTMLFrameBase2) \
|
|
|
|
XIID(IHTMLFrameElement3) \
|
|
|
|
XIID(IHTMLGenericElement) \
|
|
|
|
XIID(IHTMLIFrameElement) \
|
|
|
|
XIID(IHTMLImageElementFactory) \
|
|
|
|
XIID(IHTMLImgElement) \
|
|
|
|
XIID(IHTMLInputElement) \
|
|
|
|
XIID(IHTMLLocation) \
|
|
|
|
XIID(IHTMLObjectElement) \
|
|
|
|
XIID(IHTMLOptionElement) \
|
|
|
|
XIID(IHTMLPluginsCollection) \
|
|
|
|
XIID(IHTMLRect) \
|
|
|
|
XIID(IHTMLScreen) \
|
|
|
|
XIID(IHTMLScriptElement) \
|
|
|
|
XIID(IHTMLSelectElement) \
|
|
|
|
XIID(IHTMLStyle) \
|
|
|
|
XIID(IHTMLStyle2) \
|
|
|
|
XIID(IHTMLStyle3) \
|
|
|
|
XIID(IHTMLStyle4) \
|
2010-11-12 12:31:24 +01:00
|
|
|
XIID(IHTMLStyleElement) \
|
2010-11-08 12:49:07 +01:00
|
|
|
XIID(IHTMLStyleSheetsCollection) \
|
|
|
|
XIID(IHTMLTable) \
|
|
|
|
XIID(IHTMLTableRow) \
|
|
|
|
XIID(IHTMLTextAreaElement) \
|
|
|
|
XIID(IHTMLTextContainer) \
|
|
|
|
XIID(IHTMLUniqueName) \
|
|
|
|
XIID(IHTMLWindow2) \
|
|
|
|
XIID(IHTMLWindow3) \
|
|
|
|
XIID(IHTMLWindow4) \
|
|
|
|
XIID(IOmNavigator)
|
|
|
|
|
2008-04-17 02:32:18 +02:00
|
|
|
typedef enum {
|
2010-11-08 12:49:07 +01:00
|
|
|
#define XIID(iface) iface ## _tid,
|
|
|
|
#define XDIID(iface) iface ## _tid,
|
|
|
|
TID_LIST
|
|
|
|
#undef XIID
|
|
|
|
#undef XDIID
|
2008-04-17 02:32:18 +02:00
|
|
|
LAST_tid
|
|
|
|
} tid_t;
|
|
|
|
|
2008-04-19 12:55:24 +02:00
|
|
|
typedef struct dispex_data_t dispex_data_t;
|
2008-06-18 00:10:26 +02:00
|
|
|
typedef struct dispex_dynamic_data_t dispex_dynamic_data_t;
|
2008-04-19 12:55:24 +02:00
|
|
|
|
2008-04-29 01:38:09 +02:00
|
|
|
#define MSHTML_DISPID_CUSTOM_MIN 0x60000000
|
|
|
|
#define MSHTML_DISPID_CUSTOM_MAX 0x6fffffff
|
2010-04-29 18:29:23 +02:00
|
|
|
#define MSHTML_CUSTOM_DISPID_CNT (MSHTML_DISPID_CUSTOM_MAX-MSHTML_DISPID_CUSTOM_MIN)
|
2008-04-29 01:38:09 +02:00
|
|
|
|
2010-12-27 18:34:39 +01:00
|
|
|
typedef struct DispatchEx DispatchEx;
|
|
|
|
|
2008-04-29 01:38:09 +02:00
|
|
|
typedef struct {
|
2010-12-27 18:34:39 +01:00
|
|
|
HRESULT (*value)(DispatchEx*,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
|
|
|
|
HRESULT (*get_dispid)(DispatchEx*,BSTR,DWORD,DISPID*);
|
|
|
|
HRESULT (*invoke)(DispatchEx*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
|
2008-04-29 01:38:09 +02:00
|
|
|
} dispex_static_data_vtbl_t;
|
|
|
|
|
2008-04-19 12:55:24 +02:00
|
|
|
typedef struct {
|
2008-04-29 01:38:09 +02:00
|
|
|
const dispex_static_data_vtbl_t *vtbl;
|
2008-04-19 12:55:24 +02:00
|
|
|
const tid_t disp_tid;
|
|
|
|
dispex_data_t *data;
|
2008-05-06 16:04:58 +02:00
|
|
|
const tid_t* const iface_tids;
|
2008-04-19 12:55:24 +02:00
|
|
|
} dispex_static_data_t;
|
|
|
|
|
2010-12-27 18:34:39 +01:00
|
|
|
struct DispatchEx {
|
2010-12-31 11:07:33 +01:00
|
|
|
IDispatchEx IDispatchEx_iface;
|
2008-04-17 02:31:43 +02:00
|
|
|
|
|
|
|
IUnknown *outer;
|
2008-04-19 12:55:24 +02:00
|
|
|
|
|
|
|
dispex_static_data_t *data;
|
2008-06-18 00:10:26 +02:00
|
|
|
dispex_dynamic_data_t *dynamic_data;
|
2010-12-27 18:34:39 +01:00
|
|
|
};
|
2008-04-17 02:31:43 +02:00
|
|
|
|
2008-04-19 12:55:24 +02:00
|
|
|
void init_dispex(DispatchEx*,IUnknown*,dispex_static_data_t*);
|
2009-08-31 20:47:55 +02:00
|
|
|
void release_dispex(DispatchEx*);
|
2008-06-30 21:38:23 +02:00
|
|
|
BOOL dispex_query_interface(DispatchEx*,REFIID,void**);
|
2008-10-09 22:30:51 +02:00
|
|
|
HRESULT dispex_get_dprop_ref(DispatchEx*,const WCHAR*,BOOL,VARIANT**);
|
2009-11-23 19:28:43 +01:00
|
|
|
HRESULT get_dispids(tid_t,DWORD*,DISPID**);
|
2010-03-24 20:34:17 +01:00
|
|
|
HRESULT remove_prop(DispatchEx*,BSTR,VARIANT_BOOL*);
|
2008-04-17 02:31:43 +02:00
|
|
|
|
2010-02-21 21:08:39 +01:00
|
|
|
typedef struct HTMLWindow HTMLWindow;
|
2009-09-16 22:08:20 +02:00
|
|
|
typedef struct HTMLDocumentNode HTMLDocumentNode;
|
|
|
|
typedef struct HTMLDocumentObj HTMLDocumentObj;
|
2009-11-01 19:19:19 +01:00
|
|
|
typedef struct HTMLFrameBase HTMLFrameBase;
|
2010-02-21 21:09:11 +01:00
|
|
|
typedef struct NSContainer NSContainer;
|
2009-09-16 22:05:24 +02:00
|
|
|
|
2009-09-09 21:30:41 +02:00
|
|
|
typedef enum {
|
|
|
|
SCRIPTMODE_GECKO,
|
|
|
|
SCRIPTMODE_ACTIVESCRIPT
|
|
|
|
} SCRIPTMODE;
|
|
|
|
|
2009-09-09 21:31:32 +02:00
|
|
|
typedef struct ScriptHost ScriptHost;
|
|
|
|
|
2009-11-01 19:21:57 +01:00
|
|
|
typedef enum {
|
|
|
|
GLOBAL_SCRIPTVAR,
|
|
|
|
GLOBAL_ELEMENTVAR
|
|
|
|
} global_prop_type_t;
|
|
|
|
|
2009-09-09 21:31:32 +02:00
|
|
|
typedef struct {
|
2009-11-01 19:21:57 +01:00
|
|
|
global_prop_type_t type;
|
2009-09-09 21:31:32 +02:00
|
|
|
WCHAR *name;
|
|
|
|
ScriptHost *script_host;
|
|
|
|
DISPID id;
|
|
|
|
} global_prop_t;
|
|
|
|
|
2006-12-06 18:21:16 +01:00
|
|
|
typedef struct {
|
2011-01-03 01:04:25 +01:00
|
|
|
IHTMLOptionElementFactory IHTMLOptionElementFactory_iface;
|
2009-09-16 22:05:24 +02:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
HTMLWindow *window;
|
|
|
|
} HTMLOptionElementFactory;
|
|
|
|
|
2009-10-20 23:04:34 +02:00
|
|
|
typedef struct {
|
2009-10-20 23:05:03 +02:00
|
|
|
DispatchEx dispex;
|
2011-01-03 01:05:51 +01:00
|
|
|
IHTMLImageElementFactory IHTMLImageElementFactory_iface;
|
2009-10-20 23:04:34 +02:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
HTMLWindow *window;
|
|
|
|
} HTMLImageElementFactory;
|
|
|
|
|
2009-09-16 22:05:50 +02:00
|
|
|
struct HTMLLocation {
|
|
|
|
DispatchEx dispex;
|
2011-01-03 01:12:05 +01:00
|
|
|
IHTMLLocation IHTMLLocation_iface;
|
2009-09-16 22:05:50 +02:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
HTMLWindow *window;
|
|
|
|
};
|
|
|
|
|
2009-10-26 23:02:50 +01:00
|
|
|
typedef struct {
|
|
|
|
HTMLWindow *window;
|
|
|
|
LONG ref;
|
|
|
|
} windowref_t;
|
|
|
|
|
2010-02-21 21:07:43 +01:00
|
|
|
typedef struct nsChannelBSC nsChannelBSC;
|
|
|
|
|
2009-09-16 22:05:24 +02:00
|
|
|
struct HTMLWindow {
|
2008-04-19 18:41:25 +02:00
|
|
|
DispatchEx dispex;
|
2010-12-27 12:50:32 +01:00
|
|
|
IHTMLWindow2 IHTMLWindow2_iface;
|
2010-12-27 14:22:27 +01:00
|
|
|
IHTMLWindow3 IHTMLWindow3_iface;
|
|
|
|
IHTMLWindow4 IHTMLWindow4_iface;
|
|
|
|
IHTMLPrivateWindow IHTMLPrivateWindow_iface;
|
2010-12-31 11:03:45 +01:00
|
|
|
IDispatchEx IDispatchEx_iface;
|
2010-12-27 01:43:10 +01:00
|
|
|
IServiceProvider IServiceProvider_iface;
|
2006-12-06 18:21:16 +01:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
2009-10-26 23:02:50 +01:00
|
|
|
windowref_t *window_ref;
|
2009-10-26 23:05:37 +01:00
|
|
|
LONG task_magic;
|
2009-10-26 23:02:50 +01:00
|
|
|
|
2009-09-16 22:08:20 +02:00
|
|
|
HTMLDocumentNode *doc;
|
|
|
|
HTMLDocumentObj *doc_obj;
|
2006-12-06 18:21:16 +01:00
|
|
|
nsIDOMWindow *nswindow;
|
2009-10-21 21:30:20 +02:00
|
|
|
HTMLWindow *parent;
|
2009-11-01 19:19:19 +01:00
|
|
|
HTMLFrameBase *frame_element;
|
2009-11-01 19:25:13 +01:00
|
|
|
READYSTATE readystate;
|
2006-12-08 12:38:19 +01:00
|
|
|
|
2009-10-26 23:03:53 +01:00
|
|
|
nsChannelBSC *bscallback;
|
2009-10-26 23:04:28 +01:00
|
|
|
IMoniker *mon;
|
|
|
|
LPOLESTR url;
|
2009-10-26 23:03:53 +01:00
|
|
|
|
2008-04-21 00:48:18 +02:00
|
|
|
IHTMLEventObj *event;
|
|
|
|
|
2009-09-09 21:30:41 +02:00
|
|
|
SCRIPTMODE scriptmode;
|
|
|
|
struct list script_hosts;
|
|
|
|
|
2009-09-16 22:05:24 +02:00
|
|
|
HTMLOptionElementFactory *option_factory;
|
2009-10-20 23:04:34 +02:00
|
|
|
HTMLImageElementFactory *image_factory;
|
2009-09-16 22:05:50 +02:00
|
|
|
HTMLLocation *location;
|
2009-11-30 17:56:01 +01:00
|
|
|
IHTMLScreen *screen;
|
2009-09-16 22:05:24 +02:00
|
|
|
|
2009-09-09 21:31:32 +02:00
|
|
|
global_prop_t *global_props;
|
|
|
|
DWORD global_prop_cnt;
|
|
|
|
DWORD global_prop_size;
|
|
|
|
|
2009-10-21 21:30:20 +02:00
|
|
|
struct list children;
|
|
|
|
struct list sibling_entry;
|
2006-12-08 12:38:19 +01:00
|
|
|
struct list entry;
|
2009-09-16 22:05:24 +02:00
|
|
|
};
|
2006-12-06 18:21:16 +01:00
|
|
|
|
2006-06-30 23:44:04 +02:00
|
|
|
typedef enum {
|
|
|
|
UNKNOWN_USERMODE,
|
|
|
|
BROWSEMODE,
|
|
|
|
EDITMODE
|
|
|
|
} USERMODE;
|
|
|
|
|
2010-01-04 00:37:47 +01:00
|
|
|
typedef struct _cp_static_data_t {
|
2009-11-23 19:28:43 +01:00
|
|
|
tid_t tid;
|
2010-01-04 00:37:47 +01:00
|
|
|
void (*on_advise)(IUnknown*,struct _cp_static_data_t*);
|
2009-11-23 19:28:43 +01:00
|
|
|
DWORD id_cnt;
|
|
|
|
DISPID *ids;
|
|
|
|
} cp_static_data_t;
|
|
|
|
|
2009-11-23 19:28:17 +01:00
|
|
|
typedef struct ConnectionPointContainer {
|
2011-01-03 01:02:57 +01:00
|
|
|
IConnectionPointContainer IConnectionPointContainer_iface;
|
2007-06-29 02:49:27 +02:00
|
|
|
|
|
|
|
ConnectionPoint *cp_list;
|
|
|
|
IUnknown *outer;
|
2009-11-23 19:28:17 +01:00
|
|
|
struct ConnectionPointContainer *forward_container;
|
2007-06-29 02:49:27 +02:00
|
|
|
} ConnectionPointContainer;
|
|
|
|
|
2007-06-29 02:47:59 +02:00
|
|
|
struct ConnectionPoint {
|
2011-01-03 01:02:57 +01:00
|
|
|
IConnectionPoint IConnectionPoint_iface;
|
2007-06-29 02:47:59 +02:00
|
|
|
|
2010-01-04 00:37:09 +01:00
|
|
|
ConnectionPointContainer *container;
|
2007-06-29 02:47:59 +02:00
|
|
|
|
|
|
|
union {
|
|
|
|
IUnknown *unk;
|
|
|
|
IDispatch *disp;
|
|
|
|
IPropertyNotifySink *propnotif;
|
|
|
|
} *sinks;
|
|
|
|
DWORD sinks_size;
|
|
|
|
|
2007-12-04 13:36:27 +01:00
|
|
|
const IID *iid;
|
2009-11-23 19:28:43 +01:00
|
|
|
cp_static_data_t *data;
|
2007-06-29 02:48:50 +02:00
|
|
|
|
|
|
|
ConnectionPoint *next;
|
2007-06-29 02:47:59 +02:00
|
|
|
};
|
|
|
|
|
2006-08-03 02:36:15 +02:00
|
|
|
struct HTMLDocument {
|
2010-12-16 14:59:51 +01:00
|
|
|
IHTMLDocument2 IHTMLDocument2_iface;
|
2010-12-22 10:39:41 +01:00
|
|
|
IHTMLDocument3 IHTMLDocument3_iface;
|
2010-12-22 10:41:19 +01:00
|
|
|
IHTMLDocument4 IHTMLDocument4_iface;
|
2010-12-22 10:43:37 +01:00
|
|
|
IHTMLDocument5 IHTMLDocument5_iface;
|
2010-12-22 10:45:14 +01:00
|
|
|
IHTMLDocument6 IHTMLDocument6_iface;
|
2010-12-22 10:48:41 +01:00
|
|
|
IPersistMoniker IPersistMoniker_iface;
|
|
|
|
IPersistFile IPersistFile_iface;
|
|
|
|
IPersistHistory IPersistHistory_iface;
|
2010-12-23 02:12:25 +01:00
|
|
|
IMonikerProp IMonikerProp_iface;
|
2010-12-23 02:16:00 +01:00
|
|
|
IOleObject IOleObject_iface;
|
2010-12-23 02:17:39 +01:00
|
|
|
IOleDocument IOleDocument_iface;
|
2010-12-23 02:19:14 +01:00
|
|
|
IOleDocumentView IOleDocumentView_iface;
|
2010-12-23 02:20:05 +01:00
|
|
|
IOleInPlaceActiveObject IOleInPlaceActiveObject_iface;
|
2010-12-23 02:21:09 +01:00
|
|
|
IViewObjectEx IViewObjectEx_iface;
|
2010-12-23 02:22:21 +01:00
|
|
|
IOleInPlaceObjectWindowless IOleInPlaceObjectWindowless_iface;
|
2010-12-27 01:43:10 +01:00
|
|
|
IServiceProvider IServiceProvider_iface;
|
2010-12-27 01:44:54 +01:00
|
|
|
IOleCommandTarget IOleCommandTarget_iface;
|
2010-12-27 01:46:09 +01:00
|
|
|
IOleControl IOleControl_iface;
|
2010-12-27 01:47:29 +01:00
|
|
|
IHlinkTarget IHlinkTarget_iface;
|
2010-12-22 10:48:41 +01:00
|
|
|
IPersistStreamInit IPersistStreamInit_iface;
|
2010-12-31 11:02:05 +01:00
|
|
|
IDispatchEx IDispatchEx_iface;
|
2010-12-27 01:48:10 +01:00
|
|
|
ISupportErrorInfo ISupportErrorInfo_iface;
|
2010-12-27 01:49:48 +01:00
|
|
|
IObjectWithSite IObjectWithSite_iface;
|
|
|
|
IOleContainer IOleContainer_iface;
|
2011-01-19 21:31:43 +01:00
|
|
|
IObjectSafety IObjectSafety_iface;
|
2005-04-12 13:57:51 +02:00
|
|
|
|
2009-09-16 22:14:21 +02:00
|
|
|
IUnknown *unk_impl;
|
2009-09-16 22:14:38 +02:00
|
|
|
IDispatchEx *dispex;
|
2009-09-16 22:14:21 +02:00
|
|
|
|
2009-09-16 22:07:58 +02:00
|
|
|
HTMLDocumentObj *doc_obj;
|
|
|
|
HTMLDocumentNode *doc_node;
|
|
|
|
|
2006-12-06 18:21:16 +01:00
|
|
|
HTMLWindow *window;
|
2005-08-01 12:59:45 +02:00
|
|
|
|
2009-10-26 23:05:10 +01:00
|
|
|
LONG task_magic;
|
|
|
|
|
2007-06-29 02:49:27 +02:00
|
|
|
ConnectionPointContainer cp_container;
|
2007-06-29 02:47:59 +02:00
|
|
|
ConnectionPoint cp_htmldocevents;
|
|
|
|
ConnectionPoint cp_htmldocevents2;
|
|
|
|
ConnectionPoint cp_propnotif;
|
2009-12-28 20:09:16 +01:00
|
|
|
ConnectionPoint cp_dispatch;
|
2009-12-07 14:52:28 +01:00
|
|
|
|
|
|
|
IOleAdviseHolder *advise_holder;
|
2006-08-03 02:36:15 +02:00
|
|
|
};
|
2005-04-11 18:11:52 +02:00
|
|
|
|
2009-09-16 22:06:31 +02:00
|
|
|
static inline HRESULT htmldoc_query_interface(HTMLDocument *This, REFIID riid, void **ppv)
|
|
|
|
{
|
2009-09-16 22:14:21 +02:00
|
|
|
return IUnknown_QueryInterface(This->unk_impl, riid, ppv);
|
2009-09-16 22:06:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline ULONG htmldoc_addref(HTMLDocument *This)
|
|
|
|
{
|
2009-09-16 22:14:21 +02:00
|
|
|
return IUnknown_AddRef(This->unk_impl);
|
2009-09-16 22:06:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
static inline ULONG htmldoc_release(HTMLDocument *This)
|
|
|
|
{
|
2009-09-16 22:14:21 +02:00
|
|
|
return IUnknown_Release(This->unk_impl);
|
2009-09-16 22:06:31 +02:00
|
|
|
}
|
|
|
|
|
2009-09-16 22:07:58 +02:00
|
|
|
struct HTMLDocumentObj {
|
2009-09-16 22:06:31 +02:00
|
|
|
HTMLDocument basedoc;
|
2009-09-16 22:14:38 +02:00
|
|
|
DispatchEx dispex;
|
2011-01-03 01:10:03 +01:00
|
|
|
ICustomDoc ICustomDoc_iface;
|
2009-09-16 22:06:31 +02:00
|
|
|
|
|
|
|
LONG ref;
|
2009-09-16 22:09:17 +02:00
|
|
|
|
|
|
|
NSContainer *nscontainer;
|
2009-09-16 22:10:03 +02:00
|
|
|
|
|
|
|
IOleClientSite *client;
|
|
|
|
IDocHostUIHandler *hostui;
|
2010-11-29 00:18:01 +01:00
|
|
|
BOOL custom_hostui;
|
2009-09-16 22:10:03 +02:00
|
|
|
IOleInPlaceSite *ipsite;
|
|
|
|
IOleInPlaceFrame *frame;
|
|
|
|
IOleInPlaceUIWindow *ip_window;
|
2010-02-15 16:03:25 +01:00
|
|
|
IAdviseSink *view_sink;
|
2009-09-16 22:10:30 +02:00
|
|
|
|
2009-09-16 22:11:05 +02:00
|
|
|
DOCHOSTUIINFO hostinfo;
|
|
|
|
|
2009-09-16 22:10:30 +02:00
|
|
|
IOleUndoManager *undomgr;
|
2009-09-16 22:10:47 +02:00
|
|
|
|
|
|
|
HWND hwnd;
|
|
|
|
HWND tooltips_hwnd;
|
2009-09-16 22:11:26 +02:00
|
|
|
|
2009-12-07 14:54:33 +01:00
|
|
|
BOOL request_uiactivate;
|
2009-09-16 22:11:26 +02:00
|
|
|
BOOL in_place_active;
|
|
|
|
BOOL ui_active;
|
|
|
|
BOOL window_active;
|
2010-03-03 14:56:56 +01:00
|
|
|
BOOL hostui_setup;
|
2009-09-16 22:11:26 +02:00
|
|
|
BOOL container_locked;
|
|
|
|
BOOL focus;
|
2009-12-07 14:51:52 +01:00
|
|
|
INT download_state;
|
2009-09-16 22:12:06 +02:00
|
|
|
|
2009-09-16 22:12:25 +02:00
|
|
|
USERMODE usermode;
|
2009-09-16 22:12:56 +02:00
|
|
|
LPWSTR mime;
|
2009-09-16 22:12:25 +02:00
|
|
|
|
2009-09-16 22:13:13 +02:00
|
|
|
DWORD update;
|
2009-09-16 22:07:58 +02:00
|
|
|
};
|
2009-09-16 22:06:31 +02:00
|
|
|
|
2005-08-01 12:59:45 +02:00
|
|
|
struct NSContainer {
|
2010-12-27 23:27:55 +01:00
|
|
|
nsIWebBrowserChrome nsIWebBrowserChrome_iface;
|
2010-12-27 23:30:53 +01:00
|
|
|
nsIContextMenuListener nsIContextMenuListener_iface;
|
|
|
|
nsIURIContentListener nsIURIContentListener_iface;
|
|
|
|
nsIEmbeddingSiteWindow nsIEmbeddingSiteWindow_iface;
|
|
|
|
nsITooltipListener nsITooltipListener_iface;
|
|
|
|
nsIInterfaceRequestor nsIInterfaceRequestor_iface;
|
|
|
|
nsIWeakReference nsIWeakReference_iface;
|
|
|
|
nsISupportsWeakReference nsISupportsWeakReference_iface;
|
2005-08-25 21:24:58 +02:00
|
|
|
|
2005-08-01 12:59:45 +02:00
|
|
|
nsIWebBrowser *webbrowser;
|
|
|
|
nsIWebNavigation *navigation;
|
|
|
|
nsIBaseWindow *window;
|
2005-08-26 12:05:52 +02:00
|
|
|
nsIWebBrowserFocus *focus;
|
2005-08-01 12:59:45 +02:00
|
|
|
|
2007-09-12 11:41:36 +02:00
|
|
|
nsIEditor *editor;
|
2007-06-10 11:49:12 +02:00
|
|
|
nsIController *editor_controller;
|
|
|
|
|
2006-02-15 11:51:44 +01:00
|
|
|
LONG ref;
|
|
|
|
|
2006-03-01 22:04:51 +01:00
|
|
|
NSContainer *parent;
|
2009-09-16 22:09:17 +02:00
|
|
|
HTMLDocumentObj *doc;
|
2005-08-25 21:24:58 +02:00
|
|
|
|
2006-08-16 16:34:32 +02:00
|
|
|
nsIURIContentListener *content_listener;
|
|
|
|
|
2005-08-01 12:59:45 +02:00
|
|
|
HWND hwnd;
|
|
|
|
};
|
|
|
|
|
2010-02-21 21:05:15 +01:00
|
|
|
typedef struct nsWineURI nsWineURI;
|
|
|
|
|
|
|
|
HRESULT set_wine_url(nsWineURI*,LPCWSTR);
|
2010-02-21 21:05:59 +01:00
|
|
|
nsresult on_start_uri_open(NSContainer*,nsIURI*,PRBool*);
|
2010-02-21 21:05:15 +01:00
|
|
|
|
2010-08-03 21:40:20 +02:00
|
|
|
/* Keep sync with request_method_strings in nsio.c */
|
|
|
|
typedef enum {
|
|
|
|
METHOD_GET,
|
|
|
|
METHOD_PUT,
|
|
|
|
METHOD_POST
|
|
|
|
} REQUEST_METHOD;
|
|
|
|
|
2006-06-03 00:40:26 +02:00
|
|
|
typedef struct {
|
2010-12-30 01:43:11 +01:00
|
|
|
nsIHttpChannel nsIHttpChannel_iface;
|
2010-12-30 01:49:21 +01:00
|
|
|
nsIUploadChannel nsIUploadChannel_iface;
|
|
|
|
nsIHttpChannelInternal nsIHttpChannelInternal_iface;
|
2006-06-03 00:40:26 +02:00
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
2010-02-21 21:05:15 +01:00
|
|
|
nsWineURI *uri;
|
2006-06-03 00:40:26 +02:00
|
|
|
nsIInputStream *post_data_stream;
|
|
|
|
nsILoadGroup *load_group;
|
|
|
|
nsIInterfaceRequestor *notif_callback;
|
2008-12-18 14:08:31 +01:00
|
|
|
nsISupports *owner;
|
2006-06-03 00:40:26 +02:00
|
|
|
nsLoadFlags load_flags;
|
|
|
|
nsIURI *original_uri;
|
2010-08-18 13:37:08 +02:00
|
|
|
nsIURI *referrer;
|
2008-03-26 15:24:03 +01:00
|
|
|
char *content_type;
|
2007-04-12 21:25:08 +02:00
|
|
|
char *charset;
|
2009-08-11 19:15:07 +02:00
|
|
|
PRUint32 response_status;
|
2010-08-03 21:40:20 +02:00
|
|
|
REQUEST_METHOD request_method;
|
2010-04-03 00:31:45 +02:00
|
|
|
struct list response_headers;
|
2010-08-03 21:39:34 +02:00
|
|
|
struct list request_headers;
|
2009-12-01 22:50:19 +01:00
|
|
|
UINT url_scheme;
|
2006-06-03 00:40:26 +02:00
|
|
|
} nsChannel;
|
|
|
|
|
2010-08-03 21:38:37 +02:00
|
|
|
typedef struct {
|
2010-04-03 00:31:45 +02:00
|
|
|
struct list entry;
|
|
|
|
WCHAR *header;
|
|
|
|
WCHAR *data;
|
2010-08-03 21:37:00 +02:00
|
|
|
} http_header_t;
|
2010-04-03 00:31:45 +02:00
|
|
|
|
2010-08-03 21:38:37 +02:00
|
|
|
HRESULT set_http_header(struct list*,const WCHAR*,int,const WCHAR*,int);
|
|
|
|
|
2007-10-04 02:09:48 +02:00
|
|
|
typedef struct {
|
2007-10-04 02:10:36 +02:00
|
|
|
HRESULT (*qi)(HTMLDOMNode*,REFIID,void**);
|
2007-10-04 02:09:48 +02:00
|
|
|
void (*destructor)(HTMLDOMNode*);
|
2010-11-14 14:41:39 +01:00
|
|
|
HRESULT (*clone)(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
|
2009-09-08 22:29:39 +02:00
|
|
|
event_target_t **(*get_event_target)(HTMLDOMNode*);
|
2009-10-13 00:42:22 +02:00
|
|
|
HRESULT (*call_event)(HTMLDOMNode*,DWORD,BOOL*);
|
2008-10-09 22:26:41 +02:00
|
|
|
HRESULT (*put_disabled)(HTMLDOMNode*,VARIANT_BOOL);
|
|
|
|
HRESULT (*get_disabled)(HTMLDOMNode*,VARIANT_BOOL*);
|
2009-11-24 21:13:38 +01:00
|
|
|
HRESULT (*get_document)(HTMLDOMNode*,IDispatch**);
|
2009-11-30 17:58:59 +01:00
|
|
|
HRESULT (*get_readystate)(HTMLDOMNode*,BSTR*);
|
2009-12-01 21:04:17 +01:00
|
|
|
HRESULT (*get_dispid)(HTMLDOMNode*,BSTR,DWORD,DISPID*);
|
|
|
|
HRESULT (*invoke)(HTMLDOMNode*,DISPID,LCID,WORD,DISPPARAMS*,VARIANT*,EXCEPINFO*,IServiceProvider*);
|
2009-12-03 01:12:12 +01:00
|
|
|
HRESULT (*bind_to_tree)(HTMLDOMNode*);
|
2007-10-04 02:09:48 +02:00
|
|
|
} NodeImplVtbl;
|
|
|
|
|
2006-03-05 20:38:30 +01:00
|
|
|
struct HTMLDOMNode {
|
2008-04-23 16:45:52 +02:00
|
|
|
DispatchEx dispex;
|
2010-12-30 01:39:16 +01:00
|
|
|
IHTMLDOMNode IHTMLDOMNode_iface;
|
2010-12-30 01:40:18 +01:00
|
|
|
IHTMLDOMNode2 IHTMLDOMNode2_iface;
|
2007-10-04 02:09:48 +02:00
|
|
|
const NodeImplVtbl *vtbl;
|
2006-03-05 20:38:30 +01:00
|
|
|
|
2007-10-14 12:07:27 +02:00
|
|
|
LONG ref;
|
|
|
|
|
2006-03-05 20:38:30 +01:00
|
|
|
nsIDOMNode *nsnode;
|
2009-09-16 22:13:31 +02:00
|
|
|
HTMLDocumentNode *doc;
|
2008-04-18 20:16:35 +02:00
|
|
|
event_target_t *event_target;
|
2009-11-23 19:28:43 +01:00
|
|
|
ConnectionPointContainer *cp_container;
|
2006-03-05 20:38:30 +01:00
|
|
|
|
|
|
|
HTMLDOMNode *next;
|
|
|
|
};
|
|
|
|
|
2006-03-05 20:39:59 +01:00
|
|
|
typedef struct {
|
2007-09-12 23:39:17 +02:00
|
|
|
HTMLDOMNode node;
|
2007-12-04 13:37:21 +01:00
|
|
|
ConnectionPointContainer cp_container;
|
2007-09-12 23:39:17 +02:00
|
|
|
|
2010-12-30 01:24:59 +01:00
|
|
|
IHTMLElement IHTMLElement_iface;
|
2010-12-30 01:27:28 +01:00
|
|
|
IHTMLElement2 IHTMLElement2_iface;
|
2010-12-30 01:30:37 +01:00
|
|
|
IHTMLElement3 IHTMLElement3_iface;
|
2006-03-05 20:39:59 +01:00
|
|
|
|
|
|
|
nsIDOMHTMLElement *nselem;
|
|
|
|
} HTMLElement;
|
|
|
|
|
2010-01-28 02:09:02 +01:00
|
|
|
#define HTMLELEMENT_TIDS \
|
|
|
|
IHTMLDOMNode_tid, \
|
|
|
|
IHTMLDOMNode2_tid, \
|
|
|
|
IHTMLElement_tid, \
|
|
|
|
IHTMLElement2_tid, \
|
|
|
|
IHTMLElement3_tid, \
|
|
|
|
IHTMLElement4_tid
|
|
|
|
|
2006-04-28 19:57:28 +02:00
|
|
|
typedef struct {
|
2007-09-15 16:07:52 +02:00
|
|
|
HTMLElement element;
|
2006-04-28 19:57:28 +02:00
|
|
|
|
2011-01-03 01:08:23 +01:00
|
|
|
IHTMLTextContainer IHTMLTextContainer_iface;
|
2007-12-04 13:38:31 +01:00
|
|
|
|
|
|
|
ConnectionPoint cp;
|
2006-04-28 19:57:28 +02:00
|
|
|
} HTMLTextContainer;
|
|
|
|
|
2009-11-01 19:19:19 +01:00
|
|
|
struct HTMLFrameBase {
|
2009-11-01 19:17:17 +01:00
|
|
|
HTMLElement element;
|
|
|
|
|
2011-01-03 00:59:45 +01:00
|
|
|
IHTMLFrameBase IHTMLFrameBase_iface;
|
|
|
|
IHTMLFrameBase2 IHTMLFrameBase2_iface;
|
2009-11-01 19:18:38 +01:00
|
|
|
|
|
|
|
HTMLWindow *content_window;
|
2009-12-07 23:28:04 +01:00
|
|
|
|
|
|
|
nsIDOMHTMLFrameElement *nsframe;
|
|
|
|
nsIDOMHTMLIFrameElement *nsiframe;
|
2009-11-01 19:19:19 +01:00
|
|
|
};
|
2009-11-01 19:17:17 +01:00
|
|
|
|
2009-10-27 21:09:25 +01:00
|
|
|
typedef struct nsDocumentEventListener nsDocumentEventListener;
|
|
|
|
|
2009-09-16 22:13:49 +02:00
|
|
|
struct HTMLDocumentNode {
|
|
|
|
HTMLDOMNode node;
|
|
|
|
HTMLDocument basedoc;
|
|
|
|
|
2011-01-03 01:01:38 +01:00
|
|
|
IInternetHostSecurityManager IInternetHostSecurityManager_iface;
|
2009-09-29 00:11:28 +02:00
|
|
|
|
2011-01-03 01:01:38 +01:00
|
|
|
nsIDocumentObserver nsIDocumentObserver_iface;
|
2009-10-21 21:28:09 +02:00
|
|
|
|
2009-09-16 22:13:49 +02:00
|
|
|
LONG ref;
|
|
|
|
|
2009-10-21 21:27:42 +02:00
|
|
|
nsIDOMHTMLDocument *nsdoc;
|
2009-09-16 22:13:49 +02:00
|
|
|
HTMLDOMNode *nodes;
|
2009-10-11 21:10:47 +02:00
|
|
|
BOOL content_ready;
|
2010-01-04 00:39:31 +01:00
|
|
|
event_target_t *body_event_target;
|
2009-09-16 22:13:49 +02:00
|
|
|
|
2009-10-01 00:05:36 +02:00
|
|
|
IInternetSecurityManager *secmgr;
|
2009-11-20 00:00:41 +01:00
|
|
|
ICatInformation *catmgr;
|
2009-10-27 21:09:25 +01:00
|
|
|
nsDocumentEventListener *nsevent_listener;
|
2009-10-27 21:10:02 +01:00
|
|
|
BOOL *event_vector;
|
2009-10-01 00:05:36 +02:00
|
|
|
|
2010-08-18 13:39:04 +02:00
|
|
|
BOOL skip_mutation_notif;
|
2009-10-21 21:28:09 +02:00
|
|
|
|
2009-10-26 23:05:37 +01:00
|
|
|
struct list bindings;
|
2009-09-16 22:13:49 +02:00
|
|
|
struct list selection_list;
|
|
|
|
struct list range_list;
|
2010-12-09 16:27:51 +01:00
|
|
|
struct list plugin_hosts;
|
2009-09-16 22:13:49 +02:00
|
|
|
};
|
|
|
|
|
2005-03-31 12:08:02 +02:00
|
|
|
HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
|
2006-06-22 16:14:14 +02:00
|
|
|
HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**);
|
2009-09-16 22:07:58 +02:00
|
|
|
HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument*,HTMLDocumentObj*,HTMLWindow*,HTMLDocumentNode**);
|
2010-11-14 14:42:20 +01:00
|
|
|
HRESULT create_document_fragment(nsIDOMNode*,HTMLDocumentNode*,HTMLDocumentNode**);
|
2005-04-11 18:11:52 +02:00
|
|
|
|
2009-10-21 21:30:20 +02:00
|
|
|
HRESULT HTMLWindow_Create(HTMLDocumentObj*,nsIDOMWindow*,HTMLWindow*,HTMLWindow**);
|
2009-10-21 21:29:36 +02:00
|
|
|
void update_window_doc(HTMLWindow*);
|
2007-05-30 23:38:03 +02:00
|
|
|
HTMLWindow *nswindow_to_window(const nsIDOMWindow*);
|
2009-10-21 21:30:20 +02:00
|
|
|
nsIDOMWindow *get_nsdoc_window(nsIDOMDocument*);
|
2009-09-16 22:05:24 +02:00
|
|
|
HTMLOptionElementFactory *HTMLOptionElementFactory_Create(HTMLWindow*);
|
2009-10-20 23:04:34 +02:00
|
|
|
HTMLImageElementFactory *HTMLImageElementFactory_Create(HTMLWindow*);
|
2009-09-16 22:05:50 +02:00
|
|
|
HRESULT HTMLLocation_Create(HTMLWindow*,HTMLLocation**);
|
2008-04-07 12:34:24 +02:00
|
|
|
IOmNavigator *OmNavigator_Create(void);
|
2009-11-30 17:56:01 +01:00
|
|
|
HRESULT HTMLScreen_Create(IHTMLScreen**);
|
2006-12-06 18:21:16 +01:00
|
|
|
|
2005-12-12 11:51:43 +01:00
|
|
|
void HTMLDocument_HTMLDocument3_Init(HTMLDocument*);
|
2007-09-26 20:43:52 +02:00
|
|
|
void HTMLDocument_HTMLDocument5_Init(HTMLDocument*);
|
2005-04-11 18:11:52 +02:00
|
|
|
void HTMLDocument_Persist_Init(HTMLDocument*);
|
2006-06-20 19:02:48 +02:00
|
|
|
void HTMLDocument_OleCmd_Init(HTMLDocument*);
|
2005-04-12 13:57:51 +02:00
|
|
|
void HTMLDocument_OleObj_Init(HTMLDocument*);
|
2005-04-13 16:41:19 +02:00
|
|
|
void HTMLDocument_View_Init(HTMLDocument*);
|
2005-06-28 12:53:42 +02:00
|
|
|
void HTMLDocument_Window_Init(HTMLDocument*);
|
2005-07-03 13:22:23 +02:00
|
|
|
void HTMLDocument_Service_Init(HTMLDocument*);
|
2005-08-27 11:25:56 +02:00
|
|
|
void HTMLDocument_Hlink_Init(HTMLDocument*);
|
2006-06-25 15:49:39 +02:00
|
|
|
|
2009-09-29 00:11:28 +02:00
|
|
|
void HTMLDocumentNode_SecMgr_Init(HTMLDocumentNode*);
|
|
|
|
|
2008-10-06 16:49:00 +02:00
|
|
|
HRESULT HTMLCurrentStyle_Create(HTMLElement*,IHTMLCurrentStyle**);
|
2008-10-02 12:37:35 +02:00
|
|
|
|
2009-11-23 19:28:43 +01:00
|
|
|
void ConnectionPoint_Init(ConnectionPoint*,ConnectionPointContainer*,REFIID,cp_static_data_t*);
|
2007-12-04 13:36:27 +01:00
|
|
|
void ConnectionPointContainer_Init(ConnectionPointContainer*,IUnknown*);
|
2007-06-29 02:49:27 +02:00
|
|
|
void ConnectionPointContainer_Destroy(ConnectionPointContainer*);
|
2007-06-29 02:48:50 +02:00
|
|
|
|
2009-09-16 22:09:17 +02:00
|
|
|
NSContainer *NSContainer_Create(HTMLDocumentObj*,NSContainer*);
|
2006-02-15 11:51:44 +01:00
|
|
|
void NSContainer_Release(NSContainer*);
|
2010-12-27 22:22:02 +01:00
|
|
|
nsresult create_chrome_window(nsIWebBrowserChrome*,nsIWebBrowserChrome**);
|
2005-04-14 13:30:50 +02:00
|
|
|
|
2009-10-21 21:28:09 +02:00
|
|
|
void init_mutation(HTMLDocumentNode*);
|
2009-10-21 21:28:39 +02:00
|
|
|
void release_mutation(HTMLDocumentNode*);
|
2008-12-30 06:48:59 +01:00
|
|
|
|
2009-09-16 22:10:03 +02:00
|
|
|
void HTMLDocument_LockContainer(HTMLDocumentObj*,BOOL);
|
|
|
|
void show_context_menu(HTMLDocumentObj*,DWORD,POINT*,IDispatch*);
|
|
|
|
void notif_focus(HTMLDocumentObj*);
|
2005-08-22 16:07:49 +02:00
|
|
|
|
2009-09-16 22:10:47 +02:00
|
|
|
void show_tooltip(HTMLDocumentObj*,DWORD,DWORD,LPCWSTR);
|
|
|
|
void hide_tooltip(HTMLDocumentObj*);
|
2006-08-17 03:34:22 +02:00
|
|
|
HRESULT get_client_disp_property(IOleClientSite*,DISPID,VARIANT*);
|
2006-03-27 21:02:28 +02:00
|
|
|
|
2005-06-27 11:50:56 +02:00
|
|
|
HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
|
|
|
|
|
2007-10-14 01:49:19 +02:00
|
|
|
BOOL load_gecko(BOOL);
|
2005-08-01 12:59:45 +02:00
|
|
|
void close_gecko(void);
|
2006-03-01 22:04:51 +01:00
|
|
|
void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
|
2006-02-09 12:17:08 +01:00
|
|
|
void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
|
2008-12-18 14:08:13 +01:00
|
|
|
void release_nsio(void);
|
2010-08-18 13:37:21 +02:00
|
|
|
BOOL is_gecko_path(const char*);
|
2005-08-01 12:59:45 +02:00
|
|
|
|
2009-09-14 00:36:09 +02:00
|
|
|
HRESULT nsuri_to_url(LPCWSTR,BOOL,BSTR*);
|
2010-02-21 21:06:51 +01:00
|
|
|
HRESULT create_doc_uri(HTMLWindow*,WCHAR*,nsWineURI**);
|
|
|
|
HRESULT load_nsuri(HTMLWindow*,nsWineURI*,nsChannelBSC*,DWORD);
|
2008-10-13 21:50:37 +02:00
|
|
|
|
2010-03-03 14:54:44 +01:00
|
|
|
HRESULT hlink_frame_navigate(HTMLDocument*,LPCWSTR,nsIInputStream*,DWORD,BOOL*);
|
2009-11-30 18:00:38 +01:00
|
|
|
HRESULT navigate_url(HTMLWindow*,const WCHAR*,const WCHAR*);
|
2009-12-03 01:12:12 +01:00
|
|
|
HRESULT set_frame_doc(HTMLFrameBase*,nsIDOMDocument*);
|
2010-03-03 14:56:21 +01:00
|
|
|
HRESULT set_moniker(HTMLDocument*,IMoniker*,IBindCtx*,nsChannelBSC*,BOOL);
|
2006-02-13 13:26:00 +01:00
|
|
|
|
2006-08-22 16:15:09 +02:00
|
|
|
void call_property_onchanged(ConnectionPoint*,DISPID);
|
2007-11-20 01:49:36 +01:00
|
|
|
HRESULT call_set_active_object(IOleInPlaceUIWindow*,IOleInPlaceActiveObject*);
|
2006-08-22 16:15:09 +02:00
|
|
|
|
2008-09-04 13:39:58 +02:00
|
|
|
void *nsalloc(size_t) __WINE_ALLOC_SIZE(1);
|
2006-03-27 21:02:28 +02:00
|
|
|
void nsfree(void*);
|
|
|
|
|
2010-04-22 17:48:12 +02:00
|
|
|
void nsACString_InitDepend(nsACString*,const char*);
|
2006-12-14 00:20:26 +01:00
|
|
|
void nsACString_SetData(nsACString*,const char*);
|
2007-12-17 01:38:15 +01:00
|
|
|
PRUint32 nsACString_GetData(const nsACString*,const char**);
|
2010-04-22 17:48:12 +02:00
|
|
|
void nsACString_Finish(nsACString*);
|
2005-08-11 20:36:48 +02:00
|
|
|
|
2010-01-28 23:54:38 +01:00
|
|
|
BOOL nsAString_Init(nsAString*,const PRUnichar*);
|
2010-01-28 23:55:06 +01:00
|
|
|
void nsAString_InitDepend(nsAString*,const PRUnichar*);
|
2008-03-07 12:56:33 +01:00
|
|
|
void nsAString_SetData(nsAString*,const PRUnichar*);
|
2007-12-17 01:38:30 +01:00
|
|
|
PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**);
|
2006-03-06 22:34:49 +01:00
|
|
|
void nsAString_Finish(nsAString*);
|
2010-12-17 03:39:11 +01:00
|
|
|
HRESULT return_nsstr(nsresult,nsAString*,BSTR*);
|
2006-03-06 22:34:49 +01:00
|
|
|
|
2006-08-27 16:01:06 +02:00
|
|
|
nsICommandParams *create_nscommand_params(void);
|
2009-08-11 19:17:19 +02:00
|
|
|
HRESULT nsnode_to_nsstring(nsIDOMNode*,nsAString*);
|
2007-09-12 11:41:36 +02:00
|
|
|
void get_editor_controller(NSContainer*);
|
2007-09-26 20:46:37 +02:00
|
|
|
nsresult get_nsinterface(nsISupports*,REFIID,void**);
|
2006-06-03 00:40:26 +02:00
|
|
|
|
2009-10-27 21:09:25 +01:00
|
|
|
void init_nsevents(HTMLDocumentNode*);
|
|
|
|
void release_nsevents(HTMLDocumentNode*);
|
2010-03-18 01:05:38 +01:00
|
|
|
void add_nsevent_listener(HTMLDocumentNode*,nsIDOMNode*,LPCWSTR);
|
2009-10-27 21:09:25 +01:00
|
|
|
|
2009-10-26 23:03:53 +01:00
|
|
|
void set_window_bscallback(HTMLWindow*,nsChannelBSC*);
|
2009-10-26 23:04:28 +01:00
|
|
|
void set_current_mon(HTMLWindow*,IMoniker*);
|
2009-10-26 23:05:37 +01:00
|
|
|
HRESULT start_binding(HTMLWindow*,HTMLDocumentNode*,BSCallback*,IBindCtx*);
|
2010-03-03 14:53:32 +01:00
|
|
|
HRESULT async_start_doc_binding(HTMLWindow*,nsChannelBSC*);
|
2009-10-26 23:05:37 +01:00
|
|
|
void abort_document_bindings(HTMLDocumentNode*);
|
2008-03-23 02:16:03 +01:00
|
|
|
|
2009-10-26 23:05:37 +01:00
|
|
|
HRESULT bind_mon_to_buffer(HTMLDocumentNode*,IMoniker*,void**,DWORD*);
|
2006-02-15 11:52:33 +01:00
|
|
|
|
2010-03-03 14:53:49 +01:00
|
|
|
HRESULT create_channelbsc(IMoniker*,WCHAR*,BYTE*,DWORD,nsChannelBSC**);
|
2008-03-23 02:16:03 +01:00
|
|
|
HRESULT channelbsc_load_stream(nsChannelBSC*,IStream*);
|
|
|
|
void channelbsc_set_channel(nsChannelBSC*,nsChannel*,nsIStreamListener*,nsISupports*);
|
|
|
|
IMoniker *get_channelbsc_mon(nsChannelBSC*);
|
2008-03-23 02:15:20 +01:00
|
|
|
|
2009-11-01 19:24:19 +01:00
|
|
|
void set_ready_state(HTMLWindow*,READYSTATE);
|
2009-10-26 23:05:10 +01:00
|
|
|
|
2009-09-16 22:09:42 +02:00
|
|
|
HRESULT HTMLSelectionObject_Create(HTMLDocumentNode*,nsISelection*,IHTMLSelectionObject**);
|
2009-09-16 22:11:43 +02:00
|
|
|
HRESULT HTMLTxtRange_Create(HTMLDocumentNode*,nsIDOMRange*,IHTMLTxtRange**);
|
2006-11-17 13:05:01 +01:00
|
|
|
IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration*);
|
2007-11-25 19:08:40 +01:00
|
|
|
IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet*);
|
2007-09-19 13:09:35 +02:00
|
|
|
IHTMLStyleSheetsCollection *HTMLStyleSheetsCollection_Create(nsIDOMStyleSheetList*);
|
2006-02-13 13:26:00 +01:00
|
|
|
|
2009-09-16 22:09:42 +02:00
|
|
|
void detach_selection(HTMLDocumentNode*);
|
2009-09-16 22:11:43 +02:00
|
|
|
void detach_ranges(HTMLDocumentNode*);
|
2008-10-13 21:49:58 +02:00
|
|
|
HRESULT get_node_text(HTMLDOMNode*,BSTR*);
|
2007-08-15 19:17:49 +02:00
|
|
|
|
2009-10-19 23:04:19 +02:00
|
|
|
HRESULT create_nselem(HTMLDocumentNode*,const WCHAR*,nsIDOMHTMLElement**);
|
|
|
|
|
2010-12-01 22:42:03 +01:00
|
|
|
HRESULT HTMLDOMTextNode_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLDOMNode**);
|
2008-04-24 18:25:34 +02:00
|
|
|
|
2010-12-01 22:42:51 +01:00
|
|
|
HRESULT HTMLElement_Create(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLElement**);
|
2010-12-01 22:42:03 +01:00
|
|
|
HRESULT HTMLCommentElement_Create(HTMLDocumentNode*,nsIDOMNode*,HTMLElement**);
|
2010-12-01 22:43:14 +01:00
|
|
|
HRESULT HTMLAnchorElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLBodyElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLEmbedElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLFormElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLFrameElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLIFrame_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLStyleElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLImgElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLInputElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLObjectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLOptionElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLScriptElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLSelectElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLTable_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLTableRow_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
|
|
|
HRESULT HTMLTextAreaElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
2010-12-01 22:42:51 +01:00
|
|
|
HRESULT HTMLGenericElement_Create(HTMLDocumentNode*,nsIDOMHTMLElement*,HTMLElement**);
|
2006-03-05 20:39:59 +01:00
|
|
|
|
2009-09-16 22:13:31 +02:00
|
|
|
void HTMLDOMNode_Init(HTMLDocumentNode*,HTMLDOMNode*,nsIDOMNode*);
|
2009-11-01 19:16:48 +01:00
|
|
|
void HTMLElement_Init(HTMLElement*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*);
|
2006-03-23 21:38:38 +01:00
|
|
|
void HTMLElement2_Init(HTMLElement*);
|
2008-10-07 21:44:18 +02:00
|
|
|
void HTMLElement3_Init(HTMLElement*);
|
2009-11-01 19:16:48 +01:00
|
|
|
void HTMLTextContainer_Init(HTMLTextContainer*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*);
|
2009-12-03 01:12:12 +01:00
|
|
|
void HTMLFrameBase_Init(HTMLFrameBase*,HTMLDocumentNode*,nsIDOMHTMLElement*,dispex_static_data_t*);
|
2006-04-28 19:57:28 +02:00
|
|
|
|
2006-03-18 19:43:05 +01:00
|
|
|
HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
|
2007-10-04 02:09:48 +02:00
|
|
|
void HTMLDOMNode_destructor(HTMLDOMNode*);
|
|
|
|
|
2007-10-04 02:10:36 +02:00
|
|
|
HRESULT HTMLElement_QI(HTMLDOMNode*,REFIID,void**);
|
2007-10-04 02:09:48 +02:00
|
|
|
void HTMLElement_destructor(HTMLDOMNode*);
|
2010-11-14 14:41:39 +01:00
|
|
|
HRESULT HTMLElement_clone(HTMLDOMNode*,nsIDOMNode*,HTMLDOMNode**);
|
2006-03-18 19:43:05 +01:00
|
|
|
|
2009-11-01 19:17:17 +01:00
|
|
|
HRESULT HTMLFrameBase_QI(HTMLFrameBase*,REFIID,void**);
|
|
|
|
void HTMLFrameBase_destructor(HTMLFrameBase*);
|
|
|
|
|
2010-12-01 12:52:08 +01:00
|
|
|
HRESULT get_node(HTMLDocumentNode*,nsIDOMNode*,BOOL,HTMLDOMNode**);
|
2009-09-16 22:13:31 +02:00
|
|
|
void release_nodes(HTMLDocumentNode*);
|
2006-03-05 20:38:30 +01:00
|
|
|
|
2009-09-09 21:30:41 +02:00
|
|
|
void release_script_hosts(HTMLWindow*);
|
|
|
|
void connect_scripts(HTMLWindow*);
|
2009-09-16 22:09:17 +02:00
|
|
|
void doc_insert_script(HTMLWindow*,nsIDOMHTMLScriptElement*);
|
2009-09-16 22:08:20 +02:00
|
|
|
IDispatch *script_parse_event(HTMLWindow*,LPCWSTR);
|
2010-11-09 13:36:24 +01:00
|
|
|
HRESULT exec_script(HTMLWindow*,const WCHAR*,const WCHAR*,VARIANT*);
|
2009-09-09 21:30:41 +02:00
|
|
|
void set_script_mode(HTMLWindow*,SCRIPTMODE);
|
2009-09-09 21:31:32 +02:00
|
|
|
BOOL find_global_prop(HTMLWindow*,BSTR,DWORD,ScriptHost**,DISPID*);
|
|
|
|
IDispatch *get_script_disp(ScriptHost*);
|
2009-12-15 00:38:53 +01:00
|
|
|
HRESULT search_window_props(HTMLWindow*,BSTR,DWORD,DISPID*);
|
2008-03-25 02:10:47 +01:00
|
|
|
|
2008-09-30 17:45:08 +02:00
|
|
|
IHTMLElementCollection *create_all_collection(HTMLDOMNode*,BOOL);
|
2009-09-16 22:13:31 +02:00
|
|
|
IHTMLElementCollection *create_collection_from_nodelist(HTMLDocumentNode*,IUnknown*,nsIDOMNodeList*);
|
|
|
|
IHTMLElementCollection *create_collection_from_htmlcol(HTMLDocumentNode*,IUnknown*,nsIDOMHTMLCollection*);
|
2007-10-04 02:13:01 +02:00
|
|
|
|
2007-06-10 11:49:12 +02:00
|
|
|
/* commands */
|
2007-06-10 11:26:47 +02:00
|
|
|
typedef struct {
|
|
|
|
DWORD id;
|
|
|
|
HRESULT (*query)(HTMLDocument*,OLECMD*);
|
|
|
|
HRESULT (*exec)(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
|
|
|
} cmdtable_t;
|
|
|
|
|
2007-06-10 11:28:52 +02:00
|
|
|
extern const cmdtable_t editmode_cmds[];
|
|
|
|
|
2009-09-16 22:09:17 +02:00
|
|
|
void do_ns_command(HTMLDocument*,const char*,nsICommandParams*);
|
2007-09-26 20:45:31 +02:00
|
|
|
|
2007-06-10 11:49:12 +02:00
|
|
|
/* timer */
|
2007-06-10 11:38:51 +02:00
|
|
|
#define UPDATE_UI 0x0001
|
|
|
|
#define UPDATE_TITLE 0x0002
|
|
|
|
|
2009-09-16 22:10:47 +02:00
|
|
|
void update_doc(HTMLDocument*,DWORD);
|
2009-09-16 22:10:03 +02:00
|
|
|
void update_title(HTMLDocumentObj*);
|
2007-06-10 11:38:51 +02:00
|
|
|
|
2006-11-24 10:17:54 +01:00
|
|
|
/* editor */
|
2007-06-10 11:44:38 +02:00
|
|
|
void init_editor(HTMLDocument*);
|
2006-11-30 23:32:05 +01:00
|
|
|
void handle_edit_event(HTMLDocument*,nsIDOMEvent*);
|
2007-06-11 00:28:48 +02:00
|
|
|
HRESULT editor_exec_copy(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
2007-06-11 00:30:30 +02:00
|
|
|
HRESULT editor_exec_cut(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
2007-06-11 00:29:53 +02:00
|
|
|
HRESULT editor_exec_paste(HTMLDocument*,DWORD,VARIANT*,VARIANT*);
|
2008-01-10 12:53:38 +01:00
|
|
|
void handle_edit_load(HTMLDocument*);
|
2007-09-12 11:42:01 +02:00
|
|
|
HRESULT editor_is_dirty(HTMLDocument*);
|
2008-01-10 12:53:38 +01:00
|
|
|
void set_dirty(HTMLDocument*,VARIANT_BOOL);
|
2006-11-30 23:32:05 +01:00
|
|
|
|
2006-09-24 23:10:38 +02:00
|
|
|
extern DWORD mshtml_tls;
|
|
|
|
|
2009-10-26 23:05:10 +01:00
|
|
|
typedef struct task_t task_t;
|
|
|
|
typedef void (*task_proc_t)(task_t*);
|
2007-02-10 17:36:13 +01:00
|
|
|
|
2009-10-26 23:05:10 +01:00
|
|
|
struct task_t {
|
|
|
|
LONG target_magic;
|
|
|
|
task_proc_t proc;
|
2006-09-24 23:12:06 +02:00
|
|
|
struct task_t *next;
|
2009-10-26 23:05:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
task_t header;
|
|
|
|
HTMLDocumentObj *doc;
|
|
|
|
} docobj_task_t;
|
2006-09-24 23:12:06 +02:00
|
|
|
|
2006-09-24 23:10:38 +02:00
|
|
|
typedef struct {
|
|
|
|
HWND thread_hwnd;
|
2006-09-24 23:12:06 +02:00
|
|
|
task_t *task_queue_head;
|
|
|
|
task_t *task_queue_tail;
|
2008-04-21 18:21:19 +02:00
|
|
|
struct list timer_list;
|
2006-09-24 23:10:38 +02:00
|
|
|
} thread_data_t;
|
|
|
|
|
|
|
|
thread_data_t *get_thread_data(BOOL);
|
|
|
|
HWND get_thread_hwnd(void);
|
2009-10-26 23:05:10 +01:00
|
|
|
|
|
|
|
LONG get_task_target_magic(void);
|
|
|
|
void push_task(task_t*,task_proc_t,LONG);
|
|
|
|
void remove_target_tasks(LONG);
|
|
|
|
|
2008-06-27 21:11:38 +02:00
|
|
|
DWORD set_task_timer(HTMLDocument*,DWORD,BOOL,IDispatch*);
|
2008-06-27 21:14:40 +02:00
|
|
|
HRESULT clear_task_timer(HTMLDocument*,BOOL,DWORD);
|
2006-09-24 23:10:38 +02:00
|
|
|
|
2008-04-17 02:32:18 +02:00
|
|
|
void release_typelib(void);
|
2009-09-06 18:54:30 +02:00
|
|
|
HRESULT call_disp_func(IDispatch*,DISPPARAMS*);
|
2007-07-31 00:53:10 +02:00
|
|
|
|
2008-09-30 17:40:19 +02:00
|
|
|
const char *debugstr_variant(const VARIANT*);
|
|
|
|
|
2005-06-27 11:50:56 +02:00
|
|
|
DEFINE_GUID(CLSID_AboutProtocol, 0x3050F406, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
|
|
|
|
DEFINE_GUID(CLSID_JSProtocol, 0x3050F3B2, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
|
|
|
|
DEFINE_GUID(CLSID_MailtoProtocol, 0x3050F3DA, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
|
|
|
|
DEFINE_GUID(CLSID_ResProtocol, 0x3050F3BC, 0x98B5, 0x11CF, 0xBB,0x82, 0x00,0xAA,0x00,0xBD,0xCE,0x0B);
|
|
|
|
DEFINE_GUID(CLSID_SysimageProtocol, 0x76E67A63, 0x06E9, 0x11D2, 0xA8,0x40, 0x00,0x60,0x08,0x05,0x93,0x82);
|
|
|
|
|
2006-05-24 17:58:27 +02:00
|
|
|
DEFINE_GUID(CLSID_CMarkup,0x3050f4fb,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
|
|
|
|
|
2006-07-16 23:21:36 +02:00
|
|
|
/* memory allocation functions */
|
|
|
|
|
2008-09-19 05:35:49 +02:00
|
|
|
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc(size_t len)
|
2006-07-16 23:21:36 +02:00
|
|
|
{
|
|
|
|
return HeapAlloc(GetProcessHeap(), 0, len);
|
|
|
|
}
|
|
|
|
|
2008-09-19 05:35:49 +02:00
|
|
|
static inline void * __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len)
|
2006-09-24 23:10:38 +02:00
|
|
|
{
|
|
|
|
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
|
|
|
}
|
|
|
|
|
2008-09-19 05:35:49 +02:00
|
|
|
static inline void * __WINE_ALLOC_SIZE(2) heap_realloc(void *mem, size_t len)
|
2006-07-16 23:21:36 +02:00
|
|
|
{
|
|
|
|
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
|
|
|
|
}
|
|
|
|
|
2009-09-06 19:05:40 +02:00
|
|
|
static inline void * __WINE_ALLOC_SIZE(2) heap_realloc_zero(void *mem, size_t len)
|
|
|
|
{
|
|
|
|
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, mem, len);
|
|
|
|
}
|
|
|
|
|
2007-12-05 21:52:31 +01:00
|
|
|
static inline BOOL heap_free(void *mem)
|
2006-07-16 23:21:36 +02:00
|
|
|
{
|
|
|
|
return HeapFree(GetProcessHeap(), 0, mem);
|
|
|
|
}
|
|
|
|
|
2007-12-31 01:32:48 +01:00
|
|
|
static inline LPWSTR heap_strdupW(LPCWSTR str)
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
size = (strlenW(str)+1)*sizeof(WCHAR);
|
|
|
|
ret = heap_alloc(size);
|
|
|
|
memcpy(ret, str, size);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2010-08-03 21:38:11 +02:00
|
|
|
static inline LPWSTR heap_strndupW(LPCWSTR str, unsigned len)
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
ret = heap_alloc((len+1)*sizeof(WCHAR));
|
|
|
|
memcpy(ret, str, len*sizeof(WCHAR));
|
|
|
|
ret[len] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-03-26 15:24:03 +01:00
|
|
|
static inline char *heap_strdupA(const char *str)
|
|
|
|
{
|
|
|
|
char *ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
DWORD size;
|
|
|
|
|
|
|
|
size = strlen(str)+1;
|
|
|
|
ret = heap_alloc(size);
|
|
|
|
memcpy(ret, str, size);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2008-02-01 15:31:19 +01:00
|
|
|
static inline WCHAR *heap_strdupAtoW(const char *str)
|
|
|
|
{
|
|
|
|
LPWSTR ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
DWORD len;
|
|
|
|
|
|
|
|
len = MultiByteToWideChar(CP_ACP, 0, str, -1, NULL, 0);
|
|
|
|
ret = heap_alloc(len*sizeof(WCHAR));
|
2008-03-26 15:24:20 +01:00
|
|
|
MultiByteToWideChar(CP_ACP, 0, str, -1, ret, len);
|
2008-02-01 15:31:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
2007-12-31 01:32:48 +01:00
|
|
|
|
2008-03-26 15:24:03 +01:00
|
|
|
static inline char *heap_strdupWtoA(LPCWSTR str)
|
|
|
|
{
|
|
|
|
char *ret = NULL;
|
|
|
|
|
|
|
|
if(str) {
|
|
|
|
DWORD size = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, NULL, NULL);
|
|
|
|
ret = heap_alloc(size);
|
|
|
|
WideCharToMultiByte(CP_ACP, 0, str, -1, ret, size, NULL, NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2009-10-26 23:02:50 +01:00
|
|
|
static inline void windowref_addref(windowref_t *ref)
|
|
|
|
{
|
|
|
|
InterlockedIncrement(&ref->ref);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void windowref_release(windowref_t *ref)
|
|
|
|
{
|
|
|
|
if(!InterlockedDecrement(&ref->ref))
|
|
|
|
heap_free(ref);
|
|
|
|
}
|
|
|
|
|
2009-11-30 17:57:39 +01:00
|
|
|
HDC get_display_dc(void);
|
2006-11-09 23:54:09 +01:00
|
|
|
HINSTANCE get_shdoclc(void);
|
2010-07-30 21:56:05 +02:00
|
|
|
void set_statustext(HTMLDocumentObj*,INT,LPCWSTR);
|
2006-11-09 23:54:09 +01:00
|
|
|
|
2005-04-14 13:30:50 +02:00
|
|
|
extern HINSTANCE hInst;
|