summaryrefslogtreecommitdiffstats
path: root/bundles
diff options
context:
space:
mode:
authorSilenio Quarti <silenio>2009-05-05 20:33:50 +0000
committerSilenio Quarti <silenio>2009-05-05 20:33:50 +0000
commit27d6879775783848962b3d35adec4cb85bd44588 (patch)
tree2f3c73de540c22cc37c7357a4b5e36afaea2d888 /bundles
parent747510f9a00f1437e5879de92c35f5d1da173a8a (diff)
downloadeclipse.platform.swt-27d6879775783848962b3d35adec4cb85bd44588.tar.gz
eclipse.platform.swt-27d6879775783848962b3d35adec4cb85bd44588.tar.xz
eclipse.platform.swt-27d6879775783848962b3d35adec4cb85bd44588.zip
274890 - SWT crash
Diffstat (limited to 'bundles')
-rw-r--r--bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java92
-rw-r--r--bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java107
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c664
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c432
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c60
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h60
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras58
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java152
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/WebKitFull.bridgesupport.extras2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java42
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java50
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java90
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java10
15 files changed, 1128 insertions, 697 deletions
diff --git a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
index 358abcce1c..60d7bbce57 100644
--- a/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
+++ b/bundles/org.eclipse.swt.tools/JNI Generation/org/eclipse/swt/tools/internal/NativesGenerator.java
@@ -76,6 +76,95 @@ public void generate(JNIMethod[] methods) {
}
}
+boolean isStruct(String flagsStr) {
+ String[] flags = split(flagsStr, " ");
+ for (int i = 0; i < flags.length; i++) {
+ if (flags[i].equals(Flags.FLAG_STRUCT)) return true;
+ }
+ return false;
+}
+
+void generateCallback(JNIMethod method, String function, JNIParameter[] params, JNIType returnType) {
+ output("static jintLong ");
+ output(function);
+ outputln(";");
+ output("static ");
+ String[] types = split((String)method.getParam("callback_types"), ";");
+ String[] flags = split((String)method.getParam("callback_flags"), ";");
+ output(types[0]);
+ output(" ");
+ output("proc_");
+ output(function);
+ output("(");
+ boolean first = true;
+ for (int i = 1; i < types.length; i++) {
+ if (!first) output(", ");
+ output(types[i]);
+ output(" ");
+ output("arg");
+ output(String.valueOf(i - 1));
+ first = false;
+ }
+ outputln(") {");
+
+ output("\t");
+ if (isStruct(flags[0])) {
+ output(types[0]);
+ output("* lprc = ");
+ } else if (!types[0].equals("void")) {
+ output("return ");
+ }
+ output("((");
+ output(types[0]);
+ if (isStruct(flags[0])) output("*");
+ output(" (*)(");
+ first = true;
+ for (int i = 1; i < types.length; i++) {
+ if (!first) output(", ");
+ first = false;
+ output(types[i]);
+ if (isStruct(flags[i])) output("*");
+ }
+ output("))");
+ output(function);
+ output(")(");
+ first = true;
+ for (int i = 1; i < types.length; i++) {
+ if (!first) output(", ");
+ first = false;
+ if (isStruct(flags[i])) output("&");
+ output("arg");
+ output(String.valueOf(i -1));
+ }
+ outputln(");");
+ if (isStruct(flags[0])) {
+ output("\t");
+ output(types[0]);
+ outputln(" rc;");
+ outputln("\tif (lprc) {");
+ outputln("\t\trc = *lprc;");
+ outputln("\t\tfree(lprc);");
+ outputln("\t} else {");
+ output("\t\tmemset(&rc, 0, sizeof(");
+ output(types[0]);
+ outputln("));");
+ outputln("\t}");
+ outputln("\treturn rc;");
+ }
+ outputln("}");
+
+ output("static jintLong ");
+ output(method.getName());
+ outputln("(jintLong func) {");
+ output("\t");
+ output(function);
+ outputln(" = func;");
+ output("\treturn (jintLong)proc_");
+ output(function);
+ outputln(";");
+ outputln("}");
+}
+
public void generate(JNIMethod method) {
if (method.getFlag(FLAG_NO_GEN)) return;
JNIType returnType = method.getReturnType(), returnType64 = method.getReturnType64();
@@ -98,6 +187,9 @@ public void generate(JNIMethod method) {
generateFunctionPrototype(method, function, params, returnType, returnType64, true);
outputln(";");
}
+ if (function.startsWith("CALLBACK_")) {
+ generateCallback(method, function, params, returnType);
+ }
generateFunctionPrototype(method, function, params, returnType, returnType64, !sameFunction);
if (!function.equals(function64)) {
outputln();
diff --git a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
index c1dae5d7f5..b0e2583f64 100644
--- a/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
+++ b/bundles/org.eclipse.swt.tools/Mac Generation/org/eclipse/swt/tools/internal/MacGenerator.java
@@ -546,7 +546,11 @@ void generateMainClass() {
out(header);
outln();
outln();
-
+
+ out("/** Custom callbacks */");
+ outln();
+ generateCustomCallbacks();
+ outln();
out("/** Classes */");
outln();
generateClassesConst();
@@ -681,7 +685,7 @@ Document getDocument(String xmlPath) {
public String[] getExtraAttributeNames(Node node) {
String name = node.getNodeName();
if (name.equals("method")) {
- return new String[]{"swt_gen_super_msgSend"};
+ return new String[]{"swt_gen_super_msgSend", "swt_gen_custom_callback"};
} else if (name.equals("function")) {
NamedNodeMap attribs = node.getAttributes();
if (attribs != null && attribs.getNamedItem("variadic") != null) {
@@ -874,6 +878,13 @@ boolean getGenSuper(Node node) {
return gen != null && !gen.getNodeValue().equals("false");
}
+boolean getGenCallback(Node node) {
+ NamedNodeMap attributes = node.getAttributes();
+ if (attributes == null) return false;
+ Node gen = attributes.getNamedItem("swt_gen_custom_callback");
+ return gen != null && !gen.getNodeValue().equals("false");
+}
+
boolean isStatic(Node node) {
NamedNodeMap attributes = node.getAttributes();
Node isStatic = attributes.getNamedItem("class_method");
@@ -1130,6 +1141,98 @@ String buildSend(Node method, boolean tags, boolean only64, boolean superCall) {
return buffer.toString();
}
+String getCType (Node node) {
+ NamedNodeMap attributes = node.getAttributes();
+ return attributes.getNamedItem("declared_type").getNodeValue();
+}
+
+Node findNSObjectMethod(Node method) {
+ NamedNodeMap methodAttributes = method.getAttributes();
+ String selector = methodAttributes.getNamedItem("selector").getNodeValue();
+ NodeList list = method.getParentNode().getParentNode().getChildNodes();
+ for (int i = 0; i < list.getLength(); i++) {
+ Node cls = list.item(i);
+ if ("class".equals(cls.getNodeName())) {
+ NamedNodeMap classAttributes = cls.getAttributes();
+ if ("NSObject".equals(classAttributes.getNamedItem("name").getNodeValue())) {
+ NodeList methods = cls.getChildNodes();
+ for (int j = 0; j < methods.getLength(); j++) {
+ Node mth = methods.item(j);
+ if ("method".equals(mth.getNodeName())) {
+ NamedNodeMap mthAttributes = mth.getAttributes();
+ if (selector.equals(mthAttributes.getNamedItem("selector").getNodeValue())) {
+ return mth;
+ }
+ }
+ }
+ }
+ }
+ }
+ return null;
+}
+
+void generateCustomCallbacks() {
+ TreeMap set = new TreeMap();
+ for (int x = 0; x < xmls.length; x++) {
+ Document document = documents[x];
+ if (document == null) continue;
+ NodeList list = document.getDocumentElement().getChildNodes();
+ for (int i = 0; i < list.getLength(); i++) {
+ Node node = list.item(i);
+ if (("class".equals(node.getNodeName()) || "informal_protocol".equals(node.getNodeName())) && getGen(node)) {
+ NodeList methods = node.getChildNodes();
+ for (int j = 0; j < methods.getLength(); j++) {
+ Node method = methods.item(j);
+ if ("method".equals(method.getNodeName()) && getGen(method) && getGenCallback(method)) {
+ NamedNodeMap mthAttributes = method.getAttributes();
+ String sel = mthAttributes.getNamedItem("selector").getNodeValue();
+ set.put(sel, method);
+ }
+ }
+ }
+ }
+ }
+ for (Iterator iterator = set.keySet().iterator(); iterator.hasNext();) {
+ String key = (String)iterator.next();
+ Node method = (Node)set.get(key);
+ if ("informal_protocol".equals(method.getParentNode().getNodeName())) {
+ method = findNSObjectMethod(method);
+ if (method == null) continue;
+ }
+ String nativeMth = key.replaceAll(":", "_");
+ out("/**");
+ outln();
+ out(" * @method callback_types=");
+ Node returnNode = getReturnNode(method.getChildNodes());
+ out(returnNode == null ? "void" : getCType(returnNode));
+ out(";id;SEL;");
+ NodeList params = method.getChildNodes();
+ for (int k = 0; k < params.getLength(); k++) {
+ Node param = params.item(k);
+ if ("arg".equals(param.getNodeName())) {
+ out(getCType(param));
+ out(";");
+ }
+ }
+ out(",callback_flags=");
+ out(returnNode != null && isStruct(returnNode) ? "struct" : "none");
+ out(";none;none;");
+ for (int k = 0; k < params.getLength(); k++) {
+ Node param = params.item(k);
+ if ("arg".equals(param.getNodeName())) {
+ out (isStruct(param) ? "struct" : "none");
+ out(";");
+ }
+ }
+ out(" */");
+ outln();
+ out("public static final native int /*long*/ CALLBACK_");
+ out(nativeMth);
+ out("(int /*long*/ func);");
+ outln();
+ }
+}
+
void generateSends(boolean superCall) {
TreeMap set = new TreeMap();
TreeMap set64 = new TreeMap();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java
index 9dd917cfb2..ebc871e61d 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/cocoa/org/eclipse/swt/browser/Safari.java
@@ -129,7 +129,7 @@ public void create (Composite parent, int style) {
Callback7 = new Callback(safariClass, "browserProc", 7); //$NON-NLS-1$
int /*long*/ proc7 = Callback7.getAddress();
if (proc7 == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
- int /*long*/ setFrameProc = OS.webView_setFrame_CALLBACK(proc4);
+ int /*long*/ setFrameProc = OS.CALLBACK_webView_setFrame_(proc4);
if (setFrameProc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS);
String className = "SWTWebViewDelegate"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java
index 30097d969c..c319c877b1 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/DragSource.java
@@ -134,7 +134,7 @@ public class DragSource extends Widget {
int /*long*/ cls = OS.objc_allocateClassPair(OS.class_NSObject, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
- int /*long*/ draggedImage_endedAt_operationProc = OS.draggedImage_endedAt_operation_CALLBACK(proc5);
+ int /*long*/ draggedImage_endedAt_operationProc = OS.CALLBACK_draggedImage_endedAt_operation_(proc5);
// Add the NSDraggingSource callbacks
OS.class_addMethod(cls, OS.sel_draggingSourceOperationMaskForLocal_, proc3, "@:I");
@@ -255,7 +255,7 @@ public DragSource(Control control, int style) {
int /*long*/ procPtr = OS.class_getMethodImplementation(cls, OS.sel_draggingSourceOperationMaskForLocal_);
if (procPtr == proc3) return;
- int /*long*/ draggedImage_endedAt_operationProc = OS.draggedImage_endedAt_operation_CALLBACK(proc5);
+ int /*long*/ draggedImage_endedAt_operationProc = OS.CALLBACK_draggedImage_endedAt_operation_(proc5);
// Add the NSDraggingSource overrides.
OS.class_addMethod(cls, OS.sel_draggingSourceOperationMaskForLocal_, proc3, "@:I");
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 26671092a9..dedeb5a35d 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
@@ -62,6 +62,670 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(AcquireRootMenu)
}
#endif
+#ifndef NO_CALLBACK_1accessibilityHitTest_1
+static jintLong CALLBACK_1accessibilityHitTest_1;
+static id proc_CALLBACK_1accessibilityHitTest_1(id arg0, SEL arg1, NSPoint arg2) {
+ return ((id (*)(id, SEL, NSPoint*))CALLBACK_1accessibilityHitTest_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_accessibilityHitTest_(jintLong func) {
+ CALLBACK_1accessibilityHitTest_1 = func;
+ return (jintLong)proc_CALLBACK_1accessibilityHitTest_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1accessibilityHitTest_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1accessibilityHitTest_1_FUNC);
+ rc = (jintLong)CALLBACK_accessibilityHitTest_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1accessibilityHitTest_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1attributedSubstringFromRange_1
+static jintLong CALLBACK_1attributedSubstringFromRange_1;
+static NSAttributedString* proc_CALLBACK_1attributedSubstringFromRange_1(id arg0, SEL arg1, NSRange arg2) {
+ return ((NSAttributedString* (*)(id, SEL, NSRange*))CALLBACK_1attributedSubstringFromRange_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_attributedSubstringFromRange_(jintLong func) {
+ CALLBACK_1attributedSubstringFromRange_1 = func;
+ return (jintLong)proc_CALLBACK_1attributedSubstringFromRange_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1attributedSubstringFromRange_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1attributedSubstringFromRange_1_FUNC);
+ rc = (jintLong)CALLBACK_attributedSubstringFromRange_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1attributedSubstringFromRange_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1canDragRowsWithIndexes_1atPoint_1
+static jintLong CALLBACK_1canDragRowsWithIndexes_1atPoint_1;
+static BOOL proc_CALLBACK_1canDragRowsWithIndexes_1atPoint_1(id arg0, SEL arg1, NSIndexSet* arg2, NSPoint arg3) {
+ return ((BOOL (*)(id, SEL, NSIndexSet*, NSPoint*))CALLBACK_1canDragRowsWithIndexes_1atPoint_1)(arg0, arg1, arg2, &arg3);
+}
+static jintLong CALLBACK_canDragRowsWithIndexes_atPoint_(jintLong func) {
+ CALLBACK_1canDragRowsWithIndexes_1atPoint_1 = func;
+ return (jintLong)proc_CALLBACK_1canDragRowsWithIndexes_1atPoint_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1canDragRowsWithIndexes_1atPoint_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1canDragRowsWithIndexes_1atPoint_1_FUNC);
+ rc = (jintLong)CALLBACK_canDragRowsWithIndexes_atPoint_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1canDragRowsWithIndexes_1atPoint_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1cellSize
+static jintLong CALLBACK_1cellSize;
+static NSSize proc_CALLBACK_1cellSize(id arg0, SEL arg1) {
+ NSSize* lprc = ((NSSize* (*)(id, SEL))CALLBACK_1cellSize)(arg0, arg1);
+ NSSize rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSSize));
+ }
+ return rc;
+}
+static jintLong CALLBACK_cellSize(jintLong func) {
+ CALLBACK_1cellSize = func;
+ return (jintLong)proc_CALLBACK_1cellSize;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1cellSize)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1cellSize_FUNC);
+ rc = (jintLong)CALLBACK_cellSize(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1cellSize_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1characterIndexForPoint_1
+static jintLong CALLBACK_1characterIndexForPoint_1;
+static NSUInteger proc_CALLBACK_1characterIndexForPoint_1(id arg0, SEL arg1, NSPoint arg2) {
+ return ((NSUInteger (*)(id, SEL, NSPoint*))CALLBACK_1characterIndexForPoint_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_characterIndexForPoint_(jintLong func) {
+ CALLBACK_1characterIndexForPoint_1 = func;
+ return (jintLong)proc_CALLBACK_1characterIndexForPoint_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1characterIndexForPoint_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1characterIndexForPoint_1_FUNC);
+ rc = (jintLong)CALLBACK_characterIndexForPoint_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1characterIndexForPoint_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1
+static jintLong CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1;
+static BOOL proc_CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1(id arg0, SEL arg1, NSEvent* arg2, NSSize arg3, BOOL arg4) {
+ return ((BOOL (*)(id, SEL, NSEvent*, NSSize*, BOOL))CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1)(arg0, arg1, arg2, &arg3, arg4);
+}
+static jintLong CALLBACK_dragSelectionWithEvent_offset_slideBack_(jintLong func) {
+ CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1 = func;
+ return (jintLong)proc_CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1_FUNC);
+ rc = (jintLong)CALLBACK_dragSelectionWithEvent_offset_slideBack_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1draggedImage_1beganAt_1
+static jintLong CALLBACK_1draggedImage_1beganAt_1;
+static void proc_CALLBACK_1draggedImage_1beganAt_1(id arg0, SEL arg1, NSImage* arg2, NSPoint arg3) {
+ ((void (*)(id, SEL, NSImage*, NSPoint*))CALLBACK_1draggedImage_1beganAt_1)(arg0, arg1, arg2, &arg3);
+}
+static jintLong CALLBACK_draggedImage_beganAt_(jintLong func) {
+ CALLBACK_1draggedImage_1beganAt_1 = func;
+ return (jintLong)proc_CALLBACK_1draggedImage_1beganAt_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1draggedImage_1beganAt_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1draggedImage_1beganAt_1_FUNC);
+ rc = (jintLong)CALLBACK_draggedImage_beganAt_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1draggedImage_1beganAt_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1draggedImage_1endedAt_1operation_1
+static jintLong CALLBACK_1draggedImage_1endedAt_1operation_1;
+static void proc_CALLBACK_1draggedImage_1endedAt_1operation_1(id arg0, SEL arg1, NSImage* arg2, NSPoint arg3, NSDragOperation arg4) {
+ ((void (*)(id, SEL, NSImage*, NSPoint*, NSDragOperation))CALLBACK_1draggedImage_1endedAt_1operation_1)(arg0, arg1, arg2, &arg3, arg4);
+}
+static jintLong CALLBACK_draggedImage_endedAt_operation_(jintLong func) {
+ CALLBACK_1draggedImage_1endedAt_1operation_1 = func;
+ return (jintLong)proc_CALLBACK_1draggedImage_1endedAt_1operation_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1draggedImage_1endedAt_1operation_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1draggedImage_1endedAt_1operation_1_FUNC);
+ rc = (jintLong)CALLBACK_draggedImage_endedAt_operation_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1draggedImage_1endedAt_1operation_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1drawImage_1withFrame_1inView_1
+static jintLong CALLBACK_1drawImage_1withFrame_1inView_1;
+static void proc_CALLBACK_1drawImage_1withFrame_1inView_1(id arg0, SEL arg1, NSImage* arg2, NSRect arg3, NSView* arg4) {
+ ((void (*)(id, SEL, NSImage*, NSRect*, NSView*))CALLBACK_1drawImage_1withFrame_1inView_1)(arg0, arg1, arg2, &arg3, arg4);
+}
+static jintLong CALLBACK_drawImage_withFrame_inView_(jintLong func) {
+ CALLBACK_1drawImage_1withFrame_1inView_1 = func;
+ return (jintLong)proc_CALLBACK_1drawImage_1withFrame_1inView_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawImage_1withFrame_1inView_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1drawImage_1withFrame_1inView_1_FUNC);
+ rc = (jintLong)CALLBACK_drawImage_withFrame_inView_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1drawImage_1withFrame_1inView_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1drawInteriorWithFrame_1inView_1
+static jintLong CALLBACK_1drawInteriorWithFrame_1inView_1;
+static void proc_CALLBACK_1drawInteriorWithFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
+ ((void (*)(id, SEL, NSRect*, NSView*))CALLBACK_1drawInteriorWithFrame_1inView_1)(arg0, arg1, &arg2, arg3);
+}
+static jintLong CALLBACK_drawInteriorWithFrame_inView_(jintLong func) {
+ CALLBACK_1drawInteriorWithFrame_1inView_1 = func;
+ return (jintLong)proc_CALLBACK_1drawInteriorWithFrame_1inView_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawInteriorWithFrame_1inView_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1drawInteriorWithFrame_1inView_1_FUNC);
+ rc = (jintLong)CALLBACK_drawInteriorWithFrame_inView_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1drawInteriorWithFrame_1inView_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1drawRect_1
+static jintLong CALLBACK_1drawRect_1;
+static void proc_CALLBACK_1drawRect_1(id arg0, SEL arg1, NSRect arg2) {
+ ((void (*)(id, SEL, NSRect*))CALLBACK_1drawRect_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_drawRect_(jintLong func) {
+ CALLBACK_1drawRect_1 = func;
+ return (jintLong)proc_CALLBACK_1drawRect_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawRect_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1drawRect_1_FUNC);
+ rc = (jintLong)CALLBACK_drawRect_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1drawRect_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1drawWithFrame_1inView_1
+static jintLong CALLBACK_1drawWithFrame_1inView_1;
+static void proc_CALLBACK_1drawWithFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
+ ((void (*)(id, SEL, NSRect*, NSView*))CALLBACK_1drawWithFrame_1inView_1)(arg0, arg1, &arg2, arg3);
+}
+static jintLong CALLBACK_drawWithFrame_inView_(jintLong func) {
+ CALLBACK_1drawWithFrame_1inView_1 = func;
+ return (jintLong)proc_CALLBACK_1drawWithFrame_1inView_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1drawWithFrame_1inView_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1drawWithFrame_1inView_1_FUNC);
+ rc = (jintLong)CALLBACK_drawWithFrame_inView_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1drawWithFrame_1inView_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1expansionFrameWithFrame_1inView_1
+static jintLong CALLBACK_1expansionFrameWithFrame_1inView_1;
+static NSRect proc_CALLBACK_1expansionFrameWithFrame_1inView_1(id arg0, SEL arg1, NSRect arg2, NSView* arg3) {
+ NSRect* lprc = ((NSRect* (*)(id, SEL, NSRect*, NSView*))CALLBACK_1expansionFrameWithFrame_1inView_1)(arg0, arg1, &arg2, arg3);
+ NSRect rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSRect));
+ }
+ return rc;
+}
+static jintLong CALLBACK_expansionFrameWithFrame_inView_(jintLong func) {
+ CALLBACK_1expansionFrameWithFrame_1inView_1 = func;
+ return (jintLong)proc_CALLBACK_1expansionFrameWithFrame_1inView_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1expansionFrameWithFrame_1inView_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1expansionFrameWithFrame_1inView_1_FUNC);
+ rc = (jintLong)CALLBACK_expansionFrameWithFrame_inView_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1expansionFrameWithFrame_1inView_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1firstRectForCharacterRange_1
+static jintLong CALLBACK_1firstRectForCharacterRange_1;
+static NSRect proc_CALLBACK_1firstRectForCharacterRange_1(id arg0, SEL arg1, NSRange arg2) {
+ NSRect* lprc = ((NSRect* (*)(id, SEL, NSRange*))CALLBACK_1firstRectForCharacterRange_1)(arg0, arg1, &arg2);
+ NSRect rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSRect));
+ }
+ return rc;
+}
+static jintLong CALLBACK_firstRectForCharacterRange_(jintLong func) {
+ CALLBACK_1firstRectForCharacterRange_1 = func;
+ return (jintLong)proc_CALLBACK_1firstRectForCharacterRange_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1firstRectForCharacterRange_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1firstRectForCharacterRange_1_FUNC);
+ rc = (jintLong)CALLBACK_firstRectForCharacterRange_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1firstRectForCharacterRange_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1highlightSelectionInClipRect_1
+static jintLong CALLBACK_1highlightSelectionInClipRect_1;
+static void proc_CALLBACK_1highlightSelectionInClipRect_1(id arg0, SEL arg1, NSRect arg2) {
+ ((void (*)(id, SEL, NSRect*))CALLBACK_1highlightSelectionInClipRect_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_highlightSelectionInClipRect_(jintLong func) {
+ CALLBACK_1highlightSelectionInClipRect_1 = func;
+ return (jintLong)proc_CALLBACK_1highlightSelectionInClipRect_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1highlightSelectionInClipRect_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1highlightSelectionInClipRect_1_FUNC);
+ rc = (jintLong)CALLBACK_highlightSelectionInClipRect_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1highlightSelectionInClipRect_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1hitTestForEvent_1inRect_1ofView_1
+static jintLong CALLBACK_1hitTestForEvent_1inRect_1ofView_1;
+static NSUInteger proc_CALLBACK_1hitTestForEvent_1inRect_1ofView_1(id arg0, SEL arg1, NSEvent* arg2, NSRect arg3, NSView* arg4) {
+ return ((NSUInteger (*)(id, SEL, NSEvent*, NSRect*, NSView*))CALLBACK_1hitTestForEvent_1inRect_1ofView_1)(arg0, arg1, arg2, &arg3, arg4);
+}
+static jintLong CALLBACK_hitTestForEvent_inRect_ofView_(jintLong func) {
+ CALLBACK_1hitTestForEvent_1inRect_1ofView_1 = func;
+ return (jintLong)proc_CALLBACK_1hitTestForEvent_1inRect_1ofView_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1hitTestForEvent_1inRect_1ofView_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1hitTestForEvent_1inRect_1ofView_1_FUNC);
+ rc = (jintLong)CALLBACK_hitTestForEvent_inRect_ofView_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1hitTestForEvent_1inRect_1ofView_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1hitTest_1
+static jintLong CALLBACK_1hitTest_1;
+static NSView* proc_CALLBACK_1hitTest_1(id arg0, SEL arg1, NSPoint arg2) {
+ return ((NSView* (*)(id, SEL, NSPoint*))CALLBACK_1hitTest_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_hitTest_(jintLong func) {
+ CALLBACK_1hitTest_1 = func;
+ return (jintLong)proc_CALLBACK_1hitTest_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1hitTest_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1hitTest_1_FUNC);
+ rc = (jintLong)CALLBACK_hitTest_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1hitTest_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1imageRectForBounds_1
+static jintLong CALLBACK_1imageRectForBounds_1;
+static NSRect proc_CALLBACK_1imageRectForBounds_1(id arg0, SEL arg1, NSRect arg2) {
+ NSRect* lprc = ((NSRect* (*)(id, SEL, NSRect*))CALLBACK_1imageRectForBounds_1)(arg0, arg1, &arg2);
+ NSRect rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSRect));
+ }
+ return rc;
+}
+static jintLong CALLBACK_imageRectForBounds_(jintLong func) {
+ CALLBACK_1imageRectForBounds_1 = func;
+ return (jintLong)proc_CALLBACK_1imageRectForBounds_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1imageRectForBounds_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1imageRectForBounds_1_FUNC);
+ rc = (jintLong)CALLBACK_imageRectForBounds_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1imageRectForBounds_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1markedRange
+static jintLong CALLBACK_1markedRange;
+static NSRange proc_CALLBACK_1markedRange(id arg0, SEL arg1) {
+ NSRange* lprc = ((NSRange* (*)(id, SEL))CALLBACK_1markedRange)(arg0, arg1);
+ NSRange rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSRange));
+ }
+ return rc;
+}
+static jintLong CALLBACK_markedRange(jintLong func) {
+ CALLBACK_1markedRange = func;
+ return (jintLong)proc_CALLBACK_1markedRange;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1markedRange)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1markedRange_FUNC);
+ rc = (jintLong)CALLBACK_markedRange(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1markedRange_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1selectedRange
+static jintLong CALLBACK_1selectedRange;
+static NSRange proc_CALLBACK_1selectedRange(id arg0, SEL arg1) {
+ NSRange* lprc = ((NSRange* (*)(id, SEL))CALLBACK_1selectedRange)(arg0, arg1);
+ NSRange rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSRange));
+ }
+ return rc;
+}
+static jintLong CALLBACK_selectedRange(jintLong func) {
+ CALLBACK_1selectedRange = func;
+ return (jintLong)proc_CALLBACK_1selectedRange;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1selectedRange)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1selectedRange_FUNC);
+ rc = (jintLong)CALLBACK_selectedRange(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1selectedRange_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1setFrameOrigin_1
+static jintLong CALLBACK_1setFrameOrigin_1;
+static void proc_CALLBACK_1setFrameOrigin_1(id arg0, SEL arg1, NSPoint arg2) {
+ ((void (*)(id, SEL, NSPoint*))CALLBACK_1setFrameOrigin_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_setFrameOrigin_(jintLong func) {
+ CALLBACK_1setFrameOrigin_1 = func;
+ return (jintLong)proc_CALLBACK_1setFrameOrigin_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setFrameOrigin_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1setFrameOrigin_1_FUNC);
+ rc = (jintLong)CALLBACK_setFrameOrigin_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1setFrameOrigin_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1setFrameSize_1
+static jintLong CALLBACK_1setFrameSize_1;
+static void proc_CALLBACK_1setFrameSize_1(id arg0, SEL arg1, NSSize arg2) {
+ ((void (*)(id, SEL, NSSize*))CALLBACK_1setFrameSize_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_setFrameSize_(jintLong func) {
+ CALLBACK_1setFrameSize_1 = func;
+ return (jintLong)proc_CALLBACK_1setFrameSize_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setFrameSize_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1setFrameSize_1_FUNC);
+ rc = (jintLong)CALLBACK_setFrameSize_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1setFrameSize_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1setFrame_1
+static jintLong CALLBACK_1setFrame_1;
+static void proc_CALLBACK_1setFrame_1(id arg0, SEL arg1, NSRect arg2) {
+ ((void (*)(id, SEL, NSRect*))CALLBACK_1setFrame_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_setFrame_(jintLong func) {
+ CALLBACK_1setFrame_1 = func;
+ return (jintLong)proc_CALLBACK_1setFrame_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setFrame_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1setFrame_1_FUNC);
+ rc = (jintLong)CALLBACK_setFrame_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1setFrame_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1setMarkedText_1selectedRange_1
+static jintLong CALLBACK_1setMarkedText_1selectedRange_1;
+static void proc_CALLBACK_1setMarkedText_1selectedRange_1(id arg0, SEL arg1, id arg2, NSRange arg3) {
+ ((void (*)(id, SEL, id, NSRange*))CALLBACK_1setMarkedText_1selectedRange_1)(arg0, arg1, arg2, &arg3);
+}
+static jintLong CALLBACK_setMarkedText_selectedRange_(jintLong func) {
+ CALLBACK_1setMarkedText_1selectedRange_1 = func;
+ return (jintLong)proc_CALLBACK_1setMarkedText_1selectedRange_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setMarkedText_1selectedRange_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1setMarkedText_1selectedRange_1_FUNC);
+ rc = (jintLong)CALLBACK_setMarkedText_selectedRange_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1setMarkedText_1selectedRange_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1setNeedsDisplayInRect_1
+static jintLong CALLBACK_1setNeedsDisplayInRect_1;
+static void proc_CALLBACK_1setNeedsDisplayInRect_1(id arg0, SEL arg1, NSRect arg2) {
+ ((void (*)(id, SEL, NSRect*))CALLBACK_1setNeedsDisplayInRect_1)(arg0, arg1, &arg2);
+}
+static jintLong CALLBACK_setNeedsDisplayInRect_(jintLong func) {
+ CALLBACK_1setNeedsDisplayInRect_1 = func;
+ return (jintLong)proc_CALLBACK_1setNeedsDisplayInRect_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1setNeedsDisplayInRect_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1setNeedsDisplayInRect_1_FUNC);
+ rc = (jintLong)CALLBACK_setNeedsDisplayInRect_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1setNeedsDisplayInRect_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1shouldChangeTextInRange_1replacementString_1
+static jintLong CALLBACK_1shouldChangeTextInRange_1replacementString_1;
+static BOOL proc_CALLBACK_1shouldChangeTextInRange_1replacementString_1(id arg0, SEL arg1, NSRange arg2, NSString* arg3) {
+ return ((BOOL (*)(id, SEL, NSRange*, NSString*))CALLBACK_1shouldChangeTextInRange_1replacementString_1)(arg0, arg1, &arg2, arg3);
+}
+static jintLong CALLBACK_shouldChangeTextInRange_replacementString_(jintLong func) {
+ CALLBACK_1shouldChangeTextInRange_1replacementString_1 = func;
+ return (jintLong)proc_CALLBACK_1shouldChangeTextInRange_1replacementString_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1shouldChangeTextInRange_1replacementString_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1shouldChangeTextInRange_1replacementString_1_FUNC);
+ rc = (jintLong)CALLBACK_shouldChangeTextInRange_replacementString_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1shouldChangeTextInRange_1replacementString_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1
+static jintLong CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
+static NSRange proc_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1(id arg0, SEL arg1, NSTextView* arg2, NSRange arg3, NSRange arg4) {
+ NSRange* lprc = ((NSRange* (*)(id, SEL, NSTextView*, NSRange*, NSRange*))CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1)(arg0, arg1, arg2, &arg3, &arg4);
+ NSRange rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSRange));
+ }
+ return rc;
+}
+static jintLong CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(jintLong func) {
+ CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1 = func;
+ return (jintLong)proc_CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1_FUNC);
+ rc = (jintLong)CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1titleRectForBounds_1
+static jintLong CALLBACK_1titleRectForBounds_1;
+static NSRect proc_CALLBACK_1titleRectForBounds_1(id arg0, SEL arg1, NSRect arg2) {
+ NSRect* lprc = ((NSRect* (*)(id, SEL, NSRect*))CALLBACK_1titleRectForBounds_1)(arg0, arg1, &arg2);
+ NSRect rc;
+ if (lprc) {
+ rc = *lprc;
+ free(lprc);
+ } else {
+ memset(&rc, 0, sizeof(NSRect));
+ }
+ return rc;
+}
+static jintLong CALLBACK_titleRectForBounds_(jintLong func) {
+ CALLBACK_1titleRectForBounds_1 = func;
+ return (jintLong)proc_CALLBACK_1titleRectForBounds_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1titleRectForBounds_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1titleRectForBounds_1_FUNC);
+ rc = (jintLong)CALLBACK_titleRectForBounds_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1titleRectForBounds_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1view_1stringForToolTip_1point_1userData_1
+static jintLong CALLBACK_1view_1stringForToolTip_1point_1userData_1;
+static NSString* proc_CALLBACK_1view_1stringForToolTip_1point_1userData_1(id arg0, SEL arg1, NSView* arg2, NSToolTipTag arg3, NSPoint arg4, void* arg5) {
+ return ((NSString* (*)(id, SEL, NSView*, NSToolTipTag, NSPoint*, void*))CALLBACK_1view_1stringForToolTip_1point_1userData_1)(arg0, arg1, arg2, arg3, &arg4, arg5);
+}
+static jintLong CALLBACK_view_stringForToolTip_point_userData_(jintLong func) {
+ CALLBACK_1view_1stringForToolTip_1point_1userData_1 = func;
+ return (jintLong)proc_CALLBACK_1view_1stringForToolTip_1point_1userData_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1view_1stringForToolTip_1point_1userData_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1view_1stringForToolTip_1point_1userData_1_FUNC);
+ rc = (jintLong)CALLBACK_view_stringForToolTip_point_userData_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1view_1stringForToolTip_1point_1userData_1_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_CALLBACK_1webView_1setFrame_1
+static jintLong CALLBACK_1webView_1setFrame_1;
+static void proc_CALLBACK_1webView_1setFrame_1(id arg0, SEL arg1, WebView* arg2, NSRect arg3) {
+ ((void (*)(id, SEL, WebView*, NSRect*))CALLBACK_1webView_1setFrame_1)(arg0, arg1, arg2, &arg3);
+}
+static jintLong CALLBACK_webView_setFrame_(jintLong func) {
+ CALLBACK_1webView_1setFrame_1 = func;
+ return (jintLong)proc_CALLBACK_1webView_1setFrame_1;
+}
+JNIEXPORT jintLong JNICALL OS_NATIVE(CALLBACK_1webView_1setFrame_1)
+ (JNIEnv *env, jclass that, jintLong arg0)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, CALLBACK_1webView_1setFrame_1_FUNC);
+ rc = (jintLong)CALLBACK_webView_setFrame_(arg0);
+ OS_NATIVE_EXIT(env, that, CALLBACK_1webView_1setFrame_1_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_CFDataGetBytePtr
JNIEXPORT jintLong JNICALL OS_NATIVE(CFDataGetBytePtr)
(JNIEnv *env, jclass that, jintLong arg0)
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 f67bc6604c..b913d10bc9 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
@@ -77,76 +77,6 @@ JNIEXPORT jboolean JNICALL OS_NATIVE(_1_1BIG_1ENDIAN_1_1)
}
#endif
-#ifndef NO_drawRect_1CALLBACK
-static jintLong drawRect_1CALLBACK;
-static void drawRect(id obj, SEL sel, NSRect rect)
-{
- return ((void (*)(id, SEL, NSRect*))drawRect_1CALLBACK)(obj, sel, &rect);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(drawRect_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- drawRect_1CALLBACK = func;
- return (jintLong)drawRect;
-}
-#endif
-
-#ifndef NO_draggedImage_1beganAt_1CALLBACK
-static jintLong draggedImage_1beganAt_1CALLBACK;
-static BOOL draggedImage_1beganAt_1(id obj, SEL sel, NSImage *image, NSPoint point)
-{
- return ((BOOL (*)(id, SEL, NSImage*, NSPoint*))draggedImage_1beganAt_1CALLBACK)(obj, sel, image, &point);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(draggedImage_1beganAt_1CALLBACK)
-(JNIEnv *env, jclass that, jintLong func)
-{
- draggedImage_1beganAt_1CALLBACK = func;
- return (jintLong)draggedImage_1beganAt_1;
-}
-#endif
-
-#ifndef NO_draggedImage_1endedAt_1operation_1CALLBACK
-static jintLong draggedImage_1endedAt_1operation_1CALLBACK;
-static void draggedImage_1endedAt_1operation(id obj, SEL sel, NSImage *image, NSPoint point, NSDragOperation op)
-{
- return ((void (*)(id, SEL, NSImage *, NSPoint *, NSDragOperation))draggedImage_1endedAt_1operation_1CALLBACK)(obj, sel, image, &point, op);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(draggedImage_1endedAt_1operation_1CALLBACK)
-(JNIEnv *env, jclass that, jintLong func)
-{
- draggedImage_1endedAt_1operation_1CALLBACK = func;
- return (jintLong)draggedImage_1endedAt_1operation;
-}
-#endif
-
-#ifndef NO_drawInteriorWithFrame_1inView_1CALLBACK
-static jintLong drawInteriorWithFrame_1inView_1CALLBACK;
-static void drawInteriorWithFrame_1inView(id obj, SEL sel, NSRect rect, NSView* view)
-{
- return ((void (*)(id, SEL, NSRect*, NSView*))drawInteriorWithFrame_1inView_1CALLBACK)(obj, sel, &rect, view);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(drawInteriorWithFrame_1inView_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- drawInteriorWithFrame_1inView_1CALLBACK = func;
- return (jintLong)drawInteriorWithFrame_1inView;
-}
-#endif
-
-#ifndef NO_drawImage_1withFrame_1inView_1CALLBACK
-static jintLong drawImage_1withFrame_1inView_1CALLBACK;
-static void drawImage_1withFrame_1inView(id obj, SEL sel, NSImage* image, NSRect frame, NSView* view)
-{
- return ((void (*)(id, SEL, NSImage*, NSRect*, NSView*))drawImage_1withFrame_1inView_1CALLBACK)(obj, sel, image, &frame, view);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(drawImage_1withFrame_1inView_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- drawImage_1withFrame_1inView_1CALLBACK = func;
- return (jintLong)drawImage_1withFrame_1inView;
-}
-#endif
-
#ifndef NO_class_1getName
JNIEXPORT jstring JNICALL OS_NATIVE(class_1getName)
(JNIEnv *env, jclass that, jintLong arg0)
@@ -160,215 +90,6 @@ JNIEXPORT jstring JNICALL OS_NATIVE(class_1getName)
}
#endif
-
-#ifndef NO_setFrame_1CALLBACK
-static jintLong setFrame_1CALLBACK;
-static void setFrame(id obj, SEL sel, NSRect rect)
-{
- return ((void (*)(id, SEL, NSRect*))setFrame_1CALLBACK)(obj, sel, &rect);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(setFrame_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- setFrame_1CALLBACK = func;
- return (jintLong)setFrame;
-}
-#endif
-
-#ifndef NO_setFrameOrigin_1CALLBACK
-static jintLong setFrameOrigin_1CALLBACK;
-static void setFrameOrigin(id obj, SEL sel, NSPoint point)
-{
- return ((void (*)(id, SEL, NSPoint*))setFrameOrigin_1CALLBACK)(obj, sel, &point);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(setFrameOrigin_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- setFrameOrigin_1CALLBACK = func;
- return (jintLong)setFrameOrigin;
-}
-#endif
-
-#ifndef NO_setFrameSize_1CALLBACK
-static jintLong setFrameSize_1CALLBACK;
-static void setFrameSize(id obj, SEL sel, NSSize size)
-{
- return ((void (*)(id, SEL, NSSize*))setFrameSize_1CALLBACK)(obj, sel, &size);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(setFrameSize_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- setFrameSize_1CALLBACK = func;
- return (jintLong)setFrameSize;
-}
-#endif
-
-#ifndef NO_hitTest_1CALLBACK
-static jintLong hitTest_1CALLBACK;
-static void hitTest(id obj, SEL sel, NSPoint point)
-{
- return ((void (*)(id, SEL, NSPoint*))hitTest_1CALLBACK)(obj, sel, &point);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(hitTest_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- hitTest_1CALLBACK = func;
- return (jintLong)hitTest;
-}
-#endif
-
-#ifndef NO_highlightSelectionInClipRect_1CALLBACK
-static jintLong highlightSelectionInClipRect_1CALLBACK;
-static void highlightSelectionInClipRect(id obj, SEL sel, NSRect rect)
-{
- return ((void (*)(id, SEL, NSRect*))highlightSelectionInClipRect_1CALLBACK)(obj, sel, &rect);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(highlightSelectionInClipRect_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- highlightSelectionInClipRect_1CALLBACK = func;
- return (jintLong)highlightSelectionInClipRect;
-}
-#endif
-
-#ifndef NO_webView_1setFrame_1CALLBACK
-static jintLong webView_1setFrame_1CALLBACK;
-static void webView_1setFrame(id obj, SEL sel, WebView *sender, NSRect rect)
-{
- return ((void (*)(id, SEL, WebView*, NSRect*))webView_1setFrame_1CALLBACK)(obj, sel, sender, &rect);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(webView_1setFrame_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- webView_1setFrame_1CALLBACK = func;
- return (jintLong)webView_1setFrame;
-}
-#endif
-
-#ifndef NO_setMarkedText_1selectedRange_1CALLBACK
-static jintLong setMarkedText_1selectedRange_1CALLBACK;
-static void setMarkedText_1selectedRange(id obj, SEL sel, id *arg0, NSRange arg1)
-{
- ((void (*)(id, SEL, id*, NSRange*))setMarkedText_1selectedRange_1CALLBACK)(obj, sel, arg0, &arg1);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(setMarkedText_1selectedRange_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- setMarkedText_1selectedRange_1CALLBACK = func;
- return (jintLong)setMarkedText_1selectedRange;
-}
-#endif
-
-#ifndef NO_selectedRange_1CALLBACK
-static jintLong selectedRange_1CALLBACK;
-static NSRange selectedRangeProc(id obj, SEL sel)
-{
- NSRange* ptr = ((NSRange* (*)(id, SEL))selectedRange_1CALLBACK)(obj, sel);
- NSRange range = *ptr;
- free(ptr);
- return range;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(selectedRange_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- selectedRange_1CALLBACK = func;
- return (jintLong)selectedRangeProc;
-}
-#endif
-
-#ifndef NO_markedRange_1CALLBACK
-static jintLong markedRange_1CALLBACK;
-static NSRange markedRangeProc(id obj, SEL sel)
-{
- NSRange* ptr = ((NSRange* (*)(id, SEL))markedRange_1CALLBACK)(obj, sel);
- NSRange range = *ptr;
- free(ptr);
- return range;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(markedRange_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- markedRange_1CALLBACK = func;
- return (jintLong)markedRangeProc;
-}
-#endif
-
-#ifndef NO_characterIndexForPoint_1CALLBACK
-static jintLong characterIndexForPoint_1CALLBACK;
-static int characterIndexForPoint(id obj, SEL sel, NSPoint point)
-{
- return ((int (*)(id, SEL, NSPoint*))characterIndexForPoint_1CALLBACK)(obj, sel, &point);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(characterIndexForPoint_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- characterIndexForPoint_1CALLBACK = func;
- return (jintLong)characterIndexForPoint;
-}
-#endif
-
-#ifndef NO_firstRectForCharacterRange_1CALLBACK
-static jintLong firstRectForCharacterRange_1CALLBACK;
-static NSRect firstRectForCharacterRangeProc(id obj, SEL sel, NSRange arg0)
-{
- NSRect* ptr = ((NSRect* (*)(id, SEL, NSRange*))firstRectForCharacterRange_1CALLBACK)(obj, sel, &arg0);
- NSRect result = *ptr;
- free(ptr);
- return result;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(firstRectForCharacterRange_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- firstRectForCharacterRange_1CALLBACK = func;
- return (jintLong)firstRectForCharacterRangeProc;
-}
-#endif
-
-#ifndef NO_attributedSubstringFromRange_1CALLBACK
-static jintLong attributedSubstringFromRange_1CALLBACK;
-static id attributedSubstringFromRangeProc(id obj, SEL sel, NSRange arg0)
-{
- return ((id (*)(id, SEL, NSRange*))attributedSubstringFromRange_1CALLBACK)(obj, sel, &arg0);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(attributedSubstringFromRange_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- attributedSubstringFromRange_1CALLBACK = func;
- return (jintLong)attributedSubstringFromRangeProc;
-}
-#endif
-
-#ifndef NO_textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK
-static jintLong textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK;
-static NSRange textView_1willChangeSelectionFromCharacterRange_1toCharacterRange(id obj, SEL sel, NSTextView *aTextView, NSRange oldSelectedCharRange, NSRange newSelectedCharRange)
-{
- NSRange* ptr = ((NSRange* (*)(id, SEL, NSTextView*, NSRange*, NSRange*))textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK)(obj, sel, aTextView, &oldSelectedCharRange, &newSelectedCharRange);
- NSRange result = *ptr;
- free(ptr);
- return result;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK = func;
- return (jintLong)textView_1willChangeSelectionFromCharacterRange_1toCharacterRange;
-}
-#endif
-
-#ifndef NO_accessibilityHitTest_1CALLBACK
-static jintLong accessibilityHitTest_1CALLBACK;
-static void accessibilityHitTest(id obj, SEL sel, NSPoint point)
-{
- return ((void (*)(id, SEL, NSPoint *))accessibilityHitTest_1CALLBACK)(obj, sel, &point);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(accessibilityHitTest_1CALLBACK)
-(JNIEnv *env, jclass that, jintLong func)
-{
- accessibilityHitTest_1CALLBACK = func;
- return (jintLong)accessibilityHitTest;
-}
-#endif
-
#ifndef NO_isFlipped_1CALLBACK
static BOOL isFlippedProc(id obj, SEL sel)
{
@@ -398,156 +119,3 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(kTISPropertyUnicodeKeyLayoutData)
return (jintLong)(*var);
}
#endif
-
-#ifndef NO_shouldChangeTextInRange_1replacementString_1CALLBACK
-static jintLong shouldChangeTextInRange_1replacementString_1CALLBACK;
-static BOOL shouldChangeTextInRange_1replacementString(id obj, SEL sel, NSRange affectedCharRange, NSString *replacementString)
-{
- return ((BOOL (*)(id, SEL, NSRange*, NSString*))shouldChangeTextInRange_1replacementString_1CALLBACK)(obj, sel, &affectedCharRange, replacementString);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(shouldChangeTextInRange_1replacementString_1CALLBACK)
-(JNIEnv *env, jclass that, jintLong func)
-{
- shouldChangeTextInRange_1replacementString_1CALLBACK = func;
- return (jintLong)shouldChangeTextInRange_1replacementString;
-}
-#endif
-
-#ifndef NO_view_1stringForToolTip_1point_1userData_1CALLBACK
-static jintLong view_1stringForToolTip_1point_1userData_1CALLBACK;
-static NSString * view_1stringForToolTip_1point_1userDataProc(id obj, SEL sel, NSView* view, NSToolTipTag tag, NSPoint point, void *userData)
-{
- return ((NSString* (*)(id, SEL, NSView*, NSToolTipTag, NSPoint*, void *))view_1stringForToolTip_1point_1userData_1CALLBACK)(obj, sel, view, tag, &point, userData);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(view_1stringForToolTip_1point_1userData_1CALLBACK)
-(JNIEnv *env, jclass that, jintLong func)
-{
- view_1stringForToolTip_1point_1userData_1CALLBACK = func;
- return (jintLong)view_1stringForToolTip_1point_1userDataProc;
-}
-#endif
-
-#ifndef NO_canDragRowsWithIndexes_1atPoint_1CALLBACK
-static jintLong canDragRowsWithIndexes_1atPoint_1CALLBACK;
-static BOOL canDragRowsWithIndexes_1atPoint_1Proc(id obj, SEL sel, NSIndexSet *indexes, NSPoint point)
-{
- return ((BOOL (*)(id, SEL, NSIndexSet*, NSPoint*))canDragRowsWithIndexes_1atPoint_1CALLBACK)(obj, sel, indexes, &point);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(canDragRowsWithIndexes_1atPoint_1CALLBACK)
-(JNIEnv *env, jclass that, jintLong func)
-{
- canDragRowsWithIndexes_1atPoint_1CALLBACK = func;
- return (jintLong)canDragRowsWithIndexes_1atPoint_1Proc;
-}
-#endif
-
-
-#ifndef NO_setNeedsDisplayInRect_1CALLBACK
-static jintLong setNeedsDisplayInRect_1CALLBACK;
-static void setNeedsDisplayInRectProc(id obj, SEL sel, NSRect rect)
-{
- return ((void (*)(id, SEL, NSRect*))setNeedsDisplayInRect_1CALLBACK)(obj, sel, &rect);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(setNeedsDisplayInRect_1CALLBACK)
-(JNIEnv *env, jclass that, jintLong func)
-{
- setNeedsDisplayInRect_1CALLBACK = func;
- return (jintLong)setNeedsDisplayInRectProc;
-}
-#endif
-
-#ifndef NO_drawWithFrame_1inView_1CALLBACK
-static jintLong drawWithFrame_1inView_1CALLBACK;
-static void drawWithFrame_1inView(id obj, SEL sel, NSRect rect, NSView* view)
-{
- return ((void (*)(id, SEL, NSRect*, NSView*))drawWithFrame_1inView_1CALLBACK)(obj, sel, &rect, view);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(drawWithFrame_1inView_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- drawWithFrame_1inView_1CALLBACK = func;
- return (jintLong)drawWithFrame_1inView;
-}
-#endif
-
-#ifndef NO_imageRectForBounds_1CALLBACK
-static jintLong imageRectForBounds_1CALLBACK;
-static NSRect imageRectForBoundsProc(id obj, SEL sel, NSRect cellFrame)
-{
- NSRect* ptr = ((NSRect* (*)(id, SEL, NSRect*))imageRectForBounds_1CALLBACK)(obj, sel, &cellFrame);
- NSRect result = *ptr;
- free(ptr);
- return result;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(imageRectForBounds_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- imageRectForBounds_1CALLBACK = func;
- return (jintLong)imageRectForBoundsProc;
-}
-#endif
-
-#ifndef NO_titleRectForBounds_1CALLBACK
-static jintLong titleRectForBounds_1CALLBACK;
-static NSRect titleRectForBoundsProc(id obj, SEL sel, NSRect cellFrame)
-{
- NSRect* ptr = ((NSRect* (*)(id, SEL, NSRect*))titleRectForBounds_1CALLBACK)(obj, sel, &cellFrame);
- NSRect result = *ptr;
- free(ptr);
- return result;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(titleRectForBounds_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- titleRectForBounds_1CALLBACK = func;
- return (jintLong)titleRectForBoundsProc;
-}
-#endif
-
-#ifndef NO_cellSize_1CALLBACK
-static jintLong cellSize_1CALLBACK;
-static NSSize cellSizeProc(id obj, SEL sel)
-{
- NSSize* ptr = ((NSSize* (*)(id, SEL))cellSize_1CALLBACK)(obj, sel);
- NSSize range = *ptr;
- free(ptr);
- return range;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(cellSize_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- cellSize_1CALLBACK = func;
- return (jintLong)cellSizeProc;
-}
-#endif
-
-#ifndef NO_hitTestForEvent_1inRect_1ofView_1CALLBACK
-static jintLong hitTestForEvent_1inRect_1ofView_1CALLBACK;
-static NSUInteger hitTestForEvent_1inRect_1ofViewProc(id obj, SEL sel, NSEvent* event, NSRect frame, NSView* view)
-{
- return ((NSUInteger (*)(id, SEL, NSEvent*, NSRect*, NSView*))hitTestForEvent_1inRect_1ofView_1CALLBACK)(obj, sel, event, &frame, view);
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(hitTestForEvent_1inRect_1ofView_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- hitTestForEvent_1inRect_1ofView_1CALLBACK = func;
- return (jintLong)hitTestForEvent_1inRect_1ofViewProc;
-}
-#endif
-
-#ifndef NO_expansionFrameWithFrameProc_1CALLBACK
-static jintLong expansionFrameWithFrameProc_1CALLBACK;
-static NSRect expansionFrameWithFrameProc(id obj, SEL sel, NSRect cellFrame, NSView* view)
-{
- NSRect* ptr = ((NSRect* (*)(id, SEL, NSRect*, NSView*))expansionFrameWithFrameProc_1CALLBACK)(obj, sel, &cellFrame, view);
- NSRect result = *ptr;
- free(ptr);
- return result;
-}
-JNIEXPORT jintLong JNICALL OS_NATIVE(expansionFrameWithFrameProc_1CALLBACK)
- (JNIEnv *env, jclass that, jintLong func)
-{
- expansionFrameWithFrameProc_1CALLBACK = func;
- return (jintLong)expansionFrameWithFrameProc;
-}
-#endif
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 87f5e82fec..40777e9095 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
@@ -19,6 +19,36 @@ int OS_nativeFunctionCallCount[476];
char * OS_nativeFunctionNames[] = {
"ATSFontActivateFromFileReference",
"AcquireRootMenu",
+ "CALLBACK_1accessibilityHitTest_1",
+ "CALLBACK_1attributedSubstringFromRange_1",
+ "CALLBACK_1canDragRowsWithIndexes_1atPoint_1",
+ "CALLBACK_1cellSize",
+ "CALLBACK_1characterIndexForPoint_1",
+ "CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1",
+ "CALLBACK_1draggedImage_1beganAt_1",
+ "CALLBACK_1draggedImage_1endedAt_1operation_1",
+ "CALLBACK_1drawImage_1withFrame_1inView_1",
+ "CALLBACK_1drawInteriorWithFrame_1inView_1",
+ "CALLBACK_1drawRect_1",
+ "CALLBACK_1drawWithFrame_1inView_1",
+ "CALLBACK_1expansionFrameWithFrame_1inView_1",
+ "CALLBACK_1firstRectForCharacterRange_1",
+ "CALLBACK_1highlightSelectionInClipRect_1",
+ "CALLBACK_1hitTestForEvent_1inRect_1ofView_1",
+ "CALLBACK_1hitTest_1",
+ "CALLBACK_1imageRectForBounds_1",
+ "CALLBACK_1markedRange",
+ "CALLBACK_1selectedRange",
+ "CALLBACK_1setFrameOrigin_1",
+ "CALLBACK_1setFrameSize_1",
+ "CALLBACK_1setFrame_1",
+ "CALLBACK_1setMarkedText_1selectedRange_1",
+ "CALLBACK_1setNeedsDisplayInRect_1",
+ "CALLBACK_1shouldChangeTextInRange_1replacementString_1",
+ "CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1",
+ "CALLBACK_1titleRectForBounds_1",
+ "CALLBACK_1view_1stringForToolTip_1point_1userData_1",
+ "CALLBACK_1webView_1setFrame_1",
"CFDataGetBytePtr",
"CFDataGetLength",
"CFRelease",
@@ -293,12 +323,7 @@ char * OS_nativeFunctionNames[] = {
"UCKeyTranslate",
"UnionRgn",
"_1_1BIG_1ENDIAN_1_1",
- "accessibilityHitTest_1CALLBACK",
- "attributedSubstringFromRange_1CALLBACK",
"call",
- "canDragRowsWithIndexes_1atPoint_1CALLBACK",
- "cellSize_1CALLBACK",
- "characterIndexForPoint_1CALLBACK",
"class_1addIvar",
"class_1addMethod",
"class_1addProtocol",
@@ -308,25 +333,11 @@ char * OS_nativeFunctionNames[] = {
"class_1getMethodImplementation",
"class_1getName",
"class_1getSuperclass",
- "dragSelectionWithEvent_1offset_1slideBack_1CALLBACK",
- "draggedImage_1beganAt_1CALLBACK",
- "draggedImage_1endedAt_1operation_1CALLBACK",
- "drawImage_1withFrame_1inView_1CALLBACK",
- "drawInteriorWithFrame_1inView_1CALLBACK",
- "drawRect_1CALLBACK",
- "drawWithFrame_1inView_1CALLBACK",
- "expansionFrameWithFrameProc_1CALLBACK",
- "firstRectForCharacterRange_1CALLBACK",
"getpid",
- "highlightSelectionInClipRect_1CALLBACK",
- "hitTestForEvent_1inRect_1ofView_1CALLBACK",
- "hitTest_1CALLBACK",
- "imageRectForBounds_1CALLBACK",
"instrumentObjcMessageSends",
"isFlipped_1CALLBACK",
"kCFRunLoopCommonModes",
"kTISPropertyUnicodeKeyLayoutData",
- "markedRange_1CALLBACK",
#ifndef JNI64
"memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I",
#else
@@ -1022,17 +1033,6 @@ char * OS_nativeFunctionNames[] = {
"object_1setClass",
"object_1setInstanceVariable",
"sel_1registerName",
- "selectedRange_1CALLBACK",
- "setFrameOrigin_1CALLBACK",
- "setFrameSize_1CALLBACK",
- "setFrame_1CALLBACK",
- "setMarkedText_1selectedRange_1CALLBACK",
- "setNeedsDisplayInRect_1CALLBACK",
- "shouldChangeTextInRange_1replacementString_1CALLBACK",
- "textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK",
- "titleRectForBounds_1CALLBACK",
- "view_1stringForToolTip_1point_1userData_1CALLBACK",
- "webView_1setFrame_1CALLBACK",
};
#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func
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 5e02e523d0..4fb1127dac 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
@@ -27,6 +27,36 @@ extern char* OS_nativeFunctionNames[];
typedef enum {
ATSFontActivateFromFileReference_FUNC,
AcquireRootMenu_FUNC,
+ CALLBACK_1accessibilityHitTest_1_FUNC,
+ CALLBACK_1attributedSubstringFromRange_1_FUNC,
+ CALLBACK_1canDragRowsWithIndexes_1atPoint_1_FUNC,
+ CALLBACK_1cellSize_FUNC,
+ CALLBACK_1characterIndexForPoint_1_FUNC,
+ CALLBACK_1dragSelectionWithEvent_1offset_1slideBack_1_FUNC,
+ CALLBACK_1draggedImage_1beganAt_1_FUNC,
+ CALLBACK_1draggedImage_1endedAt_1operation_1_FUNC,
+ CALLBACK_1drawImage_1withFrame_1inView_1_FUNC,
+ CALLBACK_1drawInteriorWithFrame_1inView_1_FUNC,
+ CALLBACK_1drawRect_1_FUNC,
+ CALLBACK_1drawWithFrame_1inView_1_FUNC,
+ CALLBACK_1expansionFrameWithFrame_1inView_1_FUNC,
+ CALLBACK_1firstRectForCharacterRange_1_FUNC,
+ CALLBACK_1highlightSelectionInClipRect_1_FUNC,
+ CALLBACK_1hitTestForEvent_1inRect_1ofView_1_FUNC,
+ CALLBACK_1hitTest_1_FUNC,
+ CALLBACK_1imageRectForBounds_1_FUNC,
+ CALLBACK_1markedRange_FUNC,
+ CALLBACK_1selectedRange_FUNC,
+ CALLBACK_1setFrameOrigin_1_FUNC,
+ CALLBACK_1setFrameSize_1_FUNC,
+ CALLBACK_1setFrame_1_FUNC,
+ CALLBACK_1setMarkedText_1selectedRange_1_FUNC,
+ CALLBACK_1setNeedsDisplayInRect_1_FUNC,
+ CALLBACK_1shouldChangeTextInRange_1replacementString_1_FUNC,
+ CALLBACK_1textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1_FUNC,
+ CALLBACK_1titleRectForBounds_1_FUNC,
+ CALLBACK_1view_1stringForToolTip_1point_1userData_1_FUNC,
+ CALLBACK_1webView_1setFrame_1_FUNC,
CFDataGetBytePtr_FUNC,
CFDataGetLength_FUNC,
CFRelease_FUNC,
@@ -301,12 +331,7 @@ typedef enum {
UCKeyTranslate_FUNC,
UnionRgn_FUNC,
_1_1BIG_1ENDIAN_1_1_FUNC,
- accessibilityHitTest_1CALLBACK_FUNC,
- attributedSubstringFromRange_1CALLBACK_FUNC,
call_FUNC,
- canDragRowsWithIndexes_1atPoint_1CALLBACK_FUNC,
- cellSize_1CALLBACK_FUNC,
- characterIndexForPoint_1CALLBACK_FUNC,
class_1addIvar_FUNC,
class_1addMethod_FUNC,
class_1addProtocol_FUNC,
@@ -316,25 +341,11 @@ typedef enum {
class_1getMethodImplementation_FUNC,
class_1getName_FUNC,
class_1getSuperclass_FUNC,
- dragSelectionWithEvent_1offset_1slideBack_1CALLBACK_FUNC,
- draggedImage_1beganAt_1CALLBACK_FUNC,
- draggedImage_1endedAt_1operation_1CALLBACK_FUNC,
- drawImage_1withFrame_1inView_1CALLBACK_FUNC,
- drawInteriorWithFrame_1inView_1CALLBACK_FUNC,
- drawRect_1CALLBACK_FUNC,
- drawWithFrame_1inView_1CALLBACK_FUNC,
- expansionFrameWithFrameProc_1CALLBACK_FUNC,
- firstRectForCharacterRange_1CALLBACK_FUNC,
getpid_FUNC,
- highlightSelectionInClipRect_1CALLBACK_FUNC,
- hitTestForEvent_1inRect_1ofView_1CALLBACK_FUNC,
- hitTest_1CALLBACK_FUNC,
- imageRectForBounds_1CALLBACK_FUNC,
instrumentObjcMessageSends_FUNC,
isFlipped_1CALLBACK_FUNC,
kCFRunLoopCommonModes_FUNC,
kTISPropertyUnicodeKeyLayoutData_FUNC,
- markedRange_1CALLBACK_FUNC,
#ifndef JNI64
memmove__ILorg_eclipse_swt_internal_cocoa_CGPathElement_2I_FUNC,
#else
@@ -1030,15 +1041,4 @@ typedef enum {
object_1setClass_FUNC,
object_1setInstanceVariable_FUNC,
sel_1registerName_FUNC,
- selectedRange_1CALLBACK_FUNC,
- setFrameOrigin_1CALLBACK_FUNC,
- setFrameSize_1CALLBACK_FUNC,
- setFrame_1CALLBACK_FUNC,
- setMarkedText_1selectedRange_1CALLBACK_FUNC,
- setNeedsDisplayInRect_1CALLBACK_FUNC,
- shouldChangeTextInRange_1replacementString_1CALLBACK_FUNC,
- textView_1willChangeSelectionFromCharacterRange_1toCharacterRange_1CALLBACK_FUNC,
- titleRectForBounds_1CALLBACK_FUNC,
- view_1stringForToolTip_1point_1userData_1CALLBACK_FUNC,
- webView_1setFrame_1CALLBACK_FUNC,
} OS_FUNCS;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
index 3884964a5a..1209cd9880 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras
@@ -943,7 +943,7 @@
</method>
</class>
<class name="NSButtonCell" swt_gen="mixed" swt_superclass="NSActionCell">
- <method selector="drawImage:withFrame:inView:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="drawImage:withFrame:inView:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="image" swt_gen="true"></arg>
<arg name="frame" swt_gen="true"></arg>
<arg name="controlView" swt_gen="true"></arg>
@@ -973,19 +973,19 @@
<method selector="attributedStringValue" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="cellSize" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="cellSize" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<retval swt_gen="true"></retval>
</method>
<method selector="cellSizeForBounds:" swt_gen="true">
<arg name="aRect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="drawInteriorWithFrame:inView:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="drawInteriorWithFrame:inView:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="cellFrame" swt_gen="true"></arg>
<arg name="controlView" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="drawWithFrame:inView:" swt_gen="true">
+ <method selector="drawWithFrame:inView:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="cellFrame" swt_gen="true"></arg>
<arg name="controlView" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -994,7 +994,7 @@
<arg name="theRect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="expansionFrameWithFrame:inView:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="expansionFrameWithFrame:inView:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="cellFrame" swt_gen="true"></arg>
<arg name="view" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -1007,7 +1007,7 @@
<arg name="controlView" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="hitTestForEvent:inRect:ofView:" swt_gen="true">
+ <method selector="hitTestForEvent:inRect:ofView:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="event" swt_gen="true"></arg>
<arg name="cellFrame" swt_gen="true"></arg>
<arg name="controlView" swt_gen="true"></arg>
@@ -1016,7 +1016,7 @@
<method selector="image" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="imageRectForBounds:" swt_gen="true">
+ <method selector="imageRectForBounds:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="theRect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -1088,7 +1088,7 @@
<method selector="title" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="titleRectForBounds:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="titleRectForBounds:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="theRect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -3228,7 +3228,7 @@
<method selector="allowsColumnReordering" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="canDragRowsWithIndexes:atPoint:" swt_gen="true">
+ <method selector="canDragRowsWithIndexes:atPoint:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="rowIndexes" swt_gen="true"></arg>
<arg name="mouseDownPoint" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -3274,7 +3274,7 @@
<method selector="headerView" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="highlightSelectionInClipRect:" swt_gen="true">
+ <method selector="highlightSelectionInClipRect:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="clipRect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -3621,7 +3621,7 @@
<method selector="defaultParagraphStyle" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="dragSelectionWithEvent:offset:slideBack:" swt_gen="true">
+ <method selector="dragSelectionWithEvent:offset:slideBack:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="event" swt_gen="true"></arg>
<arg name="mouseOffset" swt_gen="true"></arg>
<arg name="slideBack" swt_gen="true"></arg>
@@ -3648,7 +3648,7 @@
<arg name="flag" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="shouldChangeTextInRange:replacementString:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="shouldChangeTextInRange:replacementString:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="affectedCharRange" swt_gen="true"></arg>
<arg name="replacementString" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
@@ -3895,7 +3895,7 @@
<arg name="slideFlag" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="drawRect:" swt_gen="true">
+ <method selector="drawRect:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="rect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -3908,7 +3908,7 @@
<method selector="frame" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="hitTest:" swt_gen="true">
+ <method selector="hitTest:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="aPoint" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -3969,15 +3969,15 @@
<arg name="focusRingType" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setFrame:" swt_gen="true">
+ <method selector="setFrame:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="frameRect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setFrameOrigin:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="setFrameOrigin:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="newOrigin" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setFrameSize:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="setFrameSize:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="newSize" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -3989,7 +3989,7 @@
<arg name="flag" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setNeedsDisplayInRect:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="setNeedsDisplayInRect:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="invalidRect" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
@@ -4356,7 +4356,7 @@
<arg name="parameter" swt_gen="true"></arg>
</method>
<method selector="accessibilityFocusedUIElement" swt_gen="true"></method>
- <method selector="accessibilityHitTest:" swt_gen="true" swt_gen_super_msgSend="true">
+ <method selector="accessibilityHitTest:" swt_gen="true" swt_gen_custom_callback="true" swt_gen_super_msgSend="true">
<arg name="point" swt_gen="true"></arg>
</method>
<method selector="accessibilityIsAttributeSettable:" swt_gen="true">
@@ -4432,11 +4432,11 @@
<method selector="wantsPeriodicDraggingUpdates" swt_gen="true"></method>
</informal_protocol>
<informal_protocol name="NSDraggingSource" swt_gen="mixed">
- <method selector="draggedImage:beganAt:" swt_gen="true">
+ <method selector="draggedImage:beganAt:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="image" swt_gen="true"></arg>
<arg name="screenPoint" swt_gen="true"></arg>
</method>
- <method selector="draggedImage:endedAt:operation:" swt_gen="true">
+ <method selector="draggedImage:endedAt:operation:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="image" swt_gen="true"></arg>
<arg name="screenPoint" swt_gen="true"></arg>
<arg name="operation" swt_gen="true"></arg>
@@ -4644,7 +4644,7 @@
<arg name="link" swt_gen="true"></arg>
<arg name="charIndex" swt_gen="true"></arg>
</method>
- <method selector="textView:willChangeSelectionFromCharacterRange:toCharacterRange:" swt_gen="true">
+ <method selector="textView:willChangeSelectionFromCharacterRange:toCharacterRange:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="textView" swt_gen="true"></arg>
<arg name="oldSelectedCharRange" swt_gen="true"></arg>
<arg name="newSelectedCharRange" swt_gen="true"></arg>
@@ -4654,7 +4654,7 @@
</method>
</informal_protocol>
<informal_protocol name="NSToolTipOwner" swt_gen="true">
- <method selector="view:stringForToolTip:point:userData:" swt_gen="true">
+ <method selector="view:stringForToolTip:point:userData:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="view" swt_gen="true"></arg>
<arg name="tag" swt_gen="true"></arg>
<arg name="point" swt_gen="true"></arg>
@@ -4709,25 +4709,25 @@
</informal_protocol>
<class name="NSSecureTextField" swt_gen="true" swt_superclass="NSTextField"></class>
<informal_protocol name="NSTextInput" swt_gen="true">
- <method selector="markedRange" swt_gen="true"></method>
+ <method selector="markedRange" swt_gen="true" swt_gen_custom_callback="true"></method>
<method selector="insertText:" swt_gen="true">
<arg name="aString" swt_gen="true"></arg>
</method>
<method selector="unmarkText" swt_gen="true"></method>
<method selector="hasMarkedText" swt_gen="true"></method>
<method selector="validAttributesForMarkedText" swt_gen="true"></method>
- <method selector="characterIndexForPoint:" swt_gen="true">
+ <method selector="characterIndexForPoint:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="thePoint" swt_gen="true"></arg>
</method>
- <method selector="attributedSubstringFromRange:" swt_gen="true">
+ <method selector="attributedSubstringFromRange:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="theRange" swt_gen="true"></arg>
</method>
- <method selector="selectedRange" swt_gen="true"></method>
- <method selector="setMarkedText:selectedRange:" swt_gen="true">
+ <method selector="selectedRange" swt_gen="true" swt_gen_custom_callback="true"></method>
+ <method selector="setMarkedText:selectedRange:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="selRange" swt_gen="true"></arg>
<arg name="aString" swt_gen="true"></arg>
</method>
- <method selector="firstRectForCharacterRange:" swt_gen="true">
+ <method selector="firstRectForCharacterRange:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="theRange" swt_gen="true"></arg>
</method>
</informal_protocol>
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 c1f7bfd852..7cf2a39104 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
@@ -241,66 +241,6 @@ public static final int kQDRegionToRectsMsgParse = 2;
/** @method flags=no_gen */
public static final native int /*long*/ isFlipped_CALLBACK();
-/** @method flags=no_gen */
-public static final native int /*long*/ drawRect_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ drawImage_withFrame_inView_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ drawInteriorWithFrame_inView_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ drawWithFrame_inView_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ imageRectForBounds_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ titleRectForBounds_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ hitTestForEvent_inRect_ofView_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ cellSize_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ setFrame_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ setFrameOrigin_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ setFrameSize_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ hitTest_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ webView_setFrame_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ markedRange_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ selectedRange_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ highlightSelectionInClipRect_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ attributedSubstringFromRange_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ setMarkedText_selectedRange_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ characterIndexForPoint_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ firstRectForCharacterRange_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ draggedImage_beganAt_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ draggedImage_endedAt_operation_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ accessibilityHitTest_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ dragSelectionWithEvent_offset_slideBack_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ shouldChangeTextInRange_replacementString_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ view_stringForToolTip_point_userData_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ canDragRowsWithIndexes_atPoint_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ setNeedsDisplayInRect_CALLBACK(int /*long*/ func);
-/** @method flags=no_gen */
-public static final native int /*long*/ expansionFrameWithFrameProc_CALLBACK(int /*long*/ func);
/** Custom structure return */
@@ -400,6 +340,98 @@ public static final native int objc_super_sizeof();
/** This section is auto generated */
+/** Custom callbacks */
+/**
+ * @method callback_types=id;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_accessibilityHitTest_(int /*long*/ func);
+/**
+ * @method callback_types=NSAttributedString*;id;SEL;NSRange;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_attributedSubstringFromRange_(int /*long*/ func);
+/**
+ * @method callback_types=BOOL;id;SEL;NSIndexSet*;NSPoint;,callback_flags=none;none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_canDragRowsWithIndexes_atPoint_(int /*long*/ func);
+/**
+ * @method callback_types=NSSize;id;SEL;,callback_flags=struct;none;none; */
+public static final native int /*long*/ CALLBACK_cellSize(int /*long*/ func);
+/**
+ * @method callback_types=NSUInteger;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_characterIndexForPoint_(int /*long*/ func);
+/**
+ * @method callback_types=BOOL;id;SEL;NSEvent*;NSSize;BOOL;,callback_flags=none;none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_dragSelectionWithEvent_offset_slideBack_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSImage*;NSPoint;,callback_flags=none;none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_draggedImage_beganAt_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSImage*;NSPoint;NSDragOperation;,callback_flags=none;none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_draggedImage_endedAt_operation_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSImage*;NSRect;NSView*;,callback_flags=none;none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_drawImage_withFrame_inView_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSRect;NSView*;,callback_flags=none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_drawInteriorWithFrame_inView_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_drawRect_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSRect;NSView*;,callback_flags=none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_drawWithFrame_inView_(int /*long*/ func);
+/**
+ * @method callback_types=NSRect;id;SEL;NSRect;NSView*;,callback_flags=struct;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_expansionFrameWithFrame_inView_(int /*long*/ func);
+/**
+ * @method callback_types=NSRect;id;SEL;NSRange;,callback_flags=struct;none;none;struct; */
+public static final native int /*long*/ CALLBACK_firstRectForCharacterRange_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_highlightSelectionInClipRect_(int /*long*/ func);
+/**
+ * @method callback_types=NSView*;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_hitTest_(int /*long*/ func);
+/**
+ * @method callback_types=NSUInteger;id;SEL;NSEvent*;NSRect;NSView*;,callback_flags=none;none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_hitTestForEvent_inRect_ofView_(int /*long*/ func);
+/**
+ * @method callback_types=NSRect;id;SEL;NSRect;,callback_flags=struct;none;none;struct; */
+public static final native int /*long*/ CALLBACK_imageRectForBounds_(int /*long*/ func);
+/**
+ * @method callback_types=NSRange;id;SEL;,callback_flags=struct;none;none; */
+public static final native int /*long*/ CALLBACK_markedRange(int /*long*/ func);
+/**
+ * @method callback_types=NSRange;id;SEL;,callback_flags=struct;none;none; */
+public static final native int /*long*/ CALLBACK_selectedRange(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_setFrame_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSPoint;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_setFrameOrigin_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSSize;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_setFrameSize_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;id;NSRange;,callback_flags=none;none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_setMarkedText_selectedRange_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;NSRect;,callback_flags=none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_setNeedsDisplayInRect_(int /*long*/ func);
+/**
+ * @method callback_types=BOOL;id;SEL;NSRange;NSString*;,callback_flags=none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_shouldChangeTextInRange_replacementString_(int /*long*/ func);
+/**
+ * @method callback_types=NSRange;id;SEL;NSTextView*;NSRange;NSRange;,callback_flags=struct;none;none;none;struct;struct; */
+public static final native int /*long*/ CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(int /*long*/ func);
+/**
+ * @method callback_types=NSRect;id;SEL;NSRect;,callback_flags=struct;none;none;struct; */
+public static final native int /*long*/ CALLBACK_titleRectForBounds_(int /*long*/ func);
+/**
+ * @method callback_types=NSString*;id;SEL;NSView*;NSToolTipTag;NSPoint;void*;,callback_flags=none;none;none;none;none;struct;none; */
+public static final native int /*long*/ CALLBACK_view_stringForToolTip_point_userData_(int /*long*/ func);
+/**
+ * @method callback_types=void;id;SEL;WebView*;NSRect;,callback_flags=none;none;none;none;struct; */
+public static final native int /*long*/ CALLBACK_webView_setFrame_(int /*long*/ func);
+
/** Classes */
public static final int /*long*/ class_DOMDocument = objc_getClass("DOMDocument");
public static final int /*long*/ class_DOMEvent = objc_getClass("DOMEvent");
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 3b3a320fbc..e17610d662 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
@@ -349,7 +349,7 @@
<arg name="sender" swt_gen="true"></arg>
<arg name="resultListener" swt_gen="true"></arg>
</method>
- <method selector="webView:setFrame:" swt_gen="true">
+ <method selector="webView:setFrame:" swt_gen="true" swt_gen_custom_callback="true">
<arg name="sender" swt_gen="true"></arg>
<arg name="frame" swt_gen="true"></arg>
</method>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
index e725b4e8e4..7c68a56ab9 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java
@@ -525,22 +525,21 @@ public void deselectAll () {
boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
if ((style & SWT.READ_ONLY) == 0) {
- NSText fieldEditor = view.window().fieldEditor(false, view);
- NSRange selectedRange = fieldEditor.selectedRange();
-
- if (selectedRange.length > 0) {
- NSPoint mouseLocation = NSEvent.mouseLocation();
- NSTextView feAsTextView = new NSTextView(fieldEditor);
- int /*long*/ charPosition = feAsTextView.characterIndexForInsertionAtPoint(mouseLocation);
-
- if (charPosition != OS.NSNotFound && charPosition >= selectedRange.location && charPosition < (selectedRange.location + selectedRange.length)) {
- if (super.dragDetect(x, y, filter, consume)) {
- if (consume != null) consume[0] = true;
- return true;
- }
- }
+ NSText fieldEditor = ((NSControl)view).currentEditor();
+ if (fieldEditor != null) {
+ NSRange selectedRange = fieldEditor.selectedRange();
+ if (selectedRange.length > 0) {
+ NSPoint mouseLocation = NSEvent.mouseLocation();
+ NSTextView feAsTextView = new NSTextView(fieldEditor);
+ int /*long*/ charPosition = feAsTextView.characterIndexForInsertionAtPoint(mouseLocation);
+ if (charPosition != OS.NSNotFound && charPosition >= selectedRange.location && charPosition < (selectedRange.location + selectedRange.length)) {
+ if (super.dragDetect(x, y, filter, consume)) {
+ if (consume != null) consume[0] = true;
+ return true;
+ }
+ }
+ }
}
-
return false;
}
@@ -917,8 +916,8 @@ void insertEditText (String string) {
char [] buffer = new char [length];
string.getChars (0, buffer.length, buffer, 0);
NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
- NSText editor = ((NSTextField) view).currentEditor ();
- editor.replaceCharactersInRange (editor.selectedRange (), nsstring);
+ NSText fieldEditor = ((NSTextField) view).currentEditor ();
+ fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
selectionRange = null;
} else {
String oldText = getText ();
@@ -1430,17 +1429,16 @@ public void setSelection (Point selection) {
checkWidget ();
if (selection == null) error (SWT.ERROR_NULL_ARGUMENT);
if ((style & SWT.READ_ONLY) == 0) {
- NSString str = new NSCell(((NSComboBox)view).cell()).title();
+ NSComboBox widget = (NSComboBox)view;
+ NSString str = new NSCell(widget.cell()).title();
int length = (int)/*64*/str.length();
int start = Math.min (Math.max (Math.min (selection.x, selection.y), 0), length);
int end = Math.min (Math.max (Math.max (selection.x, selection.y), 0), length);
selectionRange = new NSRange();
selectionRange.location = start;
selectionRange.length = end - start;
- if (this == display.getFocusControl ()) {
- NSText editor = view.window().fieldEditor(false, view);
- editor.setSelectedRange(selectionRange);
- }
+ NSText fieldEditor = widget.currentEditor();
+ if (fieldEditor != null) fieldEditor.setSelectedRange(selectionRange);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
index f8230c10f8..edb60bd6ba 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java
@@ -2009,32 +2009,32 @@ void initClasses () {
if (fieldEditorProc4 == 0) error (SWT.ERROR_NO_MORE_CALLBACKS);
int /*long*/ isFlippedProc = OS.isFlipped_CALLBACK();
- int /*long*/ drawRectProc = OS.drawRect_CALLBACK(proc3);
- int /*long*/ drawInteriorWithFrameInViewProc = OS.drawInteriorWithFrame_inView_CALLBACK (proc4);
- int /*long*/ drawWithFrameInViewProc = OS.drawWithFrame_inView_CALLBACK (proc4);
- int /*long*/ imageRectForBoundsProc = OS.imageRectForBounds_CALLBACK (proc3);
- int /*long*/ titleRectForBoundsProc = OS.titleRectForBounds_CALLBACK (proc3);
- int /*long*/ hitTestForEvent_inRect_ofViewProc = OS.hitTestForEvent_inRect_ofView_CALLBACK (proc5);
- int /*long*/ cellSizeProc = OS.cellSize_CALLBACK (proc2);
- int /*long*/ drawImageWithFrameInViewProc = OS.drawImage_withFrame_inView_CALLBACK (proc5);
- int /*long*/ setFrameOriginProc = OS.setFrameOrigin_CALLBACK(proc3);
- int /*long*/ setFrameSizeProc = OS.setFrameSize_CALLBACK(proc3);
- int /*long*/ hitTestProc = OS.hitTest_CALLBACK(proc3);
- int /*long*/ markedRangeProc = OS.markedRange_CALLBACK(proc2);
- int /*long*/ selectedRangeProc = OS.selectedRange_CALLBACK(proc2);
- int /*long*/ highlightSelectionInClipRectProc = OS.highlightSelectionInClipRect_CALLBACK(proc3);
- int /*long*/ setMarkedText_selectedRangeProc = OS.setMarkedText_selectedRange_CALLBACK(proc4);
- int /*long*/ attributedSubstringFromRangeProc = OS.attributedSubstringFromRange_CALLBACK(proc3);
- int /*long*/ characterIndexForPointProc = OS.characterIndexForPoint_CALLBACK(proc3);
- int /*long*/ firstRectForCharacterRangeProc = OS.firstRectForCharacterRange_CALLBACK(proc3);
- int /*long*/ textWillChangeSelectionProc = OS.textView_willChangeSelectionFromCharacterRange_toCharacterRange_CALLBACK(proc5);
- int /*long*/ accessibilityHitTestProc = OS.accessibilityHitTest_CALLBACK(proc3);
- int /*long*/ shouldChangeTextInRange_replacementString_Proc = OS.shouldChangeTextInRange_replacementString_CALLBACK(fieldEditorProc4);
+ int /*long*/ drawRectProc = OS.CALLBACK_drawRect_(proc3);
+ int /*long*/ drawInteriorWithFrameInViewProc = OS.CALLBACK_drawInteriorWithFrame_inView_ (proc4);
+ int /*long*/ drawWithFrameInViewProc = OS.CALLBACK_drawWithFrame_inView_ (proc4);
+ int /*long*/ imageRectForBoundsProc = OS.CALLBACK_imageRectForBounds_ (proc3);
+ int /*long*/ titleRectForBoundsProc = OS.CALLBACK_titleRectForBounds_ (proc3);
+ int /*long*/ hitTestForEvent_inRect_ofViewProc = OS.CALLBACK_hitTestForEvent_inRect_ofView_ (proc5);
+ int /*long*/ cellSizeProc = OS.CALLBACK_cellSize (proc2);
+ int /*long*/ drawImageWithFrameInViewProc = OS.CALLBACK_drawImage_withFrame_inView_ (proc5);
+ int /*long*/ setFrameOriginProc = OS.CALLBACK_setFrameOrigin_(proc3);
+ int /*long*/ setFrameSizeProc = OS.CALLBACK_setFrameSize_(proc3);
+ int /*long*/ hitTestProc = OS.CALLBACK_hitTest_(proc3);
+ int /*long*/ markedRangeProc = OS.CALLBACK_markedRange (proc2);
+ int /*long*/ selectedRangeProc = OS.CALLBACK_selectedRange (proc2);
+ int /*long*/ highlightSelectionInClipRectProc = OS.CALLBACK_highlightSelectionInClipRect_ (proc3);
+ int /*long*/ setMarkedText_selectedRangeProc = OS.CALLBACK_setMarkedText_selectedRange_(proc4);
+ int /*long*/ attributedSubstringFromRangeProc = OS.CALLBACK_attributedSubstringFromRange_(proc3);
+ int /*long*/ characterIndexForPointProc = OS.CALLBACK_characterIndexForPoint_(proc3);
+ int /*long*/ firstRectForCharacterRangeProc = OS.CALLBACK_firstRectForCharacterRange_(proc3);
+ int /*long*/ textWillChangeSelectionProc = OS.CALLBACK_textView_willChangeSelectionFromCharacterRange_toCharacterRange_(proc5);
+ int /*long*/ accessibilityHitTestProc = OS.CALLBACK_accessibilityHitTest_(proc3);
+ int /*long*/ shouldChangeTextInRange_replacementString_Proc = OS.CALLBACK_shouldChangeTextInRange_replacementString_(fieldEditorProc4);
int /*long*/ shouldChangeTextInRange_replacementString_fieldEditorProc = shouldChangeTextInRange_replacementString_Proc;
- int /*long*/ view_stringForToolTip_point_userDataProc = OS.view_stringForToolTip_point_userData_CALLBACK(proc6);
- int /*long*/ canDragRowsWithIndexes_atPoint_Proc = OS.canDragRowsWithIndexes_atPoint_CALLBACK(proc4);
- int /*long*/ setNeedsDisplayInRectProc = OS.setNeedsDisplayInRect_CALLBACK(proc3);
- int /*long*/ expansionFrameWithFrameProc = OS.expansionFrameWithFrameProc_CALLBACK (proc4);
+ int /*long*/ view_stringForToolTip_point_userDataProc = OS.CALLBACK_view_stringForToolTip_point_userData_(proc6);
+ int /*long*/ canDragRowsWithIndexes_atPoint_Proc = OS.CALLBACK_canDragRowsWithIndexes_atPoint_(proc4);
+ int /*long*/ setNeedsDisplayInRectProc = OS.CALLBACK_setNeedsDisplayInRect_(proc3);
+ int /*long*/ expansionFrameWithFrameProc = OS.CALLBACK_expansionFrameWithFrame_inView_ (proc4);
byte[] types = {'*','\0'};
int size = C.PTR_SIZEOF, align = C.PTR_SIZEOF == 4 ? 2 : 3;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
index ac42a12411..27a14b0aa2 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Spinner.java
@@ -240,7 +240,12 @@ public Point computeSize (int wHint, int hHint, boolean changed) {
*/
public void copy () {
checkWidget ();
- textView.window().fieldEditor(false, textView).copy(null);
+ NSText fieldEditor = textView.currentEditor();
+ if (fieldEditor != null) {
+ fieldEditor.copy(null);
+ } else {
+ //TODO
+ }
}
void createHandle () {
@@ -282,7 +287,12 @@ void createHandle () {
public void cut () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) return;
- textView.window().fieldEditor(false, textView).cut(null);
+ NSText fieldEditor = textView.currentEditor();
+ if (fieldEditor != null) {
+ fieldEditor.cut(null);
+ } else {
+ //TODO
+ }
}
void enableWidget (boolean enabled) {
@@ -505,7 +515,12 @@ boolean isEventView (int /*long*/ id) {
public void paste () {
checkWidget ();
if ((style & SWT.READ_ONLY) != 0) return;
- textView.window().fieldEditor(false, textView).paste(null);
+ NSText fieldEditor = textView.currentEditor();
+ if (fieldEditor != null) {
+ fieldEditor.paste(null);
+ } else {
+ //TODO
+ }
}
void register () {
@@ -866,10 +881,8 @@ void setSelection (int value, boolean setPos, boolean setText, boolean notify) {
NSRange selection = new NSRange();
selection.location = 0;
selection.length = string.length();
- if (textView.window() != null) {
- NSText fieldEditor = textView.window().fieldEditor(false, textView);
- if (fieldEditor != null) fieldEditor.setSelectedRange(selection);
- }
+ NSText fieldEditor = textView.currentEditor();
+ if (fieldEditor != null) fieldEditor.setSelectedRange(selection);
sendEvent (SWT.Modify);
}
if (notify) postEvent (SWT.Selection);
@@ -880,47 +893,6 @@ void setSmallSize () {
buttonView.cell ().setControlSize (OS.NSSmallControlSize);
}
-char [] setText (String string, int /*long*/ start, int /*long*/ end, boolean notify) {
- if (notify) {
- if (hooks (SWT.Verify) || filters (SWT.Verify)) {
- string = verifyText (string, (int)/*64*/start, (int)/*64*/end, null);
- if (string == null) return null;
- }
- }
-
- int /*long*/ charCount = textView.stringValue().length();
- int /*long*/ length = string.length ();
- if (textLimit != LIMIT) {
- if (charCount - (end - start) + length > textLimit) {
- length = textLimit - charCount + (end - start);
- }
- }
- char [] text = new char [(int)/*64*/(charCount - (end - start) + length)];
- NSRange range = new NSRange();
- range.location = 0;
- range.length = start;
- char [] buffer = new char [(int)/*64*/range.length];
- textView.stringValue().getCharacters(buffer, range);
- System.arraycopy (buffer, 0, text, 0, (int)/*64*/range.length);
- string.getChars (0, (int)/*64*/length, text, (int)/*64*/start);
- range.location = end;
- range.length = charCount - end;
- buffer = new char [(int)/*64*/range.length];
- textView.stringValue().getCharacters(buffer, range);
- System.arraycopy (buffer, 0, text, (int)/*64*/(start + length), (int)/*64*/range.length);
-
- /* Copying the return value to buffer */
- range.location = start;
- range.length = end - start;
- buffer = new char [(int)/*64*/range.length];
- textView.stringValue().getCharacters(buffer, range);
-
- NSString newText = NSString.stringWithCharacters(text, text.length);
- textView.setStringValue(newText);
- if (notify) sendEvent (SWT.Modify);
- return buffer;
-}
-
/**
* Sets the maximum number of characters that the receiver's
* text field is capable of holding to be the argument.
@@ -1001,18 +973,20 @@ boolean shouldChangeTextInRange_replacementString(int /*long*/ id, int /*long*/
if (text != newText) {
int length = newText.length();
NSText fieldEditor = textView.currentEditor ();
- NSRange selectedRange = fieldEditor.selectedRange();
- if (textLimit != LIMIT) {
- int /*long*/ charCount = fieldEditor.string().length();
- if (charCount - selectedRange.length + length > textLimit) {
- length = (int)/*64*/(textLimit - charCount + selectedRange.length);
+ if (fieldEditor != null) {
+ NSRange selectedRange = fieldEditor.selectedRange();
+ if (textLimit != LIMIT) {
+ int /*long*/ charCount = fieldEditor.string().length();
+ if (charCount - selectedRange.length + length > textLimit) {
+ length = (int)/*64*/(textLimit - charCount + selectedRange.length);
+ }
}
+ char [] buffer = new char [length];
+ newText.getChars (0, buffer.length, buffer, 0);
+ NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
+ fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
+ result = false;
}
- char [] buffer = new char [length];
- newText.getChars (0, buffer.length, buffer, 0);
- NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
- fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
- result = false;
}
if (!result) sendEvent (SWT.Modify);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
index 2b8c25f362..45c489a387 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java
@@ -1193,8 +1193,8 @@ void insertEditText (String string) {
char [] buffer = new char [length];
string.getChars (0, buffer.length, buffer, 0);
NSString nsstring = NSString.stringWithCharacters (buffer, buffer.length);
- NSText editor = ((NSTextField) view).currentEditor ();
- editor.replaceCharactersInRange (editor.selectedRange (), nsstring);
+ NSText fieldEditor = ((NSTextField) view).currentEditor ();
+ if (fieldEditor != null) fieldEditor.replaceCharactersInRange (fieldEditor.selectedRange (), nsstring);
selectionRange = null;
} else {
String oldText = getText ();
@@ -1672,9 +1672,9 @@ public void setSelection (int start, int end) {
selectionRange = new NSRange ();
selectionRange.location = selStart;
selectionRange.length = selEnd - selStart;
- if (this == display.getFocusControl ()) {
- NSText editor = view.window ().fieldEditor (false, view);
- editor.setSelectedRange (selectionRange);
+ NSText fieldEditor = ((NSControl)view).currentEditor();
+ if (fieldEditor != null) {
+ fieldEditor.setSelectedRange (selectionRange);
}
} else {
int length = (int)/*64*/((NSTextView) view).textStorage ().length ();