ReactOS 0.4.15-dev-8135-g1bc6c90
nsembed.c File Reference
#include "mshtml_private.h"
#include <wincon.h>
#include <shlobj.h>
Include dependency graph for nsembed.c:

Go to the source code of this file.

Classes

struct  nsSingletonEnumerator
 
struct  nsWeakReference
 

Macros

#define NS_APPSTARTUPNOTIFIER_CONTRACTID   "@mozilla.org/embedcomp/appstartup-notifier;1"
 
#define NS_WEBBROWSER_CONTRACTID   "@mozilla.org/embedding/browser/nsWebBrowser;1"
 
#define NS_COMMANDPARAMS_CONTRACTID   "@mozilla.org/embedcomp/command-params;1"
 
#define NS_HTMLSERIALIZER_CONTRACTID   "@mozilla.org/layout/contentserializer;1?mimetype=text/html"
 
#define NS_EDITORCONTROLLER_CONTRACTID   "@mozilla.org/editor/editorcontroller;1"
 
#define NS_PREFERENCES_CONTRACTID   "@mozilla.org/preferences;1"
 
#define NS_VARIANT_CONTRACTID   "@mozilla.org/variant;1"
 
#define NS_CATEGORYMANAGER_CONTRACTID   "@mozilla.org/categorymanager;1"
 
#define NS_XMLHTTPREQUEST_CONTRACTID   "@mozilla.org/xmlextras/xmlhttprequest;1"
 
#define NS_SCRIPTSECURITYMANAGER_CONTRACTID   "@mozilla.org/scriptsecuritymanager;1"
 
#define PR_UINT32_MAX   0xffffffff
 
#define NS_STRING_CONTAINER_INIT_DEPEND   0x0002
 
#define NS_CSTRING_CONTAINER_INIT_DEPEND   0x0002
 
#define NS_DLSYM(func)
 

Typedefs

typedef UINT32 PRUint32
 

Functions

 WINE_DECLARE_DEBUG_CHANNEL (gecko)
 
static nsresult (CDECL *NS_InitXPCOM2)(nsIServiceManager **
 
static nsIFile **static PRUint32 (CDECL *NS_StringGetData)(const nsAString *
 
static nsIFile **static const PRUnichar cpp_bool *static const char cpp_bool *static void *CDECLNS_Alloc (SIZE_T)
 
static void (CDECL *NS_Free)(void *)
 
nsresult create_nsfile (const PRUnichar *path, nsIFile **ret)
 
static nsSingletonEnumeratorimpl_from_nsISimpleEnumerator (nsISimpleEnumerator *iface)
 
static nsresult NSAPI nsSingletonEnumerator_QueryInterface (nsISimpleEnumerator *iface, nsIIDRef riid, void **ppv)
 
static nsrefcnt NSAPI nsSingletonEnumerator_AddRef (nsISimpleEnumerator *iface)
 
static nsrefcnt NSAPI nsSingletonEnumerator_Release (nsISimpleEnumerator *iface)
 
static nsresult NSAPI nsSingletonEnumerator_HasMoreElements (nsISimpleEnumerator *iface, cpp_bool *_retval)
 
static nsresult NSAPI nsSingletonEnumerator_GetNext (nsISimpleEnumerator *iface, nsISupports **_retval)
 
static nsISimpleEnumeratorcreate_singleton_enumerator (nsISupports *value)
 
static nsresult NSAPI nsDirectoryServiceProvider2_QueryInterface (nsIDirectoryServiceProvider2 *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsDirectoryServiceProvider2_AddRef (nsIDirectoryServiceProvider2 *iface)
 
static nsrefcnt NSAPI nsDirectoryServiceProvider2_Release (nsIDirectoryServiceProvider2 *iface)
 
static nsresult create_profile_directory (void)
 
static nsresult NSAPI nsDirectoryServiceProvider2_GetFile (nsIDirectoryServiceProvider2 *iface, const char *prop, cpp_bool *persistent, nsIFile **_retval)
 
static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles (nsIDirectoryServiceProvider2 *iface, const char *prop, nsISimpleEnumerator **_retval)
 
static LRESULT WINAPI nsembed_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 
static void register_nscontainer_class (void)
 
static BOOL install_wine_gecko (void)
 
static void set_environment (LPCWSTR gre_path)
 
static BOOL load_xul (const PRUnichar *gre_path)
 
static BOOL check_version (LPCWSTR gre_path, const char *version_string)
 
static BOOL load_wine_gecko_v (PRUnichar *gre_path, HKEY mshtml_key, const char *version, const char *version_string)
 
static BOOL load_wine_gecko (PRUnichar *gre_path)
 
static void set_bool_pref (nsIPrefBranch *pref, const char *pref_name, BOOL val)
 
static void set_int_pref (nsIPrefBranch *pref, const char *pref_name, int val)
 
static void set_string_pref (nsIPrefBranch *pref, const char *pref_name, const char *val)
 
static void set_lang (nsIPrefBranch *pref)
 
static void set_preferences (void)
 
static BOOL init_xpcom (const PRUnichar *gre_path)
 
BOOL load_gecko (void)
 
voidnsalloc (size_t size)
 
void nsfree (void *mem)
 
BOOL nsACString_Init (nsACString *str, const char *data)
 
void nsACString_InitDepend (nsACString *str, const char *data)
 
void nsACString_SetData (nsACString *str, const char *data)
 
UINT32 nsACString_GetData (const nsACString *str, const char **data)
 
void nsACString_Finish (nsACString *str)
 
BOOL nsAString_Init (nsAString *str, const PRUnichar *data)
 
void nsAString_InitDepend (nsAString *str, const PRUnichar *data)
 
UINT32 nsAString_GetData (const nsAString *str, const PRUnichar **data)
 
void nsAString_Finish (nsAString *str)
 
HRESULT return_nsstr (nsresult nsres, nsAString *nsstr, BSTR *p)
 
nsICommandParamscreate_nscommand_params (void)
 
nsIWritableVariantcreate_nsvariant (void)
 
charget_nscategory_entry (const char *category, const char *entry)
 
nsresult get_nsinterface (nsISupports *iface, REFIID riid, void **ppv)
 
static HRESULT nsnode_to_nsstring_rec (nsIContentSerializer *serializer, nsIDOMNode *nsnode, nsAString *str)
 
HRESULT nsnode_to_nsstring (nsIDOMNode *nsnode, nsAString *str)
 
void get_editor_controller (NSContainer *This)
 
void close_gecko (void)
 
BOOL is_gecko_path (const char *path)
 
void set_viewer_zoom (NSContainer *nscontainer, float factor)
 
static nsWeakReferenceimpl_from_nsIWeakReference (nsIWeakReference *iface)
 
static nsresult NSAPI nsWeakReference_QueryInterface (nsIWeakReference *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsWeakReference_AddRef (nsIWeakReference *iface)
 
static nsrefcnt NSAPI nsWeakReference_Release (nsIWeakReference *iface)
 
static nsresult NSAPI nsWeakReference_QueryReferent (nsIWeakReference *iface, const nsIID *riid, void **result)
 
static NSContainerimpl_from_nsIWebBrowserChrome (nsIWebBrowserChrome *iface)
 
static nsresult NSAPI nsWebBrowserChrome_QueryInterface (nsIWebBrowserChrome *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsWebBrowserChrome_AddRef (nsIWebBrowserChrome *iface)
 
static nsrefcnt NSAPI nsWebBrowserChrome_Release (nsIWebBrowserChrome *iface)
 
static nsresult NSAPI nsWebBrowserChrome_SetStatus (nsIWebBrowserChrome *iface, UINT32 statusType, const PRUnichar *status)
 
static nsresult NSAPI nsWebBrowserChrome_GetWebBrowser (nsIWebBrowserChrome *iface, nsIWebBrowser **aWebBrowser)
 
static nsresult NSAPI nsWebBrowserChrome_SetWebBrowser (nsIWebBrowserChrome *iface, nsIWebBrowser *aWebBrowser)
 
static nsresult NSAPI nsWebBrowserChrome_GetChromeFlags (nsIWebBrowserChrome *iface, UINT32 *aChromeFlags)
 
static nsresult NSAPI nsWebBrowserChrome_SetChromeFlags (nsIWebBrowserChrome *iface, UINT32 aChromeFlags)
 
static nsresult NSAPI nsWebBrowserChrome_DestroyBrowserWindow (nsIWebBrowserChrome *iface)
 
static nsresult NSAPI nsWebBrowserChrome_SizeBrowserTo (nsIWebBrowserChrome *iface, LONG aCX, LONG aCY)
 
static nsresult NSAPI nsWebBrowserChrome_ShowAsModal (nsIWebBrowserChrome *iface)
 
static nsresult NSAPI nsWebBrowserChrome_IsWindowModal (nsIWebBrowserChrome *iface, cpp_bool *_retval)
 
static nsresult NSAPI nsWebBrowserChrome_ExitModalEventLoop (nsIWebBrowserChrome *iface, nsresult aStatus)
 
static NSContainerimpl_from_nsIContextMenuListener (nsIContextMenuListener *iface)
 
static nsresult NSAPI nsContextMenuListener_QueryInterface (nsIContextMenuListener *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsContextMenuListener_AddRef (nsIContextMenuListener *iface)
 
static nsrefcnt NSAPI nsContextMenuListener_Release (nsIContextMenuListener *iface)
 
static nsresult NSAPI nsContextMenuListener_OnShowContextMenu (nsIContextMenuListener *iface, UINT32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode)
 
static NSContainerimpl_from_nsIURIContentListener (nsIURIContentListener *iface)
 
static nsresult NSAPI nsURIContentListener_QueryInterface (nsIURIContentListener *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsURIContentListener_AddRef (nsIURIContentListener *iface)
 
static nsrefcnt NSAPI nsURIContentListener_Release (nsIURIContentListener *iface)
 
static nsresult NSAPI nsURIContentListener_OnStartURIOpen (nsIURIContentListener *iface, nsIURI *aURI, cpp_bool *_retval)
 
static nsresult NSAPI nsURIContentListener_DoContent (nsIURIContentListener *iface, const nsACString *aContentType, cpp_bool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, cpp_bool *_retval)
 
static nsresult NSAPI nsURIContentListener_IsPreferred (nsIURIContentListener *iface, const char *aContentType, char **aDesiredContentType, cpp_bool *_retval)
 
static nsresult NSAPI nsURIContentListener_CanHandleContent (nsIURIContentListener *iface, const char *aContentType, cpp_bool aIsContentPreferred, char **aDesiredContentType, cpp_bool *_retval)
 
static nsresult NSAPI nsURIContentListener_GetLoadCookie (nsIURIContentListener *iface, nsISupports **aLoadCookie)
 
static nsresult NSAPI nsURIContentListener_SetLoadCookie (nsIURIContentListener *iface, nsISupports *aLoadCookie)
 
static nsresult NSAPI nsURIContentListener_GetParentContentListener (nsIURIContentListener *iface, nsIURIContentListener **aParentContentListener)
 
static nsresult NSAPI nsURIContentListener_SetParentContentListener (nsIURIContentListener *iface, nsIURIContentListener *aParentContentListener)
 
static NSContainerimpl_from_nsIEmbeddingSiteWindow (nsIEmbeddingSiteWindow *iface)
 
static nsresult NSAPI nsEmbeddingSiteWindow_QueryInterface (nsIEmbeddingSiteWindow *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsEmbeddingSiteWindow_AddRef (nsIEmbeddingSiteWindow *iface)
 
static nsrefcnt NSAPI nsEmbeddingSiteWindow_Release (nsIEmbeddingSiteWindow *iface)
 
static nsresult NSAPI nsEmbeddingSiteWindow_SetDimensions (nsIEmbeddingSiteWindow *iface, UINT32 flags, LONG x, LONG y, LONG cx, LONG cy)
 
static nsresult NSAPI nsEmbeddingSiteWindow_GetDimensions (nsIEmbeddingSiteWindow *iface, UINT32 flags, LONG *x, LONG *y, LONG *cx, LONG *cy)
 
static nsresult NSAPI nsEmbeddingSiteWindow_SetFocus (nsIEmbeddingSiteWindow *iface)
 
static nsresult NSAPI nsEmbeddingSiteWindow_GetVisibility (nsIEmbeddingSiteWindow *iface, cpp_bool *aVisibility)
 
static nsresult NSAPI nsEmbeddingSiteWindow_SetVisibility (nsIEmbeddingSiteWindow *iface, cpp_bool aVisibility)
 
static nsresult NSAPI nsEmbeddingSiteWindow_GetTitle (nsIEmbeddingSiteWindow *iface, PRUnichar **aTitle)
 
static nsresult NSAPI nsEmbeddingSiteWindow_SetTitle (nsIEmbeddingSiteWindow *iface, const PRUnichar *aTitle)
 
static nsresult NSAPI nsEmbeddingSiteWindow_GetSiteWindow (nsIEmbeddingSiteWindow *iface, void **aSiteWindow)
 
static NSContainerimpl_from_nsITooltipListener (nsITooltipListener *iface)
 
static nsresult NSAPI nsTooltipListener_QueryInterface (nsITooltipListener *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsTooltipListener_AddRef (nsITooltipListener *iface)
 
static nsrefcnt NSAPI nsTooltipListener_Release (nsITooltipListener *iface)
 
static nsresult NSAPI nsTooltipListener_OnShowTooltip (nsITooltipListener *iface, LONG aXCoord, LONG aYCoord, const PRUnichar *aTipText)
 
static nsresult NSAPI nsTooltipListener_OnHideTooltip (nsITooltipListener *iface)
 
static NSContainerimpl_from_nsIInterfaceRequestor (nsIInterfaceRequestor *iface)
 
static nsresult NSAPI nsInterfaceRequestor_QueryInterface (nsIInterfaceRequestor *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsInterfaceRequestor_AddRef (nsIInterfaceRequestor *iface)
 
static nsrefcnt NSAPI nsInterfaceRequestor_Release (nsIInterfaceRequestor *iface)
 
static nsresult NSAPI nsInterfaceRequestor_GetInterface (nsIInterfaceRequestor *iface, nsIIDRef riid, void **result)
 
static NSContainerimpl_from_nsISupportsWeakReference (nsISupportsWeakReference *iface)
 
static nsresult NSAPI nsSupportsWeakReference_QueryInterface (nsISupportsWeakReference *iface, nsIIDRef riid, void **result)
 
static nsrefcnt NSAPI nsSupportsWeakReference_AddRef (nsISupportsWeakReference *iface)
 
static nsrefcnt NSAPI nsSupportsWeakReference_Release (nsISupportsWeakReference *iface)
 
static nsresult NSAPI nsSupportsWeakReference_GetWeakReference (nsISupportsWeakReference *iface, nsIWeakReference **_retval)
 
static HRESULT init_nscontainer (NSContainer *nscontainer)
 
HRESULT create_nscontainer (HTMLDocumentObj *doc, NSContainer **_ret)
 
void NSContainer_Release (NSContainer *This)
 
nsIXMLHttpRequestcreate_nsxhr (nsIDOMWindow *nswindow)
 

Variables

static cpp_bool
 
static HINSTANCE xul_handle = NULL
 
static nsIServiceManagerpServMgr = NULL
 
static nsIComponentManagerpCompMgr = NULL
 
static nsICategoryManagercat_mgr
 
static nsIFileprofile_directory
 
static nsIFileplugin_directory
 
static const WCHAR wszNsContainer [] = {'N','s','C','o','n','t','a','i','n','e','r',0}
 
static ATOM nscontainer_class
 
static WCHAR gecko_path [MAX_PATH]
 
static unsigned gecko_path_len
 
static const nsISimpleEnumeratorVtbl nsSingletonEnumeratorVtbl
 
static const nsIDirectoryServiceProvider2Vtbl nsDirectoryServiceProvider2Vtbl
 
static nsIDirectoryServiceProvider2 nsDirectoryServiceProvider2
 
static CRITICAL_SECTION cs_load_gecko = { &cs_load_gecko_dbg, -1, 0, 0, 0, 0 }
 
static CRITICAL_SECTION_DEBUG cs_load_gecko_dbg
 
static const nsIWeakReferenceVtbl nsWeakReferenceVtbl
 
static const nsIWebBrowserChromeVtbl nsWebBrowserChromeVtbl
 
static const nsIContextMenuListenerVtbl nsContextMenuListenerVtbl
 
static const nsIURIContentListenerVtbl nsURIContentListenerVtbl
 
static const nsIEmbeddingSiteWindowVtbl nsEmbeddingSiteWindowVtbl
 
static const nsITooltipListenerVtbl nsTooltipListenerVtbl
 
static const nsIInterfaceRequestorVtbl nsInterfaceRequestorVtbl
 
static const nsISupportsWeakReferenceVtbl nsSupportsWeakReferenceVtbl
 

Macro Definition Documentation

◆ NS_APPSTARTUPNOTIFIER_CONTRACTID

#define NS_APPSTARTUPNOTIFIER_CONTRACTID   "@mozilla.org/embedcomp/appstartup-notifier;1"

Definition at line 26 of file nsembed.c.

◆ NS_CATEGORYMANAGER_CONTRACTID

#define NS_CATEGORYMANAGER_CONTRACTID   "@mozilla.org/categorymanager;1"

Definition at line 33 of file nsembed.c.

◆ NS_COMMANDPARAMS_CONTRACTID

#define NS_COMMANDPARAMS_CONTRACTID   "@mozilla.org/embedcomp/command-params;1"

Definition at line 28 of file nsembed.c.

◆ NS_CSTRING_CONTAINER_INIT_DEPEND

#define NS_CSTRING_CONTAINER_INIT_DEPEND   0x0002

Definition at line 40 of file nsembed.c.

◆ NS_DLSYM

#define NS_DLSYM (   func)
Value:
if(!func) \
ERR("Could not GetProcAddress(" #func ") failed\n")
#define GetProcAddress(x, y)
Definition: compat.h:753
GLenum func
Definition: glext.h:6028
static HINSTANCE xul_handle
Definition: nsembed.c:59

◆ NS_EDITORCONTROLLER_CONTRACTID

#define NS_EDITORCONTROLLER_CONTRACTID   "@mozilla.org/editor/editorcontroller;1"

Definition at line 30 of file nsembed.c.

◆ NS_HTMLSERIALIZER_CONTRACTID

#define NS_HTMLSERIALIZER_CONTRACTID   "@mozilla.org/layout/contentserializer;1?mimetype=text/html"

Definition at line 29 of file nsembed.c.

◆ NS_PREFERENCES_CONTRACTID

#define NS_PREFERENCES_CONTRACTID   "@mozilla.org/preferences;1"

Definition at line 31 of file nsembed.c.

◆ NS_SCRIPTSECURITYMANAGER_CONTRACTID

#define NS_SCRIPTSECURITYMANAGER_CONTRACTID   "@mozilla.org/scriptsecuritymanager;1"

Definition at line 35 of file nsembed.c.

◆ NS_STRING_CONTAINER_INIT_DEPEND

#define NS_STRING_CONTAINER_INIT_DEPEND   0x0002

Definition at line 39 of file nsembed.c.

◆ NS_VARIANT_CONTRACTID

#define NS_VARIANT_CONTRACTID   "@mozilla.org/variant;1"

Definition at line 32 of file nsembed.c.

◆ NS_WEBBROWSER_CONTRACTID

#define NS_WEBBROWSER_CONTRACTID   "@mozilla.org/embedding/browser/nsWebBrowser;1"

Definition at line 27 of file nsembed.c.

◆ NS_XMLHTTPREQUEST_CONTRACTID

#define NS_XMLHTTPREQUEST_CONTRACTID   "@mozilla.org/xmlextras/xmlhttprequest;1"

Definition at line 34 of file nsembed.c.

◆ PR_UINT32_MAX

#define PR_UINT32_MAX   0xffffffff

Definition at line 37 of file nsembed.c.

Typedef Documentation

◆ PRUint32

static nsIFile **static const PRUnichar cpp_bool *static PRUint32

Definition at line 42 of file nsembed.c.

Function Documentation

◆ check_version()

static BOOL check_version ( LPCWSTR  gre_path,
const char version_string 
)
static

Definition at line 521 of file nsembed.c.

522{
524 char version[128];
525 DWORD read=0;
526 HANDLE hfile;
527
528 static const WCHAR wszVersion[] = {'\\','V','E','R','S','I','O','N',0};
529
530 strcpyW(file_name, gre_path);
531 strcatW(file_name, wszVersion);
532
535 if(hfile == INVALID_HANDLE_VALUE) {
536 ERR("Could not open VERSION file\n");
537 return FALSE;
538 }
539
540 ReadFile(hfile, version, sizeof(version), &read, NULL);
541 version[read] = 0;
542 CloseHandle(hfile);
543
544 TRACE("%s\n", debugstr_a(version));
545
547 ERR("Unexpected version %s, expected %s\n", debugstr_a(version),
549 return FALSE;
550 }
551
552 return TRUE;
553}
int strcmp(const char *String1, const char *String2)
Definition: utclib.c:469
#define read
Definition: acwin.h:96
#define ERR(fmt,...)
Definition: debug.h:113
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define CloseHandle
Definition: compat.h:739
#define OPEN_EXISTING
Definition: compat.h:775
#define ReadFile(a, b, c, d, e)
Definition: compat.h:742
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define GENERIC_READ
Definition: compat.h:135
#define MAX_PATH
Definition: compat.h:34
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define FILE_SHARE_READ
Definition: compat.h:136
static const WCHAR version[]
Definition: asmname.c:66
unsigned long DWORD
Definition: ntddk_ex.h:95
#define debugstr_a
Definition: kernel32.h:31
char version_string[]
Definition: mkisofs.c:71
static LPCWSTR file_name
Definition: protocol.c:147
#define strcatW(d, s)
Definition: unicode.h:36
#define strcpyW(d, s)
Definition: unicode.h:35
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by load_wine_gecko_v(), and SECUR32_initNTLMSP().

◆ close_gecko()

void close_gecko ( void  )

Definition at line 1076 of file nsembed.c.

1077{
1078 TRACE("()\n");
1079
1080 release_nsio();
1082
1083 if(profile_directory) {
1084 nsIFile_Release(profile_directory);
1086 }
1087
1088 if(plugin_directory) {
1089 nsIFile_Release(plugin_directory);
1091 }
1092
1093 if(pCompMgr)
1094 nsIComponentManager_Release(pCompMgr);
1095
1096 if(pServMgr)
1097 nsIServiceManager_Release(pServMgr);
1098
1099 if(cat_mgr)
1100 nsICategoryManager_Release(cat_mgr);
1101
1102 /* Gecko doesn't really support being unloaded */
1103 /* if (hXPCOM) FreeLibrary(hXPCOM); */
1104
1106}
void init_mutation(nsIComponentManager *) DECLSPEC_HIDDEN
Definition: mutation.c:774
void release_nsio(void) DECLSPEC_HIDDEN
Definition: nsio.c:4085
static nsICategoryManager * cat_mgr
Definition: nsembed.c:63
static CRITICAL_SECTION cs_load_gecko
Definition: nsembed.c:733
static nsIComponentManager * pCompMgr
Definition: nsembed.c:62
static nsIFile * plugin_directory
Definition: nsembed.c:64
static nsIServiceManager * pServMgr
Definition: nsembed.c:61
static nsIFile * profile_directory
Definition: nsembed.c:64
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)

Referenced by process_detach().

◆ create_nscommand_params()

nsICommandParams * create_nscommand_params ( void  )

Definition at line 865 of file nsembed.c.

866{
868 nsresult nsres;
869
870 if(!pCompMgr)
871 return NULL;
872
873 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
874 NS_COMMANDPARAMS_CONTRACTID, NULL, &IID_nsICommandParams,
875 (void**)&ret);
876 if(NS_FAILED(nsres))
877 ERR("Could not get nsICommandParams\n");
878
879 return ret;
880}
#define NS_FAILED(res)
#define NS_COMMANDPARAMS_CONTRACTID
Definition: nsembed.c:28
int ret

Referenced by exec_fontname(), exec_forecolor(), query_ns_edit_status(), set_ns_align(), and set_ns_fontname().

◆ create_nscontainer()

HRESULT create_nscontainer ( HTMLDocumentObj doc,
NSContainer **  _ret 
)

Definition at line 2076 of file nsembed.c.

2077{
2079 HRESULT hres;
2080
2081 if(!load_gecko())
2083
2084 ret = heap_alloc_zero(sizeof(NSContainer));
2085 if(!ret)
2086 return E_OUTOFMEMORY;
2087
2088 ret->nsIWebBrowserChrome_iface.lpVtbl = &nsWebBrowserChromeVtbl;
2089 ret->nsIContextMenuListener_iface.lpVtbl = &nsContextMenuListenerVtbl;
2090 ret->nsIURIContentListener_iface.lpVtbl = &nsURIContentListenerVtbl;
2091 ret->nsIEmbeddingSiteWindow_iface.lpVtbl = &nsEmbeddingSiteWindowVtbl;
2092 ret->nsITooltipListener_iface.lpVtbl = &nsTooltipListenerVtbl;
2093 ret->nsIInterfaceRequestor_iface.lpVtbl = &nsInterfaceRequestorVtbl;
2094 ret->nsISupportsWeakReference_iface.lpVtbl = &nsSupportsWeakReferenceVtbl;
2095
2096 ret->doc = doc;
2097 ret->ref = 1;
2098
2100 if(SUCCEEDED(hres))
2101 *_ret = ret;
2102 else
2103 nsIWebBrowserChrome_Release(&ret->nsIWebBrowserChrome_iface);
2104 return hres;
2105}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hres
Definition: protocol.c:465
static const nsIInterfaceRequestorVtbl nsInterfaceRequestorVtbl
Definition: nsembed.c:1908
BOOL load_gecko(void)
Definition: nsembed.c:742
static const nsISupportsWeakReferenceVtbl nsSupportsWeakReferenceVtbl
Definition: nsembed.c:1961
static const nsITooltipListenerVtbl nsTooltipListenerVtbl
Definition: nsembed.c:1863
static const nsIWebBrowserChromeVtbl nsWebBrowserChromeVtbl
Definition: nsembed.c:1399
static const nsIURIContentListenerVtbl nsURIContentListenerVtbl
Definition: nsembed.c:1673
static const nsIEmbeddingSiteWindowVtbl nsEmbeddingSiteWindowVtbl
Definition: nsembed.c:1804
static HRESULT init_nscontainer(NSContainer *nscontainer)
Definition: nsembed.c:1968
static const nsIContextMenuListenerVtbl nsContextMenuListenerVtbl
Definition: nsembed.c:1509
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

Referenced by HTMLDocument_Create().

◆ create_nsfile()

nsresult create_nsfile ( const PRUnichar path,
nsIFile **  ret 
)

Definition at line 72 of file nsembed.c.

73{
75 nsresult nsres;
76
78 nsres = NS_NewLocalFile(&str, FALSE, ret);
80
81 if(NS_FAILED(nsres))
82 WARN("NS_NewLocalFile failed: %08x\n", nsres);
83 return nsres;
84}
#define WARN(fmt,...)
Definition: debug.h:115
void nsAString_InitDepend(nsAString *str, const PRUnichar *data)
Definition: nsembed.c:826
void nsAString_Finish(nsAString *str)
Definition: nsembed.c:836
const WCHAR * str

Referenced by create_profile_directory(), init_xpcom(), nsDirectoryServiceProvider2_GetFiles(), and nsFileURL_GetFile().

◆ create_nsvariant()

nsIWritableVariant * create_nsvariant ( void  )

Definition at line 882 of file nsembed.c.

883{
885 nsresult nsres;
886
887 if(!pCompMgr)
888 return NULL;
889
890 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
891 NS_VARIANT_CONTRACTID, NULL, &IID_nsIWritableVariant, (void**)&ret);
892 if(NS_FAILED(nsres))
893 ERR("Could not get nsIVariant\n");
894
895 return ret;
896}
#define NS_VARIANT_CONTRACTID
Definition: nsembed.c:32

Referenced by HTMLSelectElement_add().

◆ create_nsxhr()

nsIXMLHttpRequest * create_nsxhr ( nsIDOMWindow nswindow)

Definition at line 2156 of file nsembed.c.

2157{
2159 nsIPrincipal *nspri;
2160 nsIGlobalObject *nsglo;
2161 nsIXMLHttpRequest *nsxhr;
2162 nsresult nsres;
2163
2164 nsres = nsIServiceManager_GetServiceByContractID(pServMgr,
2166 &IID_nsIScriptSecurityManager, (void**)&secman);
2167 if(NS_FAILED(nsres)) {
2168 ERR("Could not get sec manager service: %08x\n", nsres);
2169 return NULL;
2170 }
2171
2172 nsres = nsIScriptSecurityManager_GetSystemPrincipal(secman, &nspri);
2173 nsIScriptSecurityManager_Release(secman);
2174 if(NS_FAILED(nsres)) {
2175 ERR("GetSystemPrincipal failed: %08x\n", nsres);
2176 return NULL;
2177 }
2178
2179 nsres = nsIDOMWindow_QueryInterface(nswindow, &IID_nsIGlobalObject, (void **)&nsglo);
2180 assert(nsres == NS_OK);
2181
2182 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
2183 NS_XMLHTTPREQUEST_CONTRACTID, NULL, &IID_nsIXMLHttpRequest,
2184 (void**)&nsxhr);
2185 if(NS_FAILED(nsres)) {
2186 ERR("Could not get nsIXMLHttpRequest: %08x\n", nsres);
2187 nsISupports_Release(nspri);
2188 nsIGlobalObject_Release(nsglo);
2189 return NULL;
2190 }
2191
2192 nsres = nsIXMLHttpRequest_Init(nsxhr, nspri, NULL, nsglo, NULL, NULL);
2193
2194 nsISupports_Release(nspri);
2195 nsIGlobalObject_Release(nsglo);
2196 if(NS_FAILED(nsres)) {
2197 ERR("nsIXMLHttpRequest_Init failed: %08x\n", nsres);
2198 nsIXMLHttpRequest_Release(nsxhr);
2199 return NULL;
2200 }
2201 return nsxhr;
2202}
#define assert(x)
Definition: debug.h:53
#define NS_OK
#define NS_SCRIPTSECURITYMANAGER_CONTRACTID
Definition: nsembed.c:35
#define NS_XMLHTTPREQUEST_CONTRACTID
Definition: nsembed.c:34

Referenced by HTMLXMLHttpRequestFactory_create().

◆ create_profile_directory()

static nsresult create_profile_directory ( void  )
static

Definition at line 224 of file nsembed.c.

225{
226 static const WCHAR wine_geckoW[] = {'\\','w','i','n','e','_','g','e','c','k','o',0};
227
228 WCHAR path[MAX_PATH + sizeof(wine_geckoW)/sizeof(WCHAR)];
229 cpp_bool exists;
230 nsresult nsres;
232
234 if(FAILED(hres)) {
235 ERR("SHGetFolderPath failed: %08x\n", hres);
236 return NS_ERROR_FAILURE;
237 }
238
239 strcatW(path, wine_geckoW);
241 if(NS_FAILED(nsres))
242 return nsres;
243
244 nsres = nsIFile_Exists(profile_directory, &exists);
245 if(NS_FAILED(nsres)) {
246 ERR("Exists failed: %08x\n", nsres);
247 return nsres;
248 }
249
250 if(!exists) {
251 nsres = nsIFile_Create(profile_directory, 1, 0700);
252 if(NS_FAILED(nsres))
253 ERR("Create failed: %08x\n", nsres);
254 }
255
256 return nsres;
257}
unsigned char cpp_bool
Definition: atl.c:38
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2589
#define FAILED(hr)
Definition: intsafe.h:51
#define NS_ERROR_FAILURE
nsresult create_nsfile(const PRUnichar *path, nsIFile **ret)
Definition: nsembed.c:72
@ SHGFP_TYPE_CURRENT
Definition: shlobj.h:2135
#define CSIDL_APPDATA
Definition: shlobj.h:2184

Referenced by nsDirectoryServiceProvider2_GetFile().

◆ create_singleton_enumerator()

static nsISimpleEnumerator * create_singleton_enumerator ( nsISupports value)
static

Definition at line 175 of file nsembed.c.

176{
178
179 ret = heap_alloc(sizeof(*ret));
180 if(!ret)
181 return NULL;
182
183 ret->nsISimpleEnumerator_iface.lpVtbl = &nsSingletonEnumeratorVtbl;
184 ret->ref = 1;
185
186 if(value)
187 nsISupports_AddRef(value);
188 ret->value = value;
189 return &ret->nsISimpleEnumerator_iface;
190}
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static const nsISimpleEnumeratorVtbl nsSingletonEnumeratorVtbl
Definition: nsembed.c:167
Definition: pdh_main.c:94

Referenced by nsDirectoryServiceProvider2_GetFiles().

◆ get_editor_controller()

void get_editor_controller ( NSContainer This)

Definition at line 1029 of file nsembed.c.

1030{
1031 nsIEditingSession *editing_session = NULL;
1032 nsIControllerContext *ctrlctx;
1033 nsresult nsres;
1034
1035 if(This->editor) {
1036 nsIEditor_Release(This->editor);
1037 This->editor = NULL;
1038 }
1039
1040 if(This->editor_controller) {
1041 nsIController_Release(This->editor_controller);
1042 This->editor_controller = NULL;
1043 }
1044
1045 nsres = get_nsinterface((nsISupports*)This->webbrowser, &IID_nsIEditingSession,
1046 (void**)&editing_session);
1047 if(NS_FAILED(nsres)) {
1048 ERR("Could not get nsIEditingSession: %08x\n", nsres);
1049 return;
1050 }
1051
1052 nsres = nsIEditingSession_GetEditorForWindow(editing_session,
1053 This->doc->basedoc.window->nswindow, &This->editor);
1054 nsIEditingSession_Release(editing_session);
1055 if(NS_FAILED(nsres)) {
1056 ERR("Could not get editor: %08x\n", nsres);
1057 return;
1058 }
1059
1060 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
1061 NS_EDITORCONTROLLER_CONTRACTID, NULL, &IID_nsIControllerContext, (void**)&ctrlctx);
1062 if(NS_SUCCEEDED(nsres)) {
1063 nsres = nsIControllerContext_SetCommandContext(ctrlctx, (nsISupports *)This->editor);
1064 if(NS_FAILED(nsres))
1065 ERR("SetCommandContext failed: %08x\n", nsres);
1066 nsres = nsIControllerContext_QueryInterface(ctrlctx, &IID_nsIController,
1067 (void**)&This->editor_controller);
1068 nsIControllerContext_Release(ctrlctx);
1069 if(NS_FAILED(nsres))
1070 ERR("Could not get nsIController interface: %08x\n", nsres);
1071 }else {
1072 ERR("Could not create edit controller: %08x\n", nsres);
1073 }
1074}
#define NS_SUCCEEDED(res)
nsresult get_nsinterface(nsISupports *iface, REFIID riid, void **ppv)
Definition: nsembed.c:907
#define NS_EDITORCONTROLLER_CONTRACTID
Definition: nsembed.c:30

Referenced by handle_edit_load().

◆ get_nscategory_entry()

char * get_nscategory_entry ( const char category,
const char entry 
)

Definition at line 898 of file nsembed.c.

899{
900 char *ret = NULL;
901 nsresult nsres;
902
903 nsres = nsICategoryManager_GetCategoryEntry(cat_mgr, category, entry, &ret);
904 return NS_SUCCEEDED(nsres) ? ret : NULL;
905}
uint32_t entry
Definition: isohybrid.c:63

Referenced by is_supported_doc_mime().

◆ get_nsinterface()

nsresult get_nsinterface ( nsISupports iface,
REFIID  riid,
void **  ppv 
)

Definition at line 907 of file nsembed.c.

908{
909 nsIInterfaceRequestor *iface_req;
910 nsresult nsres;
911
912 nsres = nsISupports_QueryInterface(iface, &IID_nsIInterfaceRequestor, (void**)&iface_req);
913 if(NS_FAILED(nsres))
914 return nsres;
915
916 nsres = nsIInterfaceRequestor_GetInterface(iface_req, riid, ppv);
917 nsIInterfaceRequestor_Release(iface_req);
918
919 return nsres;
920}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

Referenced by CustomDoc_Release(), do_ns_command(), exec_print(), get_clipboard_commands(), get_editor_controller(), get_ns_command_state(), load_nsuri(), and set_viewer_zoom().

◆ impl_from_nsIContextMenuListener()

static NSContainer * impl_from_nsIContextMenuListener ( nsIContextMenuListener iface)
inlinestatic

Definition at line 1419 of file nsembed.c.

1420{
1421 return CONTAINING_RECORD(iface, NSContainer, nsIContextMenuListener_iface);
1422}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by nsContextMenuListener_AddRef(), nsContextMenuListener_OnShowContextMenu(), nsContextMenuListener_QueryInterface(), and nsContextMenuListener_Release().

◆ impl_from_nsIEmbeddingSiteWindow()

◆ impl_from_nsIInterfaceRequestor()

static NSContainer * impl_from_nsIInterfaceRequestor ( nsIInterfaceRequestor iface)
inlinestatic

Definition at line 1871 of file nsembed.c.

1872{
1873 return CONTAINING_RECORD(iface, NSContainer, nsIInterfaceRequestor_iface);
1874}

Referenced by nsInterfaceRequestor_AddRef(), nsInterfaceRequestor_GetInterface(), nsInterfaceRequestor_QueryInterface(), and nsInterfaceRequestor_Release().

◆ impl_from_nsISimpleEnumerator()

static nsSingletonEnumerator * impl_from_nsISimpleEnumerator ( nsISimpleEnumerator iface)
inlinestatic

◆ impl_from_nsISupportsWeakReference()

static NSContainer * impl_from_nsISupportsWeakReference ( nsISupportsWeakReference iface)
inlinestatic

◆ impl_from_nsITooltipListener()

static NSContainer * impl_from_nsITooltipListener ( nsITooltipListener iface)
inlinestatic

◆ impl_from_nsIURIContentListener()

◆ impl_from_nsIWeakReference()

static nsWeakReference * impl_from_nsIWeakReference ( nsIWeakReference iface)
inlinestatic

Definition at line 1160 of file nsembed.c.

1161{
1162 return CONTAINING_RECORD(iface, nsWeakReference, nsIWeakReference_iface);
1163}

Referenced by nsWeakReference_AddRef(), nsWeakReference_QueryInterface(), nsWeakReference_QueryReferent(), and nsWeakReference_Release().

◆ impl_from_nsIWebBrowserChrome()

◆ init_nscontainer()

static HRESULT init_nscontainer ( NSContainer nscontainer)
static

Definition at line 1968 of file nsembed.c.

1969{
1970 nsIWebBrowserSetup *wbsetup;
1971 nsIScrollable *scrollable;
1972 nsresult nsres;
1973
1974 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr, NS_WEBBROWSER_CONTRACTID,
1975 NULL, &IID_nsIWebBrowser, (void**)&nscontainer->webbrowser);
1976 if(NS_FAILED(nsres)) {
1977 ERR("Creating WebBrowser failed: %08x\n", nsres);
1978 return E_FAIL;
1979 }
1980
1981 nsres = nsIWebBrowser_SetContainerWindow(nscontainer->webbrowser, &nscontainer->nsIWebBrowserChrome_iface);
1982 if(NS_FAILED(nsres)) {
1983 ERR("SetContainerWindow failed: %08x\n", nsres);
1984 return E_FAIL;
1985 }
1986
1987 nsres = nsIWebBrowser_QueryInterface(nscontainer->webbrowser, &IID_nsIBaseWindow,
1988 (void**)&nscontainer->window);
1989 if(NS_FAILED(nsres)) {
1990 ERR("Could not get nsIBaseWindow interface: %08x\n", nsres);
1991 return E_FAIL;
1992 }
1993
1994 nsres = nsIWebBrowser_QueryInterface(nscontainer->webbrowser, &IID_nsIWebBrowserSetup,
1995 (void**)&wbsetup);
1996 if(NS_SUCCEEDED(nsres)) {
1997 nsres = nsIWebBrowserSetup_SetProperty(wbsetup, SETUP_IS_CHROME_WRAPPER, FALSE);
1998 nsIWebBrowserSetup_Release(wbsetup);
1999 if(NS_FAILED(nsres)) {
2000 ERR("SetProperty(SETUP_IS_CHROME_WRAPPER) failed: %08x\n", nsres);
2001 return E_FAIL;
2002 }
2003 }else {
2004 ERR("Could not get nsIWebBrowserSetup interface\n");
2005 return E_FAIL;
2006 }
2007
2008 nsres = nsIWebBrowser_QueryInterface(nscontainer->webbrowser, &IID_nsIWebNavigation,
2009 (void**)&nscontainer->navigation);
2010 if(NS_FAILED(nsres)) {
2011 ERR("Could not get nsIWebNavigation interface: %08x\n", nsres);
2012 return E_FAIL;
2013 }
2014
2015 nsres = nsIWebBrowser_QueryInterface(nscontainer->webbrowser, &IID_nsIWebBrowserFocus,
2016 (void**)&nscontainer->focus);
2017 if(NS_FAILED(nsres)) {
2018 ERR("Could not get nsIWebBrowserFocus interface: %08x\n", nsres);
2019 return E_FAIL;
2020 }
2021
2022 if(!nscontainer_class) {
2025 return E_FAIL;
2026 }
2027
2028 nscontainer->hwnd = CreateWindowExW(0, wszNsContainer, NULL,
2029 WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, 0, 0, 100, 100,
2030 GetDesktopWindow(), NULL, hInst, nscontainer);
2031 if(!nscontainer->hwnd) {
2032 WARN("Could not create window\n");
2033 return E_FAIL;
2034 }
2035
2036 nsres = nsIBaseWindow_InitWindow(nscontainer->window, nscontainer->hwnd, NULL, 0, 0, 100, 100);
2037 if(NS_SUCCEEDED(nsres)) {
2038 nsres = nsIBaseWindow_Create(nscontainer->window);
2039 if(NS_FAILED(nsres)) {
2040 WARN("Creating window failed: %08x\n", nsres);
2041 return E_FAIL;
2042 }
2043
2044 nsIBaseWindow_SetVisibility(nscontainer->window, FALSE);
2045 nsIBaseWindow_SetEnabled(nscontainer->window, FALSE);
2046 }else {
2047 ERR("InitWindow failed: %08x\n", nsres);
2048 return E_FAIL;
2049 }
2050
2051 nsres = nsIWebBrowser_SetParentURIContentListener(nscontainer->webbrowser,
2052 &nscontainer->nsIURIContentListener_iface);
2053 if(NS_FAILED(nsres))
2054 ERR("SetParentURIContentListener failed: %08x\n", nsres);
2055
2056 nsres = nsIWebBrowser_QueryInterface(nscontainer->webbrowser, &IID_nsIScrollable, (void**)&scrollable);
2057 if(NS_SUCCEEDED(nsres)) {
2058 nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable,
2059 ScrollOrientation_Y, Scrollbar_Always);
2060 if(NS_FAILED(nsres))
2061 ERR("Could not set default Y scrollbar prefs: %08x\n", nsres);
2062
2063 nsres = nsIScrollable_SetDefaultScrollbarPreferences(scrollable,
2064 ScrollOrientation_X, Scrollbar_Auto);
2065 if(NS_FAILED(nsres))
2066 ERR("Could not set default X scrollbar prefs: %08x\n", nsres);
2067
2068 nsIScrollable_Release(scrollable);
2069 }else {
2070 ERR("Could not get nsIScrollable: %08x\n", nsres);
2071 }
2072
2073 return S_OK;
2074}
#define E_FAIL
Definition: ddrawi.h:102
HINSTANCE hInst
Definition: dxdiag.c:13
#define S_OK
Definition: intsafe.h:52
#define NS_WEBBROWSER_CONTRACTID
Definition: nsembed.c:27
static void register_nscontainer_class(void)
Definition: nsembed.c:372
static ATOM nscontainer_class
Definition: nsembed.c:68
static const WCHAR wszNsContainer[]
Definition: nsembed.c:66
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
nsIURIContentListener nsIURIContentListener_iface
nsIWebBrowser * webbrowser
nsIWebBrowserChrome nsIWebBrowserChrome_iface
nsIBaseWindow * window
nsIWebBrowserFocus * focus
nsIWebNavigation * navigation
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:656
HWND WINAPI CreateWindowExW(_In_ DWORD dwExStyle, _In_opt_ LPCWSTR lpClassName, _In_opt_ LPCWSTR lpWindowName, _In_ DWORD dwStyle, _In_ int X, _In_ int Y, _In_ int nWidth, _In_ int nHeight, _In_opt_ HWND hWndParent, _In_opt_ HMENU hMenu, _In_opt_ HINSTANCE hInstance, _In_opt_ LPVOID lpParam)

Referenced by create_nscontainer().

◆ init_xpcom()

static BOOL init_xpcom ( const PRUnichar gre_path)
static

Definition at line 678 of file nsembed.c.

679{
680 nsIComponentRegistrar *registrar = NULL;
681 nsIFile *gre_dir;
682 WCHAR *ptr;
683 nsresult nsres;
684
685 nsres = create_nsfile(gre_path, &gre_dir);
686 if(NS_FAILED(nsres)) {
688 return FALSE;
689 }
690
691 nsres = NS_InitXPCOM2(&pServMgr, gre_dir, (nsIDirectoryServiceProvider*)&nsDirectoryServiceProvider2);
692 if(NS_FAILED(nsres)) {
693 ERR("NS_InitXPCOM2 failed: %08x\n", nsres);
695 return FALSE;
696 }
697
698 strcpyW(gecko_path, gre_path);
699 for(ptr = gecko_path; *ptr; ptr++) {
700 if(*ptr == '\\')
701 *ptr = '/';
702 }
704
705 nsres = nsIServiceManager_QueryInterface(pServMgr, &IID_nsIComponentManager, (void**)&pCompMgr);
706 if(NS_FAILED(nsres))
707 ERR("Could not get nsIComponentManager: %08x\n", nsres);
708
709 nsres = NS_GetComponentRegistrar(&registrar);
710 if(NS_SUCCEEDED(nsres))
711 init_nsio(pCompMgr, registrar);
712 else
713 ERR("NS_GetComponentRegistrar failed: %08x\n", nsres);
714
717
718 nsres = nsIServiceManager_GetServiceByContractID(pServMgr, NS_CATEGORYMANAGER_CONTRACTID,
719 &IID_nsICategoryManager, (void**)&cat_mgr);
720 if(NS_FAILED(nsres))
721 ERR("Could not get category manager service: %08x\n", nsres);
722
723 if(registrar) {
724 register_nsservice(registrar, pServMgr);
725 nsIComponentRegistrar_Release(registrar);
726 }
727
728 init_node_cc();
729
730 return TRUE;
731}
#define FreeLibrary(x)
Definition: compat.h:748
void init_node_cc(void)
Definition: htmlnode.c:1328
static PVOID ptr
Definition: dispmode.c:27
void register_nsservice(nsIComponentRegistrar *, nsIServiceManager *) DECLSPEC_HIDDEN
Definition: nsservice.c:372
void init_nsio(nsIComponentManager *, nsIComponentRegistrar *) DECLSPEC_HIDDEN
Definition: nsio.c:4048
static unsigned gecko_path_len
Definition: nsembed.c:70
static WCHAR gecko_path[MAX_PATH]
Definition: nsembed.c:69
static nsIDirectoryServiceProvider2 nsDirectoryServiceProvider2
Definition: nsembed.c:331
static void set_preferences(void)
Definition: nsembed.c:658
#define NS_CATEGORYMANAGER_CONTRACTID
Definition: nsembed.c:33

Referenced by load_gecko().

◆ install_wine_gecko()

static BOOL install_wine_gecko ( void  )
static

Definition at line 387 of file nsembed.c.

388{
390 STARTUPINFOW si;
391 WCHAR app[MAX_PATH];
392 WCHAR *args;
393 LONG len;
394 BOOL ret;
395
396 static const WCHAR controlW[] = {'\\','c','o','n','t','r','o','l','.','e','x','e',0};
397 static const WCHAR argsW[] =
398 {' ','a','p','p','w','i','z','.','c','p','l',' ','i','n','s','t','a','l','l','_','g','e','c','k','o',0};
399
400 len = GetSystemDirectoryW(app, MAX_PATH-sizeof(controlW)/sizeof(WCHAR));
401 memcpy(app+len, controlW, sizeof(controlW));
402
403 args = heap_alloc(len*sizeof(WCHAR) + sizeof(controlW) + sizeof(argsW));
404 if(!args)
405 return FALSE;
406
407 memcpy(args, app, len*sizeof(WCHAR) + sizeof(controlW));
408 memcpy(args + len + sizeof(controlW)/sizeof(WCHAR)-1, argsW, sizeof(argsW));
409
410 TRACE("starting %s\n", debugstr_w(args));
411
412 memset(&si, 0, sizeof(si));
413 si.cb = sizeof(si);
414 ret = CreateProcessW(app, args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
416 if (ret) {
417 CloseHandle(pi.hThread);
419 CloseHandle(pi.hProcess);
420 }
421
422 return ret;
423}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4592
#define INFINITE
Definition: serial.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
GLenum GLsizei len
Definition: glext.h:6722
#define debugstr_w
Definition: kernel32.h:32
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static refpint_t pi[]
Definition: server.c:96
long LONG
Definition: pedump.c:60
#define memset(x, y, z)
Definition: compat.h:39
static const WCHAR controlW[]
Definition: actctx.c:726
#define args
Definition: format.c:66
DWORD cb
Definition: winbase.h:852
Definition: match.c:390
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82

Referenced by load_gecko().

◆ is_gecko_path()

BOOL is_gecko_path ( const char path)

Definition at line 1108 of file nsembed.c.

1109{
1110 WCHAR *buf, *ptr;
1111 BOOL ret;
1112
1114 if(!buf || strlenW(buf) < gecko_path_len)
1115 return FALSE;
1116
1117 for(ptr = buf; *ptr; ptr++) {
1118 if(*ptr == '\\')
1119 *ptr = '/';
1120 }
1121
1123 buf[gecko_path_len] = 0;
1124
1126 heap_free(buf);
1127 return ret;
1128}
HRESULT WINAPI UrlUnescapeW(LPWSTR pszUrl, LPWSTR pszUnescaped, LPDWORD pcchUnescaped, DWORD dwFlags)
Definition: url.c:1367
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
static WCHAR * heap_strdupUtoW(const char *str)
#define strcmpiW(s1, s2)
Definition: unicode.h:45
#define strlenW(s)
Definition: unicode.h:34
#define URL_UNESCAPE_INPLACE
Definition: shlwapi.h:1224

Referenced by is_gecko_special_uri().

◆ load_gecko()

BOOL load_gecko ( void  )

Definition at line 742 of file nsembed.c.

743{
744 PRUnichar gre_path[MAX_PATH];
745 BOOL ret = FALSE;
746
747 static DWORD loading_thread;
748
749 TRACE("()\n");
750
751 /* load_gecko may be called recursively */
752 if(loading_thread == GetCurrentThreadId())
753 return pCompMgr != NULL;
754
756
757 if(!loading_thread) {
758 loading_thread = GetCurrentThreadId();
759
760#ifdef __REACTOS__
761 if(load_wine_gecko(gre_path))
762#else
763 if(load_wine_gecko(gre_path)
764 || (install_wine_gecko() && load_wine_gecko(gre_path)))
765#endif
766 ret = init_xpcom(gre_path);
767 else
768 MESSAGE("Could not load wine-gecko. HTML rendering will be disabled.\n");
769 }else {
770 ret = pCompMgr != NULL;
771 }
772
774
775 return ret;
776}
#define MESSAGE
Definition: options.h:86
static BOOL install_wine_gecko(void)
Definition: nsembed.c:387
static BOOL load_wine_gecko(PRUnichar *gre_path)
Definition: nsembed.c:583
static BOOL init_xpcom(const PRUnichar *gre_path)
Definition: nsembed.c:678
WCHAR PRUnichar
Definition: nsiface.idl:48
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)

Referenced by create_nscontainer(), and DllRegisterServer().

◆ load_wine_gecko()

static BOOL load_wine_gecko ( PRUnichar gre_path)
static

Definition at line 583 of file nsembed.c.

584{
585 HKEY hkey;
586 DWORD res;
587 BOOL ret;
588
589 static const WCHAR wszMshtmlKey[] = {
590 'S','o','f','t','w','a','r','e','\\','W','i','n','e',
591 '\\','M','S','H','T','M','L',0};
592
593 /* @@ Wine registry key: HKLM\Software\Wine\MSHTML */
594 res = RegOpenKeyW(HKEY_LOCAL_MACHINE, wszMshtmlKey, &hkey);
595 if(res != ERROR_SUCCESS)
596 return FALSE;
597
598 ret = load_wine_gecko_v(gre_path, hkey, GECKO_VERSION, GECKO_VERSION_STRING);
599
600 RegCloseKey(hkey);
601 return ret;
602}
#define GECKO_VERSION
Definition: nsiface.idl:28
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3268
GLuint res
Definition: glext.h:9613
static BOOL load_wine_gecko_v(PRUnichar *gre_path, HKEY mshtml_key, const char *version, const char *version_string)
Definition: nsembed.c:555
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by load_gecko().

◆ load_wine_gecko_v()

static BOOL load_wine_gecko_v ( PRUnichar gre_path,
HKEY  mshtml_key,
const char version,
const char version_string 
)
static

Definition at line 555 of file nsembed.c.

557{
559 HKEY hkey = mshtml_key;
560
561 static const WCHAR wszGeckoPath[] =
562 {'G','e','c','k','o','P','a','t','h',0};
563
564 if(version) {
565 /* @@ Wine registry key: HKLM\Software\Wine\MSHTML<version> */
566 res = RegOpenKeyA(mshtml_key, version, &hkey);
567 if(res != ERROR_SUCCESS)
568 return FALSE;
569 }
570
571 res = RegQueryValueExW(hkey, wszGeckoPath, NULL, &type, (LPBYTE)gre_path, &size);
572 if(hkey != mshtml_key)
573 RegCloseKey(hkey);
574 if(res != ERROR_SUCCESS || type != REG_SZ)
575 return FALSE;
576
577 if(!check_version(gre_path, version_string))
578 return FALSE;
579
580 return load_xul(gre_path);
581}
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3234
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLsizeiptr size
Definition: glext.h:5919
#define REG_SZ
Definition: layer.c:22
static BOOL load_xul(const PRUnichar *gre_path)
Definition: nsembed.c:472
static BOOL check_version(LPCWSTR gre_path, const char *version_string)
Definition: nsembed.c:521
unsigned char * LPBYTE
Definition: typedefs.h:53

Referenced by load_wine_gecko().

◆ load_xul()

static BOOL load_xul ( const PRUnichar gre_path)
static

Definition at line 472 of file nsembed.c.

473{
474 static const WCHAR xul_dllW[] = {'\\','x','u','l','.','d','l','l',0};
476
477 strcpyW(file_name, gre_path);
478 strcatW(file_name, xul_dllW);
479
480 TRACE("(%s)\n", debugstr_w(file_name));
481
482 set_environment(gre_path);
483
485 if(!xul_handle) {
486 WARN("Could not load XUL: %d\n", GetLastError());
487 return FALSE;
488 }
489
490#define NS_DLSYM(func) \
491 func = (void *)GetProcAddress(xul_handle, #func); \
492 if(!func) \
493 ERR("Could not GetProcAddress(" #func ") failed\n")
494
495 NS_DLSYM(NS_InitXPCOM2);
496 NS_DLSYM(NS_ShutdownXPCOM);
497 NS_DLSYM(NS_GetComponentRegistrar);
498 NS_DLSYM(NS_StringContainerInit2);
499 NS_DLSYM(NS_CStringContainerInit2);
500 NS_DLSYM(NS_StringContainerFinish);
501 NS_DLSYM(NS_CStringContainerFinish);
502 NS_DLSYM(NS_StringSetData);
503 NS_DLSYM(NS_CStringSetData);
504 NS_DLSYM(NS_NewLocalFile);
505 NS_DLSYM(NS_StringGetData);
506 NS_DLSYM(NS_CStringGetData);
508 NS_DLSYM(NS_Free);
509 NS_DLSYM(ccref_incr);
510 NS_DLSYM(ccref_decr);
511 NS_DLSYM(ccref_init);
512 NS_DLSYM(ccp_init);
513 NS_DLSYM(describe_cc_node);
514 NS_DLSYM(note_cc_edge);
515
516#undef NS_DLSYM
517
518 return TRUE;
519}
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
Definition: loader.c:288
static nsIFile **static const PRUnichar cpp_bool *static const char cpp_bool *static void *CDECL * NS_Alloc(SIZE_T)
static void set_environment(LPCWSTR gre_path)
Definition: nsembed.c:426
#define NS_DLSYM(func)
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define LOAD_WITH_ALTERED_SEARCH_PATH
Definition: winbase.h:344

Referenced by load_wine_gecko_v().

◆ NS_Alloc()

static nsIFile **static const PRUnichar cpp_bool *static const char cpp_bool *static void *CDECL * NS_Alloc ( SIZE_T  )
static

Referenced by load_xul(), and nsalloc().

◆ nsACString_Finish()

void nsACString_Finish ( nsACString str)

◆ nsACString_GetData()

◆ nsACString_Init()

BOOL nsACString_Init ( nsACString str,
const char data 
)

◆ nsACString_InitDepend()

void nsACString_InitDepend ( nsACString str,
const char data 
)

Definition at line 797 of file nsembed.c.

798{
799 NS_CStringContainerInit2(str, data, PR_UINT32_MAX, NS_CSTRING_CONTAINER_INIT_DEPEND);
800}
#define NS_CSTRING_CONTAINER_INIT_DEPEND
Definition: nsembed.c:40

Referenced by HTMLXMLHttpRequest_getResponseHeader(), parse_content_type(), and visit_http_headers().

◆ nsACString_SetData()

◆ nsalloc()

void * nsalloc ( size_t  size)

Definition at line 778 of file nsembed.c.

779{
780 return NS_Alloc(size);
781}

Referenced by nsTooltipTextProvider_GetNodeText().

◆ nsAString_Finish()

void nsAString_Finish ( nsAString str)

Definition at line 836 of file nsembed.c.

837{
838 NS_StringContainerFinish(str);
839}

Referenced by bind_event_scripts(), check_codebase(), check_event_attr(), check_style_attr_value(), create_nselem(), create_nsfile(), detach_nslistener(), detach_xhr_event_listener(), dispid_from_elem_name(), document_write(), elem_string_attr_getter(), elem_string_attr_setter(), exec_hyperlink(), fill_props(), find_event_target(), get_doc_elem_by_id(), get_doc_string(), get_document_charset(), get_elem_attr_value(), get_elem_clsid(), get_font_size(), get_frame_by_name(), get_nsstyle_attr(), get_nsstyle_attr_nsval(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_script_guid(), handle_htmlevent(), handle_link_click_event(), HTMLAnchorElement_get_href(), HTMLAnchorElement_handle_event(), HTMLAnchorElement_put_href(), HTMLAnchorElement_put_name(), HTMLAnchorElement_put_rel(), HTMLAnchorElement_put_search(), HTMLAnchorElement_put_target(), HTMLAreaElement_handle_event(), HTMLBodyElement_get_bgColor(), HTMLBodyElement_get_text(), HTMLBodyElement_put_aLink(), HTMLBodyElement_put_background(), HTMLBodyElement_put_bgColor(), HTMLBodyElement_put_link(), HTMLBodyElement_put_text(), HTMLBodyElement_put_vLink(), HTMLButtonElement_put_name(), HTMLCurrentStyle_Create(), HTMLDocument3_createTextNode(), HTMLDocument3_getElementsByName(), HTMLDocument3_getElementsByTagName(), HTMLDocument5_createComment(), HTMLDocument_get_title(), HTMLDocument_put_title(), HTMLDocumentNode_invoke(), HTMLDOMAttribute_get_specified(), HTMLDOMNode_get_nodeValue(), HTMLDOMNode_put_nodeValue(), HTMLDOMTextNode2_appendData(), HTMLDOMTextNode_put_data(), HTMLElement2_getElementsByTagName(), HTMLElement2_put_dir(), HTMLElement3_put_contentEditable(), HTMLElement_Create(), HTMLElement_get_outerHTML(), HTMLElement_insertAdjacentHTML(), HTMLElement_insertAdjacentText(), HTMLElement_populate_props(), HTMLElement_put_className(), HTMLElement_put_id(), HTMLElement_put_innerHTML(), HTMLElement_put_innerText(), HTMLElement_put_title(), HTMLElementCollection_tags(), HTMLFormElement_get_action(), HTMLFormElement_get_dispid(), HTMLFormElement_put_action(), HTMLFormElement_put_encoding(), HTMLFormElement_put_method(), HTMLFormElement_put_name(), HTMLFormElement_put_target(), HTMLFormElement_submit(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLFrameBase_get_scrolling(), HTMLFrameBase_put_frameBorder(), HTMLFrameBase_put_marginHeight(), HTMLFrameBase_put_marginWidth(), HTMLFrameBase_put_name(), HTMLFrameBase_put_scrolling(), HTMLFrameBase_put_src(), HTMLIFrameElement2_put_height(), HTMLIFrameElement2_put_width(), HTMLImgElement_get_src(), HTMLImgElement_put_align(), HTMLImgElement_put_alt(), HTMLImgElement_put_src(), HTMLInputElement_get_src(), HTMLInputElement_is_text_edit(), HTMLInputElement_put_defaultValue(), HTMLInputElement_put_name(), HTMLInputElement_put_src(), HTMLInputElement_put_type(), HTMLInputElement_put_value(), HTMLLabelElement_put_htmlFor(), HTMLLinkElement_put_href(), HTMLLinkElement_put_media(), HTMLLinkElement_put_rel(), HTMLLinkElement_put_rev(), HTMLLinkElement_put_type(), HTMLObjectElement_get_height(), HTMLObjectElement_get_width(), HTMLObjectElement_put_height(), HTMLObjectElement_put_name(), HTMLObjectElement_put_width(), HTMLOptionElement_put_text(), HTMLOptionElement_put_value(), HTMLScriptElement_put_src(), HTMLScriptElement_put_text(), HTMLScriptElement_put_type(), HTMLSelectElement_put_name(), HTMLSelectElement_put_value(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_get_cssText(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTMLStyle_put_cssText(), HTMLStyle_removeAttribute(), HTMLStyleElement_put_media(), HTMLStyleElement_put_type(), HTMLStyleSheet_put_cssText(), HTMLTable3_put_summary(), HTMLTable_get_bgColor(), HTMLTable_get_width(), HTMLTable_put_align(), HTMLTable_put_bgColor(), HTMLTable_put_cellPadding(), HTMLTable_put_cellSpacing(), HTMLTable_put_frame(), HTMLTable_put_width(), HTMLTableCell_get_bgColor(), HTMLTableCell_put_align(), HTMLTableCell_put_bgColor(), HTMLTableRow_get_bgColor(), HTMLTableRow_put_align(), HTMLTableRow_put_bgColor(), HTMLTableRow_put_vAlign(), HTMLTextAreaElement_put_defaultValue(), HTMLTextAreaElement_put_value(), HTMLTxtRange_get_htmlText(), HTMLTxtRange_pasteHTML(), HTMLTxtRange_put_text(), HTMLWindow2_put_name(), HTMLXMLHttpRequest_bind_event(), HTMLXMLHttpRequest_open(), init_event(), is_elem_name(), is_elem_tag(), move_next_char(), move_prev_char(), navigate_fragment(), nsTooltipTextProvider_GetNodeText(), parse_event_elem(), parse_inline_script(), parse_script_elem(), query_align_status(), range_to_string(), remove_child_attr(), replace_node_by_html(), return_nscolor(), return_nsstr(), run_insert_comment(), set_event_info(), set_font_size(), set_nsstyle_attr(), set_opacity(), update_window_doc(), and wstrbuf_append_node().

◆ nsAString_GetData()

UINT32 nsAString_GetData ( const nsAString str,
const PRUnichar **  data 
)

Definition at line 831 of file nsembed.c.

832{
833 return NS_StringGetData(str, data, NULL);
834}

Referenced by check_style_attr_value(), find_event_target(), get_doc_string(), get_document_charset(), get_elem_attr_value(), get_font_size(), get_nsstyle_attr(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_script_guid(), get_target_window(), get_text_node_data(), handle_htmlevent(), HTMLAnchorElement_get_href(), HTMLBodyElement_get_bgColor(), HTMLBodyElement_get_text(), HTMLDocument_get_title(), HTMLDOMNode_get_nodeValue(), HTMLElement_Create(), HTMLElement_get_outerHTML(), HTMLElement_populate_props(), HTMLElementCollection_tags(), HTMLFormElement_get_action(), HTMLFormElement_get_dispid(), HTMLFormElement_submit(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLFrameBase_get_scrolling(), HTMLImgElement_get_src(), HTMLInputElement_get_src(), HTMLInputElement_is_text_edit(), HTMLObjectElement_get_height(), HTMLObjectElement_get_width(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_get_cssText(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTMLStyle_removeAttribute(), HTMLTable_get_bgColor(), HTMLTableCell_get_bgColor(), HTMLTableRow_get_bgColor(), HTMLTxtRange_get_htmlText(), is_elem_name(), is_elem_tag(), navigate_href(), navigate_href_new_window(), nsstr_to_truncated_bstr(), nsTooltipTextProvider_GetNodeText(), parse_event_elem(), parse_inline_script(), parse_script_elem(), remove_child_attr(), return_nscolor(), return_nsstr(), run_insert_comment(), and wstrbuf_append_node().

◆ nsAString_Init()

BOOL nsAString_Init ( nsAString str,
const PRUnichar data 
)

Definition at line 817 of file nsembed.c.

818{
819 return NS_SUCCEEDED(NS_StringContainerInit2(str, data, PR_UINT32_MAX, 0));
820}

Referenced by check_style_attr_value(), find_event_target(), get_doc_string(), get_document_charset(), get_elem_attr_value(), get_font_size(), get_nsstyle_attr(), get_nsstyle_attr_var(), get_nsstyle_pixel_val(), get_nsstyle_pos(), get_script_guid(), get_text_node_data(), handle_htmlevent(), HTMLAnchorElement_get_hash(), HTMLAnchorElement_get_hostname(), HTMLAnchorElement_get_href(), HTMLAnchorElement_get_name(), HTMLAnchorElement_get_rel(), HTMLAnchorElement_get_search(), HTMLAnchorElement_get_target(), HTMLAnchorElement_handle_event(), HTMLAreaElement_handle_event(), HTMLBodyElement_get_aLink(), HTMLBodyElement_get_background(), HTMLBodyElement_get_bgColor(), HTMLBodyElement_get_link(), HTMLBodyElement_get_text(), HTMLBodyElement_get_vLink(), HTMLButtonElement_get_name(), HTMLCurrentStyle_Create(), HTMLDocument5_get_compatMode(), HTMLDocument_get_charset(), HTMLDocument_get_title(), HTMLDOMNode_get_nodeName(), HTMLDOMNode_get_nodeValue(), HTMLDOMTextNode_get_data(), HTMLElement2_get_dir(), HTMLElement3_get_contentEditable(), HTMLElement_Create(), HTMLElement_get_className(), HTMLElement_get_id(), HTMLElement_get_innerHTML(), HTMLElement_get_outerHTML(), HTMLElement_get_tagName(), HTMLElement_get_title(), HTMLElement_populate_props(), HTMLElementCollection_tags(), HTMLFormElement_get_action(), HTMLFormElement_get_dispid(), HTMLFormElement_get_encoding(), HTMLFormElement_get_method(), HTMLFormElement_get_name(), HTMLFormElement_get_target(), HTMLFormElement_submit(), HTMLFrameBase_get_frameBorder(), HTMLFrameBase_get_marginHeight(), HTMLFrameBase_get_marginWidth(), HTMLFrameBase_get_name(), HTMLFrameBase_get_scrolling(), HTMLFrameBase_get_src(), HTMLIFrameElement2_get_height(), HTMLIFrameElement2_get_width(), HTMLImgElement_get_align(), HTMLImgElement_get_alt(), HTMLImgElement_get_name(), HTMLImgElement_get_src(), HTMLInputElement_get_defaultValue(), HTMLInputElement_get_name(), HTMLInputElement_get_src(), HTMLInputElement_get_type(), HTMLInputElement_get_value(), HTMLInputElement_is_text_edit(), HTMLLinkElement_get_href(), HTMLLinkElement_get_media(), HTMLLinkElement_get_rel(), HTMLLinkElement_get_rev(), HTMLLinkElement_get_type(), HTMLObjectElement_get_height(), HTMLObjectElement_get_name(), HTMLObjectElement_get_width(), HTMLOptionElement_get_text(), HTMLOptionElement_get_value(), HTMLScriptElement_get_src(), HTMLScriptElement_get_text(), HTMLScriptElement_get_type(), HTMLScriptElement_put_type(), HTMLSelectElement_get_name(), HTMLSelectElement_get_type(), HTMLSelectElement_get_value(), HTMLStyle_get_backgroundPositionX(), HTMLStyle_get_backgroundPositionY(), HTMLStyle_get_cssText(), HTMLStyle_put_backgroundPositionX(), HTMLStyle_put_backgroundPositionY(), HTMLStyle_removeAttribute(), HTMLStyleElement_get_media(), HTMLStyleElement_get_type(), HTMLStyleSheet_get_cssText(), HTMLStyleSheet_get_href(), HTMLTable3_get_summary(), HTMLTable_get_align(), HTMLTable_get_bgColor(), HTMLTable_get_cellPadding(), HTMLTable_get_cellSpacing(), HTMLTable_get_frame(), HTMLTable_get_width(), HTMLTableCell_get_align(), HTMLTableCell_get_bgColor(), HTMLTableRow_get_align(), HTMLTableRow_get_bgColor(), HTMLTableRow_get_vAlign(), HTMLTextAreaElement_get_defaultValue(), HTMLTextAreaElement_get_name(), HTMLTextAreaElement_get_value(), HTMLTxtRange_get_htmlText(), HTMLWindow2_get_name(), HTMLXMLHttpRequest_get_responseText(), is_elem_name(), is_elem_tag(), nsTooltipTextProvider_GetNodeText(), parse_event_elem(), parse_inline_script(), parse_script_elem(), query_align_status(), remove_child_attr(), run_insert_comment(), var2str(), variant_to_nsastr(), variant_to_nscolor(), and wstrbuf_append_node().

◆ nsAString_InitDepend()

void nsAString_InitDepend ( nsAString str,
const PRUnichar data 
)

Definition at line 826 of file nsembed.c.

827{
828 NS_StringContainerInit2(str, data, PR_UINT32_MAX, NS_STRING_CONTAINER_INIT_DEPEND);
829}
#define NS_STRING_CONTAINER_INIT_DEPEND
Definition: nsembed.c:39

Referenced by bind_event_scripts(), create_nselem(), create_nsfile(), detach_nslistener(), detach_xhr_event_listener(), dispid_from_elem_name(), document_write(), elem_string_attr_setter(), exec_hyperlink(), fill_props(), get_doc_elem_by_id(), get_elem_attr_value(), get_frame_by_name(), get_nsstyle_attr_nsval(), HTMLAnchorElement_put_href(), HTMLAnchorElement_put_name(), HTMLAnchorElement_put_rel(), HTMLAnchorElement_put_search(), HTMLAnchorElement_put_target(), HTMLBodyElement_put_background(), HTMLButtonElement_put_name(), HTMLDocument3_createTextNode(), HTMLDocument3_getElementsByName(), HTMLDocument3_getElementsByTagName(), HTMLDocument5_createComment(), HTMLDocument_put_title(), HTMLDocumentNode_invoke(), HTMLDOMAttribute_get_specified(), HTMLDOMNode_put_nodeValue(), HTMLDOMTextNode2_appendData(), HTMLDOMTextNode_put_data(), HTMLElement2_getElementsByTagName(), HTMLElement2_put_dir(), HTMLElement3_put_contentEditable(), HTMLElement_insertAdjacentHTML(), HTMLElement_insertAdjacentText(), HTMLElement_put_className(), HTMLElement_put_id(), HTMLElement_put_innerHTML(), HTMLElement_put_innerText(), HTMLElement_put_title(), HTMLFormElement_put_action(), HTMLFormElement_put_encoding(), HTMLFormElement_put_method(), HTMLFormElement_put_name(), HTMLFormElement_put_target(), HTMLFrameBase_put_frameBorder(), HTMLFrameBase_put_marginHeight(), HTMLFrameBase_put_marginWidth(), HTMLFrameBase_put_name(), HTMLFrameBase_put_scrolling(), HTMLFrameBase_put_src(), HTMLIFrameElement2_put_height(), HTMLIFrameElement2_put_width(), HTMLImgElement_put_align(), HTMLImgElement_put_alt(), HTMLImgElement_put_src(), HTMLInputElement_put_defaultValue(), HTMLInputElement_put_name(), HTMLInputElement_put_src(), HTMLInputElement_put_type(), HTMLInputElement_put_value(), HTMLLabelElement_put_htmlFor(), HTMLLinkElement_put_href(), HTMLLinkElement_put_media(), HTMLLinkElement_put_rel(), HTMLLinkElement_put_rev(), HTMLLinkElement_put_type(), HTMLObjectElement_put_height(), HTMLObjectElement_put_name(), HTMLObjectElement_put_width(), HTMLOptionElement_put_text(), HTMLOptionElement_put_value(), HTMLScriptElement_put_src(), HTMLScriptElement_put_text(), HTMLSelectElement_put_name(), HTMLSelectElement_put_value(), HTMLStyle_put_cssText(), HTMLStyle_removeAttribute(), HTMLStyleElement_put_media(), HTMLStyleElement_put_type(), HTMLStyleSheet_put_cssText(), HTMLTable3_put_summary(), HTMLTable_put_align(), HTMLTable_put_cellSpacing(), HTMLTable_put_frame(), HTMLTableCell_put_align(), HTMLTableRow_put_align(), HTMLTableRow_put_vAlign(), HTMLTextAreaElement_put_defaultValue(), HTMLTextAreaElement_put_value(), HTMLTxtRange_pasteHTML(), HTMLTxtRange_put_text(), HTMLWindow2_put_name(), HTMLXMLHttpRequest_bind_event(), init_event(), navigate_fragment(), replace_node_by_html(), set_event_info(), set_font_size(), set_nsstyle_attr(), set_opacity(), update_window_doc(), and variant_to_nsastr().

◆ NSContainer_Release()

void NSContainer_Release ( NSContainer This)

Definition at line 2107 of file nsembed.c.

2108{
2109 TRACE("(%p)\n", This);
2110
2111 This->doc = NULL;
2112
2113 ShowWindow(This->hwnd, SW_HIDE);
2114 SetParent(This->hwnd, NULL);
2115
2116 nsIBaseWindow_SetVisibility(This->window, FALSE);
2117 nsIBaseWindow_Destroy(This->window);
2118
2119 nsIWebBrowser_SetContainerWindow(This->webbrowser, NULL);
2120
2121 nsIWebBrowser_Release(This->webbrowser);
2122 This->webbrowser = NULL;
2123
2124 nsIWebNavigation_Release(This->navigation);
2125 This->navigation = NULL;
2126
2127 nsIBaseWindow_Release(This->window);
2128 This->window = NULL;
2129
2130 nsIWebBrowserFocus_Release(This->focus);
2131 This->focus = NULL;
2132
2133 if(This->editor_controller) {
2134 nsIController_Release(This->editor_controller);
2135 This->editor_controller = NULL;
2136 }
2137
2138 if(This->editor) {
2139 nsIEditor_Release(This->editor);
2140 This->editor = NULL;
2141 }
2142
2143 if(This->content_listener) {
2144 nsIURIContentListener_Release(This->content_listener);
2145 This->content_listener = NULL;
2146 }
2147
2148 if(This->hwnd) {
2149 DestroyWindow(This->hwnd);
2150 This->hwnd = NULL;
2151 }
2152
2153 nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
2154}
#define SW_HIDE
Definition: winuser.h:768
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)

Referenced by CustomDoc_Release().

◆ nsContextMenuListener_AddRef()

static nsrefcnt NSAPI nsContextMenuListener_AddRef ( nsIContextMenuListener iface)
static

Definition at line 1431 of file nsembed.c.

1432{
1434 return nsIWebBrowserChrome_AddRef(&This->nsIWebBrowserChrome_iface);
1435}
static NSContainer * impl_from_nsIContextMenuListener(nsIContextMenuListener *iface)
Definition: nsembed.c:1419

◆ nsContextMenuListener_OnShowContextMenu()

static nsresult NSAPI nsContextMenuListener_OnShowContextMenu ( nsIContextMenuListener iface,
UINT32  aContextFlags,
nsIDOMEvent aEvent,
nsIDOMNode aNode 
)
static

Definition at line 1443 of file nsembed.c.

1445{
1449 POINT pt;
1450 DWORD dwID = CONTEXT_MENU_DEFAULT;
1451 nsresult nsres;
1452 HRESULT hres;
1453
1454 TRACE("(%p)->(%08x %p %p)\n", This, aContextFlags, aEvent, aNode);
1455
1456 fire_event(This->doc->basedoc.doc_node /* FIXME */, EVENTID_CONTEXTMENU, TRUE, aNode, aEvent, NULL);
1457
1458 nsres = nsIDOMEvent_QueryInterface(aEvent, &IID_nsIDOMMouseEvent, (void**)&event);
1459 if(NS_FAILED(nsres)) {
1460 ERR("Could not get nsIDOMMouseEvent interface: %08x\n", nsres);
1461 return nsres;
1462 }
1463
1464 nsIDOMMouseEvent_GetScreenX(event, &pt.x);
1465 nsIDOMMouseEvent_GetScreenY(event, &pt.y);
1466 nsIDOMMouseEvent_Release(event);
1467
1468 switch(aContextFlags) {
1469 case CONTEXT_NONE:
1470 case CONTEXT_DOCUMENT:
1471 case CONTEXT_TEXT: {
1473
1474 nsres = nsIDOMHTMLDocument_GetSelection(This->doc->basedoc.doc_node->nsdoc, &selection);
1475 if(NS_SUCCEEDED(nsres) && selection) {
1476 cpp_bool is_collapsed;
1477
1478 /* FIXME: Check if the click was inside selection. */
1479 nsres = nsISelection_GetIsCollapsed(selection, &is_collapsed);
1480 nsISelection_Release(selection);
1481 if(NS_SUCCEEDED(nsres) && !is_collapsed)
1482 dwID = CONTEXT_MENU_TEXTSELECT;
1483 }
1484 break;
1485 }
1486 case CONTEXT_IMAGE:
1487 case CONTEXT_IMAGE|CONTEXT_LINK:
1488 dwID = CONTEXT_MENU_IMAGE;
1489 break;
1490 case CONTEXT_LINK:
1491 dwID = CONTEXT_MENU_ANCHOR;
1492 break;
1493 case CONTEXT_INPUT:
1494 dwID = CONTEXT_MENU_CONTROL;
1495 break;
1496 default:
1497 FIXME("aContextFlags=%08x\n", aContextFlags);
1498 };
1499
1500 hres = get_node(This->doc->basedoc.doc_node, aNode, TRUE, &node);
1501 if(FAILED(hres))
1502 return NS_ERROR_FAILURE;
1503
1504 show_context_menu(This->doc, dwID, &pt, (IDispatch*)&node->IHTMLDOMNode_iface);
1506 return NS_OK;
1507}
#define FIXME(fmt,...)
Definition: debug.h:114
int selection
Definition: ctm.c:92
#define pt(x, y)
Definition: drawing.c:79
struct _cl_event * event
Definition: glext.h:7739
void fire_event(HTMLDocumentNode *doc, eventid_t eid, BOOL set_event, nsIDOMNode *target, nsIDOMEvent *nsevent, IDispatch *script_this)
Definition: htmlevent.c:1195
@ EVENTID_CONTEXTMENU
Definition: htmlevent.h:27
HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDOMNode **ret)
Definition: htmlnode.c:1339
static void node_release(HTMLDOMNode *node)
void show_context_menu(HTMLDocumentObj *, DWORD, POINT *, IDispatch *) DECLSPEC_HIDDEN
Definition: olecmd.c:936
Definition: dlist.c:348

◆ nsContextMenuListener_QueryInterface()

static nsresult NSAPI nsContextMenuListener_QueryInterface ( nsIContextMenuListener iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1424 of file nsembed.c.

1426{
1428 return nsIWebBrowserChrome_QueryInterface(&This->nsIWebBrowserChrome_iface, riid, result);
1429}
GLuint64EXT * result
Definition: glext.h:11304

◆ nsContextMenuListener_Release()

static nsrefcnt NSAPI nsContextMenuListener_Release ( nsIContextMenuListener iface)
static

Definition at line 1437 of file nsembed.c.

1438{
1440 return nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
1441}

◆ nsDirectoryServiceProvider2_AddRef()

static nsrefcnt NSAPI nsDirectoryServiceProvider2_AddRef ( nsIDirectoryServiceProvider2 iface)
static

Definition at line 214 of file nsembed.c.

215{
216 return 2;
217}

◆ nsDirectoryServiceProvider2_GetFile()

static nsresult NSAPI nsDirectoryServiceProvider2_GetFile ( nsIDirectoryServiceProvider2 iface,
const char prop,
cpp_bool persistent,
nsIFile **  _retval 
)
static

Definition at line 259 of file nsembed.c.

261{
262 TRACE("(%s %p %p)\n", debugstr_a(prop), persistent, _retval);
263
264 if(!strcmp(prop, "ProfD")) {
265 if(!profile_directory) {
266 nsresult nsres;
267
268 nsres = create_profile_directory();
269 if(NS_FAILED(nsres))
270 return nsres;
271 }
272
274 return nsIFile_Clone(profile_directory, _retval);
275 }
276
277 *_retval = NULL;
278 return NS_ERROR_FAILURE;
279}
static nsresult create_profile_directory(void)
Definition: nsembed.c:224

◆ nsDirectoryServiceProvider2_GetFiles()

static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles ( nsIDirectoryServiceProvider2 iface,
const char prop,
nsISimpleEnumerator **  _retval 
)
static

Definition at line 281 of file nsembed.c.

283{
284 TRACE("(%s %p)\n", debugstr_a(prop), _retval);
285
286 if(!strcmp(prop, "APluginsDL")) {
287 WCHAR plugin_path[MAX_PATH];
288 nsIFile *file;
289 int len;
290 nsresult nsres;
291
292 if(!plugin_directory) {
293 static const WCHAR gecko_pluginW[] = {'\\','g','e','c','k','o','\\','p','l','u','g','i','n',0};
294
295 len = GetSystemDirectoryW(plugin_path, (sizeof(plugin_path)-sizeof(gecko_pluginW))/sizeof(WCHAR)+1);
296 if(!len)
297 return NS_ERROR_UNEXPECTED;
298
299 strcpyW(plugin_path+len, gecko_pluginW);
300 nsres = create_nsfile(plugin_path, &plugin_directory);
301 if(NS_FAILED(nsres)) {
302 *_retval = NULL;
303 return nsres;
304 }
305 }
306
307 nsres = nsIFile_Clone(plugin_directory, &file);
308 if(NS_FAILED(nsres))
309 return nsres;
310
312 nsIFile_Release(file);
313 if(!*_retval)
315
316 return NS_OK;
317 }
318
319 *_retval = NULL;
320 return NS_ERROR_FAILURE;
321}
#define NS_ERROR_OUT_OF_MEMORY
#define NS_ERROR_UNEXPECTED
static nsISimpleEnumerator * create_singleton_enumerator(nsISupports *value)
Definition: nsembed.c:175
Definition: fci.c:127

◆ nsDirectoryServiceProvider2_QueryInterface()

static nsresult NSAPI nsDirectoryServiceProvider2_QueryInterface ( nsIDirectoryServiceProvider2 iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 192 of file nsembed.c.

194{
195 if(IsEqualGUID(&IID_nsISupports, riid)) {
196 TRACE("(IID_nsISupports %p)\n", result);
197 *result = iface;
198 }else if(IsEqualGUID(&IID_nsIDirectoryServiceProvider, riid)) {
199 TRACE("(IID_nsIDirectoryServiceProvider %p)\n", result);
200 *result = iface;
201 }else if(IsEqualGUID(&IID_nsIDirectoryServiceProvider2, riid)) {
202 TRACE("(IID_nsIDirectoryServiceProvider2 %p)\n", result);
203 *result = iface;
204 }else {
205 WARN("(%s %p)\n", debugstr_guid(riid), result);
206 *result = NULL;
207 return NS_NOINTERFACE;
208 }
209
210 nsISupports_AddRef((nsISupports*)*result);
211 return NS_OK;
212}
#define debugstr_guid
Definition: kernel32.h:35
#define NS_NOINTERFACE
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147

◆ nsDirectoryServiceProvider2_Release()

static nsrefcnt NSAPI nsDirectoryServiceProvider2_Release ( nsIDirectoryServiceProvider2 iface)
static

Definition at line 219 of file nsembed.c.

220{
221 return 1;
222}

◆ nsembed_proc()

static LRESULT WINAPI nsembed_proc ( HWND  hwnd,
UINT  msg,
WPARAM  wParam,
LPARAM  lParam 
)
static

Definition at line 334 of file nsembed.c.

335{
337 nsresult nsres;
338
339 static const WCHAR wszTHIS[] = {'T','H','I','S',0};
340
341 if(msg == WM_CREATE) {
342 This = *(NSContainer**)lParam;
343 SetPropW(hwnd, wszTHIS, This);
344 }else {
345 This = GetPropW(hwnd, wszTHIS);
346 }
347
348 switch(msg) {
349 case WM_SIZE:
350 TRACE("(%p)->(WM_SIZE)\n", This);
351
352 nsres = nsIBaseWindow_SetSize(This->window,
354 if(NS_FAILED(nsres))
355 WARN("SetSize failed: %08x\n", nsres);
356 break;
357
358 case WM_PARENTNOTIFY:
359 TRACE("WM_PARENTNOTIFY %x\n", (unsigned)wParam);
360
361 switch(wParam) {
362 case WM_LBUTTONDOWN:
363 case WM_RBUTTONDOWN:
364 nsIWebBrowserFocus_Activate(This->focus);
365 }
366 }
367
369}
#define msg(x)
Definition: auth_time.c:54
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define HIWORD(l)
Definition: typedefs.h:247
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_CREATE
Definition: winuser.h:1608
#define WM_SIZE
Definition: winuser.h:1611
#define WM_LBUTTONDOWN
Definition: winuser.h:1776
#define WM_RBUTTONDOWN
Definition: winuser.h:1779
BOOL WINAPI SetPropW(_In_ HWND, _In_ LPCWSTR, _In_opt_ HANDLE)
HANDLE WINAPI GetPropW(_In_ HWND, _In_ LPCWSTR)
#define WM_PARENTNOTIFY
Definition: winuser.h:1803

Referenced by register_nscontainer_class().

◆ nsEmbeddingSiteWindow_AddRef()

static nsrefcnt NSAPI nsEmbeddingSiteWindow_AddRef ( nsIEmbeddingSiteWindow iface)
static

Definition at line 1703 of file nsembed.c.

1704{
1706 return nsIWebBrowserChrome_AddRef(&This->nsIWebBrowserChrome_iface);
1707}
static NSContainer * impl_from_nsIEmbeddingSiteWindow(nsIEmbeddingSiteWindow *iface)
Definition: nsembed.c:1691

◆ nsEmbeddingSiteWindow_GetDimensions()

static nsresult NSAPI nsEmbeddingSiteWindow_GetDimensions ( nsIEmbeddingSiteWindow iface,
UINT32  flags,
LONG x,
LONG y,
LONG cx,
LONG cy 
)
static

Definition at line 1723 of file nsembed.c.

1725{
1727 RECT r;
1728
1729 TRACE("(%p)->(%x %p %p %p %p)\n", This, flags, x, y, cx, cy);
1730
1731 if(!GetWindowRect(This->hwnd, &r)) {
1732 ERR("GetWindowRect failed\n");
1733 return NS_ERROR_FAILURE;
1734 }
1735
1736 if(x)
1737 *x = r.left;
1738 if(y)
1739 *y = r.top;
1740 if(cx)
1741 *cx = r.right-r.left;
1742 if(cy)
1743 *cy = r.bottom-r.top;
1744 return NS_OK;
1745}
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLbitfield flags
Definition: glext.h:7161
_Out_opt_ int _Out_opt_ int * cy
Definition: commctrl.h:586
_Out_opt_ int * cx
Definition: commctrl.h:585
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)

◆ nsEmbeddingSiteWindow_GetSiteWindow()

static nsresult NSAPI nsEmbeddingSiteWindow_GetSiteWindow ( nsIEmbeddingSiteWindow iface,
void **  aSiteWindow 
)
static

Definition at line 1793 of file nsembed.c.

1795{
1797
1798 TRACE("(%p)->(%p)\n", This, aSiteWindow);
1799
1800 *aSiteWindow = This->hwnd;
1801 return NS_OK;
1802}

◆ nsEmbeddingSiteWindow_GetTitle()

static nsresult NSAPI nsEmbeddingSiteWindow_GetTitle ( nsIEmbeddingSiteWindow iface,
PRUnichar **  aTitle 
)
static

Definition at line 1777 of file nsembed.c.

1779{
1781 WARN("(%p)->(%p)\n", This, aTitle);
1783}
#define NS_ERROR_NOT_IMPLEMENTED

◆ nsEmbeddingSiteWindow_GetVisibility()

static nsresult NSAPI nsEmbeddingSiteWindow_GetVisibility ( nsIEmbeddingSiteWindow iface,
cpp_bool aVisibility 
)
static

Definition at line 1756 of file nsembed.c.

1758{
1760
1761 TRACE("(%p)->(%p)\n", This, aVisibility);
1762
1763 *aVisibility = This->doc && This->doc->hwnd && IsWindowVisible(This->doc->hwnd);
1764 return NS_OK;
1765}
BOOL WINAPI IsWindowVisible(_In_ HWND)

◆ nsEmbeddingSiteWindow_QueryInterface()

static nsresult NSAPI nsEmbeddingSiteWindow_QueryInterface ( nsIEmbeddingSiteWindow iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1696 of file nsembed.c.

1698{
1700 return nsIWebBrowserChrome_QueryInterface(&This->nsIWebBrowserChrome_iface, riid, result);
1701}

◆ nsEmbeddingSiteWindow_Release()

static nsrefcnt NSAPI nsEmbeddingSiteWindow_Release ( nsIEmbeddingSiteWindow iface)
static

Definition at line 1709 of file nsembed.c.

1710{
1712 return nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
1713}

◆ nsEmbeddingSiteWindow_SetDimensions()

static nsresult NSAPI nsEmbeddingSiteWindow_SetDimensions ( nsIEmbeddingSiteWindow iface,
UINT32  flags,
LONG  x,
LONG  y,
LONG  cx,
LONG  cy 
)
static

Definition at line 1715 of file nsembed.c.

1717{
1719 WARN("(%p)->(%08x %d %d %d %d)\n", This, flags, x, y, cx, cy);
1721}

◆ nsEmbeddingSiteWindow_SetFocus()

static nsresult NSAPI nsEmbeddingSiteWindow_SetFocus ( nsIEmbeddingSiteWindow iface)
static

Definition at line 1747 of file nsembed.c.

1748{
1750
1751 TRACE("(%p)\n", This);
1752
1753 return nsIBaseWindow_SetFocus(This->window);
1754}

◆ nsEmbeddingSiteWindow_SetTitle()

static nsresult NSAPI nsEmbeddingSiteWindow_SetTitle ( nsIEmbeddingSiteWindow iface,
const PRUnichar aTitle 
)
static

Definition at line 1785 of file nsembed.c.

1787{
1789 WARN("(%p)->(%s)\n", This, debugstr_w(aTitle));
1791}

◆ nsEmbeddingSiteWindow_SetVisibility()

static nsresult NSAPI nsEmbeddingSiteWindow_SetVisibility ( nsIEmbeddingSiteWindow iface,
cpp_bool  aVisibility 
)
static

Definition at line 1767 of file nsembed.c.

1769{
1771
1772 TRACE("(%p)->(%x)\n", This, aVisibility);
1773
1774 return NS_OK;
1775}

◆ nsfree()

void nsfree ( void mem)

Definition at line 783 of file nsembed.c.

784{
785 NS_Free(mem);
786}
Definition: mem.c:156

Referenced by exec_fontname(), and is_supported_doc_mime().

◆ nsInterfaceRequestor_AddRef()

static nsrefcnt NSAPI nsInterfaceRequestor_AddRef ( nsIInterfaceRequestor iface)
static

Definition at line 1883 of file nsembed.c.

1884{
1886 return nsIWebBrowserChrome_AddRef(&This->nsIWebBrowserChrome_iface);
1887}
static NSContainer * impl_from_nsIInterfaceRequestor(nsIInterfaceRequestor *iface)
Definition: nsembed.c:1871

◆ nsInterfaceRequestor_GetInterface()

static nsresult NSAPI nsInterfaceRequestor_GetInterface ( nsIInterfaceRequestor iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1895 of file nsembed.c.

1897{
1899
1900 if(IsEqualGUID(&IID_nsIDOMWindow, riid)) {
1901 TRACE("(%p)->(IID_nsIDOMWindow %p)\n", This, result);
1902 return nsIWebBrowser_GetContentDOMWindow(This->webbrowser, (nsIDOMWindow**)result);
1903 }
1904
1905 return nsIWebBrowserChrome_QueryInterface(&This->nsIWebBrowserChrome_iface, riid, result);
1906}

◆ nsInterfaceRequestor_QueryInterface()

static nsresult NSAPI nsInterfaceRequestor_QueryInterface ( nsIInterfaceRequestor iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1876 of file nsembed.c.

1878{
1880 return nsIWebBrowserChrome_QueryInterface(&This->nsIWebBrowserChrome_iface, riid, result);
1881}

◆ nsInterfaceRequestor_Release()

static nsrefcnt NSAPI nsInterfaceRequestor_Release ( nsIInterfaceRequestor iface)
static

Definition at line 1889 of file nsembed.c.

1890{
1892 return nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
1893}

◆ nsnode_to_nsstring()

HRESULT nsnode_to_nsstring ( nsIDOMNode nsnode,
nsAString str 
)

Definition at line 1000 of file nsembed.c.

1001{
1002 nsIContentSerializer *serializer;
1003 nsresult nsres;
1004 HRESULT hres;
1005
1006 nsres = nsIComponentManager_CreateInstanceByContractID(pCompMgr,
1007 NS_HTMLSERIALIZER_CONTRACTID, NULL, &IID_nsIContentSerializer,
1008 (void**)&serializer);
1009 if(NS_FAILED(nsres)) {
1010 ERR("Could not get nsIContentSerializer: %08x\n", nsres);
1011 return E_FAIL;
1012 }
1013
1014 nsres = nsIContentSerializer_Init(serializer, 0, 100, NULL, FALSE, FALSE /* FIXME */);
1015 if(NS_FAILED(nsres))
1016 ERR("Init failed: %08x\n", nsres);
1017
1018 hres = nsnode_to_nsstring_rec(serializer, nsnode, str);
1019 if(SUCCEEDED(hres)) {
1020 nsres = nsIContentSerializer_Flush(serializer, str);
1021 if(NS_FAILED(nsres))
1022 ERR("Flush failed: %08x\n", nsres);
1023 }
1024
1025 nsIContentSerializer_Release(serializer);
1026 return hres;
1027}
static HRESULT nsnode_to_nsstring_rec(nsIContentSerializer *serializer, nsIDOMNode *nsnode, nsAString *str)
Definition: nsembed.c:922
#define NS_HTMLSERIALIZER_CONTRACTID
Definition: nsembed.c:29

Referenced by get_doc_string(), HTMLElement_get_outerHTML(), and HTMLTxtRange_get_htmlText().

◆ nsnode_to_nsstring_rec()

static HRESULT nsnode_to_nsstring_rec ( nsIContentSerializer serializer,
nsIDOMNode nsnode,
nsAString str 
)
static

Definition at line 922 of file nsembed.c.

923{
924 nsIDOMNodeList *node_list = NULL;
925 cpp_bool has_children = FALSE;
926 nsIContent *nscontent;
927 UINT16 type;
928 nsresult nsres;
929
930 nsIDOMNode_HasChildNodes(nsnode, &has_children);
931
932 nsres = nsIDOMNode_GetNodeType(nsnode, &type);
933 if(NS_FAILED(nsres)) {
934 ERR("GetType failed: %08x\n", nsres);
935 return E_FAIL;
936 }
937
938 if(type != DOCUMENT_NODE) {
939 nsres = nsIDOMNode_QueryInterface(nsnode, &IID_nsIContent, (void**)&nscontent);
940 if(NS_FAILED(nsres)) {
941 ERR("Could not get nsIContent interface: %08x\n", nsres);
942 return E_FAIL;
943 }
944 }
945
946 switch(type) {
947 case ELEMENT_NODE:
948 nsIContentSerializer_AppendElementStart(serializer, nscontent, nscontent, str);
949 break;
950 case TEXT_NODE:
951 nsIContentSerializer_AppendText(serializer, nscontent, 0, -1, str);
952 break;
953 case COMMENT_NODE:
954 nsres = nsIContentSerializer_AppendComment(serializer, nscontent, 0, -1, str);
955 break;
956 case DOCUMENT_NODE: {
957 nsIDocument *nsdoc;
958 nsIDOMNode_QueryInterface(nsnode, &IID_nsIDocument, (void**)&nsdoc);
959 nsIContentSerializer_AppendDocumentStart(serializer, nsdoc, str);
960 nsIDocument_Release(nsdoc);
961 break;
962 }
963 case DOCUMENT_TYPE_NODE:
964 nsIContentSerializer_AppendDoctype(serializer, nscontent, str);
965 break;
966 case DOCUMENT_FRAGMENT_NODE:
967 break;
968 default:
969 FIXME("Unhandled type %u\n", type);
970 }
971
972 if(has_children) {
973 UINT32 child_cnt, i;
974 nsIDOMNode *child_node;
975
976 nsIDOMNode_GetChildNodes(nsnode, &node_list);
977 nsIDOMNodeList_GetLength(node_list, &child_cnt);
978
979 for(i=0; i<child_cnt; i++) {
980 nsres = nsIDOMNodeList_Item(node_list, i, &child_node);
981 if(NS_SUCCEEDED(nsres)) {
982 nsnode_to_nsstring_rec(serializer, child_node, str);
983 nsIDOMNode_Release(child_node);
984 }else {
985 ERR("Item failed: %08x\n", nsres);
986 }
987 }
988
989 nsIDOMNodeList_Release(node_list);
990 }
991
992 if(type == ELEMENT_NODE)
993 nsIContentSerializer_AppendElementEnd(serializer, nscontent, str);
994
995 if(type != DOCUMENT_NODE)
996 nsIContent_Release(nscontent);
997 return S_OK;
998}
unsigned short UINT16
unsigned int UINT32
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248

Referenced by nsnode_to_nsstring(), and nsnode_to_nsstring_rec().

◆ nsresult()

static nsresult ( CDECL NS_InitXPCOM2)
static

◆ nsSingletonEnumerator_AddRef()

static nsrefcnt NSAPI nsSingletonEnumerator_AddRef ( nsISimpleEnumerator iface)
static

Definition at line 117 of file nsembed.c.

118{
121
122 TRACE("(%p) ref=%d\n", This, ref);
123
124 return ref;
125}
#define InterlockedIncrement
Definition: armddk.h:53
static nsSingletonEnumerator * impl_from_nsISimpleEnumerator(nsISimpleEnumerator *iface)
Definition: nsembed.c:92
ULONG nsrefcnt
Definition: nsiface.idl:40
Definition: send.c:48

◆ nsSingletonEnumerator_GetNext()

static nsresult NSAPI nsSingletonEnumerator_GetNext ( nsISimpleEnumerator iface,
nsISupports **  _retval 
)
static

Definition at line 153 of file nsembed.c.

154{
156
157 TRACE("(%p)->()\n", This);
158
159 if(!This->value)
160 return NS_ERROR_UNEXPECTED;
161
162 *_retval = This->value;
163 This->value = NULL;
164 return NS_OK;
165}

◆ nsSingletonEnumerator_HasMoreElements()

static nsresult NSAPI nsSingletonEnumerator_HasMoreElements ( nsISimpleEnumerator iface,
cpp_bool _retval 
)
static

Definition at line 143 of file nsembed.c.

144{
146
147 TRACE("(%p)->()\n", This);
148
149 *_retval = This->value != NULL;
150 return NS_OK;
151}

◆ nsSingletonEnumerator_QueryInterface()

static nsresult NSAPI nsSingletonEnumerator_QueryInterface ( nsISimpleEnumerator iface,
nsIIDRef  riid,
void **  ppv 
)
static

Definition at line 97 of file nsembed.c.

98{
100
101 if(IsEqualGUID(&IID_nsISupports, riid)) {
102 TRACE("(%p)->(IID_nsISupports %p)\n", This, ppv);
103 *ppv = &This->nsISimpleEnumerator_iface;
104 }else if(IsEqualGUID(&IID_nsISimpleEnumerator, riid)) {
105 TRACE("(%p)->(IID_nsISimpleEnumerator %p)\n", This, ppv);
106 *ppv = &This->nsISimpleEnumerator_iface;
107 }else {
108 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
109 *ppv = NULL;
110 return NS_NOINTERFACE;
111 }
112
113 nsISupports_AddRef((nsISupports*)*ppv);
114 return NS_OK;
115}

◆ nsSingletonEnumerator_Release()

static nsrefcnt NSAPI nsSingletonEnumerator_Release ( nsISimpleEnumerator iface)
static

Definition at line 127 of file nsembed.c.

128{
131
132 TRACE("(%p) ref=%d\n", This, ref);
133
134 if(!ref) {
135 if(This->value)
136 nsISupports_Release(This->value);
138 }
139
140 return ref;
141}
#define InterlockedDecrement
Definition: armddk.h:52

◆ nsSupportsWeakReference_AddRef()

static nsrefcnt NSAPI nsSupportsWeakReference_AddRef ( nsISupportsWeakReference iface)
static

Definition at line 1927 of file nsembed.c.

1928{
1930 return nsIWebBrowserChrome_AddRef(&This->nsIWebBrowserChrome_iface);
1931}
static NSContainer * impl_from_nsISupportsWeakReference(nsISupportsWeakReference *iface)
Definition: nsembed.c:1915

◆ nsSupportsWeakReference_GetWeakReference()

static nsresult NSAPI nsSupportsWeakReference_GetWeakReference ( nsISupportsWeakReference iface,
nsIWeakReference **  _retval 
)
static

Definition at line 1939 of file nsembed.c.

1941{
1943
1944 TRACE("(%p)->(%p)\n", This, _retval);
1945
1946 if(!This->weak_reference) {
1947 This->weak_reference = heap_alloc(sizeof(nsWeakReference));
1948 if(!This->weak_reference)
1950
1951 This->weak_reference->nsIWeakReference_iface.lpVtbl = &nsWeakReferenceVtbl;
1952 This->weak_reference->ref = 1;
1953 This->weak_reference->nscontainer = This;
1954 }
1955
1956 *_retval = &This->weak_reference->nsIWeakReference_iface;
1957 nsIWeakReference_AddRef(*_retval);
1958 return NS_OK;
1959}
static const nsIWeakReferenceVtbl nsWeakReferenceVtbl
Definition: nsembed.c:1222

◆ nsSupportsWeakReference_QueryInterface()

static nsresult NSAPI nsSupportsWeakReference_QueryInterface ( nsISupportsWeakReference iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1920 of file nsembed.c.

1922{
1924 return nsIWebBrowserChrome_QueryInterface(&This->nsIWebBrowserChrome_iface, riid, result);
1925}

◆ nsSupportsWeakReference_Release()

static nsrefcnt NSAPI nsSupportsWeakReference_Release ( nsISupportsWeakReference iface)
static

Definition at line 1933 of file nsembed.c.

1934{
1936 return nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
1937}

◆ nsTooltipListener_AddRef()

static nsrefcnt NSAPI nsTooltipListener_AddRef ( nsITooltipListener iface)
static

Definition at line 1830 of file nsembed.c.

1831{
1833 return nsIWebBrowserChrome_AddRef(&This->nsIWebBrowserChrome_iface);
1834}
static NSContainer * impl_from_nsITooltipListener(nsITooltipListener *iface)
Definition: nsembed.c:1818

◆ nsTooltipListener_OnHideTooltip()

static nsresult NSAPI nsTooltipListener_OnHideTooltip ( nsITooltipListener iface)
static

Definition at line 1853 of file nsembed.c.

1854{
1856
1857 if (This->doc)
1858 hide_tooltip(This->doc);
1859
1860 return NS_OK;
1861}
void hide_tooltip(HTMLDocumentObj *) DECLSPEC_HIDDEN
Definition: view.c:386

◆ nsTooltipListener_OnShowTooltip()

static nsresult NSAPI nsTooltipListener_OnShowTooltip ( nsITooltipListener iface,
LONG  aXCoord,
LONG  aYCoord,
const PRUnichar aTipText 
)
static

Definition at line 1842 of file nsembed.c.

1844{
1846
1847 if (This->doc)
1848 show_tooltip(This->doc, aXCoord, aYCoord, aTipText);
1849
1850 return NS_OK;
1851}
void show_tooltip(HTMLDocumentObj *, DWORD, DWORD, LPCWSTR) DECLSPEC_HIDDEN
Definition: view.c:368

◆ nsTooltipListener_QueryInterface()

static nsresult NSAPI nsTooltipListener_QueryInterface ( nsITooltipListener iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1823 of file nsembed.c.

1825{
1827 return nsIWebBrowserChrome_QueryInterface(&This->nsIWebBrowserChrome_iface, riid, result);
1828}

◆ nsTooltipListener_Release()

static nsrefcnt NSAPI nsTooltipListener_Release ( nsITooltipListener iface)
static

Definition at line 1836 of file nsembed.c.

1837{
1839 return nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
1840}

◆ nsURIContentListener_AddRef()

static nsrefcnt NSAPI nsURIContentListener_AddRef ( nsIURIContentListener iface)
static

Definition at line 1532 of file nsembed.c.

1533{
1535 return nsIWebBrowserChrome_AddRef(&This->nsIWebBrowserChrome_iface);
1536}
static NSContainer * impl_from_nsIURIContentListener(nsIURIContentListener *iface)
Definition: nsembed.c:1520

◆ nsURIContentListener_CanHandleContent()

static nsresult NSAPI nsURIContentListener_CanHandleContent ( nsIURIContentListener iface,
const char aContentType,
cpp_bool  aIsContentPreferred,
char **  aDesiredContentType,
cpp_bool _retval 
)
static

Definition at line 1600 of file nsembed.c.

1603{
1605
1606 TRACE("(%p)->(%s %x %p %p)\n", This, debugstr_a(aContentType), aIsContentPreferred,
1607 aDesiredContentType, _retval);
1608
1609 return This->content_listener
1610 ? nsIURIContentListener_CanHandleContent(This->content_listener, aContentType,
1611 aIsContentPreferred, aDesiredContentType, _retval)
1613}

◆ nsURIContentListener_DoContent()

static nsresult NSAPI nsURIContentListener_DoContent ( nsIURIContentListener iface,
const nsACString aContentType,
cpp_bool  aIsContentPreferred,
nsIRequest aRequest,
nsIStreamListener **  aContentHandler,
cpp_bool _retval 
)
static

Definition at line 1569 of file nsembed.c.

1572{
1574
1575 TRACE("(%p)->(%p %x %p %p %p)\n", This, aContentType, aIsContentPreferred,
1576 aRequest, aContentHandler, _retval);
1577
1578 return This->content_listener
1579 ? nsIURIContentListener_DoContent(This->content_listener, aContentType,
1580 aIsContentPreferred, aRequest, aContentHandler, _retval)
1582}

◆ nsURIContentListener_GetLoadCookie()

static nsresult NSAPI nsURIContentListener_GetLoadCookie ( nsIURIContentListener iface,
nsISupports **  aLoadCookie 
)
static

Definition at line 1615 of file nsembed.c.

1617{
1619
1620 WARN("(%p)->(%p)\n", This, aLoadCookie);
1621
1622 return This->content_listener
1623 ? nsIURIContentListener_GetLoadCookie(This->content_listener, aLoadCookie)
1625}

◆ nsURIContentListener_GetParentContentListener()

static nsresult NSAPI nsURIContentListener_GetParentContentListener ( nsIURIContentListener iface,
nsIURIContentListener **  aParentContentListener 
)
static

Definition at line 1639 of file nsembed.c.

1641{
1643
1644 TRACE("(%p)->(%p)\n", This, aParentContentListener);
1645
1646 if(This->content_listener)
1647 nsIURIContentListener_AddRef(This->content_listener);
1648
1649 *aParentContentListener = This->content_listener;
1650 return NS_OK;
1651}

◆ nsURIContentListener_IsPreferred()

static nsresult NSAPI nsURIContentListener_IsPreferred ( nsIURIContentListener iface,
const char aContentType,
char **  aDesiredContentType,
cpp_bool _retval 
)
static

Definition at line 1584 of file nsembed.c.

1586{
1588
1589 TRACE("(%p)->(%s %p %p)\n", This, debugstr_a(aContentType), aDesiredContentType, _retval);
1590
1591 /* FIXME: Should we do something here? */
1592 *_retval = TRUE;
1593
1594 return This->content_listener
1595 ? nsIURIContentListener_IsPreferred(This->content_listener, aContentType,
1596 aDesiredContentType, _retval)
1597 : NS_OK;
1598}

◆ nsURIContentListener_OnStartURIOpen()

static nsresult NSAPI nsURIContentListener_OnStartURIOpen ( nsIURIContentListener iface,
nsIURI aURI,
cpp_bool _retval 
)
static

Definition at line 1544 of file nsembed.c.

1546{
1548 nsACString spec_str;
1549 const char *spec;
1550 nsresult nsres;
1551
1552 nsACString_Init(&spec_str, NULL);
1553 nsIURI_GetSpec(aURI, &spec_str);
1554 nsACString_GetData(&spec_str, &spec);
1555
1556 TRACE("(%p)->(%p(%s) %p)\n", This, aURI, debugstr_a(spec), _retval);
1557
1558 nsACString_Finish(&spec_str);
1559
1560 nsres = on_start_uri_open(This, aURI, _retval);
1561 if(NS_FAILED(nsres))
1562 return nsres;
1563
1564 return !*_retval && This->content_listener
1565 ? nsIURIContentListener_OnStartURIOpen(This->content_listener, aURI, _retval)
1566 : NS_OK;
1567}
nsresult on_start_uri_open(NSContainer *, nsIURI *, cpp_bool *) DECLSPEC_HIDDEN
Definition: nsio.c:4019
BOOL nsACString_Init(nsACString *str, const char *data)
Definition: nsembed.c:788
void nsACString_Finish(nsACString *str)
Definition: nsembed.c:812
UINT32 nsACString_GetData(const nsACString *str, const char **data)
Definition: nsembed.c:807

◆ nsURIContentListener_QueryInterface()

static nsresult NSAPI nsURIContentListener_QueryInterface ( nsIURIContentListener iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1525 of file nsembed.c.

1527{
1529 return nsIWebBrowserChrome_QueryInterface(&This->nsIWebBrowserChrome_iface, riid, result);
1530}

◆ nsURIContentListener_Release()

static nsrefcnt NSAPI nsURIContentListener_Release ( nsIURIContentListener iface)
static

Definition at line 1538 of file nsembed.c.

1539{
1541 return nsIWebBrowserChrome_Release(&This->nsIWebBrowserChrome_iface);
1542}

◆ nsURIContentListener_SetLoadCookie()

static nsresult NSAPI nsURIContentListener_SetLoadCookie ( nsIURIContentListener iface,
nsISupports aLoadCookie 
)
static

Definition at line 1627 of file nsembed.c.

1629{
1631
1632 WARN("(%p)->(%p)\n", This, aLoadCookie);
1633
1634 return This->content_listener
1635 ? nsIURIContentListener_SetLoadCookie(This->content_listener, aLoadCookie)
1637}

◆ nsURIContentListener_SetParentContentListener()

static nsresult NSAPI nsURIContentListener_SetParentContentListener ( nsIURIContentListener iface,
nsIURIContentListener aParentContentListener 
)
static

Definition at line 1653 of file nsembed.c.

1655{
1657
1658 TRACE("(%p)->(%p)\n", This, aParentContentListener);
1659
1660 if(aParentContentListener == &This->nsIURIContentListener_iface)
1661 return NS_OK;
1662
1663 if(This->content_listener)
1664 nsIURIContentListener_Release(This->content_listener);
1665
1666 This->content_listener = aParentContentListener;
1667 if(This->content_listener)
1668 nsIURIContentListener_AddRef(This->content_listener);
1669
1670 return NS_OK;
1671}

◆ nsWeakReference_AddRef()

static nsrefcnt NSAPI nsWeakReference_AddRef ( nsIWeakReference iface)
static

Definition at line 1186 of file nsembed.c.

1187{
1190
1191 TRACE("(%p) ref=%d\n", This, ref);
1192
1193 return ref;
1194}
static nsWeakReference * impl_from_nsIWeakReference(nsIWeakReference *iface)
Definition: nsembed.c:1160

◆ nsWeakReference_QueryInterface()

static nsresult NSAPI nsWeakReference_QueryInterface ( nsIWeakReference iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1165 of file nsembed.c.

1167{
1169
1170 if(IsEqualGUID(&IID_nsISupports, riid)) {
1171 TRACE("(%p)->(IID_nsISupports %p)\n", This, result);
1172 *result = &This->nsIWeakReference_iface;
1173 }else if(IsEqualGUID(&IID_nsIWeakReference, riid)) {
1174 TRACE("(%p)->(IID_nsIWeakReference %p)\n", This, result);
1175 *result = &This->nsIWeakReference_iface;
1176 }else {
1177 WARN("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
1178 *result = NULL;
1179 return NS_NOINTERFACE;
1180 }
1181
1182 nsISupports_AddRef((nsISupports*)*result);
1183 return NS_OK;
1184}

◆ nsWeakReference_QueryReferent()

static nsresult NSAPI nsWeakReference_QueryReferent ( nsIWeakReference iface,
const nsIID riid,
void **  result 
)
static

Definition at line 1211 of file nsembed.c.

1213{
1215
1216 if(!This->nscontainer)
1217 return NS_ERROR_NULL_POINTER;
1218
1219 return nsIWebBrowserChrome_QueryInterface(&This->nscontainer->nsIWebBrowserChrome_iface, riid, result);
1220}
#define NS_ERROR_NULL_POINTER

◆ nsWeakReference_Release()

static nsrefcnt NSAPI nsWeakReference_Release ( nsIWeakReference iface)
static

Definition at line 1196 of file nsembed.c.

1197{
1200
1201 TRACE("(%p) ref=%d\n", This, ref);
1202
1203 if(!ref) {
1204 assert(!This->nscontainer);
1205 heap_free(This);
1206 }
1207
1208 return ref;
1209}

◆ nsWebBrowserChrome_AddRef()

static nsrefcnt NSAPI nsWebBrowserChrome_AddRef ( nsIWebBrowserChrome iface)
static

Definition at line 1279 of file nsembed.c.

1280{
1283
1284 TRACE("(%p) ref=%d\n", This, ref);
1285
1286 return ref;
1287}
static NSContainer * impl_from_nsIWebBrowserChrome(nsIWebBrowserChrome *iface)
Definition: nsembed.c:1233

◆ nsWebBrowserChrome_DestroyBrowserWindow()

static nsresult NSAPI nsWebBrowserChrome_DestroyBrowserWindow ( nsIWebBrowserChrome iface)
static

Definition at line 1362 of file nsembed.c.

1363{
1365 TRACE("(%p)\n", This);
1367}

◆ nsWebBrowserChrome_ExitModalEventLoop()

static nsresult NSAPI nsWebBrowserChrome_ExitModalEventLoop ( nsIWebBrowserChrome iface,
nsresult  aStatus 
)
static

Definition at line 1391 of file nsembed.c.

1393{
1395 WARN("(%p)->(%08x)\n", This, aStatus);
1397}

◆ nsWebBrowserChrome_GetChromeFlags()

static nsresult NSAPI nsWebBrowserChrome_GetChromeFlags ( nsIWebBrowserChrome iface,
UINT32 aChromeFlags 
)
static

Definition at line 1346 of file nsembed.c.

1348{
1350 WARN("(%p)->(%p)\n", This, aChromeFlags);
1352}

◆ nsWebBrowserChrome_GetWebBrowser()

static nsresult NSAPI nsWebBrowserChrome_GetWebBrowser ( nsIWebBrowserChrome iface,
nsIWebBrowser **  aWebBrowser 
)
static

Definition at line 1317 of file nsembed.c.

1319{
1321
1322 TRACE("(%p)->(%p)\n", This, aWebBrowser);
1323
1324 if(!aWebBrowser)
1325 return NS_ERROR_INVALID_ARG;
1326
1327 if(This->webbrowser)
1328 nsIWebBrowser_AddRef(This->webbrowser);
1329 *aWebBrowser = This->webbrowser;
1330 return S_OK;
1331}
#define NS_ERROR_INVALID_ARG

◆ nsWebBrowserChrome_IsWindowModal()

static nsresult NSAPI nsWebBrowserChrome_IsWindowModal ( nsIWebBrowserChrome iface,
cpp_bool _retval 
)
static

Definition at line 1384 of file nsembed.c.

1385{
1387 WARN("(%p)->(%p)\n", This, _retval);
1389}

◆ nsWebBrowserChrome_QueryInterface()

static nsresult NSAPI nsWebBrowserChrome_QueryInterface ( nsIWebBrowserChrome iface,
nsIIDRef  riid,
void **  result 
)
static

Definition at line 1238 of file nsembed.c.

1240{
1242
1243 *result = NULL;
1244 if(IsEqualGUID(&IID_nsISupports, riid)) {
1245 TRACE("(%p)->(IID_nsISupports, %p)\n", This, result);
1246 *result = &This->nsIWebBrowserChrome_iface;
1247 }else if(IsEqualGUID(&IID_nsIWebBrowserChrome, riid)) {
1248 TRACE("(%p)->(IID_nsIWebBrowserChrome, %p)\n", This, result);
1249 *result = &This->nsIWebBrowserChrome_iface;
1250 }else if(IsEqualGUID(&IID_nsIContextMenuListener, riid)) {
1251 TRACE("(%p)->(IID_nsIContextMenuListener, %p)\n", This, result);
1252 *result = &This->nsIContextMenuListener_iface;
1253 }else if(IsEqualGUID(&IID_nsIURIContentListener, riid)) {
1254 TRACE("(%p)->(IID_nsIURIContentListener %p)\n", This, result);
1255 *result = &This->nsIURIContentListener_iface;
1256 }else if(IsEqualGUID(&IID_nsIEmbeddingSiteWindow, riid)) {
1257 TRACE("(%p)->(IID_nsIEmbeddingSiteWindow %p)\n", This, result);
1258 *result = &This->nsIEmbeddingSiteWindow_iface;
1259 }else if(IsEqualGUID(&IID_nsITooltipListener, riid)) {
1260 TRACE("(%p)->(IID_nsITooltipListener %p)\n", This, result);
1261 *result = &This->nsITooltipListener_iface;
1262 }else if(IsEqualGUID(&IID_nsIInterfaceRequestor, riid)) {
1263 TRACE("(%p)->(IID_nsIInterfaceRequestor %p)\n", This, result);
1264 *result = &This->nsIInterfaceRequestor_iface;
1265 }else if(IsEqualGUID(&IID_nsISupportsWeakReference, riid)) {
1266 TRACE("(%p)->(IID_nsISupportsWeakReference %p)\n", This, result);
1267 *result = &This->nsISupportsWeakReference_iface;
1268 }
1269
1270 if(*result) {
1271 nsIWebBrowserChrome_AddRef(&This->nsIWebBrowserChrome_iface);
1272 return NS_OK;
1273 }
1274
1275 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), result);
1276 return NS_NOINTERFACE;
1277}

◆ nsWebBrowserChrome_Release()

static nsrefcnt NSAPI nsWebBrowserChrome_Release ( nsIWebBrowserChrome iface)
static

Definition at line 1289 of file nsembed.c.

1290{
1293
1294 TRACE("(%p) ref=%d\n", This, ref);
1295
1296 if(!ref) {
1297 if(This->parent)
1298 nsIWebBrowserChrome_Release(&This->parent->nsIWebBrowserChrome_iface);
1299 if(This->weak_reference) {
1300 This->weak_reference->nscontainer = NULL;
1301 nsIWeakReference_Release(&This->weak_reference->nsIWeakReference_iface);
1302 }
1303 heap_free(This);
1304 }
1305
1306 return ref;
1307}

◆ nsWebBrowserChrome_SetChromeFlags()

static nsresult NSAPI nsWebBrowserChrome_SetChromeFlags ( nsIWebBrowserChrome iface,
UINT32  aChromeFlags 
)
static

Definition at line 1354 of file nsembed.c.

1356{
1358 WARN("(%p)->(%08x)\n", This, aChromeFlags);
1360}

◆ nsWebBrowserChrome_SetStatus()

static nsresult NSAPI nsWebBrowserChrome_SetStatus ( nsIWebBrowserChrome iface,
UINT32  statusType,
const PRUnichar status 
)
static

Definition at line 1309 of file nsembed.c.

1311{
1313 TRACE("(%p)->(%d %s)\n", This, statusType, debugstr_w(status));
1314 return NS_OK;
1315}
Definition: ps.c:97

◆ nsWebBrowserChrome_SetWebBrowser()

static nsresult NSAPI nsWebBrowserChrome_SetWebBrowser ( nsIWebBrowserChrome iface,
nsIWebBrowser aWebBrowser 
)
static

Definition at line 1333 of file nsembed.c.

1335{
1337
1338 TRACE("(%p)->(%p)\n", This, aWebBrowser);
1339
1340 if(aWebBrowser != This->webbrowser)
1341 ERR("Wrong nsWebBrowser!\n");
1342
1343 return NS_OK;
1344}

◆ nsWebBrowserChrome_ShowAsModal()

static nsresult NSAPI nsWebBrowserChrome_ShowAsModal ( nsIWebBrowserChrome iface)
static

Definition at line 1377 of file nsembed.c.

1378{
1380 WARN("(%p)\n", This);
1382}

◆ nsWebBrowserChrome_SizeBrowserTo()

static nsresult NSAPI nsWebBrowserChrome_SizeBrowserTo ( nsIWebBrowserChrome iface,
LONG  aCX,
LONG  aCY 
)
static

Definition at line 1369 of file nsembed.c.

1371{
1373 WARN("(%p)->(%d %d)\n", This, aCX, aCY);
1375}

◆ PRUint32()

static nsIFile **static PRUint32 ( CDECL NS_StringGetData) const
static

◆ register_nscontainer_class()

static void register_nscontainer_class ( void  )
static

Definition at line 372 of file nsembed.c.

373{
374 static WNDCLASSEXW wndclass = {
375 sizeof(WNDCLASSEXW),
378 0, 0, NULL, NULL, NULL, NULL, NULL,
380 NULL,
381 };
382 wndclass.hInstance = hInst;
384}
static LRESULT WINAPI nsembed_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
Definition: nsembed.c:334
HINSTANCE hInstance
Definition: winuser.h:3221
#define CS_DBLCLKS
Definition: winuser.h:651
ATOM WINAPI RegisterClassExW(_In_ CONST WNDCLASSEXW *)
struct _WNDCLASSEXW WNDCLASSEXW

Referenced by init_nscontainer().

◆ return_nsstr()

HRESULT return_nsstr ( nsresult  nsres,
nsAString nsstr,
BSTR p 
)

Definition at line 841 of file nsembed.c.

842{
843 const PRUnichar *str;
844
845 if(NS_FAILED(nsres)) {
846 ERR("failed: %08x\n", nsres);
847 nsAString_Finish(nsstr);
848 return E_FAIL;
849 }
850
851 nsAString_GetData(nsstr, &str);
852 TRACE("ret %s\n", debugstr_w(str));
853 if(*str) {
854 *p = SysAllocString(str);
855 if(!*p)
856 return E_OUTOFMEMORY;
857 }else {
858 *p = NULL;
859 }
860
861 nsAString_Finish(nsstr);
862 return S_OK;
863}
GLfloat GLfloat p
Definition: glext.h:8902
UINT32 nsAString_GetData(const nsAString *str, const PRUnichar **data)
Definition: nsembed.c:831
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

Referenced by HTMLAnchorElement_get_hash(), HTMLAnchorElement_get_hostname(), HTMLAnchorElement_get_name(), HTMLAnchorElement_get_rel(), HTMLAnchorElement_get_search(), HTMLAnchorElement_get_target(), HTMLBodyElement_get_background(), HTMLButtonElement_get_name(), HTMLDocument5_get_compatMode(), HTMLDocument_get_charset(), HTMLDOMNode_get_nodeName(), HTMLDOMTextNode_get_data(), HTMLElement2_get_dir(), HTMLElement3_get_contentEditable(), HTMLElement_get_className(), HTMLElement_get_id(), HTMLElement_get_innerHTML(), HTMLElement_get_tagName(), HTMLElement_get_title(), HTMLFormElement_get_encoding(), HTMLFormElement_get_method(), HTMLFormElement_get_name(), HTMLFormElement_get_target(), HTMLFrameBase_get_frameBorder(), HTMLFrameBase_get_name(), HTMLFrameBase_get_src(), HTMLIFrameElement2_get_height(), HTMLIFrameElement2_get_width(), HTMLImgElement_get_align(), HTMLImgElement_get_alt(), HTMLImgElement_get_name(), HTMLInputElement_get_defaultValue(), HTMLInputElement_get_name(), HTMLInputElement_get_type(), HTMLInputElement_get_value(), HTMLLinkElement_get_href(), HTMLLinkElement_get_media(), HTMLLinkElement_get_rel(), HTMLLinkElement_get_rev(), HTMLLinkElement_get_type(), HTMLObjectElement_get_name(), HTMLOptionElement_get_text(), HTMLOptionElement_get_value(), HTMLScriptElement_get_src(), HTMLScriptElement_get_text(), HTMLScriptElement_get_type(), HTMLSelectElement_get_name(), HTMLSelectElement_get_type(), HTMLSelectElement_get_value(), HTMLStyleElement_get_media(), HTMLStyleElement_get_type(), HTMLStyleSheet_get_cssText(), HTMLStyleSheet_get_href(), HTMLTable3_get_summary(), HTMLTable_get_align(), HTMLTable_get_cellSpacing(), HTMLTable_get_frame(), HTMLTableCell_get_align(), HTMLTableRow_get_align(), HTMLTableRow_get_vAlign(), HTMLTextAreaElement_get_defaultValue(), HTMLTextAreaElement_get_name(), HTMLTextAreaElement_get_value(), HTMLWindow2_get_name(), HTMLXMLHttpRequest_get_responseText(), and return_nsstr_variant().

◆ set_bool_pref()

static void set_bool_pref ( nsIPrefBranch pref,
const char pref_name,
BOOL  val 
)
static

Definition at line 604 of file nsembed.c.

605{
606 nsresult nsres;
607
608 nsres = nsIPrefBranch_SetBoolPref(pref, pref_name, val);
609 if(NS_FAILED(nsres))
610 ERR("Could not set pref %s\n", debugstr_a(pref_name));
611}
GLuint GLfloat * val
Definition: glext.h:7180

Referenced by set_preferences().

◆ set_environment()

static void set_environment ( LPCWSTR  gre_path)
static

Definition at line 426 of file nsembed.c.

427{
428 size_t len, gre_path_len;
429 int debug_level = 0;
430 WCHAR *path, buf[20];
431 const WCHAR *ptr;
432
433 static const WCHAR pathW[] = {'P','A','T','H',0};
434 static const WCHAR warnW[] = {'w','a','r','n',0};
435 static const WCHAR xpcom_debug_breakW[] =
436 {'X','P','C','O','M','_','D','E','B','U','G','_','B','R','E','A','K',0};
437 static const WCHAR nspr_log_modulesW[] =
438 {'N','S','P','R','_','L','O','G','_','M','O','D','U','L','E','S',0};
439 static const WCHAR debug_formatW[] = {'a','l','l',':','%','d',0};
440
441 SetEnvironmentVariableW(xpcom_debug_breakW, warnW);
442
443 if(TRACE_ON(gecko))
444 debug_level = 5;
445 else if(WARN_ON(gecko))
446 debug_level = 3;
447 else if(ERR_ON(gecko))
448 debug_level = 2;
449
450 sprintfW(buf, debug_formatW, debug_level);
451 SetEnvironmentVariableW(nspr_log_modulesW, buf);
452
453 len = GetEnvironmentVariableW(pathW, NULL, 0);
454 gre_path_len = strlenW(gre_path);
455 path = heap_alloc((len+gre_path_len+1)*sizeof(WCHAR));
456 if(!path)
457 return;
459
460 /* We have to modify PATH as xul.dll loads other DLLs from this directory. */
461 if(!(ptr = strstrW(path, gre_path))
462 || (ptr > path && *(ptr-1) != ';')
463 || (ptr[gre_path_len] && ptr[gre_path_len] != ';')) {
464 if(len)
465 path[len-1] = ';';
466 strcpyW(path+len, gre_path);
468 }
470}
#define GetEnvironmentVariableW(x, y, z)
Definition: compat.h:755
#define TRACE_ON(x)
Definition: compat.h:75
BOOL WINAPI DECLSPEC_HOTPATCH SetEnvironmentVariableW(IN LPCWSTR lpName, IN LPCWSTR lpValue)
Definition: environ.c:259
#define WARN_ON(c)
Definition: module.h:257
#define strstrW(d, s)
Definition: unicode.h:38
#define sprintfW
Definition: unicode.h:64
#define ERR_ON(ch)
Definition: debug.h:412

Referenced by load_xul().

◆ set_int_pref()

static void set_int_pref ( nsIPrefBranch pref,
const char pref_name,
int  val 
)
static

Definition at line 613 of file nsembed.c.

614{
615 nsresult nsres;
616
617 nsres = nsIPrefBranch_SetIntPref(pref, pref_name, val);
618 if(NS_FAILED(nsres))
619 ERR("Could not set pref %s\n", debugstr_a(pref_name));
620}

Referenced by set_preferences().

◆ set_lang()

static void set_lang ( nsIPrefBranch pref)
static

Definition at line 631 of file nsembed.c.

632{
633 char langs[100];
634 DWORD res, size, type;
635 HKEY hkey;
636
637 static const WCHAR international_keyW[] =
638 {'S','o','f','t','w','a','r','e',
639 '\\','M','i','c','r','o','s','o','f','t',
640 '\\','I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r',
641 '\\','I','n','t','e','r','n','a','t','i','o','n','a','l',0};
642
643 res = RegOpenKeyW(HKEY_CURRENT_USER, international_keyW, &hkey);
644 if(res != ERROR_SUCCESS)
645 return;
646
647 size = sizeof(langs);
648 res = RegQueryValueExA(hkey, "AcceptLanguage", 0, &type, (LPBYTE)langs, &size);
649 RegCloseKey(hkey);
650 if(res != ERROR_SUCCESS || type != REG_SZ)
651 return;
652
653 TRACE("Setting lang %s\n", debugstr_a(langs));
654
655 set_string_pref(pref, "intl.accept_languages", langs);
656}
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
Definition: reg.c:4009
static void set_string_pref(nsIPrefBranch *pref, const char *pref_name, const char *val)
Definition: nsembed.c:622
#define HKEY_CURRENT_USER
Definition: winreg.h:11

Referenced by set_preferences().

◆ set_preferences()

static void set_preferences ( void  )
static

Definition at line 658 of file nsembed.c.

659{
660 nsIPrefBranch *pref;
661 nsresult nsres;
662
663 nsres = nsIServiceManager_GetServiceByContractID(pServMgr, NS_PREFERENCES_CONTRACTID,
664 &IID_nsIPrefBranch, (void**)&pref);
665 if(NS_FAILED(nsres)) {
666 ERR("Could not get preference service: %08x\n", nsres);
667 return;
668 }
669
670 set_lang(pref);
671 set_bool_pref(pref, "security.warn_entering_secure", FALSE);
672 set_bool_pref(pref, "security.warn_submit_insecure", FALSE);
673 set_int_pref(pref, "layout.spellcheckDefault", 0);
674
675 nsIPrefBranch_Release(pref);
676}
static void set_lang(nsIPrefBranch *pref)
Definition: nsembed.c:631
static void set_int_pref(nsIPrefBranch *pref, const char *pref_name, int val)
Definition: nsembed.c:613
static void set_bool_pref(nsIPrefBranch *pref, const char *pref_name, BOOL val)
Definition: nsembed.c:604
#define NS_PREFERENCES_CONTRACTID
Definition: nsembed.c:31

Referenced by init_xpcom().

◆ set_string_pref()

static void set_string_pref ( nsIPrefBranch pref,
const char pref_name,
const char val 
)
static

Definition at line 622 of file nsembed.c.

623{
624 nsresult nsres;
625
626 nsres = nsIPrefBranch_SetCharPref(pref, pref_name, val);
627 if(NS_FAILED(nsres))
628 ERR("Could not set pref %s\n", debugstr_a(pref_name));
629}

Referenced by set_lang().

◆ set_viewer_zoom()

void set_viewer_zoom ( NSContainer nscontainer,
float  factor 
)

Definition at line 1130 of file nsembed.c.

1131{
1132 nsIContentViewer *content_viewer;
1133 nsIDocShell *doc_shell;
1134 nsresult nsres;
1135
1136 TRACE("Setting to %f\n", factor);
1137
1138 nsres = get_nsinterface((nsISupports*)nscontainer->navigation, &IID_nsIDocShell, (void**)&doc_shell);
1139 assert(nsres == NS_OK);
1140
1141 nsres = nsIDocShell_GetContentViewer(doc_shell, &content_viewer);
1142 assert(nsres == NS_OK && content_viewer);
1143 nsIDocShell_Release(doc_shell);
1144
1145 nsres = nsIContentViewer_SetFullZoom(content_viewer, factor);
1146 if(NS_FAILED(nsres))
1147 ERR("SetFullZoom failed: %08x\n", nsres);
1148
1149 nsIContentViewer_Release(content_viewer);
1150}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint factor
Definition: glfuncs.h:178

Referenced by exec_optical_zoom(), and load_settings().

◆ void()

static void ( CDECL NS_Free)
static

◆ WINE_DECLARE_DEBUG_CHANNEL()

WINE_DECLARE_DEBUG_CHANNEL ( gecko  )

Variable Documentation

◆ cat_mgr

nsICategoryManager* cat_mgr
static

Definition at line 63 of file nsembed.c.

Referenced by close_gecko(), get_nscategory_entry(), and init_xpcom().

◆ cpp_bool

Definition at line 53 of file nsembed.c.

◆ cs_load_gecko

static CRITICAL_SECTION cs_load_gecko = { &cs_load_gecko_dbg, -1, 0, 0, 0, 0 }
static

Definition at line 733 of file nsembed.c.

Referenced by close_gecko(), and load_gecko().

◆ cs_load_gecko_dbg

CRITICAL_SECTION_DEBUG cs_load_gecko_dbg
static
Initial value:
=
{
0, 0, &cs_load_gecko,
0, 0, { (DWORD_PTR)(__FILE__ ": load_gecko") }
}
static CRITICAL_SECTION_DEBUG cs_load_gecko_dbg
Definition: nsembed.c:734
LIST_ENTRY ProcessLocksList
Definition: winbase.h:883
#define DWORD_PTR
Definition: treelist.c:76

Definition at line 734 of file nsembed.c.

◆ gecko_path

WCHAR gecko_path[MAX_PATH]
static

Definition at line 69 of file nsembed.c.

Referenced by init_xpcom(), and is_gecko_path().

◆ gecko_path_len

unsigned gecko_path_len
static

Definition at line 70 of file nsembed.c.

Referenced by init_xpcom(), and is_gecko_path().

◆ nscontainer_class

ATOM nscontainer_class
static

Definition at line 68 of file nsembed.c.

Referenced by init_nscontainer(), and register_nscontainer_class().

◆ nsContextMenuListenerVtbl

const nsIContextMenuListenerVtbl nsContextMenuListenerVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI nsContextMenuListener_Release(nsIContextMenuListener *iface)
Definition: nsembed.c:1437
static nsresult NSAPI nsContextMenuListener_QueryInterface(nsIContextMenuListener *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1424
static nsrefcnt NSAPI nsContextMenuListener_AddRef(nsIContextMenuListener *iface)
Definition: nsembed.c:1431
static nsresult NSAPI nsContextMenuListener_OnShowContextMenu(nsIContextMenuListener *iface, UINT32 aContextFlags, nsIDOMEvent *aEvent, nsIDOMNode *aNode)
Definition: nsembed.c:1443

Definition at line 1509 of file nsembed.c.

Referenced by create_nscontainer().

◆ nsDirectoryServiceProvider2

nsIDirectoryServiceProvider2 nsDirectoryServiceProvider2
static
Initial value:
=
static const nsIDirectoryServiceProvider2Vtbl nsDirectoryServiceProvider2Vtbl
Definition: nsembed.c:323

Definition at line 331 of file nsembed.c.

Referenced by init_xpcom().

◆ nsDirectoryServiceProvider2Vtbl

const nsIDirectoryServiceProvider2Vtbl nsDirectoryServiceProvider2Vtbl
static
Initial value:
= {
}
static nsresult NSAPI nsDirectoryServiceProvider2_QueryInterface(nsIDirectoryServiceProvider2 *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:192
static nsresult NSAPI nsDirectoryServiceProvider2_GetFile(nsIDirectoryServiceProvider2 *iface, const char *prop, cpp_bool *persistent, nsIFile **_retval)
Definition: nsembed.c:259
static nsrefcnt NSAPI nsDirectoryServiceProvider2_AddRef(nsIDirectoryServiceProvider2 *iface)
Definition: nsembed.c:214
static nsresult NSAPI nsDirectoryServiceProvider2_GetFiles(nsIDirectoryServiceProvider2 *iface, const char *prop, nsISimpleEnumerator **_retval)
Definition: nsembed.c:281
static nsrefcnt NSAPI nsDirectoryServiceProvider2_Release(nsIDirectoryServiceProvider2 *iface)
Definition: nsembed.c:219

Definition at line 323 of file nsembed.c.

◆ nsEmbeddingSiteWindowVtbl

const nsIEmbeddingSiteWindowVtbl nsEmbeddingSiteWindowVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsEmbeddingSiteWindow_GetVisibility(nsIEmbeddingSiteWindow *iface, cpp_bool *aVisibility)
Definition: nsembed.c:1756
static nsresult NSAPI nsEmbeddingSiteWindow_SetDimensions(nsIEmbeddingSiteWindow *iface, UINT32 flags, LONG x, LONG y, LONG cx, LONG cy)
Definition: nsembed.c:1715
static nsrefcnt NSAPI nsEmbeddingSiteWindow_AddRef(nsIEmbeddingSiteWindow *iface)
Definition: nsembed.c:1703
static nsresult NSAPI nsEmbeddingSiteWindow_GetDimensions(nsIEmbeddingSiteWindow *iface, UINT32 flags, LONG *x, LONG *y, LONG *cx, LONG *cy)
Definition: nsembed.c:1723
static nsresult NSAPI nsEmbeddingSiteWindow_GetTitle(nsIEmbeddingSiteWindow *iface, PRUnichar **aTitle)
Definition: nsembed.c:1777
static nsresult NSAPI nsEmbeddingSiteWindow_SetVisibility(nsIEmbeddingSiteWindow *iface, cpp_bool aVisibility)
Definition: nsembed.c:1767
static nsresult NSAPI nsEmbeddingSiteWindow_SetFocus(nsIEmbeddingSiteWindow *iface)
Definition: nsembed.c:1747
static nsrefcnt NSAPI nsEmbeddingSiteWindow_Release(nsIEmbeddingSiteWindow *iface)
Definition: nsembed.c:1709
static nsresult NSAPI nsEmbeddingSiteWindow_GetSiteWindow(nsIEmbeddingSiteWindow *iface, void **aSiteWindow)
Definition: nsembed.c:1793
static nsresult NSAPI nsEmbeddingSiteWindow_QueryInterface(nsIEmbeddingSiteWindow *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1696
static nsresult NSAPI nsEmbeddingSiteWindow_SetTitle(nsIEmbeddingSiteWindow *iface, const PRUnichar *aTitle)
Definition: nsembed.c:1785

Definition at line 1804 of file nsembed.c.

Referenced by create_nscontainer().

◆ nsInterfaceRequestorVtbl

const nsIInterfaceRequestorVtbl nsInterfaceRequestorVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI nsInterfaceRequestor_AddRef(nsIInterfaceRequestor *iface)
Definition: nsembed.c:1883
static nsresult NSAPI nsInterfaceRequestor_QueryInterface(nsIInterfaceRequestor *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1876
static nsrefcnt NSAPI nsInterfaceRequestor_Release(nsIInterfaceRequestor *iface)
Definition: nsembed.c:1889
static nsresult NSAPI nsInterfaceRequestor_GetInterface(nsIInterfaceRequestor *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1895

Definition at line 1908 of file nsembed.c.

Referenced by create_nscontainer().

◆ nsSingletonEnumeratorVtbl

const nsISimpleEnumeratorVtbl nsSingletonEnumeratorVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsSingletonEnumerator_QueryInterface(nsISimpleEnumerator *iface, nsIIDRef riid, void **ppv)
Definition: nsembed.c:97
static nsrefcnt NSAPI nsSingletonEnumerator_AddRef(nsISimpleEnumerator *iface)
Definition: nsembed.c:117
static nsresult NSAPI nsSingletonEnumerator_HasMoreElements(nsISimpleEnumerator *iface, cpp_bool *_retval)
Definition: nsembed.c:143
static nsresult NSAPI nsSingletonEnumerator_GetNext(nsISimpleEnumerator *iface, nsISupports **_retval)
Definition: nsembed.c:153
static nsrefcnt NSAPI nsSingletonEnumerator_Release(nsISimpleEnumerator *iface)
Definition: nsembed.c:127

Definition at line 167 of file nsembed.c.

Referenced by create_singleton_enumerator().

◆ nsSupportsWeakReferenceVtbl

const nsISupportsWeakReferenceVtbl nsSupportsWeakReferenceVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI nsSupportsWeakReference_Release(nsISupportsWeakReference *iface)
Definition: nsembed.c:1933
static nsresult NSAPI nsSupportsWeakReference_QueryInterface(nsISupportsWeakReference *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1920
static nsrefcnt NSAPI nsSupportsWeakReference_AddRef(nsISupportsWeakReference *iface)
Definition: nsembed.c:1927
static nsresult NSAPI nsSupportsWeakReference_GetWeakReference(nsISupportsWeakReference *iface, nsIWeakReference **_retval)
Definition: nsembed.c:1939

Definition at line 1961 of file nsembed.c.

Referenced by create_nscontainer().

◆ nsTooltipListenerVtbl

const nsITooltipListenerVtbl nsTooltipListenerVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsTooltipListener_OnHideTooltip(nsITooltipListener *iface)
Definition: nsembed.c:1853
static nsrefcnt NSAPI nsTooltipListener_AddRef(nsITooltipListener *iface)
Definition: nsembed.c:1830
static nsresult NSAPI nsTooltipListener_QueryInterface(nsITooltipListener *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1823
static nsrefcnt NSAPI nsTooltipListener_Release(nsITooltipListener *iface)
Definition: nsembed.c:1836
static nsresult NSAPI nsTooltipListener_OnShowTooltip(nsITooltipListener *iface, LONG aXCoord, LONG aYCoord, const PRUnichar *aTipText)
Definition: nsembed.c:1842

Definition at line 1863 of file nsembed.c.

Referenced by create_nscontainer().

◆ nsURIContentListenerVtbl

const nsIURIContentListenerVtbl nsURIContentListenerVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsURIContentListener_SetParentContentListener(nsIURIContentListener *iface, nsIURIContentListener *aParentContentListener)
Definition: nsembed.c:1653
static nsresult NSAPI nsURIContentListener_QueryInterface(nsIURIContentListener *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1525
static nsresult NSAPI nsURIContentListener_SetLoadCookie(nsIURIContentListener *iface, nsISupports *aLoadCookie)
Definition: nsembed.c:1627
static nsresult NSAPI nsURIContentListener_GetLoadCookie(nsIURIContentListener *iface, nsISupports **aLoadCookie)
Definition: nsembed.c:1615
static nsresult NSAPI nsURIContentListener_DoContent(nsIURIContentListener *iface, const nsACString *aContentType, cpp_bool aIsContentPreferred, nsIRequest *aRequest, nsIStreamListener **aContentHandler, cpp_bool *_retval)
Definition: nsembed.c:1569
static nsresult NSAPI nsURIContentListener_IsPreferred(nsIURIContentListener *iface, const char *aContentType, char **aDesiredContentType, cpp_bool *_retval)
Definition: nsembed.c:1584
static nsresult NSAPI nsURIContentListener_CanHandleContent(nsIURIContentListener *iface, const char *aContentType, cpp_bool aIsContentPreferred, char **aDesiredContentType, cpp_bool *_retval)
Definition: nsembed.c:1600
static nsresult NSAPI nsURIContentListener_GetParentContentListener(nsIURIContentListener *iface, nsIURIContentListener **aParentContentListener)
Definition: nsembed.c:1639
static nsresult NSAPI nsURIContentListener_OnStartURIOpen(nsIURIContentListener *iface, nsIURI *aURI, cpp_bool *_retval)
Definition: nsembed.c:1544
static nsrefcnt NSAPI nsURIContentListener_AddRef(nsIURIContentListener *iface)
Definition: nsembed.c:1532
static nsrefcnt NSAPI nsURIContentListener_Release(nsIURIContentListener *iface)
Definition: nsembed.c:1538

Definition at line 1673 of file nsembed.c.

Referenced by create_nscontainer().

◆ nsWeakReferenceVtbl

const nsIWeakReferenceVtbl nsWeakReferenceVtbl
static
Initial value:
= {
}
static nsrefcnt NSAPI nsWeakReference_AddRef(nsIWeakReference *iface)
Definition: nsembed.c:1186
static nsresult NSAPI nsWeakReference_QueryReferent(nsIWeakReference *iface, const nsIID *riid, void **result)
Definition: nsembed.c:1211
static nsrefcnt NSAPI nsWeakReference_Release(nsIWeakReference *iface)
Definition: nsembed.c:1196
static nsresult NSAPI nsWeakReference_QueryInterface(nsIWeakReference *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1165

Definition at line 1222 of file nsembed.c.

Referenced by nsSupportsWeakReference_GetWeakReference().

◆ nsWebBrowserChromeVtbl

const nsIWebBrowserChromeVtbl nsWebBrowserChromeVtbl
static
Initial value:
= {
}
static nsresult NSAPI nsWebBrowserChrome_SetWebBrowser(nsIWebBrowserChrome *iface, nsIWebBrowser *aWebBrowser)
Definition: nsembed.c:1333
static nsresult NSAPI nsWebBrowserChrome_DestroyBrowserWindow(nsIWebBrowserChrome *iface)
Definition: nsembed.c:1362
static nsresult NSAPI nsWebBrowserChrome_ShowAsModal(nsIWebBrowserChrome *iface)
Definition: nsembed.c:1377
static nsresult NSAPI nsWebBrowserChrome_SizeBrowserTo(nsIWebBrowserChrome *iface, LONG aCX, LONG aCY)
Definition: nsembed.c:1369
static nsresult NSAPI nsWebBrowserChrome_GetChromeFlags(nsIWebBrowserChrome *iface, UINT32 *aChromeFlags)
Definition: nsembed.c:1346
static nsresult NSAPI nsWebBrowserChrome_SetChromeFlags(nsIWebBrowserChrome *iface, UINT32 aChromeFlags)
Definition: nsembed.c:1354
static nsresult NSAPI nsWebBrowserChrome_SetStatus(nsIWebBrowserChrome *iface, UINT32 statusType, const PRUnichar *status)
Definition: nsembed.c:1309
static nsresult NSAPI nsWebBrowserChrome_ExitModalEventLoop(nsIWebBrowserChrome *iface, nsresult aStatus)
Definition: nsembed.c:1391
static nsresult NSAPI nsWebBrowserChrome_QueryInterface(nsIWebBrowserChrome *iface, nsIIDRef riid, void **result)
Definition: nsembed.c:1238
static nsresult NSAPI nsWebBrowserChrome_GetWebBrowser(nsIWebBrowserChrome *iface, nsIWebBrowser **aWebBrowser)
Definition: nsembed.c:1317
static nsrefcnt NSAPI nsWebBrowserChrome_AddRef(nsIWebBrowserChrome *iface)
Definition: nsembed.c:1279
static nsresult NSAPI nsWebBrowserChrome_IsWindowModal(nsIWebBrowserChrome *iface, cpp_bool *_retval)
Definition: nsembed.c:1384
static nsrefcnt NSAPI nsWebBrowserChrome_Release(nsIWebBrowserChrome *iface)
Definition: nsembed.c:1289

Definition at line 1399 of file nsembed.c.

Referenced by create_nscontainer().

◆ pCompMgr

◆ plugin_directory

nsIFile * plugin_directory
static

Definition at line 64 of file nsembed.c.

Referenced by close_gecko(), and nsDirectoryServiceProvider2_GetFiles().

◆ profile_directory

nsIFile* profile_directory
static

◆ pServMgr

nsIServiceManager* pServMgr = NULL
static

Definition at line 61 of file nsembed.c.

Referenced by close_gecko(), create_nsxhr(), init_xpcom(), and set_preferences().

◆ wszNsContainer

const WCHAR wszNsContainer[] = {'N','s','C','o','n','t','a','i','n','e','r',0}
static

Definition at line 66 of file nsembed.c.

Referenced by init_nscontainer(), and register_nscontainer_class().

◆ xul_handle

HINSTANCE xul_handle = NULL
static

Definition at line 59 of file nsembed.c.

Referenced by init_xpcom(), and load_xul().