зеркало из https://github.com/mozilla/gecko-dev.git
Remove the many forms of NS_SetupRegistry since the classes registered are all now part of proper components. r=dougt, jag sr=rpotts b=81527
This commit is contained in:
Родитель
1ecb8c9748
Коммит
7a72f2d9f4
|
@ -49,7 +49,6 @@ XPIDLSRCS = nsIWindowCreator.idl \
|
|||
$(NULL)
|
||||
|
||||
CPPSRCS = \
|
||||
nsSetupRegistry.cpp \
|
||||
nsEmbedAPI.cpp \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -924,13 +924,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
|
@ -938,11 +931,6 @@
|
|||
<PATH>nsEmbedAPI.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
<TARGET>
|
||||
|
@ -1816,13 +1804,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS></FILEFLAGS>
|
||||
</FILE>
|
||||
</FILELIST>
|
||||
<LINKORDER>
|
||||
<FILEREF>
|
||||
|
@ -1830,11 +1811,6 @@
|
|||
<PATH>nsEmbedAPI.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</LINKORDER>
|
||||
</TARGET>
|
||||
</TARGETLIST>
|
||||
|
@ -1852,12 +1828,6 @@
|
|||
<PATH>nsEmbedAPI.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>EmbedAPIDebug.o</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
</GROUP>
|
||||
</GROUPLIST>
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@ XPIDLSRCS = \
|
|||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsEmbedAPI.obj \
|
||||
.\$(OBJDIR)\nsEmbedWin32.obj \
|
||||
.\$(OBJDIR)\nsSetupRegistry.obj \
|
||||
$(NULL)
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
|
|
@ -65,8 +65,6 @@ static PRBool sXPCOMInitializedFlag = PR_FALSE;
|
|||
static XPCOMCleanupHack sXPCOMCleanupHack;
|
||||
#endif
|
||||
|
||||
extern "C" void NS_SetupRegistry();
|
||||
|
||||
|
||||
nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
|
||||
nsIDirectoryServiceProvider *appFileLocProvider)
|
||||
|
@ -108,9 +106,6 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
|
|||
// Register components
|
||||
if (!sRegistryInitializedFlag)
|
||||
{
|
||||
// XXX hack method
|
||||
NS_SetupRegistry();
|
||||
|
||||
rv = nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
if (NS_FAILED(rv))
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* This evil file will go away when the XPCOM registry can be
|
||||
* externally initialized!
|
||||
*
|
||||
* Until then, include the real file to keep everything in sync.
|
||||
*/
|
||||
#include "../../xpfe/bootstrap/nsSetupRegistry.cpp"
|
|
@ -86,6 +86,8 @@ OBJS = \
|
|||
$(NULL)
|
||||
|
||||
# most of these have to be here for nsSetupRegistry.cpp...
|
||||
# ... and since nsSetupRegistry.cpp is no longer used, many could now be
|
||||
# removed.
|
||||
|
||||
LLIBS= \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
/*
|
||||
* This evil file will go away when the XPCOM registry can be
|
||||
* externally initialized!
|
||||
*
|
||||
* Until then, include the real file to keep everything in sync.
|
||||
*/
|
||||
#include "..\..\..\xpfe\bootstrap\nsSetupRegistry.cpp"
|
|
@ -1 +0,0 @@
|
|||
#include "../../../../webshell/tests/viewer/nsSetupRegistry.cpp"
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <ctype.h> // for isdigit()
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsIHTMLContentSink.h"
|
||||
|
@ -31,17 +32,6 @@
|
|||
#include "nsIComponentManager.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
extern "C" void NS_SetupRegistry();
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#endif
|
||||
#ifdef XP_MAC
|
||||
#endif
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
|
||||
|
@ -298,8 +288,8 @@ Usage: %s [-i intype] [-o outtype] [-f flags] [-w wrapcol] [-c comparison_file]
|
|||
}
|
||||
else file = stdin;
|
||||
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, 0);
|
||||
NS_SetupRegistry();
|
||||
|
||||
// Read in the string: very inefficient, but who cares?
|
||||
nsString inString;
|
||||
|
|
|
@ -38,7 +38,6 @@ REQUIRES = xpcom \
|
|||
|
||||
CPPSRCS = \
|
||||
Convert.cpp \
|
||||
nsSetupRegistry.cpp \
|
||||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
|
|
|
@ -36,7 +36,6 @@ BATCHSCRIPT = TestOutSinks.pl
|
|||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\Convert.obj \
|
||||
.\$(OBJDIR)\nsSetupRegistry.obj \
|
||||
$(NULL)
|
||||
|
||||
TEST_FILES = \
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsDOMCID.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#define DOM_DLL "jsdom.dll"
|
||||
|
||||
#elif defined(XP_MAC)
|
||||
#define PARSER_DLL "PARSER_DLL"
|
||||
#define DOM_DLL "DOM_DLL"
|
||||
|
||||
#else /* XP_UNIX etc. */
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
// Class ID's
|
||||
// PARSER
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_CID(kCWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
|
||||
static NS_DEFINE_CID(kCNavDTDCID, NS_CNAVDTD_CID);
|
||||
|
||||
// DOM
|
||||
static NS_DEFINE_IID(kCDOMScriptObjectFactory, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
|
||||
static NS_DEFINE_IID(kCScriptNameSetRegistry, NS_SCRIPT_NAMESET_REGISTRY_CID);
|
||||
|
||||
|
||||
extern "C" void
|
||||
NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponentLib(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCNavDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// DOM
|
||||
nsComponentManager::RegisterComponentLib(kCDOMScriptObjectFactory, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCScriptNameSetRegistry, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include <iostream.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -44,35 +45,15 @@
|
|||
#include "nsReadableUtils.h"
|
||||
#include "nsII18nCompatibility.h"
|
||||
|
||||
|
||||
static NS_DEFINE_CID(kI18nCompatibilityCID, NS_I18NCOMPATIBILITY_CID);
|
||||
|
||||
#ifdef XP_PC
|
||||
#define DLL_NAME "intlcmpt.dll"
|
||||
#else
|
||||
#ifdef XP_MAC
|
||||
#define DLL_NAME "INTLCMPT_DLL"
|
||||
#else
|
||||
#endif
|
||||
#define DLL_NAME "intlcmpt"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
extern "C" void NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponent(kI18nCompatibilityCID, NULL, NULL, DLL_NAME, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
||||
#undef DLL_NAME
|
||||
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
nsresult rv;
|
||||
|
||||
NS_SetupRegistry();
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
|
||||
nsCOMPtr <nsII18nCompatibility> I18nCompatibility;
|
||||
rv = nsComponentManager::CreateInstance(kI18nCompatibilityCID, NULL,
|
||||
NS_GET_IID(nsII18nCompatibility), getter_AddRefs(I18nCompatibility));
|
||||
nsCOMPtr<nsII18nCompatibility> I18nCompatibility =
|
||||
do_CreateInstance(kI18nCompatibilityCID, &rv);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
PRUint16 csid = 0;
|
||||
PRUnichar *charsetUni = NULL;
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#include <iostream.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -386,21 +387,6 @@ PRBool TestWordBreaker()
|
|||
return ok;
|
||||
}
|
||||
|
||||
#ifdef XP_PC
|
||||
#define LWBRK_DLL "lwbrk.dll"
|
||||
#else
|
||||
#ifdef XP_MAC
|
||||
#define LWBRK_DLL "LWBRK_DLL"
|
||||
#else
|
||||
#endif
|
||||
#define LWBRK_DLL "liblwbrk"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
extern "C" void NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponent(kLWBrkCID, NULL, NULL, LWBRK_DLL, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
||||
void SamplePrintWordWithBreak();
|
||||
void SampleFindWordBreakFromPosition(PRUint32 fragN, PRUint32 offset);
|
||||
// Sample Code
|
||||
|
@ -581,9 +567,9 @@ void SampleFindWordBreakFromPosition(PRUint32 fragN, PRUint32 offset)
|
|||
// Main
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
|
||||
NS_SetupRegistry();
|
||||
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
|
||||
// --------------------------------------------
|
||||
cout << "Test Line Break\n";
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include <ctype.h> // for isdigit()
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsIParser.h"
|
||||
#include "nsIHTMLContentSink.h"
|
||||
|
@ -31,17 +32,6 @@
|
|||
#include "nsIComponentManager.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
extern "C" void NS_SetupRegistry();
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#endif
|
||||
#ifdef XP_MAC
|
||||
#endif
|
||||
#if defined(XP_UNIX) || defined(XP_BEOS)
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_IID(kIParserIID, NS_IPARSER_IID);
|
||||
static NS_DEFINE_CID(kParserCID, NS_PARSER_CID);
|
||||
|
||||
|
@ -298,8 +288,8 @@ Usage: %s [-i intype] [-o outtype] [-f flags] [-w wrapcol] [-c comparison_file]
|
|||
}
|
||||
else file = stdin;
|
||||
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, 0);
|
||||
NS_SetupRegistry();
|
||||
|
||||
// Read in the string: very inefficient, but who cares?
|
||||
nsString inString;
|
||||
|
|
|
@ -38,7 +38,6 @@ REQUIRES = xpcom \
|
|||
|
||||
CPPSRCS = \
|
||||
Convert.cpp \
|
||||
nsSetupRegistry.cpp \
|
||||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
|
|
|
@ -36,7 +36,6 @@ BATCHSCRIPT = TestOutSinks.pl
|
|||
|
||||
OBJS = \
|
||||
.\$(OBJDIR)\Convert.obj \
|
||||
.\$(OBJDIR)\nsSetupRegistry.obj \
|
||||
$(NULL)
|
||||
|
||||
TEST_FILES = \
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
* The contents of this file are subject to the Netscape Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code, released
|
||||
* March 31, 1998.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998-1999 Netscape Communications Corporation. All
|
||||
* Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*/
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsParserCIID.h"
|
||||
#include "nsDOMCID.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define PARSER_DLL "gkparser.dll"
|
||||
#define DOM_DLL "jsdom.dll"
|
||||
|
||||
#elif defined(XP_MAC)
|
||||
#define PARSER_DLL "PARSER_DLL"
|
||||
#define DOM_DLL "DOM_DLL"
|
||||
|
||||
#else /* XP_UNIX etc. */
|
||||
#define PARSER_DLL "libhtmlpars"MOZ_DLL_SUFFIX
|
||||
#define DOM_DLL "libjsdom"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
|
||||
// Class ID's
|
||||
// PARSER
|
||||
static NS_DEFINE_CID(kCParserCID, NS_PARSER_CID);
|
||||
static NS_DEFINE_CID(kCWellFormedDTDCID, NS_WELLFORMEDDTD_CID);
|
||||
static NS_DEFINE_CID(kCNavDTDCID, NS_CNAVDTD_CID);
|
||||
|
||||
// DOM
|
||||
static NS_DEFINE_IID(kCDOMScriptObjectFactory, NS_DOM_SCRIPT_OBJECT_FACTORY_CID);
|
||||
static NS_DEFINE_IID(kCScriptNameSetRegistry, NS_SCRIPT_NAMESET_REGISTRY_CID);
|
||||
|
||||
|
||||
extern "C" void
|
||||
NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::RegisterComponentLib(kCParserCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCWellFormedDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCNavDTDCID, NULL, NULL, PARSER_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// DOM
|
||||
nsComponentManager::RegisterComponentLib(kCDOMScriptObjectFactory, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCScriptNameSetRegistry, NULL, NULL, DOM_DLL, PR_FALSE, PR_FALSE);
|
||||
}
|
||||
|
|
@ -79,11 +79,6 @@ static NS_DEFINE_CID(kRDFXMLDataSourceCID, NS_RDFXMLDATASOURCE_CID);
|
|||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_CID(kGenericFactoryCID, NS_GENERICFACTORY_CID);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// To get the registry initialized!
|
||||
|
||||
#include "../../../webshell/tests/viewer/nsSetupRegistry.cpp"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class ConsoleOutputStreamImpl : public nsIOutputStream
|
||||
|
@ -164,7 +159,7 @@ main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
NS_SetupRegistry();
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
|
||||
// Get netlib off the floor...
|
||||
nsCOMPtr<nsIEventQueueService> theEventQueueService =
|
||||
|
|
|
@ -30,7 +30,6 @@ PROGRAM = embed_xlib_into_gtk
|
|||
|
||||
CPPSRCS = \
|
||||
nsEmbedXlibIntoGtk.cpp \
|
||||
nsSetupRegistry.cpp \
|
||||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
|
|
|
@ -43,6 +43,7 @@ extern "C" {
|
|||
#include <gdk/gdkx.h>
|
||||
}
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
|
@ -68,8 +69,6 @@ static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
|
|||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
static NS_DEFINE_CID(kCUnixToolkitServiceCID, NS_UNIX_TOOLKIT_SERVICE_CID);
|
||||
|
||||
extern "C" void NS_SetupRegistry();
|
||||
|
||||
static GdkFilterReturn test_filter (GdkXEvent *gdk_xevent,
|
||||
GdkEvent *event,
|
||||
gpointer data);
|
||||
|
@ -129,14 +128,11 @@ int main(int argc, char **argv)
|
|||
gtk_widget_realize(main_window);
|
||||
|
||||
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Toolkit Service setup
|
||||
//
|
||||
// Note: This must happend before NS_SetupRegistry() is called so
|
||||
// that the toolkit specific xpcom components can be registered
|
||||
// as needed.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
nsIUnixToolkitService * unixToolkitService = nsnull;
|
||||
|
||||
|
@ -160,13 +156,6 @@ int main(int argc, char **argv)
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Setup the registry
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
NS_SetupRegistry();
|
||||
|
||||
printf("Creating event queue.\n");
|
||||
|
||||
nsIEventQueueService * eventQueueService = nsnull;
|
||||
|
|
|
@ -1,39 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "../../../../webshell/tests/viewer/nsSetupRegistry.cpp"
|
||||
|
|
@ -40,7 +40,6 @@ CPPSRCS = \
|
|||
QMozillaContainer.cpp \
|
||||
nsEmbedXlibIntoQt.cpp \
|
||||
nsQtEventProcessor.cpp \
|
||||
nsSetupRegistry.cpp \
|
||||
$(NULL)
|
||||
|
||||
LIBS = \
|
||||
|
|
|
@ -48,13 +48,6 @@ static NS_DEFINE_IID(kIPrefIID, NS_IPREF_IID);
|
|||
static NS_DEFINE_CID(kPrefCID, NS_PREF_CID);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
extern "C" void NS_SetupRegistry();
|
||||
|
||||
|
||||
// XXX ----------------------------------------------------------------
|
||||
// XXX
|
||||
// XXX QMozillaWidget is used to bind the windows created by Mozilla
|
||||
|
@ -236,13 +229,7 @@ int QMozillaContainer::init()
|
|||
xlib_rgb_init( qt_xdisplay(), DefaultScreenOfDisplay( qt_xdisplay() ) );
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Toolkit Service setup
|
||||
//
|
||||
// Note: This must happend before NS_SetupRegistry() is called so
|
||||
// that the toolkit specific xpcom components can be registered
|
||||
// as needed.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
nsresult rv;
|
||||
|
||||
|
@ -268,13 +255,6 @@ int QMozillaContainer::init()
|
|||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Setup the registry
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
NS_SetupRegistry();
|
||||
|
||||
printf("Creating event queue.\n");
|
||||
|
||||
nsIEventQueueService * eventQueueService = nsnull;
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||
* Netscape Communications Corporation. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Milind Changire <changire@yahoo.com>
|
||||
*/
|
||||
|
||||
#include "../../../../webshell/tests/viewer/nsSetupRegistry.cpp"
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
#
|
||||
|
||||
DEPTH = ../..
|
||||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = webshell
|
||||
LIBRARY_NAME = webshell
|
||||
EXPORT_LIBRARY = 1
|
||||
SHORT_LIBNAME = gkweb
|
||||
EXTRA_DSO_LIBS = jsdom docshell
|
||||
ifdef MOZ_PERF_METRICS
|
||||
EXTRA_DSO_LIBS += mozutil_s
|
||||
endif
|
||||
DEFFILE = $(srcdir)/webshell.def
|
||||
|
||||
ifeq ($(OS_ARCH),Darwin)
|
||||
IS_COMPONENT = 1
|
||||
endif
|
||||
|
||||
CPPSRCS = \
|
||||
dlldeps.cpp \
|
||||
nsDLLFactory.cpp \
|
||||
nsWebShell.cpp \
|
||||
$(NULL)
|
||||
|
||||
EXTRA_DSO_LDOPTS = \
|
||||
$(LIBS_DIR) \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(MOZ_COMPONENT_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
DEFINES += -D_IMPL_NS_WEB
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
DEFINES += -DWIN32_LEAN_AND_MEAN
|
||||
OS_LIBS += ole32.lib
|
||||
endif
|
||||
LOCAL_INCLUDES = \
|
||||
-I$(topsrcdir)/docshell/base \
|
||||
$(NULL)
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public
|
||||
* License Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License. You may obtain a copy of
|
||||
* the License at http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS
|
||||
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
* implied. See the License for the specific language governing
|
||||
* rights and limitations under the License.
|
||||
*
|
||||
* The Original Code is the Mozilla browser.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape
|
||||
* Communications, Inc. Portions created by Netscape are
|
||||
* Copyright (C) 1999, Mozilla. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Scott Collins <scc@netscape.com>
|
||||
*/
|
||||
|
||||
#include "nsIWebShell.h"
|
||||
|
||||
void
|
||||
XXXNeverCalled()
|
||||
{
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
#!nmake
|
||||
#
|
||||
# The contents of this file are subject to the Netscape Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/NPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Netscape
|
||||
# Communications Corporation. Portions created by Netscape are
|
||||
# Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
|
||||
DEPTH=..\..
|
||||
include <$(DEPTH)/config/config.mak>
|
||||
|
||||
|
||||
DEFINES=-D_IMPL_NS_WEB -DWIN32_LEAN_AND_MEAN
|
||||
MODULE=raptor
|
||||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\dlldeps.obj \
|
||||
.\$(OBJDIR)\nsComFactory.obj \
|
||||
.\$(OBJDIR)\nsDLLFactory.obj \
|
||||
.\$(OBJDIR)\nsWebShell.obj \
|
||||
$(NULL)
|
||||
|
||||
LINCS=-I..\public -I..\..\docshell\base
|
||||
|
||||
!ifdef MOZ_STATIC_COMPONENT_LIBS
|
||||
MAKE_OBJ_TYPE = LIB
|
||||
LIBRARY_NAME = gkweb
|
||||
LIB=.\$(OBJDIR)\$(LIBRARY_NAME).lib
|
||||
!else
|
||||
MAKE_OBJ_TYPE = DLL
|
||||
DLLNAME = gkweb
|
||||
DLL=.\$(OBJDIR)\$(DLLNAME).dll
|
||||
!endif
|
||||
|
||||
DEFFILE=webshell.def
|
||||
|
||||
LCFLAGS = \
|
||||
$(LCFLAGS) \
|
||||
$(DEFINES) \
|
||||
$(NULL)
|
||||
|
||||
# These are the libraries we need to link with to create the dll
|
||||
LLIBS= \
|
||||
$(DIST)\lib\basedocshell_s.lib \
|
||||
$(DIST)\lib\xpcom.lib \
|
||||
$(DIST)\lib\gkgfx.lib \
|
||||
$(DIST)\lib\img32$(VERSION_NUMBER).lib \
|
||||
$(DIST)\lib\util.lib \
|
||||
$(DIST)\lib\jsdom.lib \
|
||||
$(LIBNSPR)
|
||||
|
||||
WIN_LIBS= OLE32.LIB
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
||||
|
||||
!ifdef MOZ_STATIC_COMPONENT_LIBS
|
||||
libs:: $(LIB)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(LIBRARY_NAME).lib $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(LIBRARY_NAME).lib
|
||||
rm -f $(DIST)\lib\$(LIBRARY_NAME).lib
|
||||
!else
|
||||
libs:: $(DLL)
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
|
||||
$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib
|
||||
|
||||
clobber::
|
||||
rm -f $(DIST)\bin\$(DLLNAME).dll
|
||||
rm -f $(DIST)\lib\$(DLLNAME).lib
|
||||
!endif
|
|
@ -1,402 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifdef XP_PC
|
||||
|
||||
//
|
||||
// This is a terrible hack which *must* go away soon!!!
|
||||
// We need some other mechanism to prime the nsComponentManager...
|
||||
//
|
||||
#include "../tests/viewer/nsSetupRegistry.cpp"
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include <ole2.h>
|
||||
|
||||
#include "plstr.h"
|
||||
#include "prmem.h"
|
||||
#include "prprf.h"
|
||||
#include "prlink.h"
|
||||
#include "nsIFactory.h"
|
||||
#include "nsIWebShell.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "plevent.h"
|
||||
#include "prthread.h"
|
||||
#include "private/pprthred.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
|
||||
static HMODULE g_DllInst = NULL;
|
||||
|
||||
#define GUID_SIZE 128
|
||||
|
||||
//
|
||||
// Windows Registry keys and values...
|
||||
//
|
||||
#define WEBSHELL_GLOBAL_CONTRACTID_KEY "nsWebShell"
|
||||
#define WEBSHELL_GLOBAL_CONTRACTID_DESC "Netscape NGLayout WebShell Component"
|
||||
|
||||
#define WEBSHELL_CONTRACTID_KEY WEBSHELL_GLOBAL_CONTRACTID_KEY ## "1.0"
|
||||
#define WEBSHELL_CONTRACTID_DESC WEBSHELL_GLOBAL_CONTRACTID_KEY ## " Version 1.0"
|
||||
|
||||
#define WEBSHELL_CLSID_DESC WEBSHELL_CONTRACTID_DESC
|
||||
|
||||
|
||||
|
||||
static GUID WebShellCID = NS_WEB_SHELL_CID;
|
||||
|
||||
BOOL WINAPI DllMain(HINSTANCE hDllInst,
|
||||
DWORD fdwReason,
|
||||
LPVOID lpvReserved)
|
||||
{
|
||||
BOOL bResult = TRUE;
|
||||
|
||||
switch (fdwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
{
|
||||
// save our instance
|
||||
g_DllInst = hDllInst;
|
||||
}
|
||||
break;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
|
||||
case DLL_THREAD_ATTACH:
|
||||
break;
|
||||
|
||||
case DLL_THREAD_DETACH:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return (bResult);
|
||||
}
|
||||
|
||||
/*
|
||||
* COM entry-point for creating class factories...
|
||||
*/
|
||||
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void** ppv)
|
||||
{
|
||||
static PRBool isFirstTime = PR_TRUE;
|
||||
HRESULT hr = CLASS_E_CLASSNOTAVAILABLE;
|
||||
nsIFactory* pFactory = NULL;
|
||||
nsresult rv;
|
||||
|
||||
//
|
||||
// If this is the first time, then do the necessary global
|
||||
// initialization....
|
||||
//
|
||||
// This initialization should really be done somewhere else, but
|
||||
// for now here is as good a place as any...
|
||||
//
|
||||
if (PR_TRUE == isFirstTime) {
|
||||
|
||||
// Get dll directory
|
||||
char binpath[_MAX_PATH];
|
||||
::GetModuleFileName(g_DllInst, binpath, _MAX_PATH);
|
||||
char *lastslash = PL_strrchr(binpath, '\\');
|
||||
if (lastslash) *lastslash = '\0';
|
||||
|
||||
// Get existing search path
|
||||
int len = GetEnvironmentVariable("PATH", NULL, 0);
|
||||
char *newpath = (char *) PR_Malloc(sizeof(char) * (len +
|
||||
PL_strlen(binpath) +
|
||||
2)); // ';' + '\0'
|
||||
GetEnvironmentVariable("PATH", newpath, len + 1);
|
||||
PL_strcat(newpath, ";");
|
||||
PL_strcat(newpath, binpath);
|
||||
|
||||
// Set new search path
|
||||
SetEnvironmentVariable("PATH", newpath);
|
||||
|
||||
// Clean up
|
||||
PR_Free(newpath);
|
||||
|
||||
// PR_AttachThread(PR_USER_THREAD, PR_PRIORITY_NORMAL, NULL);
|
||||
NS_SetupRegistry();
|
||||
|
||||
// Create the Event Queue for the UI thread...
|
||||
//
|
||||
// If an event queue already exists for the thread, then
|
||||
// CreateThreadEventQueue(...) will fail...
|
||||
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_IID(kIEventQueueServiceIID, NS_IEVENTQUEUESERVICE_IID);
|
||||
|
||||
nsIEventQueueService* eventQService = nsnull;
|
||||
|
||||
rv = nsServiceManager::GetService(kEventQueueServiceCID,
|
||||
kIEventQueueServiceIID,
|
||||
(nsISupports **)&eventQService);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
rv = eventQService->CreateThreadEventQueue();
|
||||
nsServiceManager::ReleaseService(kEventQueueServiceCID, eventQService);
|
||||
}
|
||||
|
||||
|
||||
isFirstTime = PR_FALSE;
|
||||
}
|
||||
|
||||
if (WebShellCID == rclsid) {
|
||||
rv = NS_NewWebShellFactory(&pFactory);
|
||||
if (NS_OK != rv) {
|
||||
hr = E_OUTOFMEMORY;
|
||||
}
|
||||
}
|
||||
|
||||
if (nsnull != pFactory) {
|
||||
// This is an evil cast, but it should be safe...
|
||||
rv = ((IUnknown*)pFactory)->QueryInterface(riid, ppv);
|
||||
if (NS_OK != rv) {
|
||||
hr = E_NOINTERFACE;
|
||||
} else {
|
||||
hr = S_OK;
|
||||
}
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Helper function to register a key/sub-key in the Windows registry...
|
||||
*/
|
||||
void RegisterKey(char *aKey, const char *aSubKey, const char *aValue, const char* aValueName=NULL)
|
||||
{
|
||||
LONG rv;
|
||||
HKEY hKey;
|
||||
char keyName[256];
|
||||
|
||||
if (NULL != aSubKey) {
|
||||
PR_snprintf(keyName, sizeof(keyName), "%s\\%s", aKey, aSubKey);
|
||||
} else {
|
||||
PR_snprintf(keyName, sizeof(keyName), "%s", aKey);
|
||||
}
|
||||
|
||||
rv = RegCreateKeyEx(HKEY_CLASSES_ROOT,
|
||||
keyName,
|
||||
0,
|
||||
NULL,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
KEY_ALL_ACCESS,
|
||||
NULL,
|
||||
&hKey,
|
||||
NULL);
|
||||
|
||||
if (rv == ERROR_SUCCESS) {
|
||||
if (NULL != aValue) {
|
||||
RegSetValueEx(hKey,
|
||||
aValueName,
|
||||
0,
|
||||
REG_SZ,
|
||||
(const BYTE*)aValue,
|
||||
strlen(aValue));
|
||||
}
|
||||
RegCloseKey(hKey);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper function to remove a key/sub-key from the Windows registry...
|
||||
*/
|
||||
void UnRegisterKey(char *aKey, const char *aSubKey)
|
||||
{
|
||||
char keyName[256];
|
||||
|
||||
if (NULL != aSubKey) {
|
||||
PR_snprintf(keyName, sizeof(keyName), "%s\\%s", aKey, aSubKey);
|
||||
} else {
|
||||
PR_snprintf(keyName, sizeof(keyName), "%s", aKey);
|
||||
}
|
||||
|
||||
RegDeleteKey(HKEY_CLASSES_ROOT, keyName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* COM entry-point to register all COM Components for the DLL
|
||||
* in the Windows registry...
|
||||
*
|
||||
* Typically this entry-point is called by regsvr32.exe or an
|
||||
* installer...
|
||||
*/
|
||||
STDAPI DllRegisterServer(void)
|
||||
{
|
||||
char* WebShellCLSID;
|
||||
char WebShellCLSIDkey[255];
|
||||
char WebShellDLLPath[MAX_PATH];
|
||||
|
||||
//
|
||||
// Create a printable string from the WebShell CLSID
|
||||
//
|
||||
// This is a hack to convert the Unicode string returned by
|
||||
// StringFromIID(...) into an ansi string...
|
||||
//
|
||||
PRUnichar IIDString[255];
|
||||
nsString tmp;
|
||||
|
||||
StringFromGUID2(WebShellCID, IIDString, sizeof(IIDString));
|
||||
tmp = IIDString;
|
||||
WebShellCLSID = ToNewCString(tmp);
|
||||
|
||||
// end hack...
|
||||
|
||||
PR_snprintf(WebShellCLSIDkey, sizeof(WebShellCLSIDkey), "CLSID\\%s", WebShellCLSID);
|
||||
|
||||
|
||||
// Obtain the path to this module's executable file for later use.
|
||||
GetModuleFileName(g_DllInst, WebShellDLLPath, sizeof(WebShellDLLPath));
|
||||
|
||||
//
|
||||
// Register/Create the following registry keys:
|
||||
// nsWebShell1.0
|
||||
// nsWebShell1.0/CLSID
|
||||
//
|
||||
RegisterKey(WEBSHELL_CONTRACTID_KEY, NULL, WEBSHELL_CONTRACTID_DESC);
|
||||
RegisterKey(WEBSHELL_CONTRACTID_KEY, "CLSID", WebShellCLSID);
|
||||
|
||||
//
|
||||
// Register/Create the following registry keys:
|
||||
// nsWebShell
|
||||
// nsWebShell/CurVer
|
||||
// nsWebShell/CLSID
|
||||
//
|
||||
RegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, NULL, WEBSHELL_GLOBAL_CONTRACTID_DESC);
|
||||
RegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CurVer", WEBSHELL_CONTRACTID_KEY);
|
||||
RegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CLSID", WebShellCLSID);
|
||||
|
||||
//
|
||||
// Register/Create the following registry keys:
|
||||
// CLSID/{ CLSID }
|
||||
// CLSID/{ CLSID }/ContractID
|
||||
// CLSID/{ CLSID }/VersionIndependentContractID
|
||||
// CLSID/{ CLSID }/NotInsertable
|
||||
// CLSID/{ CLSID }/InprocServer32
|
||||
//
|
||||
RegisterKey(WebShellCLSIDkey, NULL, WEBSHELL_CLSID_DESC);
|
||||
RegisterKey(WebShellCLSIDkey, "ContractID", WEBSHELL_CONTRACTID_KEY);
|
||||
RegisterKey(WebShellCLSIDkey, "VersionIndependentContractID", WEBSHELL_GLOBAL_CONTRACTID_KEY);
|
||||
RegisterKey(WebShellCLSIDkey, "NotInsertable", NULL);
|
||||
RegisterKey(WebShellCLSIDkey, "InprocServer32", WebShellDLLPath);
|
||||
RegisterKey(WebShellCLSIDkey, "InprocServer32", "Apartment", "ThreadingModel");
|
||||
|
||||
// Free up memory...
|
||||
if (WebShellCLSID) {
|
||||
delete[] WebShellCLSID;
|
||||
}
|
||||
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* COM entry-point to remove all COM Components for the DLL
|
||||
* from the Windows registry...
|
||||
*
|
||||
* Typically this entry-point is called by regsvr32.exe /u or an
|
||||
* installer...
|
||||
*/
|
||||
STDAPI DllUnregisterServer(void)
|
||||
{
|
||||
char* WebShellCLSID;
|
||||
char WebShellCLSIDkey[255];
|
||||
|
||||
//
|
||||
// Create a printable string from the WebShell CLSID
|
||||
//
|
||||
// This is a hack to convert the Unicode string returned by
|
||||
// StringFromIID(...) into an ansi string...
|
||||
//
|
||||
PRUnichar IIDString[255];
|
||||
nsString tmp;
|
||||
|
||||
StringFromGUID2(WebShellCID, IIDString, sizeof(IIDString));
|
||||
tmp = IIDString;
|
||||
WebShellCLSID = ToNewCString(tmp);
|
||||
|
||||
// end hack...
|
||||
|
||||
PR_snprintf(WebShellCLSIDkey, sizeof(WebShellCLSIDkey), "CLSID\\%s", WebShellCLSID);
|
||||
|
||||
//
|
||||
// Remove the following registry keys:
|
||||
// nsWebShell1.0/CLSID
|
||||
// nsWebShell1.0
|
||||
//
|
||||
UnRegisterKey(WEBSHELL_CONTRACTID_KEY, "CLSID");
|
||||
UnRegisterKey(WEBSHELL_CONTRACTID_KEY, NULL);
|
||||
|
||||
//
|
||||
// Remove the following registry keys:
|
||||
// nsWebShell/CLSID
|
||||
// nsWebShell/CurVer
|
||||
// nsWebShell
|
||||
//
|
||||
UnRegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CLSID");
|
||||
UnRegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, "CurVer");
|
||||
UnRegisterKey(WEBSHELL_GLOBAL_CONTRACTID_KEY, NULL);
|
||||
|
||||
//
|
||||
// Remove the following registry keys:
|
||||
// CLSID/{ CLSID }/InprocServer32
|
||||
// CLSID/{ CLSID }/NotInsertable
|
||||
// CLSID/{ CLSID }/VersionIndependentContractID
|
||||
// CLSID/{ CLSID }/ContractID
|
||||
// CLSID/{ CLSID }
|
||||
//
|
||||
UnRegisterKey(WebShellCLSIDkey, "InprocServer32");
|
||||
UnRegisterKey(WebShellCLSIDkey, "NotInsertable");
|
||||
UnRegisterKey(WebShellCLSIDkey, "VersionIndependentContractID");
|
||||
UnRegisterKey(WebShellCLSIDkey, "ContractID");
|
||||
UnRegisterKey(WebShellCLSIDkey, NULL);
|
||||
|
||||
// Free up memory...
|
||||
if (WebShellCLSID) {
|
||||
delete[] WebShellCLSID;
|
||||
}
|
||||
|
||||
return NOERROR;
|
||||
}
|
||||
|
||||
#endif // XP_PC
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
; -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
;
|
||||
; The contents of this file are subject to the Netscape Public
|
||||
; License Version 1.1 (the "License"); you may not use this file
|
||||
; except in compliance with the License. You may obtain a copy of
|
||||
; the License at http://www.mozilla.org/NPL/
|
||||
;
|
||||
; Software distributed under the License is distributed on an "AS
|
||||
; IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
; implied. See the License for the specific language governing
|
||||
; rights and limitations under the License.
|
||||
;
|
||||
; The Original Code is Mozilla Communicator client code.
|
||||
;
|
||||
; The Initial Developer of the Original Code is Netscape Communications
|
||||
; Corporation. Portions created by Netscape are
|
||||
; Copyright (C) 1998 Netscape Communications Corporation. All
|
||||
; Rights Reserved.
|
||||
;
|
||||
; Contributor(s):
|
||||
;
|
||||
LIBRARY GKWEB
|
||||
|
||||
DESCRIPTION 'GKWEB.DLL - NGLayout Web Widget Control.'
|
||||
|
||||
EXPORTS
|
||||
DllGetClassObject PRIVATE
|
||||
; DllCanUnloadNow PRIVATE
|
||||
DllRegisterServer PRIVATE
|
||||
DllUnregisterServer PRIVATE
|
|
@ -67,7 +67,6 @@ CPPSRCS = \
|
|||
nsPrintSetupDialog.cpp \
|
||||
nsBrowserWindow.cpp \
|
||||
nsEditorMode.cpp \
|
||||
nsSetupRegistry.cpp \
|
||||
nsThrobber.cpp \
|
||||
nsViewerApp.cpp \
|
||||
nsWebCrawler.cpp \
|
||||
|
|
|
@ -1000,13 +1000,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xpcomDebug.shlb</PATH>
|
||||
|
@ -1164,11 +1157,6 @@
|
|||
<PATH>nsWebCrawler.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsBrowserWindow.cpp</PATH>
|
||||
|
@ -2193,13 +2181,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xpcom.shlb</PATH>
|
||||
|
@ -2362,11 +2343,6 @@
|
|||
<PATH>nsWebCrawler.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xpcom.shlb</PATH>
|
||||
|
@ -3386,13 +3362,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xpcom.shlb</PATH>
|
||||
|
@ -3562,11 +3531,6 @@
|
|||
<PATH>nsWebCrawler.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xpcom.shlb</PATH>
|
||||
|
@ -4591,13 +4555,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>xpcomDebug.shlb</PATH>
|
||||
|
@ -4762,11 +4719,6 @@
|
|||
<PATH>nsWebCrawler.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsBrowserWindow.cpp</PATH>
|
||||
|
@ -4904,12 +4856,6 @@
|
|||
<PATH>nsPrintSetupDialog.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>viewerDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>viewerDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
|
|
|
@ -74,7 +74,6 @@ OBJS = \
|
|||
.\$(OBJDIR)\nsXPBaseWindow.obj \
|
||||
.\$(OBJDIR)\nsBrowserWindow.obj \
|
||||
.\$(OBJDIR)\nsEditorMode.obj \
|
||||
.\$(OBJDIR)\nsSetupRegistry.obj \
|
||||
.\$(OBJDIR)\nsThrobber.obj \
|
||||
.\$(OBJDIR)\nsViewerApp.obj \
|
||||
.\$(OBJDIR)\nsWebCrawler.obj \
|
||||
|
|
|
@ -1,195 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Pierre Phaneuf <pp@ludusdesign.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
#define NS_IMPL_IDS
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsWidgetsCID.h"
|
||||
#include "nsViewsCID.h"
|
||||
|
||||
#include "nsIDocumentLoader.h"
|
||||
|
||||
#include "nsDOMCID.h"
|
||||
#include "nsIProperties.h"
|
||||
|
||||
#include "nsIObserverService.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsIMemory.h"
|
||||
#include "nsIEventQueue.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsGfxCIID.h"
|
||||
#include "nsSpecialSystemDirectory.h"
|
||||
|
||||
#include "nsISound.h"
|
||||
|
||||
#include "prprf.h"
|
||||
#include "prmem.h"
|
||||
#include "prlog.h" // PR_ASSERT
|
||||
|
||||
#if defined(XP_OS2)
|
||||
#define WIDGET_DLL "WDGTOS2"
|
||||
#define GFXWIN_DLL "GFX_OS2"
|
||||
#elif defined(XP_PC)
|
||||
#define WIDGET_DLL "gkwidget.dll"
|
||||
#define GFXWIN_DLL "gkgfxwin.dll"
|
||||
#elif defined(XP_MAC)
|
||||
#define WIDGET_DLL "WIDGET_DLL"
|
||||
#define GFXWIN_DLL "GFXWIN_DLL"
|
||||
#endif
|
||||
|
||||
// Class ID's
|
||||
|
||||
// WIDGET
|
||||
#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
|
||||
static NS_DEFINE_IID(kCLookAndFeelCID, NS_LOOKANDFEEL_CID);
|
||||
static NS_DEFINE_IID(kCWindowCID, NS_WINDOW_CID);
|
||||
static NS_DEFINE_IID(kCVScrollbarCID, NS_VERTSCROLLBAR_CID);
|
||||
static NS_DEFINE_IID(kCHScrollbarCID, NS_HORZSCROLLBAR_CID);
|
||||
static NS_DEFINE_IID(kCDialogCID, NS_DIALOG_CID);
|
||||
static NS_DEFINE_IID(kCChildCID, NS_CHILD_CID);
|
||||
static NS_DEFINE_IID(kCAppShellCID, NS_APPSHELL_CID);
|
||||
static NS_DEFINE_IID(kCToolkitCID, NS_TOOLKIT_CID);
|
||||
static NS_DEFINE_IID(kClipboardCID, NS_CLIPBOARD_CID);
|
||||
static NS_DEFINE_CID(kClipboardHelperCID, NS_CLIPBOARDHELPER_CID);
|
||||
static NS_DEFINE_CID(kCTransferableCID, NS_TRANSFERABLE_CID);
|
||||
static NS_DEFINE_IID(kDataFlavorCID, NS_DATAFLAVOR_CID);
|
||||
static NS_DEFINE_IID(kCHTMLFormatConverterCID, NS_HTMLFORMATCONVERTER_CID);
|
||||
static NS_DEFINE_IID(kCDragServiceCID, NS_DRAGSERVICE_CID);
|
||||
static NS_DEFINE_IID(kSoundCID, NS_SOUND_CID);
|
||||
static NS_DEFINE_IID(kCFilePickerCID, NS_FILEPICKER_CID);
|
||||
static NS_DEFINE_IID(kCPopUpCID,NS_POPUP_CID);
|
||||
|
||||
#ifdef IBMBIDI
|
||||
static NS_DEFINE_IID(kCBidiKeyboardCID, NS_BIDIKEYBOARD_CID);
|
||||
#endif
|
||||
|
||||
// widgets
|
||||
static NS_DEFINE_IID(kCLabelCID, NS_LABEL_CID);
|
||||
static NS_DEFINE_IID(kCButtonCID, NS_BUTTON_CID);
|
||||
static NS_DEFINE_IID(kCTextFieldCID, NS_TEXTFIELD_CID);
|
||||
static NS_DEFINE_IID(kCCheckButtonCID, NS_CHECKBUTTON_CID);
|
||||
#endif
|
||||
|
||||
// GFXWIN
|
||||
#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
|
||||
static NS_DEFINE_CID(kCRenderingContextCID, NS_RENDERING_CONTEXT_CID);
|
||||
static NS_DEFINE_CID(kCDeviceContextCID, NS_DEVICE_CONTEXT_CID);
|
||||
static NS_DEFINE_CID(kCFontMetricsCID, NS_FONT_METRICS_CID);
|
||||
static NS_DEFINE_CID(kCFontEnumeratorCID, NS_FONT_ENUMERATOR_CID);
|
||||
static NS_DEFINE_CID(kCFontListCID, NS_FONTLIST_CID);
|
||||
static NS_DEFINE_CID(kCImageCID, NS_IMAGE_CID);
|
||||
static NS_DEFINE_CID(kCRegionCID, NS_REGION_CID);
|
||||
static NS_DEFINE_CID(kCScriptableRegionCID, NS_SCRIPTABLE_REGION_CID);
|
||||
static NS_DEFINE_CID(kCBlenderCID, NS_BLENDER_CID);
|
||||
static NS_DEFINE_CID(kCDeviceContextSpecCID, NS_DEVICE_CONTEXT_SPEC_CID);
|
||||
static NS_DEFINE_CID(kCDeviceContextSpecFactoryCID, NS_DEVICE_CONTEXT_SPEC_FACTORY_CID);
|
||||
static NS_DEFINE_CID(kImageManagerCID, NS_IMAGEMANAGER_CID);
|
||||
static NS_DEFINE_CID(kScreenManagerCID, NS_SCREENMANAGER_CID);
|
||||
static NS_DEFINE_CID(kPrintOptionsCID,NS_PRINTOPTIONS_CID);
|
||||
#endif
|
||||
|
||||
extern "C" void
|
||||
NS_SetupRegistry()
|
||||
{
|
||||
|
||||
#ifdef XP_UNIX
|
||||
#undef WIDGET_DLL
|
||||
#undef GFXWIN_DLL
|
||||
#endif /* defined(XP_UNIX) */
|
||||
|
||||
// WIDGET
|
||||
#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
|
||||
nsComponentManager::RegisterComponentLib(kCLookAndFeelCID, NULL, "@mozilla.org/widget/lookandfeel;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCWindowCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCVScrollbarCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCHScrollbarCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCDialogCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCChildCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCPopUpCID,NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCAppShellCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCToolkitCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kClipboardCID, "Clipboard", "@mozilla.org/widget/clipboard;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kClipboardHelperCID, "Clipboard Helper", "@mozilla.org/widget/clipboardhelper;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCTransferableCID, "Transferable", "@mozilla.org/widget/transferable;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kDataFlavorCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCHTMLFormatConverterCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCDragServiceCID, "Drag Service", "@mozilla.org/widget/dragservice;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kSoundCID, "Sound Services", "@mozilla.org/sound;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCFilePickerCID, "FilePicker", "@mozilla.org/filepicker;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
#ifdef IBMBIDI
|
||||
nsComponentManager::RegisterComponentLib(kCBidiKeyboardCID, "Bidi Keyboard", "@mozilla.org/widget/bidikeyboard;1", WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
// WIDGETS
|
||||
nsComponentManager::RegisterComponentLib(kCLabelCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCButtonCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCTextFieldCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCCheckButtonCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
// MAC ONLY WIDGETS
|
||||
#ifdef XP_MAC
|
||||
static NS_DEFINE_IID(kCMenuBarCID, NS_MENUBAR_CID);
|
||||
static NS_DEFINE_IID(kCMenuCID, NS_MENU_CID);
|
||||
static NS_DEFINE_IID(kCMenuItemCID, NS_MENUITEM_CID);
|
||||
|
||||
nsComponentManager::RegisterComponentLib(kCMenuBarCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCMenuCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCMenuItemCID, NULL, NULL, WIDGET_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
// GFXWIN
|
||||
#if !defined(XP_UNIX) && !defined(XP_OS2) && !defined(XP_WIN)
|
||||
nsComponentManager::RegisterComponentLib(kCRenderingContextCID, "Rendering Context", "@mozilla.org/gfx/renderingcontext;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCDeviceContextCID, "Device Context", "@mozilla.org/gfx/devicecontext;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCFontMetricsCID, "Font Metrics", "@mozilla.org/gfx/fontmetrics;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCFontEnumeratorCID, "Font Enumerator", "@mozilla.org/gfx/fontenumerator;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCFontListCID, "Font List", "@mozilla.org/gfx/fontlist;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCImageCID, "Image", "@mozilla.org/gfx/image;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCRegionCID, NULL, NULL, GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCScriptableRegionCID, "Region", "@mozilla.org/gfx/region;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCBlenderCID, "Blender", "@mozilla.org/gfx/blender;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCDeviceContextSpecCID, "Device Context Spec", "@mozilla.org/gfx/devicecontextspec;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kCDeviceContextSpecFactoryCID, "Device Context Spec Factory", "@mozilla.org/gfx/devicecontextspecfactory;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kImageManagerCID, "Image Manager", "@mozilla.org/gfx/imagemanager;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kScreenManagerCID, "Screen Manager", "@mozilla.org/gfx/screenmanager;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponentLib(kPrintOptionsCID, "PrintOptions", "@mozilla.org/gfx/printoptions;1", GFXWIN_DLL, PR_FALSE, PR_FALSE);
|
||||
#endif
|
||||
|
||||
}
|
|
@ -114,7 +114,6 @@
|
|||
#endif
|
||||
|
||||
extern nsresult NS_NewXPBaseWindowFactory(nsIFactory** aFactory);
|
||||
extern "C" void NS_SetupRegistry();
|
||||
|
||||
static NS_DEFINE_IID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
static NS_DEFINE_IID(kAppShellCID, NS_APPSHELL_CID);
|
||||
|
@ -252,23 +251,12 @@ NS_METHOD nsTestFormProcessor::ProvideContent(const nsString& aFormType,
|
|||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsViewerApp::AutoregisterComponents()
|
||||
{
|
||||
nsresult rv = nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
nsresult
|
||||
nsViewerApp::SetupRegistry()
|
||||
{
|
||||
nsresult rv;
|
||||
AutoregisterComponents();
|
||||
|
||||
NS_SetupRegistry();
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
|
||||
// Register our browser window factory
|
||||
nsIFactory* bwf;
|
||||
|
|
|
@ -82,7 +82,6 @@ protected:
|
|||
|
||||
nsresult InitializeWindowCreator();
|
||||
void Destroy();
|
||||
nsresult AutoregisterComponents();
|
||||
|
||||
nsIAppShell* mAppShell;
|
||||
nsIPref* mPrefs;
|
||||
|
|
|
@ -26,9 +26,11 @@ VPATH = @srcdir@
|
|||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
||||
MODULE = widget
|
||||
MODULE = widget
|
||||
LIBRARY_NAME = widget_beos
|
||||
EXPORT_LIBRARY = 1
|
||||
EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsWidgetBeOSModule
|
||||
|
||||
REQUIRES = xpcom \
|
||||
string \
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -54,14 +55,6 @@
|
|||
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
|
||||
/***************************************************************************/
|
||||
extern "C" void
|
||||
NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, NULL /* default */);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************/
|
||||
/* nsTestXPCFoo */
|
||||
/***************************************************************************/
|
||||
|
@ -503,7 +496,9 @@ main(int argc, char **argv)
|
|||
if (argc > 1)
|
||||
numberOfThreads = atoi(argv[1]);
|
||||
|
||||
NS_SetupRegistry();
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
|
||||
|
||||
static PRThread** threads = (PRThread**) calloc(sizeof(PRThread*), numberOfThreads);
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#ifndef XPCOM_STANDALONE
|
||||
#define NS_IMPL_IDS
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIEventQueueService.h"
|
||||
#include "nsIPersistentProperties2.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -53,63 +54,13 @@
|
|||
|
||||
#include "nsSpecialSystemDirectory.h"
|
||||
|
||||
#ifdef XP_PC
|
||||
#include "plevent.h"
|
||||
#endif
|
||||
|
||||
#define TEST_URL "resource:/res/test.properties"
|
||||
|
||||
#ifdef XP_PC
|
||||
#define NETLIB_DLL "netlib.dll"
|
||||
#define RAPTORBASE_DLL "raptorbase.dll"
|
||||
#define XPCOM_DLL "xpcom32.dll"
|
||||
#else
|
||||
#ifdef XP_MAC
|
||||
#define NETLIB_DLL "NETLIB_DLL"
|
||||
#define RAPTORBASE_DLL "base.shlb"
|
||||
#define XPCOM_DLL "XPCOM_DLL"
|
||||
#else
|
||||
#define NETLIB_DLL "libnetlib"MOZ_DLL_SUFFIX
|
||||
#define RAPTORBASE_DLL "libraptorbase"MOZ_DLL_SUFFIX
|
||||
#define XPCOM_DLL "libxpcom"MOZ_DLL_SUFFIX
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static NS_DEFINE_CID(kIOServiceCID, NS_IOSERVICE_CID);
|
||||
static NS_DEFINE_CID(kEventQueueCID, NS_EVENTQUEUE_CID);
|
||||
static NS_DEFINE_CID(kEventQueueServiceCID, NS_EVENTQUEUESERVICE_CID);
|
||||
|
||||
/***************************************************************************/
|
||||
extern "C" void
|
||||
NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
|
||||
// startup netlib:
|
||||
nsComponentManager::RegisterComponent(kEventQueueServiceCID, NULL, NULL, XPCOM_DLL, PR_FALSE, PR_FALSE);
|
||||
nsComponentManager::RegisterComponent(kIOServiceCID, NULL, NULL, NETLIB_DLL, PR_FALSE, PR_FALSE);
|
||||
|
||||
// Create the Event Queue for this thread...
|
||||
nsIEventQueueService* pEventQService;
|
||||
|
||||
pEventQService = nsnull;
|
||||
nsresult result = nsServiceManager::GetService(kEventQueueServiceCID,
|
||||
NS_GET_IID(nsIEventQueueService),
|
||||
(nsISupports **)&pEventQService);
|
||||
if (NS_SUCCEEDED(result)) {
|
||||
// XXX: What if this fails?
|
||||
result = pEventQService->CreateThreadEventQueue();
|
||||
}
|
||||
|
||||
nsComponentManager::RegisterComponent(kPersistentPropertiesCID,
|
||||
NULL,
|
||||
NULL,
|
||||
RAPTORBASE_DLL,
|
||||
PR_FALSE,
|
||||
PR_FALSE);
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
int
|
||||
|
@ -118,7 +69,16 @@ main(int argc, char* argv[])
|
|||
#ifndef XPCOM_STANDALONE
|
||||
nsresult ret;
|
||||
|
||||
NS_SetupRegistry();
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
|
||||
// Create the Event Queue for this thread...
|
||||
nsCOMPtr<nsIEventQueueService> pEventQService =
|
||||
do_GetService(kEventQueueServiceCID);
|
||||
if (pEventQService)
|
||||
// XXX: What if this fails?
|
||||
pEventQService->CreateThreadEventQueue();
|
||||
|
||||
nsIInputStream* in = nsnull;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "nsILocalFile.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIMemory.h"
|
||||
|
@ -63,12 +64,6 @@ void GetPaths(nsILocalFile* file)
|
|||
printf("filepath: %s\n", (const char *)pathName);
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup, NULL);
|
||||
}
|
||||
|
||||
void InitTest(const char* creationPath, const char* appendPath)
|
||||
{
|
||||
nsILocalFile* file = nsnull;
|
||||
|
@ -319,7 +314,9 @@ DeletionTest(const char* creationPath, const char* appendPath, PRBool recursive)
|
|||
|
||||
int main(void)
|
||||
{
|
||||
NS_SetupRegistry();
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL);
|
||||
|
||||
|
||||
#ifdef XP_PC
|
||||
|
|
|
@ -90,7 +90,6 @@ endif
|
|||
|
||||
CPPSRCS = \
|
||||
nsAppRunner.cpp \
|
||||
nsSetupRegistry.cpp \
|
||||
nsWindowCreator.cpp \
|
||||
nsSigHandlers.cpp \
|
||||
showOSAlert.cpp \
|
||||
|
|
|
@ -982,13 +982,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -1250,11 +1243,6 @@
|
|||
<PATH>nsAppRunner.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -2341,13 +2329,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -2609,11 +2590,6 @@
|
|||
<PATH>nsAppRunner.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -3700,13 +3676,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -3982,11 +3951,6 @@
|
|||
<PATH>nsAppRunner.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -5083,13 +5047,6 @@
|
|||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
<FILEKIND>Text</FILEKIND>
|
||||
<FILEFLAGS>Debug</FILEFLAGS>
|
||||
</FILE>
|
||||
<FILE>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -5365,11 +5322,6 @@
|
|||
<PATH>nsAppRunner.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>InterfacesStubs</PATH>
|
||||
|
@ -5554,12 +5506,6 @@
|
|||
<PATH>nsAppRunner.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>apprunnerDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
<PATH>nsSetupRegistry.cpp</PATH>
|
||||
<PATHFORMAT>MacOS</PATHFORMAT>
|
||||
</FILEREF>
|
||||
<FILEREF>
|
||||
<TARGETNAME>apprunnerDebug</TARGETNAME>
|
||||
<PATHTYPE>Name</PATHTYPE>
|
||||
|
|
|
@ -59,7 +59,6 @@ GARBAGE=$(GARBAGE) $(EXTRA_LIBS_LIST_FILE) $(SEDCMDS) nsStaticComponents.cpp
|
|||
|
||||
CPP_OBJS= \
|
||||
.\$(OBJDIR)\nsAppRunner.obj \
|
||||
.\$(OBJDIR)\nsSetupRegistry.obj \
|
||||
.\$(OBJDIR)\nsWindowCreator.obj \
|
||||
.\$(OBJDIR)\nsNativeAppSupportBase.obj \
|
||||
.\$(OBJDIR)\nsNativeAppSupportWin.obj \
|
||||
|
|
|
@ -356,8 +356,6 @@ static int TranslateReturnValue(nsresult aResult)
|
|||
#include "nsCommandLineServiceMac.h"
|
||||
#endif
|
||||
|
||||
extern "C" void NS_SetupRegistry_1(PRBool aNeedAutoreg);
|
||||
|
||||
static void
|
||||
PrintUsage(void)
|
||||
{
|
||||
|
@ -1110,10 +1108,12 @@ static nsresult main1(int argc, char* argv[], nsISupports *nativeApp )
|
|||
needAutoReg = PR_TRUE;
|
||||
#endif
|
||||
|
||||
NS_SetupRegistry_1(needAutoReg);
|
||||
|
||||
if (needAutoReg) // XXX ...and autoreg was successful?
|
||||
if (needAutoReg) {
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
// XXX ...and autoreg was successful?
|
||||
NS_SoftwareUpdateDidAutoReg();
|
||||
}
|
||||
NS_TIMELINE_LEAVE("setup registry");
|
||||
|
||||
// remove the nativeApp as an XPCOM autoreg observer
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.1 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the NPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the NPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#define NS_IMPL_IDS
|
||||
/*
|
||||
* This evil file will go away when the XPCOM registry can be
|
||||
* externally initialized!
|
||||
*
|
||||
* Until then, include the real file to keep everything in sync.
|
||||
*/
|
||||
#ifdef XP_MAC
|
||||
#include ":::webshell:tests:viewer:nsSetupRegistry.cpp"
|
||||
#else
|
||||
#include "../../webshell/tests/viewer/nsSetupRegistry.cpp"
|
||||
#endif
|
||||
|
||||
extern "C" void
|
||||
NS_SetupRegistry_1( PRBool needAutoreg )
|
||||
{
|
||||
if ( needAutoreg )
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
NULL /* default */);
|
||||
|
||||
/*
|
||||
* Call the standard NS_SetupRegistry() implemented in
|
||||
* webshell/tests/viewer/nsSetupregistry.cpp
|
||||
*/
|
||||
NS_SetupRegistry();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#include "nsXPCOM.h"
|
||||
#include "nsIComponentManager.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
@ -60,14 +61,6 @@ static NS_DEFINE_IID(kSoftwareUpdateCID, NS_SoftwareUpdate_CID);
|
|||
/*********************************************/
|
||||
|
||||
|
||||
extern "C" void
|
||||
NS_SetupRegistry()
|
||||
{
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
nsnull /* default */);
|
||||
}
|
||||
/***************************************************************************/
|
||||
|
||||
static void
|
||||
xpinstall_usage(int argc, char *argv[])
|
||||
{
|
||||
|
@ -104,9 +97,9 @@ main(int argc, char **argv)
|
|||
}
|
||||
|
||||
|
||||
|
||||
NS_SetupRegistry();
|
||||
|
||||
NS_InitXPCOM2(nsnull, nsnull, nsnull);
|
||||
nsComponentManager::AutoRegister(nsIComponentManagerObsolete::NS_Startup,
|
||||
nsnull /* default */);
|
||||
|
||||
|
||||
nsresult rv = nsComponentManager::CreateInstance(kSoftwareUpdateCID,
|
||||
|
|
Загрузка…
Ссылка в новой задаче