summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2007-01-25 19:53:26 +0000
committerGrant Gayed <ggayed>2007-01-25 19:53:26 +0000
commit0cc058501fec64477ff461c0c56b466d11c171c7 (patch)
treea8ea7656a4b70eefbbe8d1467d32571b7da64f1f
parent5d2fa82156640a7cad1c69e701ca718edc0e84f4 (diff)
downloadeclipse.platform.swt-0cc058501fec64477ff461c0c56b466d11c171c7.tar.gz
eclipse.platform.swt-0cc058501fec64477ff461c0c56b466d11c171c7.tar.xz
eclipse.platform.swt-0cc058501fec64477ff461c0c56b466d11c171c7.zip
mozilla reorg
-rw-r--r--bundles/org.eclipse.swt/.classpath_carbon2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java (renamed from bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/MozillaDelegate.java)0
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java44
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c6
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java2
5 files changed, 29 insertions, 25 deletions
diff --git a/bundles/org.eclipse.swt/.classpath_carbon b/bundles/org.eclipse.swt/.classpath_carbon
index df6ef38eed..5b41c94a8a 100644
--- a/bundles/org.eclipse.swt/.classpath_carbon
+++ b/bundles/org.eclipse.swt/.classpath_carbon
@@ -26,9 +26,9 @@
<classpathentry kind="src" path="Eclipse SWT Program/common"/>
<classpathentry kind="src" path="Eclipse SWT Program/carbon"/>
<classpathentry kind="src" path="Eclipse SWT Browser/common"/>
- <classpathentry kind="src" path="Eclipse SWT Browser/mozilla"/>
<classpathentry kind="src" path="Eclipse SWT Browser/carbon"/>
<classpathentry kind="src" path="Eclipse SWT Mozilla/common"/>
+ <classpathentry kind="src" path="Eclipse SWT Mozilla/carbon"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/carbon"/>
<classpathentry kind="src" path="Eclipse SWT OpenGL/common"/>
<classpathentry kind="src" path="Eclipse SWT Theme/carbon"/>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/MozillaDelegate.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java
index e61aa8ad25..e61aa8ad25 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/carbon/org/eclipse/swt/browser/MozillaDelegate.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/carbon/org/eclipse/swt/browser/MozillaDelegate.java
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
index f1155c0184..02a417cc26 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Mozilla/common/org/eclipse/swt/browser/Mozilla.java
@@ -311,28 +311,32 @@ public void create (Composite parent, int style) {
nsIComponentManager componentManager = new nsIComponentManager (result[0]);
result[0] = 0;
+ /* nsIAppShell is discontinued as of xulrunner 1.9, so do not fail if it is not found */
rc = componentManager.CreateInstance (XPCOM.NS_APPSHELL_CID, 0, nsIAppShell.NS_IAPPSHELL_IID, result);
- if (rc != XPCOM.NS_OK) {
- browser.dispose ();
- error (rc);
- }
- if (result[0] == 0) {
- browser.dispose ();
- error (XPCOM.NS_NOINTERFACE);
- }
-
- AppShell = new nsIAppShell (result[0]);
- rc = AppShell.Create (0, null);
- if (rc != XPCOM.NS_OK) {
- browser.dispose ();
- error (rc);
- }
- rc = AppShell.Spinup ();
- if (rc != XPCOM.NS_OK) {
- browser.dispose ();
- error (rc);
+ if (rc != XPCOM.NS_ERROR_NO_INTERFACE) {
+ if (rc != XPCOM.NS_OK) {
+ browser.dispose ();
+ error (rc);
+ }
+ if (result[0] == 0) {
+ browser.dispose ();
+ error (XPCOM.NS_NOINTERFACE);
+ }
+
+ AppShell = new nsIAppShell (result[0]);
+ rc = AppShell.Create (0, null);
+ if (rc != XPCOM.NS_OK) {
+ browser.dispose ();
+ error (rc);
+ }
+ rc = AppShell.Spinup ();
+ if (rc != XPCOM.NS_OK) {
+ browser.dispose ();
+ error (rc);
+ }
}
-
+ result[0] = 0;
+
WindowCreator = new WindowCreator ();
WindowCreator.AddRef ();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c
index f552f1ccfa..d06ed8d258 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/cocoa_custom.c
@@ -18,10 +18,10 @@
extern id objc_msgSend(id, SEL, ...);
#include <JavaVM/jawt_md.h>
-JNIEXPORT jlong JNICALL Cocoa_NATIVE(getNativeHandleFromAWT)
+JNIEXPORT jint JNICALL Cocoa_NATIVE(getNativeHandleFromAWT)
(JNIEnv* env, jobject that, jobject widget)
{
- jlong handle = 0;
+ jint handle = 0;
JAWT awt;
awt.version = JAWT_VERSION_1_4;
if (!JAWT_GetAWT(env, &awt)) return 0;
@@ -32,7 +32,7 @@ JNIEXPORT jlong JNICALL Cocoa_NATIVE(getNativeHandleFromAWT)
JAWT_DrawingSurfaceInfo* dsi = ds->GetDrawingSurfaceInfo(ds);
if (dsi) {
JAWT_MacOSXDrawingSurfaceInfo* dsi_mac = (JAWT_MacOSXDrawingSurfaceInfo*) (dsi->platformInfo);
- handle = (jlong) (dsi_mac->cocoaViewRef);
+ handle = (jint) (dsi_mac->cocoaViewRef);
ds->FreeDrawingSurfaceInfo(dsi);
}
ds->Unlock(ds);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java
index 49dda4a606..5d8684c7b8 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/cocoa/Cocoa.java
@@ -170,5 +170,5 @@ static int objc_getClass(String className) {
return Cocoa.objc_getClass(ascii(className));
}
-public static final native long getNativeHandleFromAWT(Object frame);
+public static final native int getNativeHandleFromAWT(Object frame);
}