2005-03-31 10:08:02 +00:00
|
|
|
/*
|
2006-03-05 19:38:30 +00:00
|
|
|
* Copyright 2005-2006 Jacek Caban for CodeWeavers
|
2005-03-31 10:08:02 +00: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 12:49:52 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-03-31 10:08:02 +00:00
|
|
|
*/
|
|
|
|
|
2005-08-11 10:30:30 +00:00
|
|
|
#include "docobj.h"
|
|
|
|
#include "mshtml.h"
|
|
|
|
#include "mshtmhst.h"
|
2005-08-27 09:25:56 +00:00
|
|
|
#include "hlink.h"
|
2005-08-11 10:30:30 +00:00
|
|
|
|
2006-12-08 11:38:19 +00:00
|
|
|
#include "wine/list.h"
|
|
|
|
|
2005-08-11 10:30:30 +00:00
|
|
|
#ifdef INIT_GUID
|
|
|
|
#include "initguid.h"
|
|
|
|
#endif
|
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
#include "nsiface.h"
|
|
|
|
|
2006-08-09 14:33:00 +00:00
|
|
|
#define GENERATE_MSHTML_NS_FAILURE(code) \
|
|
|
|
((nsresult) ((PRUint32)(1<<31) | ((PRUint32)(0x45+6)<<16) | (PRUint32)(code)))
|
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
#define NS_OK ((nsresult)0x00000000L)
|
2005-12-09 10:51:02 +00:00
|
|
|
#define NS_ERROR_FAILURE ((nsresult)0x80004005L)
|
2005-08-01 10:59:45 +00:00
|
|
|
#define NS_NOINTERFACE ((nsresult)0x80004002L)
|
|
|
|
#define NS_ERROR_NOT_IMPLEMENTED ((nsresult)0x80004001L)
|
2005-08-25 19:24:58 +00:00
|
|
|
#define NS_ERROR_INVALID_ARG ((nsresult)0x80070057L)
|
2006-02-09 11:19:33 +00:00
|
|
|
#define NS_ERROR_UNEXPECTED ((nsresult)0x8000ffffL)
|
2006-02-20 10:13:37 +00:00
|
|
|
#define NS_ERROR_UNKNOWN_PROTOCOL ((nsresult)0x804b0012L)
|
2005-08-01 10:59:45 +00:00
|
|
|
|
2006-08-09 14:33:00 +00:00
|
|
|
#define WINE_NS_LOAD_FROM_MONIKER GENERATE_MSHTML_NS_FAILURE(0)
|
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
#define NS_FAILED(res) ((res) & 0x80000000)
|
|
|
|
#define NS_SUCCEEDED(res) (!NS_FAILED(res))
|
|
|
|
|
2005-08-25 19:24:58 +00:00
|
|
|
#define NSAPI WINAPI
|
|
|
|
|
2006-03-05 19:38:30 +00:00
|
|
|
#define NS_ELEMENT_NODE 1
|
|
|
|
#define NS_DOCUMENT_NODE 9
|
|
|
|
|
|
|
|
typedef struct HTMLDOMNode HTMLDOMNode;
|
2006-04-28 18:01:07 +00:00
|
|
|
typedef struct ConnectionPoint ConnectionPoint;
|
2006-06-02 22:37:58 +00:00
|
|
|
typedef struct BSCallback BSCallback;
|
2005-08-01 10:59:45 +00:00
|
|
|
|
2006-12-06 17:21:16 +00:00
|
|
|
typedef struct {
|
|
|
|
const IHTMLWindow2Vtbl *lpHTMLWindow2Vtbl;
|
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
HTMLDocument *doc;
|
|
|
|
nsIDOMWindow *nswindow;
|
2006-12-08 11:38:19 +00:00
|
|
|
|
|
|
|
struct list entry;
|
2006-12-06 17:21:16 +00:00
|
|
|
} HTMLWindow;
|
|
|
|
|
2006-06-30 21:44:04 +00:00
|
|
|
typedef enum {
|
|
|
|
UNKNOWN_USERMODE,
|
|
|
|
BROWSEMODE,
|
|
|
|
EDITMODE
|
|
|
|
} USERMODE;
|
|
|
|
|
2006-08-03 00:36:15 +00:00
|
|
|
struct HTMLDocument {
|
2005-06-28 10:53:42 +00:00
|
|
|
const IHTMLDocument2Vtbl *lpHTMLDocument2Vtbl;
|
2005-12-12 10:51:43 +00:00
|
|
|
const IHTMLDocument3Vtbl *lpHTMLDocument3Vtbl;
|
2005-06-28 10:53:42 +00:00
|
|
|
const IPersistMonikerVtbl *lpPersistMonikerVtbl;
|
|
|
|
const IPersistFileVtbl *lpPersistFileVtbl;
|
|
|
|
const IMonikerPropVtbl *lpMonikerPropVtbl;
|
|
|
|
const IOleObjectVtbl *lpOleObjectVtbl;
|
|
|
|
const IOleDocumentVtbl *lpOleDocumentVtbl;
|
|
|
|
const IOleDocumentViewVtbl *lpOleDocumentViewVtbl;
|
|
|
|
const IOleInPlaceActiveObjectVtbl *lpOleInPlaceActiveObjectVtbl;
|
|
|
|
const IViewObject2Vtbl *lpViewObject2Vtbl;
|
|
|
|
const IOleInPlaceObjectWindowlessVtbl *lpOleInPlaceObjectWindowlessVtbl;
|
2005-07-03 11:22:23 +00:00
|
|
|
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
2005-07-12 17:00:58 +00:00
|
|
|
const IOleCommandTargetVtbl *lpOleCommandTargetVtbl;
|
2005-08-08 11:07:48 +00:00
|
|
|
const IOleControlVtbl *lpOleControlVtbl;
|
2005-08-27 09:25:56 +00:00
|
|
|
const IHlinkTargetVtbl *lpHlinkTargetVtbl;
|
2006-04-28 17:59:58 +00:00
|
|
|
const IConnectionPointContainerVtbl *lpConnectionPointContainerVtbl;
|
2006-05-23 20:16:26 +00:00
|
|
|
const IPersistStreamInitVtbl *lpPersistStreamInitVtbl;
|
2005-04-11 16:11:52 +00:00
|
|
|
|
2005-07-06 10:33:10 +00:00
|
|
|
LONG ref;
|
2005-04-12 11:57:51 +00:00
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
NSContainer *nscontainer;
|
2006-12-06 17:21:16 +00:00
|
|
|
HTMLWindow *window;
|
2005-08-01 10:59:45 +00:00
|
|
|
|
2005-04-12 11:57:51 +00:00
|
|
|
IOleClientSite *client;
|
2005-07-12 17:00:58 +00:00
|
|
|
IDocHostUIHandler *hostui;
|
2005-04-13 14:41:19 +00:00
|
|
|
IOleInPlaceSite *ipsite;
|
2005-04-15 16:12:45 +00:00
|
|
|
IOleInPlaceFrame *frame;
|
2005-04-14 11:30:50 +00:00
|
|
|
|
2006-09-24 21:39:55 +00:00
|
|
|
BSCallback *bscallback;
|
|
|
|
|
2005-04-14 11:30:50 +00:00
|
|
|
HWND hwnd;
|
2006-03-27 19:02:28 +00:00
|
|
|
HWND tooltips_hwnd;
|
2005-07-14 10:14:33 +00:00
|
|
|
|
2006-11-12 16:09:38 +00:00
|
|
|
DOCHOSTUIINFO hostinfo;
|
|
|
|
|
2006-06-30 21:44:04 +00:00
|
|
|
USERMODE usermode;
|
2006-09-27 14:37:36 +00:00
|
|
|
READYSTATE readystate;
|
2005-07-14 10:14:33 +00:00
|
|
|
BOOL in_place_active;
|
|
|
|
BOOL ui_active;
|
2005-08-15 09:41:30 +00:00
|
|
|
BOOL window_active;
|
2005-07-18 09:13:32 +00:00
|
|
|
BOOL has_key_path;
|
2005-08-22 14:07:49 +00:00
|
|
|
BOOL container_locked;
|
2005-08-09 20:46:05 +00:00
|
|
|
|
2006-04-28 18:01:07 +00:00
|
|
|
ConnectionPoint *cp_htmldocevents;
|
|
|
|
ConnectionPoint *cp_htmldocevents2;
|
2006-06-20 16:55:13 +00:00
|
|
|
ConnectionPoint *cp_propnotif;
|
2006-04-28 18:01:07 +00:00
|
|
|
|
2006-03-05 19:38:30 +00:00
|
|
|
HTMLDOMNode *nodes;
|
2006-08-03 00:36:15 +00:00
|
|
|
};
|
2005-04-11 16:11:52 +00:00
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
struct NSContainer {
|
2006-03-27 19:02:28 +00:00
|
|
|
const nsIWebBrowserChromeVtbl *lpWebBrowserChromeVtbl;
|
|
|
|
const nsIContextMenuListenerVtbl *lpContextMenuListenerVtbl;
|
|
|
|
const nsIURIContentListenerVtbl *lpURIContentListenerVtbl;
|
|
|
|
const nsIEmbeddingSiteWindowVtbl *lpEmbeddingSiteWindowVtbl;
|
|
|
|
const nsITooltipListenerVtbl *lpTooltipListenerVtbl;
|
|
|
|
const nsIInterfaceRequestorVtbl *lpInterfaceRequestorVtbl;
|
|
|
|
const nsIWeakReferenceVtbl *lpWeakReferenceVtbl;
|
|
|
|
const nsISupportsWeakReferenceVtbl *lpSupportsWeakReferenceVtbl;
|
2006-11-30 22:32:05 +00:00
|
|
|
const nsIDOMEventListenerVtbl *lpDOMEventListenerVtbl;
|
2005-08-25 19:24:58 +00:00
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
nsIWebBrowser *webbrowser;
|
|
|
|
nsIWebNavigation *navigation;
|
|
|
|
nsIBaseWindow *window;
|
2005-08-26 10:05:52 +00:00
|
|
|
nsIWebBrowserFocus *focus;
|
2005-08-01 10:59:45 +00:00
|
|
|
|
2006-02-15 10:51:44 +00:00
|
|
|
LONG ref;
|
|
|
|
|
2006-03-01 21:04:51 +00:00
|
|
|
NSContainer *parent;
|
2005-08-25 19:24:58 +00:00
|
|
|
HTMLDocument *doc;
|
|
|
|
|
2006-08-16 14:34:32 +00:00
|
|
|
nsIURIContentListener *content_listener;
|
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
HWND hwnd;
|
2005-09-02 12:19:42 +00:00
|
|
|
|
2006-06-02 22:39:39 +00:00
|
|
|
BSCallback *bscallback; /* hack */
|
2005-08-01 10:59:45 +00:00
|
|
|
};
|
|
|
|
|
2006-06-02 22:40:26 +00:00
|
|
|
typedef struct {
|
|
|
|
const nsIHttpChannelVtbl *lpHttpChannelVtbl;
|
|
|
|
const nsIUploadChannelVtbl *lpUploadChannelVtbl;
|
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
nsIChannel *channel;
|
|
|
|
nsIHttpChannel *http_channel;
|
|
|
|
nsIWineURI *uri;
|
|
|
|
nsIInputStream *post_data_stream;
|
|
|
|
nsILoadGroup *load_group;
|
|
|
|
nsIInterfaceRequestor *notif_callback;
|
|
|
|
nsLoadFlags load_flags;
|
|
|
|
nsIURI *original_uri;
|
2006-06-02 22:48:13 +00:00
|
|
|
char *content;
|
2006-06-02 22:40:26 +00:00
|
|
|
} nsChannel;
|
|
|
|
|
2006-06-02 23:26:00 +00:00
|
|
|
typedef struct {
|
|
|
|
const nsIInputStreamVtbl *lpInputStreamVtbl;
|
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
char buf[1024];
|
|
|
|
DWORD buf_size;
|
|
|
|
} nsProtocolStream;
|
|
|
|
|
2006-06-02 22:37:58 +00:00
|
|
|
struct BSCallback {
|
|
|
|
const IBindStatusCallbackVtbl *lpBindStatusCallbackVtbl;
|
|
|
|
const IServiceProviderVtbl *lpServiceProviderVtbl;
|
|
|
|
const IHttpNegotiate2Vtbl *lpHttpNegotiate2Vtbl;
|
|
|
|
const IInternetBindInfoVtbl *lpInternetBindInfoVtbl;
|
|
|
|
|
|
|
|
LONG ref;
|
|
|
|
|
|
|
|
LPWSTR headers;
|
|
|
|
HGLOBAL post_data;
|
|
|
|
ULONG post_data_len;
|
2006-08-03 20:00:30 +00:00
|
|
|
ULONG readed;
|
2006-06-02 22:40:26 +00:00
|
|
|
|
|
|
|
nsChannel *nschannel;
|
|
|
|
nsIStreamListener *nslistener;
|
|
|
|
nsISupports *nscontext;
|
2006-06-02 23:26:00 +00:00
|
|
|
|
2006-08-09 14:37:48 +00:00
|
|
|
IMoniker *mon;
|
2006-09-24 21:12:23 +00:00
|
|
|
IBinding *binding;
|
2006-08-09 14:37:48 +00:00
|
|
|
|
2006-09-24 21:39:55 +00:00
|
|
|
HTMLDocument *doc;
|
|
|
|
|
2006-06-02 23:26:00 +00:00
|
|
|
nsProtocolStream *nsstream;
|
2006-06-02 22:37:58 +00:00
|
|
|
};
|
|
|
|
|
2006-03-05 19:38:30 +00:00
|
|
|
struct HTMLDOMNode {
|
|
|
|
const IHTMLDOMNodeVtbl *lpHTMLDOMNodeVtbl;
|
|
|
|
|
|
|
|
void (*destructor)(IUnknown*);
|
|
|
|
|
|
|
|
enum {
|
|
|
|
NT_UNKNOWN,
|
|
|
|
NT_HTMLELEM
|
|
|
|
} node_type;
|
|
|
|
|
|
|
|
union {
|
|
|
|
IUnknown *unk;
|
|
|
|
IHTMLElement *elem;
|
|
|
|
} impl;
|
|
|
|
|
|
|
|
nsIDOMNode *nsnode;
|
|
|
|
HTMLDocument *doc;
|
|
|
|
|
|
|
|
HTMLDOMNode *next;
|
|
|
|
};
|
|
|
|
|
2006-03-05 19:39:59 +00:00
|
|
|
typedef struct {
|
|
|
|
const IHTMLElementVtbl *lpHTMLElementVtbl;
|
2006-03-23 20:38:38 +00:00
|
|
|
const IHTMLElement2Vtbl *lpHTMLElement2Vtbl;
|
2006-03-05 19:39:59 +00:00
|
|
|
|
|
|
|
void (*destructor)(IUnknown*);
|
|
|
|
|
|
|
|
nsIDOMHTMLElement *nselem;
|
|
|
|
HTMLDOMNode *node;
|
|
|
|
|
|
|
|
IUnknown *impl;
|
|
|
|
} HTMLElement;
|
|
|
|
|
2006-04-28 17:57:28 +00:00
|
|
|
typedef struct {
|
|
|
|
const IHTMLTextContainerVtbl *lpHTMLTextContainerVtbl;
|
|
|
|
|
2006-08-01 12:49:57 +00:00
|
|
|
HTMLElement *element;
|
2006-04-28 17:57:28 +00:00
|
|
|
} HTMLTextContainer;
|
|
|
|
|
2006-12-06 17:21:16 +00:00
|
|
|
#define HTMLWINDOW2(x) ((IHTMLWindow2*) &(x)->lpHTMLWindow2Vtbl)
|
|
|
|
|
2005-06-28 10:53:42 +00:00
|
|
|
#define HTMLDOC(x) ((IHTMLDocument2*) &(x)->lpHTMLDocument2Vtbl)
|
2005-12-12 10:51:43 +00:00
|
|
|
#define HTMLDOC3(x) ((IHTMLDocument3*) &(x)->lpHTMLDocument3Vtbl)
|
2005-06-28 10:53:42 +00:00
|
|
|
#define PERSIST(x) ((IPersist*) &(x)->lpPersistFileVtbl)
|
|
|
|
#define PERSISTMON(x) ((IPersistMoniker*) &(x)->lpPersistMonikerVtbl)
|
|
|
|
#define PERSISTFILE(x) ((IPersistFile*) &(x)->lpPersistFileVtbl)
|
|
|
|
#define MONPROP(x) ((IMonikerProp*) &(x)->lpMonikerPropVtbl)
|
|
|
|
#define OLEOBJ(x) ((IOleObject*) &(x)->lpOleObjectVtbl)
|
|
|
|
#define OLEDOC(x) ((IOleDocument*) &(x)->lpOleDocumentVtbl)
|
|
|
|
#define DOCVIEW(x) ((IOleDocumentView*) &(x)->lpOleDocumentViewVtbl)
|
|
|
|
#define OLEWIN(x) ((IOleWindow*) &(x)->lpOleInPlaceActiveObjectVtbl)
|
|
|
|
#define ACTOBJ(x) ((IOleInPlaceActiveObject*) &(x)->lpOleInPlaceActiveObjectVtbl)
|
|
|
|
#define VIEWOBJ(x) ((IViewObject*) &(x)->lpViewObject2Vtbl)
|
|
|
|
#define VIEWOBJ2(x) ((IViewObject2*) &(x)->lpViewObject2Vtbl)
|
|
|
|
#define INPLACEOBJ(x) ((IOleInPlaceObject*) &(x)->lpOleInPlaceObjectWindowlessVtbl)
|
|
|
|
#define INPLACEWIN(x) ((IOleInPlaceObjectWindowless*) &(x)->lpOleInPlaceObjectWindowlessVtbl)
|
2005-07-03 11:22:23 +00:00
|
|
|
#define SERVPROV(x) ((IServiceProvider*) &(x)->lpServiceProviderVtbl)
|
2005-07-12 17:00:58 +00:00
|
|
|
#define CMDTARGET(x) ((IOleCommandTarget*) &(x)->lpOleCommandTargetVtbl)
|
2005-08-08 11:07:48 +00:00
|
|
|
#define CONTROL(x) ((IOleControl*) &(x)->lpOleControlVtbl)
|
2005-08-27 09:25:56 +00:00
|
|
|
#define HLNKTARGET(x) ((IHlinkTarget*) &(x)->lpHlinkTargetVtbl)
|
2006-04-28 17:59:58 +00:00
|
|
|
#define CONPTCONT(x) ((IConnectionPointContainer*) &(x)->lpConnectionPointContainerVtbl)
|
2006-05-23 20:16:26 +00:00
|
|
|
#define PERSTRINIT(x) ((IPersistStreamInit*) &(x)->lpPersistStreamInitVtbl)
|
2005-06-28 10:53:42 +00:00
|
|
|
|
2005-08-25 19:24:58 +00:00
|
|
|
#define NSWBCHROME(x) ((nsIWebBrowserChrome*) &(x)->lpWebBrowserChromeVtbl)
|
|
|
|
#define NSCML(x) ((nsIContextMenuListener*) &(x)->lpContextMenuListenerVtbl)
|
2005-09-02 12:19:42 +00:00
|
|
|
#define NSURICL(x) ((nsIURIContentListener*) &(x)->lpURIContentListenerVtbl)
|
2005-12-09 10:23:58 +00:00
|
|
|
#define NSEMBWNDS(x) ((nsIEmbeddingSiteWindow*) &(x)->lpEmbeddingSiteWindowVtbl)
|
2006-02-27 18:08:23 +00:00
|
|
|
#define NSIFACEREQ(x) ((nsIInterfaceRequestor*) &(x)->lpInterfaceRequestorVtbl)
|
2006-03-27 19:02:28 +00:00
|
|
|
#define NSTOOLTIP(x) ((nsITooltipListener*) &(x)->lpTooltipListenerVtbl)
|
2006-11-30 22:32:05 +00:00
|
|
|
#define NSEVENTLIST(x) ((nsIDOMEventListener*) &(x)->lpDOMEventListenerVtbl)
|
2006-03-27 19:02:28 +00:00
|
|
|
#define NSWEAKREF(x) ((nsIWeakReference*) &(x)->lpWeakReferenceVtbl)
|
|
|
|
#define NSSUPWEAKREF(x) ((nsISupportsWeakReference*) &(x)->lpSupportsWeakReferenceVtbl)
|
2005-08-25 19:24:58 +00:00
|
|
|
|
2006-06-02 22:40:26 +00:00
|
|
|
#define NSCHANNEL(x) ((nsIChannel*) &(x)->lpHttpChannelVtbl)
|
|
|
|
#define NSHTTPCHANNEL(x) ((nsIHttpChannel*) &(x)->lpHttpChannelVtbl)
|
|
|
|
#define NSUPCHANNEL(x) ((nsIUploadChannel*) &(x)->lpUploadChannelVtbl)
|
|
|
|
|
2006-06-02 22:37:58 +00:00
|
|
|
#define HTTPNEG(x) ((IHttpNegotiate2*) &(x)->lpHttpNegotiate2Vtbl)
|
2006-06-02 22:40:26 +00:00
|
|
|
#define STATUSCLB(x) ((IBindStatusCallback*) &(x)->lpBindStatusCallbackVtbl)
|
2006-06-02 22:37:58 +00:00
|
|
|
#define BINDINFO(x) ((IInternetBindInfo*) &(x)->lpInternetBindInfoVtbl);
|
|
|
|
|
2006-03-05 19:39:59 +00:00
|
|
|
#define HTMLELEM(x) ((IHTMLElement*) &(x)->lpHTMLElementVtbl)
|
2006-03-23 20:38:38 +00:00
|
|
|
#define HTMLELEM2(x) ((IHTMLElement2*) &(x)->lpHTMLElement2Vtbl)
|
2006-03-05 19:38:30 +00:00
|
|
|
#define HTMLDOMNODE(x) ((IHTMLDOMNode*) &(x)->lpHTMLDOMNodeVtbl)
|
|
|
|
|
2006-04-28 17:57:28 +00:00
|
|
|
#define HTMLTEXTCONT(x) ((IHTMLTextContainer*) &(x)->lpHTMLTextContainerVtbl)
|
|
|
|
|
2005-07-13 11:29:53 +00:00
|
|
|
#define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl)))
|
2005-04-11 16:11:52 +00:00
|
|
|
|
2005-03-31 10:08:02 +00:00
|
|
|
HRESULT HTMLDocument_Create(IUnknown*,REFIID,void**);
|
2006-06-22 14:14:14 +00:00
|
|
|
HRESULT HTMLLoadOptions_Create(IUnknown*,REFIID,void**);
|
2005-04-11 16:11:52 +00:00
|
|
|
|
2006-12-06 17:21:16 +00:00
|
|
|
HTMLWindow *HTMLWindow_Create(HTMLDocument*);
|
|
|
|
HTMLWindow *nswindow_to_window(nsIDOMWindow*);
|
|
|
|
|
2005-12-12 10:51:43 +00:00
|
|
|
void HTMLDocument_HTMLDocument3_Init(HTMLDocument*);
|
2005-04-11 16:11:52 +00:00
|
|
|
void HTMLDocument_Persist_Init(HTMLDocument*);
|
2006-06-20 17:02:48 +00:00
|
|
|
void HTMLDocument_OleCmd_Init(HTMLDocument*);
|
2005-04-12 11:57:51 +00:00
|
|
|
void HTMLDocument_OleObj_Init(HTMLDocument*);
|
2005-04-13 14:41:19 +00:00
|
|
|
void HTMLDocument_View_Init(HTMLDocument*);
|
2005-06-28 10:53:42 +00:00
|
|
|
void HTMLDocument_Window_Init(HTMLDocument*);
|
2005-07-03 11:22:23 +00:00
|
|
|
void HTMLDocument_Service_Init(HTMLDocument*);
|
2005-08-27 09:25:56 +00:00
|
|
|
void HTMLDocument_Hlink_Init(HTMLDocument*);
|
2006-04-28 17:59:58 +00:00
|
|
|
void HTMLDocument_ConnectionPoints_Init(HTMLDocument*);
|
2005-08-01 10:59:45 +00:00
|
|
|
|
2006-06-25 13:49:39 +00:00
|
|
|
void HTMLDocument_ConnectionPoints_Destroy(HTMLDocument*);
|
|
|
|
|
2006-03-01 21:04:51 +00:00
|
|
|
NSContainer *NSContainer_Create(HTMLDocument*,NSContainer*);
|
2006-02-15 10:51:44 +00:00
|
|
|
void NSContainer_Release(NSContainer*);
|
2005-04-14 11:30:50 +00:00
|
|
|
|
2005-08-22 14:07:49 +00:00
|
|
|
void HTMLDocument_LockContainer(HTMLDocument*,BOOL);
|
2005-08-25 19:24:58 +00:00
|
|
|
void HTMLDocument_ShowContextMenu(HTMLDocument*,DWORD,POINT*);
|
2005-08-22 14:07:49 +00:00
|
|
|
|
2006-03-27 19:02:28 +00:00
|
|
|
void show_tooltip(HTMLDocument*,DWORD,DWORD,LPCWSTR);
|
|
|
|
void hide_tooltip(HTMLDocument*);
|
2006-08-17 01:34:22 +00:00
|
|
|
HRESULT get_client_disp_property(IOleClientSite*,DISPID,VARIANT*);
|
2006-03-27 19:02:28 +00:00
|
|
|
|
2005-06-27 09:50:56 +00:00
|
|
|
HRESULT ProtocolFactory_Create(REFCLSID,REFIID,void**);
|
|
|
|
|
2005-08-01 10:59:45 +00:00
|
|
|
void close_gecko(void);
|
2006-03-01 21:04:51 +00:00
|
|
|
void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
|
2006-02-09 11:17:08 +00:00
|
|
|
void init_nsio(nsIComponentManager*,nsIComponentRegistrar*);
|
2005-08-01 10:59:45 +00:00
|
|
|
|
2006-03-01 21:04:51 +00:00
|
|
|
void hlink_frame_navigate(HTMLDocument*,IHlinkFrame*,LPCWSTR,nsIInputStream*,DWORD);
|
2006-02-13 12:26:00 +00:00
|
|
|
|
2006-08-22 14:15:09 +00:00
|
|
|
void call_property_onchanged(ConnectionPoint*,DISPID);
|
|
|
|
|
2006-03-27 19:02:28 +00:00
|
|
|
void *nsalloc(size_t);
|
|
|
|
void nsfree(void*);
|
|
|
|
|
2006-03-18 21:00:34 +00:00
|
|
|
void nsACString_Init(nsACString*,const char*);
|
2006-12-13 23:20:26 +00:00
|
|
|
void nsACString_SetData(nsACString*,const char*);
|
2006-02-09 11:17:38 +00:00
|
|
|
PRUint32 nsACString_GetData(const nsACString*,const char**,PRBool*);
|
2006-03-18 21:00:34 +00:00
|
|
|
void nsACString_Finish(nsACString*);
|
2005-08-11 18:36:48 +00:00
|
|
|
|
2006-03-06 21:34:49 +00:00
|
|
|
void nsAString_Init(nsAString*,const PRUnichar*);
|
|
|
|
PRUint32 nsAString_GetData(const nsAString*,const PRUnichar**,PRBool*);
|
|
|
|
void nsAString_Finish(nsAString*);
|
|
|
|
|
2006-02-15 10:52:33 +00:00
|
|
|
nsIInputStream *create_nsstream(const char*,PRInt32);
|
2006-08-27 14:01:06 +00:00
|
|
|
nsICommandParams *create_nscommand_params(void);
|
2006-10-02 18:33:08 +00:00
|
|
|
void nsnode_to_nsstring(nsIDOMNode*,nsAString*);
|
2006-06-02 22:40:26 +00:00
|
|
|
|
2006-09-24 21:39:55 +00:00
|
|
|
BSCallback *create_bscallback(IMoniker*);
|
2006-08-09 14:37:48 +00:00
|
|
|
HRESULT start_binding(BSCallback*);
|
2006-09-24 21:39:55 +00:00
|
|
|
void set_document_bscallback(HTMLDocument*,BSCallback*);
|
2006-02-15 10:52:33 +00:00
|
|
|
|
2006-02-13 12:26:00 +00:00
|
|
|
IHlink *Hlink_Create(void);
|
2006-07-05 20:37:39 +00:00
|
|
|
IHTMLSelectionObject *HTMLSelectionObject_Create(nsISelection*);
|
2006-07-05 20:38:15 +00:00
|
|
|
IHTMLTxtRange *HTMLTxtRange_Create(nsISelection*);
|
2006-11-17 12:05:01 +00:00
|
|
|
IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration*);
|
2006-11-17 12:08:09 +00:00
|
|
|
IHTMLStyleSheet *HTMLStyleSheet_Create(void);
|
2006-02-13 12:26:00 +00:00
|
|
|
|
2006-03-05 19:39:59 +00:00
|
|
|
void HTMLElement_Create(HTMLDOMNode*);
|
2006-03-08 23:20:19 +00:00
|
|
|
void HTMLBodyElement_Create(HTMLElement*);
|
2006-03-06 21:35:56 +00:00
|
|
|
void HTMLInputElement_Create(HTMLElement*);
|
2006-03-06 21:37:10 +00:00
|
|
|
void HTMLSelectElement_Create(HTMLElement*);
|
2006-03-06 21:38:02 +00:00
|
|
|
void HTMLTextAreaElement_Create(HTMLElement*);
|
2006-03-05 19:39:59 +00:00
|
|
|
|
2006-03-23 20:38:38 +00:00
|
|
|
void HTMLElement2_Init(HTMLElement*);
|
|
|
|
|
2006-08-01 12:49:57 +00:00
|
|
|
void HTMLTextContainer_Init(HTMLTextContainer*,HTMLElement*);
|
2006-04-28 17:57:28 +00:00
|
|
|
|
2006-03-18 18:43:05 +00:00
|
|
|
HRESULT HTMLDOMNode_QI(HTMLDOMNode*,REFIID,void**);
|
|
|
|
HRESULT HTMLElement_QI(HTMLElement*,REFIID,void**);
|
|
|
|
|
2006-03-05 19:38:30 +00:00
|
|
|
HTMLDOMNode *get_node(HTMLDocument*,nsIDOMNode*);
|
|
|
|
void release_nodes(HTMLDocument*);
|
|
|
|
|
2006-06-14 20:35:13 +00:00
|
|
|
void install_wine_gecko(void);
|
|
|
|
|
2006-11-24 09:17:54 +00:00
|
|
|
/* editor */
|
2006-11-30 22:32:05 +00:00
|
|
|
void handle_edit_event(HTMLDocument*,nsIDOMEvent*);
|
|
|
|
|
2006-11-24 09:17:54 +00:00
|
|
|
void get_font_size(HTMLDocument*,WCHAR*);
|
|
|
|
void set_font_size(HTMLDocument*,LPCWSTR);
|
|
|
|
|
2006-09-24 21:10:38 +00:00
|
|
|
extern DWORD mshtml_tls;
|
|
|
|
|
2006-09-24 21:12:06 +00:00
|
|
|
typedef struct task_t {
|
|
|
|
HTMLDocument *doc;
|
|
|
|
|
|
|
|
enum {
|
|
|
|
TASK_SETDOWNLOADSTATE,
|
2006-11-02 16:34:01 +00:00
|
|
|
TASK_PARSECOMPLETE,
|
|
|
|
TASK_SETPROGRESS
|
2006-09-24 21:12:06 +00:00
|
|
|
} task_id;
|
|
|
|
|
|
|
|
struct task_t *next;
|
|
|
|
} task_t;
|
|
|
|
|
2006-09-24 21:10:38 +00:00
|
|
|
typedef struct {
|
|
|
|
HWND thread_hwnd;
|
2006-09-24 21:12:06 +00:00
|
|
|
task_t *task_queue_head;
|
|
|
|
task_t *task_queue_tail;
|
2006-09-24 21:10:38 +00:00
|
|
|
} thread_data_t;
|
|
|
|
|
|
|
|
thread_data_t *get_thread_data(BOOL);
|
|
|
|
HWND get_thread_hwnd(void);
|
2006-09-24 21:12:06 +00:00
|
|
|
void push_task(task_t*);
|
|
|
|
void remove_doc_tasks(HTMLDocument*);
|
2006-09-24 21:10:38 +00:00
|
|
|
|
2005-06-27 09:50:56 +00: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 15:58:27 +00:00
|
|
|
DEFINE_GUID(CLSID_CMarkup,0x3050f4fb,0x98b5,0x11cf,0xbb,0x82,0x00,0xaa,0x00,0xbd,0xce,0x0b);
|
|
|
|
|
2005-08-02 09:49:06 +00:00
|
|
|
extern LONG module_ref;
|
|
|
|
#define LOCK_MODULE() InterlockedIncrement(&module_ref)
|
|
|
|
#define UNLOCK_MODULE() InterlockedDecrement(&module_ref)
|
|
|
|
|
2006-07-16 21:21:36 +00:00
|
|
|
/* memory allocation functions */
|
|
|
|
|
|
|
|
static inline void *mshtml_alloc(size_t len)
|
|
|
|
{
|
|
|
|
return HeapAlloc(GetProcessHeap(), 0, len);
|
|
|
|
}
|
|
|
|
|
2006-09-24 21:10:38 +00:00
|
|
|
static inline void *mshtml_alloc_zero(size_t len)
|
|
|
|
{
|
|
|
|
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
|
|
|
}
|
|
|
|
|
2006-07-16 21:21:36 +00:00
|
|
|
static inline void *mshtml_realloc(void *mem, size_t len)
|
|
|
|
{
|
|
|
|
return HeapReAlloc(GetProcessHeap(), 0, mem, len);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline BOOL mshtml_free(void *mem)
|
|
|
|
{
|
|
|
|
return HeapFree(GetProcessHeap(), 0, mem);
|
|
|
|
}
|
|
|
|
|
2006-11-09 22:54:09 +00:00
|
|
|
HINSTANCE get_shdoclc(void);
|
|
|
|
|
2005-04-14 11:30:50 +00:00
|
|
|
extern HINSTANCE hInst;
|