зеркало из https://github.com/mozilla/gecko-dev.git
Родитель
590e0a00aa
Коммит
67009c3ca5
|
@ -105,6 +105,19 @@ typedef MSG nsEmbedNativeEvent;
|
|||
#define MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
|
||||
#endif
|
||||
|
||||
/* OS/2 specific stuff */
|
||||
#ifdef OS2
|
||||
#include "os2.h"
|
||||
|
||||
/**
|
||||
* @var typedef MSG nsEmbedNativeEvent
|
||||
*
|
||||
* Embedding events are native <CODE>QMSG</CODE> structs on OS/2.
|
||||
*/
|
||||
typedef QMSG nsEmbedNativeEvent;
|
||||
#define MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
|
||||
#endif
|
||||
|
||||
/* Mac specific stuff */
|
||||
/* TODO implementation left as an exercise for the reader */
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ EXTRA_DSO_LIBS = embed_base_s gkgfx
|
|||
LIBS = \
|
||||
$(EXTRA_DSO_LIBS) \
|
||||
$(XPCOM_LIBS) \
|
||||
$(MOZ_JS_LIBS) \
|
||||
$(NSPR_LIBS) \
|
||||
$(NULL)
|
||||
|
||||
|
@ -81,4 +82,29 @@ LIBS = \
|
|||
#
|
||||
LDFLAGS += /HEAP:0x40000
|
||||
|
||||
include $(topsrcdir)/config/config.mk
|
||||
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
include $(topsrcdir)/config/static-config.mk
|
||||
|
||||
EXTRA_DEPS += $(STATIC_EXTRA_DEPS)
|
||||
EXTRA_DSO_LIBS += $(STATIC_EXTRA_DSO_LIBS)
|
||||
ifneq ($(OS_ARCH),WINNT)
|
||||
EXTRA_LIBS += -L$(DEPTH)/dist/lib/components
|
||||
endif # !WINNT
|
||||
EXTRA_LIBS += $(EXTRA_DSO_LIBS) $(STATIC_EXTRA_LIBS)
|
||||
DEFINES += $(STATIC_DEFINES)
|
||||
CPPSRCS += $(STATIC_CPPSRCS)
|
||||
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
||||
ifdef BUILD_STATIC_LIBS
|
||||
include $(topsrcdir)/config/static-rules.mk
|
||||
endif # BUILD_STATIC_LIBS
|
||||
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
|
||||
WebBrowserChrome::WebBrowserChrome()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
mNativeWindow = nsnull;
|
||||
mSizeSet = PR_FALSE;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
|
||||
WindowCreator::WindowCreator()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
WindowCreator::~WindowCreator()
|
||||
|
|
|
@ -66,6 +66,13 @@
|
|||
|
||||
#define MAX_LOADSTRING 100
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
#include "nsStaticComponent.h"
|
||||
nsresult PR_CALLBACK
|
||||
app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
||||
#endif
|
||||
|
||||
|
||||
const CHAR *szWindowClass = "OS2EMBED";
|
||||
|
||||
// Foward declarations of functions included in this code module:
|
||||
|
@ -113,7 +120,7 @@ class ProfileChangeObserver : public nsIObserver,
|
|||
|
||||
{
|
||||
public:
|
||||
ProfileChangeObserver();
|
||||
ProfileChangeObserver();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIOBSERVER
|
||||
|
@ -123,49 +130,42 @@ public:
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
printf("You are embedded, man!\n\n");
|
||||
printf("******************************************************************\n");
|
||||
printf("* *\n");
|
||||
printf("* IMPORTANT NOTE: *\n");
|
||||
printf("* *\n");
|
||||
printf("* OS2Embed is not supported!!! Do not raise bugs on it unless *\n");
|
||||
printf("* it is badly broken (e.g. crash on start/exit, build errors) *\n");
|
||||
printf("* or you have the patch to make it better! MFCEmbed is now our *\n");
|
||||
printf("* embedding test application on Win32 and all testing should *\n");
|
||||
printf("* be done on that. *\n");
|
||||
printf("* *\n");
|
||||
printf("******************************************************************\n");
|
||||
printf("\n\n");
|
||||
|
||||
// Sophisticated command-line parsing in action
|
||||
char *szFirstURL = "http://www.mozilla.org/projects/embedding";
|
||||
char *szDefaultProfile = nsnull;
|
||||
int argn;
|
||||
for (argn = 1; argn < argc; argn++)
|
||||
{
|
||||
if (stricmp("-P", argv[argn]) == 0)
|
||||
{
|
||||
if (argn + 1 < argc)
|
||||
{
|
||||
szDefaultProfile = argv[++argn];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
szFirstURL = argv[argn];
|
||||
}
|
||||
}
|
||||
strncpy(gFirstURL, szFirstURL, sizeof(gFirstURL) - 1);
|
||||
|
||||
// Initialize global strings
|
||||
CHAR szTitle[MAX_LOADSTRING];
|
||||
WinLoadString((HAB)0, ghInstanceResources, IDS_APP_TITLE, MAX_LOADSTRING, szTitle);
|
||||
MyRegisterClass();
|
||||
// Sophisticated command-line parsing in action
|
||||
char *szFirstURL = "http://www.mozilla.org/projects/embedding";
|
||||
char *szDefaultProfile = nsnull;
|
||||
int argn;
|
||||
for (argn = 1; argn < argc; argn++)
|
||||
{
|
||||
if (stricmp("-P", argv[argn]) == 0)
|
||||
{
|
||||
if (argn + 1 < argc)
|
||||
{
|
||||
szDefaultProfile = argv[++argn];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
szFirstURL = argv[argn];
|
||||
}
|
||||
}
|
||||
strncpy(gFirstURL, szFirstURL, sizeof(gFirstURL) - 1);
|
||||
|
||||
// Initialize global strings
|
||||
CHAR szTitle[MAX_LOADSTRING];
|
||||
WinLoadString((HAB)0, ghInstanceResources, IDS_APP_TITLE, MAX_LOADSTRING, szTitle);
|
||||
MyRegisterClass();
|
||||
|
||||
#ifdef _BUILD_STATIC_BIN
|
||||
// Initialize XPCOM's module info table
|
||||
NSGetStaticModuleInfo = app_getModuleInfo;
|
||||
#endif
|
||||
|
||||
// Init Embedding APIs
|
||||
NS_InitEmbedding(nsnull, nsnull);
|
||||
|
||||
// Choose the new profile
|
||||
if (!ChooseNewProfile(TRUE, szDefaultProfile))
|
||||
// Choose the new profile
|
||||
if (!ChooseNewProfile(TRUE, szDefaultProfile))
|
||||
{
|
||||
NS_TermEmbedding();
|
||||
return 1;
|
||||
|
@ -209,7 +209,6 @@ NS_IMPL_THREADSAFE_ISUPPORTS2(ProfileChangeObserver, nsIObserver, nsISupportsWea
|
|||
|
||||
ProfileChangeObserver::ProfileChangeObserver()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
Загрузка…
Ссылка в новой задаче