diff options
author | Silenio Quarti | 2007-11-14 20:40:15 +0000 |
---|---|---|
committer | Silenio Quarti | 2007-11-14 20:40:15 +0000 |
commit | bd8f77a6a5f833464e6661424417496873723197 (patch) | |
tree | ec5817093a65e501885904f4bee2304e75b4cd6b | |
parent | 451c1b68bcaef1990dcd87d9d402fcee8e533ad5 (diff) | |
download | eclipse.platform.swt-bd8f77a6a5f833464e6661424417496873723197.tar.gz eclipse.platform.swt-bd8f77a6a5f833464e6661424417496873723197.tar.xz eclipse.platform.swt-bd8f77a6a5f833464e6661424417496873723197.zip |
*** empty log message ***
3 files changed, 27 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c index 3ebd48b923..832c45c194 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c @@ -73,6 +73,31 @@ fail: } #endif + +#ifndef NO_objc_1msgSend_1struct__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III +static SEL locationForGlyphAtIndex; +JNIEXPORT jint JNICALL OS_NATIVE(objc_1msgSend_1struct__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III) + (JNIEnv *env, jclass that, jobject arg0, jint arg1, jint arg2, jint arg3) +{ + NSPoint _arg0, *lparg0=NULL; + jint rc = 0; + OS_NATIVE_ENTER(env, that, objc_1msgSend_1struct__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III_FUNC); + if (arg0) if ((lparg0 = getNSPointFields(env, arg0, &_arg0)) == NULL) goto fail; + + //rc = (jint)objc_msgSend_struct(lparg0, arg1, arg2); + + if (locationForGlyphAtIndex == 0) locationForGlyphAtIndex = sel_registerName("locationForGlyphAtIndex:"); + if ((SEL)arg2 == locationForGlyphAtIndex) { + *lparg0 = [(NSLayoutManager *)arg1 locationForGlyphAtIndex: arg3]; + } + +fail: + if (arg0 && lparg0) setNSPointFields(env, arg0, lparg0); + OS_NATIVE_EXIT(env, that, objc_1msgSend_1struct__Lorg_eclipse_swt_internal_cocoa_NSPoint_2III_FUNC); + return rc; +} +#endif + #ifndef NO_objc_1msgSend_1struct__Lorg_eclipse_swt_internal_cocoa_NSPoint_2II static SEL mouseLocationOutsideOfEventStream; static SEL locationInWindow; diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java index 579a47c999..dfcc2e660c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSLayoutManager.java @@ -335,7 +335,7 @@ public NSRect lineFragmentUsedRectForGlyphAtIndex_effectiveRange_withoutAddition public NSPoint locationForGlyphAtIndex(int glyphIndex) { NSPoint result = new NSPoint(); - OS.objc_msgSend_stret(result, this.id, OS.sel_locationForGlyphAtIndex_1, glyphIndex); + OS.objc_msgSend_struct(result, this.id, OS.sel_locationForGlyphAtIndex_1, glyphIndex); return result; } 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 6de40f832d..22f30bf7f9 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 @@ -80,6 +80,7 @@ public static final native int objc_msgSend(int id, int sel, String arg0); public static final native int objc_msgSend_struct(NSSize result, int object, int selector); public static final native int objc_msgSend_struct(NSPoint result, int object, int selector); +public static final native int objc_msgSend_struct(NSPoint result, int object, int selector, int arg0); public static final native int objc_msgSend_struct(NSPoint result, int object, int selector, NSPoint arg0); public static final native int objc_msgSend_struct(NSRange result, int object, int selector, NSRange arg0); public static final native int objc_msgSend_struct(NSPoint result, int object, int selector, NSPoint arg0, int arg1); |