diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI')
16 files changed, 168 insertions, 24 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak index e92742fe46..a476536298 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/make_macosx.mak @@ -31,8 +31,8 @@ XULRUNNER_LIB=lib$(SWTXULRUNNER_PREFIX)-$(WS_PREFIX)-$(SWT_VERSION).jnilib #SWT_DEBUG = -g ARCHS = -arch i386 -arch ppc -CFLAGS = -c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCARBON -I /System/Library/Frameworks/JavaVM.framework/Headers -LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Carbon +CFLAGS = -c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCARBON -I /System/Library/Frameworks/JavaVM.framework/Headers -I /System/Library/Frameworks/JavaScriptCore.framework/Headers +LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Carbon -framework JavaScriptCore COCOACFLAGS = $(CFLAGS) -xobjective-c -I /System/Library/Frameworks/Cocoa.framework/Headers -I /System/Library/Frameworks/WebKit.framework/Headers COCOALFLAGS = $(LFLAGS) -framework WebKit -framework Cocoa AGLLFLAGS = $(LFLAGS) -framework OpenGL -framework AGL diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c index 789f370f91..8a70808114 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -9560,6 +9560,48 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(IsWindowVisible) } #endif +#ifndef NO_JSEvaluateScript +JNIEXPORT jint JNICALL OS_NATIVE(JSEvaluateScript) + (JNIEnv *env, jclass that, jint arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintArray arg5) +{ + jint *lparg5=NULL; + jint rc = 0; + OS_NATIVE_ENTER(env, that, JSEvaluateScript_FUNC); + if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail; + rc = (jint)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5); +fail: + if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0); + OS_NATIVE_EXIT(env, that, JSEvaluateScript_FUNC); + return rc; +} +#endif + +#ifndef NO_JSStringCreateWithUTF8CString +JNIEXPORT jint JNICALL OS_NATIVE(JSStringCreateWithUTF8CString) + (JNIEnv *env, jclass that, jbyteArray arg0) +{ + jbyte *lparg0=NULL; + jint rc = 0; + OS_NATIVE_ENTER(env, that, JSStringCreateWithUTF8CString_FUNC); + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + rc = (jint)JSStringCreateWithUTF8CString((const char *)lparg0); +fail: + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); + OS_NATIVE_EXIT(env, that, JSStringCreateWithUTF8CString_FUNC); + return rc; +} +#endif + +#ifndef NO_JSStringRelease +JNIEXPORT void JNICALL OS_NATIVE(JSStringRelease) + (JNIEnv *env, jclass that, jint arg0) +{ + OS_NATIVE_ENTER(env, that, JSStringRelease_FUNC); + JSStringRelease((JSStringRef)arg0); + OS_NATIVE_EXIT(env, that, JSStringRelease_FUNC); +} +#endif + #ifndef NO_KLGetCurrentKeyboardLayout JNIEXPORT jint JNICALL OS_NATIVE(KLGetCurrentKeyboardLayout) (JNIEnv *env, jclass that, jintArray arg0) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h index d236f83a91..faae7fa272 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os.h @@ -18,6 +18,9 @@ #include <sys/types.h> #include <unistd.h> +#include <JavaScriptCore/JSBase.h> +#include <JavaScriptCore/JSStringRef.h> + #include "os_custom.h" extern jint CPSEnableForegroundOperation(jint *, jint, jint, jint, jint); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c index da3369d0ed..408bc2c6d4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.c @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -14,8 +14,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 1000; -int OS_nativeFunctionCallCount[1000]; +int OS_nativeFunctionCount = 1003; +int OS_nativeFunctionCallCount[1003]; char * OS_nativeFunctionNames[] = { "AECoerceDesc", "AECountItems", @@ -681,6 +681,9 @@ char * OS_nativeFunctionNames[] = { "IsWindowModified", "IsWindowVisible", "JNIGetObject", + "JSEvaluateScript", + "JSStringCreateWithUTF8CString", + "JSStringRelease", "KLGetCurrentKeyboardLayout", "KLGetKeyboardLayoutProperty", "KeyTranslate", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h index 112e36c665..fdc38c83e8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/library/os_stats.h @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -689,6 +689,9 @@ typedef enum { IsWindowModified_FUNC, IsWindowVisible_FUNC, JNIGetObject_FUNC, + JSEvaluateScript_FUNC, + JSStringCreateWithUTF8CString_FUNC, + JSStringRelease_FUNC, KLGetCurrentKeyboardLayout_FUNC, KLGetKeyboardLayoutProperty_FUNC, KeyTranslate_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java index fee1f7e5a9..5a45ae8989 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/carbon/org/eclipse/swt/internal/carbon/OS.java @@ -5552,6 +5552,27 @@ public static final native int HIObjectSetAuxiliaryAccessibilityAttribute(int in */ public static final native int AXUIElementCopyAttributeValue (int element, int attribute, int [] value); + +/** + * @param ctx cast=(JSContextRef) + * @param script cast=(JSStringRef) + * @param thisObject cast=(JSObjectRef) + * @param sourceURL cast=(JSStringRef) + * @param exception cast=(JSValueRef *) + */ +public static final native int JSEvaluateScript (int ctx, int script, int thisObject, int sourceURL, int startingLineNumber, int[] exception); + +/** + * @param string cast=(const char *) + */ +public static final native int JSStringCreateWithUTF8CString (byte[] string); + +/** + * @param string cast=(JSStringRef) + */ +public static final native void JSStringRelease (int string); + + public static final int kEventClassAccessibility = ('a'<<24) + ('c'<<16) + ('c'<<8) + 'e'; public static final int kEventAccessibleGetChildAtPoint = 1; 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 5e2ca4b84f..337be87f8e 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 @@ -87,6 +87,7 @@ public static final int S_download = Cocoa.sel_registerName("download"); //$NON- public static final int S_fileExistsAtPath = Cocoa.sel_registerName("fileExistsAtPath:"); //$NON-NLS-1$ public static final int S_isExecutableFileAtPath = Cocoa.sel_registerName("isExecutableFileAtPath:"); //$NON-NLS-1$ public static final int S_fileExistsAtPath_isDirectory = Cocoa.sel_registerName("fileExistsAtPath:isDirectory:"); //$NON-NLS-1$ +public static final int S_globalContext = Cocoa.sel_registerName("globalContext"); //$NON-NLS-1$ public static final int S_goBack = Cocoa.sel_registerName("goBack:"); //$NON-NLS-1$ public static final int S_goForward = Cocoa.sel_registerName("goForward:"); //$NON-NLS-1$ public static final int S_handleNotification = Cocoa.sel_registerName("handleNotification:"); //$NON-NLS-1$ @@ -151,7 +152,6 @@ public static final int S_standardPreferences = Cocoa.sel_registerName("standard public static final int S_startAuthentication = sel_registerName("startAuthentication:window:"); //$NON-NLS-1$ public static final int S_stopLoading = Cocoa.sel_registerName("stopLoading:"); //$NON-NLS-1$ public static final int S_string = Cocoa.sel_registerName("string"); //$NON-NLS-1$ -public static final int S_stringByEvaluatingJavaScriptFromString = Cocoa.sel_registerName("stringByEvaluatingJavaScriptFromString:"); //$NON-NLS-1$ public static final int S_takeStringURLFrom = Cocoa.sel_registerName("takeStringURLFrom:"); //$NON-NLS-1$ public static final int S_undefined = Cocoa.sel_registerName("undefined"); //$NON-NLS-1$ public static final int S_use = Cocoa.sel_registerName("use"); //$NON-NLS-1$ diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak index 61e21dd317..b7d9a79a17 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/make_macosx.mak @@ -33,8 +33,9 @@ AWT_OBJECTS = swt_awt.o #SWT_DEBUG = -g CFLAGS = -c -xobjective-c -Wall $(ARCHS) -DSWT_VERSION=$(SWT_VERSION) $(NATIVE_STATS) $(SWT_DEBUG) -DUSE_ASSEMBLER -DCOCOA -DATOMIC \ -I /System/Library/Frameworks/JavaVM.framework/Headers \ - -I /System/Library/Frameworks/Cocoa.framework/Headers -LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Cocoa -framework WebKit -framework CoreServices + -I /System/Library/Frameworks/Cocoa.framework/Headers \ + -I /System/Library/Frameworks/JavaScriptCore.framework/Headers +LFLAGS = -bundle $(ARCHS) -framework JavaVM -framework Cocoa -framework WebKit -framework CoreServices -framework JavaScriptCore SWT_OBJECTS = swt.o c.o c_stats.o callback.o SWTPI_OBJECTS = swt.o os.o os_structs.o os_stats.o os_custom.o XULRUNNER_OBJECTS = swt.o xpcom.o xpcom_custom.o xpcom_structs.o xpcom_stats.o xpcominit.o xpcominit_structs.o xpcominit_stats.o diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c index 2b73e98879..a397ccfcd8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c @@ -2303,6 +2303,48 @@ fail: } #endif +#ifndef NO_JSEvaluateScript +JNIEXPORT jintLong JNICALL OS_NATIVE(JSEvaluateScript) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jint arg4, jintLongArray arg5) +{ + jintLong *lparg5=NULL; + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, JSEvaluateScript_FUNC); + if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail; + rc = (jintLong)JSEvaluateScript((JSContextRef)arg0, (JSStringRef)arg1, (JSObjectRef)arg2, (JSStringRef)arg3, arg4, (JSValueRef *)lparg5); +fail: + if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0); + OS_NATIVE_EXIT(env, that, JSEvaluateScript_FUNC); + return rc; +} +#endif + +#ifndef NO_JSStringCreateWithUTF8CString +JNIEXPORT jintLong JNICALL OS_NATIVE(JSStringCreateWithUTF8CString) + (JNIEnv *env, jclass that, jbyteArray arg0) +{ + jbyte *lparg0=NULL; + jintLong rc = 0; + OS_NATIVE_ENTER(env, that, JSStringCreateWithUTF8CString_FUNC); + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + rc = (jintLong)JSStringCreateWithUTF8CString((const char *)lparg0); +fail: + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); + OS_NATIVE_EXIT(env, that, JSStringCreateWithUTF8CString_FUNC); + return rc; +} +#endif + +#ifndef NO_JSStringRelease +JNIEXPORT void JNICALL OS_NATIVE(JSStringRelease) + (JNIEnv *env, jclass that, jintLong arg0) +{ + OS_NATIVE_ENTER(env, that, JSStringRelease_FUNC); + JSStringRelease((JSStringRef)arg0); + OS_NATIVE_EXIT(env, that, JSStringRelease_FUNC); +} +#endif + #ifndef NO_LMGetKbdType JNIEXPORT jbyte JNICALL OS_NATIVE(LMGetKbdType) (JNIEnv *env, jclass that) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h index 438ecf6c0e..c21517eb48 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.h @@ -19,6 +19,9 @@ #include <WebKit/WebView.h> #import <objc/objc-runtime.h> +#include <JavaScriptCore/JSBase.h> +#include <JavaScriptCore/JSStringRef.h> + #include "os_custom.h" extern jint CPSSetProcessName(void *, jintLong); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c index 9f8d301614..8a02eeaa48 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c @@ -14,8 +14,8 @@ #ifdef NATIVE_STATS -int OS_nativeFunctionCount = 535; -int OS_nativeFunctionCallCount[535]; +int OS_nativeFunctionCount = 538; +int OS_nativeFunctionCallCount[538]; char * OS_nativeFunctionNames[] = { "ATSFontActivateFromFileReference", "AcquireRootMenu", @@ -167,6 +167,9 @@ char * OS_nativeFunctionNames[] = { "GetThemeMetric", "HIThemeDrawFocusRect", "JNIGetObject", + "JSEvaluateScript", + "JSStringCreateWithUTF8CString", + "JSStringRelease", "LMGetKbdType", "LSGetApplicationForInfo", "LineTo", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h index 6351772f01..c09e7a55af 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h @@ -175,6 +175,9 @@ typedef enum { GetThemeMetric_FUNC, HIThemeDrawFocusRect_FUNC, JNIGetObject_FUNC, + JSEvaluateScript_FUNC, + JSStringCreateWithUTF8CString_FUNC, + JSStringRelease_FUNC, LMGetKbdType_FUNC, LSGetApplicationForInfo_FUNC, LineTo_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java index 2279f1548c..62737f5d5f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java @@ -267,6 +267,28 @@ public static final int kQDParseRegionFromRight = (1 << 3); public static final int kQDParseRegionFromTopLeft = kQDParseRegionFromTop | kQDParseRegionFromLeft; public static final int kQDRegionToRectsMsgParse = 2; +/** JavaScriptCore calls */ + +/** + * @param ctx cast=(JSContextRef) + * @param script cast=(JSStringRef) + * @param thisObject cast=(JSObjectRef) + * @param sourceURL cast=(JSStringRef) + * @param exception cast=(JSValueRef *) + */ +public static final native int /*long*/ JSEvaluateScript (int /*long*/ ctx, int /*long*/ script, int /*long*/ thisObject, int /*long*/ sourceURL, int startingLineNumber, int /*long*/[] exception); + +/** + * @param string cast=(const char *) + */ +public static final native int /*long*/ JSStringCreateWithUTF8CString (byte[] string); + +/** + * @param string cast=(JSStringRef) + */ +public static final native void JSStringRelease (int /*long*/ string); + + /** Custom callbacks */ /** @method flags=no_gen */ @@ -1028,6 +1050,7 @@ public static final int /*long*/ sel_getGlyphsInRange_glyphs_characterIndexes_gl public static final int /*long*/ sel_getIndexes_maxCount_inIndexRange_ = sel_registerName("getIndexes:maxCount:inIndexRange:"); public static final int /*long*/ sel_getInfoForFile_application_type_ = sel_registerName("getInfoForFile:application:type:"); public static final int /*long*/ sel_getValues_forAttribute_forVirtualScreen_ = sel_registerName("getValues:forAttribute:forVirtualScreen:"); +public static final int /*long*/ sel_globalContext = sel_registerName("globalContext"); public static final int /*long*/ sel_glyphIndexForCharacterAtIndex_ = sel_registerName("glyphIndexForCharacterAtIndex:"); public static final int /*long*/ sel_glyphIndexForPoint_inTextContainer_fractionOfDistanceThroughGlyph_ = sel_registerName("glyphIndexForPoint:inTextContainer:fractionOfDistanceThroughGlyph:"); public static final int /*long*/ sel_glyphRangeForCharacterRange_actualCharacterRange_ = sel_registerName("glyphRangeForCharacterRange:actualCharacterRange:"); @@ -1729,7 +1752,6 @@ public static final int /*long*/ sel_stringByAppendingPathExtension_ = sel_regis public static final int /*long*/ sel_stringByAppendingString_ = sel_registerName("stringByAppendingString:"); public static final int /*long*/ sel_stringByDeletingLastPathComponent = sel_registerName("stringByDeletingLastPathComponent"); public static final int /*long*/ sel_stringByDeletingPathExtension = sel_registerName("stringByDeletingPathExtension"); -public static final int /*long*/ sel_stringByEvaluatingJavaScriptFromString_ = sel_registerName("stringByEvaluatingJavaScriptFromString:"); public static final int /*long*/ sel_stringByReplacingOccurrencesOfString_withString_ = sel_registerName("stringByReplacingOccurrencesOfString:withString:"); public static final int /*long*/ sel_stringForObjectValue_ = sel_registerName("stringForObjectValue:"); public static final int /*long*/ sel_stringForType_ = sel_registerName("stringForType:"); diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java index 951ebfb019..8e0f16aaf9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebFrame.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -34,6 +34,10 @@ public WebDataSource dataSource() { return result != 0 ? new WebDataSource(result) : null; } +public int /*long*/ globalContext() { + return OS.objc_msgSend(this.id, OS.sel_globalContext); +} + public void loadHTMLString(NSString string, NSURL URL) { OS.objc_msgSend(this.id, OS.sel_loadHTMLString_baseURL_, string != null ? string.id : 0, URL != null ? URL.id : 0); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras index 2dedb6ae5a..24966f8624 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras @@ -114,6 +114,9 @@ <method selector="dataSource" swt_gen="true"> <retval swt_gen="true"></retval> </method> + <method selector="globalContext" swt_gen="true"> + <retval swt_gen="true"></retval> + </method> <method selector="loadHTMLString:baseURL:" swt_gen="true"> <arg name="string" swt_gen="true"></arg> <arg name="URL" swt_gen="true"></arg> @@ -238,10 +241,6 @@ <arg name="sender" swt_gen="true"></arg> <retval swt_gen="true"></retval> </method> - <method selector="stringByEvaluatingJavaScriptFromString:" swt_gen="true"> - <arg name="script" swt_gen="true"></arg> - <retval swt_gen="true"></retval> - </method> </class> <informal_protocol name="WebFrameLoadDelegate" swt_gen="mixed"> <method selector="webView:didChangeLocationWithinPageForFrame:" swt_gen="true"> diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java index 671ff0985b..5277868165 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM Corporation and others. + * Copyright (c) 2000, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -106,9 +106,4 @@ public void stopLoading(id sender) { OS.objc_msgSend(this.id, OS.sel_stopLoading_, sender != null ? sender.id : 0); } -public NSString stringByEvaluatingJavaScriptFromString(NSString script) { - int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_stringByEvaluatingJavaScriptFromString_, script != null ? script.id : 0); - return result != 0 ? new NSString(result) : null; -} - } |