Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Kovatch2008-10-24 05:33:03 +0000
committerScott Kovatch2008-10-24 05:33:03 +0000
commitf059eca39b2172be0b6301e4c573d020aed8a169 (patch)
tree94b1a2c1209cdf3a69dc93a0bf19909b6ad2aedc
parent6faa15a3fc8cb7ad5393ff518a7b57813f30c2f8 (diff)
downloadeclipse.platform.swt-f059eca39b2172be0b6301e4c573d020aed8a169.tar.gz
eclipse.platform.swt-f059eca39b2172be0b6301e4c573d020aed8a169.tar.xz
eclipse.platform.swt-f059eca39b2172be0b6301e4c573d020aed8a169.zip
251149, 251766 - Add accessibility overrides to the NSCell specializations of controls so the Accessible can override the default values. Toolbar items now report their correct role and do not report a subrole as they aren't the toolbar toggle on the titlebar of a window.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c23
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_custom.c14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras36
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras112
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java21
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java33
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java10
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java11
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java2
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java59
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Display.java47
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java4
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java20
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java17
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java11
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java16
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java18
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java100
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java2
37 files changed, 553 insertions, 136 deletions
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 c1e8a4efa9..1f83d8f2ee 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
@@ -5075,6 +5075,29 @@ fail:
}
#endif
+#if (!defined(NO_objc_1msgSend_1bool__IIS) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1bool__JJS) && defined(JNI64))
+#ifndef JNI64
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__IIS)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jshort arg2)
+#else
+JNIEXPORT jboolean JNICALL OS_NATIVE(objc_1msgSend_1bool__JJS)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jshort arg2)
+#endif
+{
+ jboolean rc = 0;
+#ifndef JNI64
+ OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__IIS_FUNC);
+#else
+ OS_NATIVE_ENTER(env, that, objc_1msgSend_1bool__JJS_FUNC);
+#endif
+ rc = (jboolean)((BOOL (*)(jintLong, jintLong, jshort))objc_msgSend_bool)(arg0, arg1, arg2);
+#ifndef JNI64
+ OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__IIS_FUNC);
+#else
+ OS_NATIVE_EXIT(env, that, objc_1msgSend_1bool__JJS_FUNC);
+#endif
+ return rc;
+}
+#endif
+
#if (!defined(NO_objc_1msgSend_1fpret__II) && !defined(JNI64)) || (!defined(NO_objc_1msgSend_1fpret__JJ) && defined(JNI64))
#ifndef JNI64
JNIEXPORT jdouble JNICALL OS_NATIVE(objc_1msgSend_1fpret__II)(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
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 ea4b4f686c..729f576dfd 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
@@ -89,6 +89,20 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(drawInteriorWithFrame_1inView_1CALLBACK)
}
#endif
+#ifndef NO_class_1getName
+JNIEXPORT jstring JNICALL OS_NATIVE(class_1getName)
+(JNIEnv *env, jclass that, jintLong arg0)
+{
+ jstring rc = 0;
+ OS_NATIVE_ENTER(env, that, class_1getName_FUNC);
+ const char *className = class_getName((Class)arg0);
+ if (className != NULL) rc = (*env)->NewStringUTF(env, className);
+ OS_NATIVE_EXIT(env, that, class_1getName_FUNC);
+ return rc;
+}
+#endif
+
+
#ifndef NO_setFrame_1CALLBACK
static jintLong setFrame_1CALLBACK;
static void setFrame(id obj, SEL sel, NSRect rect)
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 b6b2de1fd7..12e74ef4b8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c
@@ -14,8 +14,8 @@
#ifdef NATIVE_STATS
-int OS_nativeFunctionCount = 354;
-int OS_nativeFunctionCallCount[354];
+int OS_nativeFunctionCount = 356;
+int OS_nativeFunctionCallCount[356];
char * OS_nativeFunctionNames[] = {
"CFRelease",
"CFURLCreateStringByAddingPercentEscapes",
@@ -226,6 +226,7 @@ char * OS_nativeFunctionNames[] = {
"class_1addMethod",
"class_1addProtocol",
"class_1getMethodImplementation",
+ "class_1getName",
"dragSelectionWithEvent_1offset_1slideBack_1CALLBACK",
"draggedImage_1beganAt_1CALLBACK",
"draggedImage_1endedAt_1operation_1CALLBACK",
@@ -686,6 +687,11 @@ char * OS_nativeFunctionNames[] = {
"objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2",
#endif
#ifndef JNI64
+ "objc_1msgSend_1bool__IIS",
+#else
+ "objc_1msgSend_1bool__JJS",
+#endif
+#ifndef JNI64
"objc_1msgSend_1fpret__II",
#else
"objc_1msgSend_1fpret__JJ",
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 6f1c8629bc..faa5c0bc61 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
@@ -234,6 +234,7 @@ typedef enum {
class_1addMethod_FUNC,
class_1addProtocol_FUNC,
class_1getMethodImplementation_FUNC,
+ class_1getName_FUNC,
dragSelectionWithEvent_1offset_1slideBack_1CALLBACK_FUNC,
draggedImage_1beganAt_1CALLBACK_FUNC,
draggedImage_1endedAt_1operation_1CALLBACK_FUNC,
@@ -694,6 +695,11 @@ typedef enum {
objc_1msgSend_1bool__JJLorg_eclipse_swt_internal_cocoa_NSRect_2_FUNC,
#endif
#ifndef JNI64
+ objc_1msgSend_1bool__IIS_FUNC,
+#else
+ objc_1msgSend_1bool__JJS_FUNC,
+#endif
+#ifndef JNI64
objc_1msgSend_1fpret__II_FUNC,
#else
objc_1msgSend_1fpret__JJ_FUNC,
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 fee655f3e6..100e0e370e 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
@@ -3987,8 +3987,8 @@
<method selector="title">
<retval></retval>
</method>
- <method selector="titleCell">
- <retval swt_java_type="NSCell"></retval>
+ <method selector="titleCell" swt_gen="true">
+ <retval swt_gen="true" swt_java_type="NSCell"></retval>
</method>
<method selector="titleFont">
<retval></retval>
@@ -5187,9 +5187,9 @@
<arg name="fontObj" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setFormatter:">
- <arg name="newFormatter"></arg>
- <retval></retval>
+ <method selector="setFormatter:" swt_gen="true">
+ <arg name="newFormatter" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setHighlighted:" swt_gen="true">
<arg name="flag" swt_gen="true"></arg>
@@ -6450,8 +6450,8 @@
<method selector="cell" swt_gen="true">
<retval swt_gen="true" swt_java_type="NSCell"></retval>
</method>
- <method class_method="true" selector="cellClass">
- <retval></retval>
+ <method class_method="true" selector="cellClass" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
<method selector="currentEditor" swt_gen="true">
<retval swt_gen="true"></retval>
@@ -6548,9 +6548,9 @@
<arg name="aCell"></arg>
<retval></retval>
</method>
- <method class_method="true" selector="setCellClass:">
- <arg name="factoryId"></arg>
- <retval></retval>
+ <method class_method="true" selector="setCellClass:" swt_gen="true">
+ <arg name="factoryId" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setContinuous:">
<arg name="flag"></arg>
@@ -6578,9 +6578,9 @@
<arg name="fontObj" swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="setFormatter:">
- <arg name="newFormatter"></arg>
- <retval></retval>
+ <method selector="setFormatter:" swt_gen="true">
+ <arg name="newFormatter" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setIgnoresMultiClick:">
<arg name="flag"></arg>
@@ -6605,9 +6605,9 @@
<arg name="flag"></arg>
<retval></retval>
</method>
- <method selector="setStringValue:">
- <arg name="aString"></arg>
- <retval></retval>
+ <method selector="setStringValue:" swt_gen="true">
+ <arg name="aString" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setTag:">
<arg name="anInt"></arg>
@@ -6620,8 +6620,8 @@
<method selector="sizeToFit" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
- <method selector="stringValue">
- <retval></retval>
+ <method selector="stringValue" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
<method selector="tag">
<retval></retval>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras
index c713ac6751..ff4f5d4b48 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras
@@ -2851,7 +2851,7 @@
<retval></retval>
</method>
</class>
- <class name="NSCharacterSet">
+ <class name="NSCharacterSet" swt_gen="mixed">
<method class_method="true" selector="alphanumericCharacterSet">
<retval></retval>
</method>
@@ -2861,9 +2861,9 @@
<method class_method="true" selector="capitalizedLetterCharacterSet">
<retval></retval>
</method>
- <method selector="characterIsMember:">
- <arg name="aCharacter"></arg>
- <retval></retval>
+ <method selector="characterIsMember:" swt_gen="true">
+ <arg name="aCharacter" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="characterSetWithBitmapRepresentation:">
<arg name="data"></arg>
@@ -2884,8 +2884,8 @@
<method class_method="true" selector="controlCharacterSet">
<retval></retval>
</method>
- <method class_method="true" selector="decimalDigitCharacterSet">
- <retval></retval>
+ <method class_method="true" selector="decimalDigitCharacterSet" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="decomposableCharacterSet">
<retval></retval>
@@ -5110,7 +5110,7 @@
<retval></retval>
</method>
</class>
- <class name="NSFormatter">
+ <class name="NSFormatter" swt_gen="mixed">
<method selector="attributedStringForObjectValue:withDefaultAttributes:">
<arg name="obj"></arg>
<arg name="attrs"></arg>
@@ -5140,9 +5140,9 @@
<arg name="error"></arg>
<retval></retval>
</method>
- <method selector="stringForObjectValue:">
- <arg name="obj"></arg>
- <retval></retval>
+ <method selector="stringForObjectValue:" swt_gen="true">
+ <arg name="obj" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
</class>
<class name="NSGarbageCollector">
@@ -6269,9 +6269,9 @@
<arg name="range"></arg>
<retval></retval>
</method>
- <method selector="removeObjectAtIndex:">
- <arg name="index"></arg>
- <retval></retval>
+ <method selector="removeObjectAtIndex:" swt_gen="true">
+ <arg name="index" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="removeObjectIdenticalTo:">
<arg name="anObject"></arg>
@@ -7127,12 +7127,12 @@
<retval></retval>
</method>
</class>
- <class name="NSNumberFormatter" swt_superclass="NSFormatter">
- <method selector="allowsFloats">
- <retval></retval>
+ <class name="NSNumberFormatter" swt_gen="mixed" swt_superclass="NSFormatter">
+ <method selector="allowsFloats" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
- <method selector="alwaysShowsDecimalSeparator">
- <retval></retval>
+ <method selector="alwaysShowsDecimalSeparator" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
<method selector="attributedStringForNil">
<retval></retval>
@@ -7155,8 +7155,8 @@
<method selector="currencySymbol">
<retval></retval>
</method>
- <method selector="decimalSeparator">
- <retval></retval>
+ <method selector="decimalSeparator" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
<method class_method="true" selector="defaultFormatterBehavior">
<retval></retval>
@@ -7210,20 +7210,20 @@
<method selector="localizesFormat">
<retval></retval>
</method>
- <method selector="maximum">
- <retval></retval>
+ <method selector="maximum" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
- <method selector="maximumFractionDigits">
- <retval></retval>
+ <method selector="maximumFractionDigits" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
- <method selector="maximumIntegerDigits">
- <retval></retval>
+ <method selector="maximumIntegerDigits" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
<method selector="maximumSignificantDigits">
<retval></retval>
</method>
- <method selector="minimum">
- <retval></retval>
+ <method selector="minimum" swt_gen="true">
+ <retval swt_gen="true"></retval>
</method>
<method selector="minimumFractionDigits">
<retval></retval>
@@ -7304,9 +7304,9 @@
<method selector="secondaryGroupingSize">
<retval></retval>
</method>
- <method selector="setAllowsFloats:">
- <arg name="flag"></arg>
- <retval></retval>
+ <method selector="setAllowsFloats:" swt_gen="true">
+ <arg name="flag" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setAlwaysShowsDecimalSeparator:">
<arg name="b"></arg>
@@ -7396,33 +7396,33 @@
<arg name="flag"></arg>
<retval></retval>
</method>
- <method selector="setMaximum:">
- <arg name="number"></arg>
- <retval></retval>
+ <method selector="setMaximum:" swt_gen="true">
+ <arg name="number" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
- <method selector="setMaximumFractionDigits:">
- <arg name="number"></arg>
- <retval></retval>
+ <method selector="setMaximumFractionDigits:" swt_gen="true">
+ <arg name="number" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
- <method selector="setMaximumIntegerDigits:">
- <arg name="number"></arg>
- <retval></retval>
+ <method selector="setMaximumIntegerDigits:" swt_gen="true">
+ <arg name="number" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setMaximumSignificantDigits:">
<arg name="number"></arg>
<retval></retval>
</method>
- <method selector="setMinimum:">
- <arg name="number"></arg>
- <retval></retval>
+ <method selector="setMinimum:" swt_gen="true">
+ <arg name="number" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
- <method selector="setMinimumFractionDigits:">
- <arg name="number"></arg>
- <retval></retval>
+ <method selector="setMinimumFractionDigits:" swt_gen="true">
+ <arg name="number" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
- <method selector="setMinimumIntegerDigits:">
- <arg name="number"></arg>
- <retval></retval>
+ <method selector="setMinimumIntegerDigits:" swt_gen="true">
+ <arg name="number" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setMinimumSignificantDigits:">
<arg name="number"></arg>
@@ -7460,9 +7460,9 @@
<arg name="string"></arg>
<retval></retval>
</method>
- <method selector="setNumberStyle:">
- <arg name="style"></arg>
- <retval></retval>
+ <method selector="setNumberStyle:" swt_gen="true">
+ <arg name="style" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setPaddingCharacter:">
<arg name="string"></arg>
@@ -7472,9 +7472,9 @@
<arg name="position"></arg>
<retval></retval>
</method>
- <method selector="setPartialStringValidationEnabled:">
- <arg name="b"></arg>
- <retval></retval>
+ <method selector="setPartialStringValidationEnabled:" swt_gen="true">
+ <arg name="b" swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
</method>
<method selector="setPerMillSymbol:">
<arg name="string"></arg>
@@ -10435,7 +10435,7 @@
</method>
<method selector="characterAtIndex:" swt_gen="true">
<arg name="index" swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
+ <retval swt_gen="true" swt_java_type="int" swt_java_type64="long"></retval>
</method>
<method selector="commonPrefixWithString:options:">
<arg name="aString"></arg>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java
index f1fd673cef..d2238e21e9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java
@@ -70,4 +70,9 @@ public void sizeToFit() {
OS.objc_msgSend(this.id, OS.sel_sizeToFit);
}
+public NSCell titleCell() {
+ int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_titleCell);
+ return result != 0 ? new NSCell(result) : null;
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java
index 77e42a98ec..0b42664cf4 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSButton.java
@@ -64,4 +64,12 @@ public int /*long*/ state() {
return OS.objc_msgSend(this.id, OS.sel_state);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSButton, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSButton, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java
index ea741e98d0..6004bebc54 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSCell.java
@@ -52,6 +52,10 @@ public void setFont(NSFont fontObj) {
OS.objc_msgSend(this.id, OS.sel_setFont_, fontObj != null ? fontObj.id : 0);
}
+public void setFormatter(NSFormatter newFormatter) {
+ OS.objc_msgSend(this.id, OS.sel_setFormatter_, newFormatter != null ? newFormatter.id : 0);
+}
+
public void setHighlighted(boolean flag) {
OS.objc_msgSend(this.id, OS.sel_setHighlighted_, flag);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java
index c9b372355e..ef52ab86ba 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSComboBox.java
@@ -69,4 +69,12 @@ public void setNumberOfVisibleItems(int /*long*/ visibleItems) {
OS.objc_msgSend(this.id, OS.sel_setNumberOfVisibleItems_, visibleItems);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSComboBox, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSComboBox, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java
index 816a4c7954..83f87efbf2 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSControl.java
@@ -33,6 +33,10 @@ public NSCell cell() {
return result != 0 ? new NSCell(result) : null;
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSControl, OS.sel_cellClass);
+}
+
public NSText currentEditor() {
int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_currentEditor);
return result != 0 ? new NSText(result) : null;
@@ -59,6 +63,10 @@ public void setAlignment(int /*long*/ mode) {
OS.objc_msgSend(this.id, OS.sel_setAlignment_, mode);
}
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSControl, OS.sel_setCellClass_, factoryId);
+}
+
public void setDoubleValue(double aDouble) {
OS.objc_msgSend(this.id, OS.sel_setDoubleValue_, aDouble);
}
@@ -71,6 +79,14 @@ public void setFont(NSFont fontObj) {
OS.objc_msgSend(this.id, OS.sel_setFont_, fontObj != null ? fontObj.id : 0);
}
+public void setFormatter(NSFormatter newFormatter) {
+ OS.objc_msgSend(this.id, OS.sel_setFormatter_, newFormatter != null ? newFormatter.id : 0);
+}
+
+public void setStringValue(NSString aString) {
+ OS.objc_msgSend(this.id, OS.sel_setStringValue_, aString != null ? aString.id : 0);
+}
+
public void setTarget(id anObject) {
OS.objc_msgSend(this.id, OS.sel_setTarget_, anObject != null ? anObject.id : 0);
}
@@ -79,6 +95,11 @@ public void sizeToFit() {
OS.objc_msgSend(this.id, OS.sel_sizeToFit);
}
+public NSString stringValue() {
+ int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_stringValue);
+ return result != 0 ? new NSString(result) : null;
+}
+
public id target() {
int /*long*/ result = OS.objc_msgSend(this.id, OS.sel_target);
return result != 0 ? new id(result) : null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java
index 7d32a7cc04..d366d2c07a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSDatePicker.java
@@ -53,4 +53,12 @@ public void setTextColor(NSColor color) {
OS.objc_msgSend(this.id, OS.sel_setTextColor_, color != null ? color.id : 0);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSDatePicker, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSDatePicker, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java
index ab983af669..bc7b1e1d6d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageView.java
@@ -36,4 +36,12 @@ public void setImageScaling(int /*long*/ newScaling) {
OS.objc_msgSend(this.id, OS.sel_setImageScaling_, newScaling);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSImageView, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSImageView, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java
index fab14bb92d..dadd58babf 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSMutableArray.java
@@ -41,6 +41,10 @@ public void removeObject(id anObject) {
OS.objc_msgSend(this.id, OS.sel_removeObject_, anObject != null ? anObject.id : 0);
}
+public void removeObjectAtIndex(int /*long*/ index) {
+ OS.objc_msgSend(this.id, OS.sel_removeObjectAtIndex_, index);
+}
+
public static NSArray array() {
int /*long*/ result = OS.objc_msgSend(OS.class_NSMutableArray, OS.sel_array);
return result != 0 ? new NSArray(result) : null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java
index e873e73714..4d6862f42b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSOutlineView.java
@@ -78,4 +78,12 @@ public void setOutlineTableColumn(NSTableColumn outlineTableColumn) {
OS.objc_msgSend(this.id, OS.sel_setOutlineTableColumn_, outlineTableColumn != null ? outlineTableColumn.id : 0);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSOutlineView, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSOutlineView, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java
index f6e0431c33..531343a01b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPopUpButton.java
@@ -81,4 +81,12 @@ public NSString titleOfSelectedItem() {
return result != 0 ? new NSString(result) : null;
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSPopUpButton, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSPopUpButton, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java
index 6e6b7d97df..d2a1861d78 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSScroller.java
@@ -36,4 +36,12 @@ public void setFloatValue(float aFloat, float /*double*/ proportion) {
OS.objc_msgSend(this.id, OS.sel_setFloatValue_knobProportion_, aFloat, proportion);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSScroller, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSScroller, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java
index 0be6a22f27..a93f458f94 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSearchField.java
@@ -29,4 +29,12 @@ public NSArray recentSearches() {
return result != 0 ? new NSArray(result) : null;
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSSearchField, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSSearchField, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java
index ff6f482c3d..fd94834e21 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSecureTextField.java
@@ -24,4 +24,12 @@ public NSSecureTextField(id id) {
super(id);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSSecureTextField, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSSecureTextField, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java
index c8c5923b1b..909b7a4ae5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSSlider.java
@@ -40,4 +40,12 @@ public void setMinValue(double aDouble) {
OS.objc_msgSend(this.id, OS.sel_setMinValue_, aDouble);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSSlider, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSSlider, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java
index 2e96d1ce04..5ec62cdffa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSStepper.java
@@ -52,4 +52,12 @@ public void setValueWraps(boolean valueWraps) {
OS.objc_msgSend(this.id, OS.sel_setValueWraps_, valueWraps);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSStepper, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSStepper, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java
index 26ef5c6444..05dd22e16a 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableView.java
@@ -206,4 +206,12 @@ public boolean usesAlternatingRowBackgroundColors() {
return OS.objc_msgSend_bool(this.id, OS.sel_usesAlternatingRowBackgroundColors);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSTableView, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSTableView, OS.sel_setCellClass_, factoryId);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java
index c6954d0f26..f9b6756aa6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextField.java
@@ -52,4 +52,12 @@ public void setTextColor(NSColor color) {
OS.objc_msgSend(this.id, OS.sel_setTextColor_, color != null ? color.id : 0);
}
+public static int /*long*/ cellClass() {
+ return OS.objc_msgSend(OS.class_NSTextField, OS.sel_cellClass);
+}
+
+public static void setCellClass(int /*long*/ factoryId) {
+ OS.objc_msgSend(OS.class_NSTextField, OS.sel_setCellClass_, factoryId);
+}
+
}
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 8c27f87ebf..91889feda9 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
@@ -185,6 +185,8 @@ public static final native boolean class_addProtocol(int /*long*/ cls, int /*lon
* @param name cast=(SEL)
*/
public static final native int /*long*/ class_getMethodImplementation(int /*long*/ cls, int /*long*/ name);
+/** @method flags=no_gen */
+public static final native String class_getName(int /*long*/ cls);
/** @method flags=dynamic */
public static final native void instrumentObjcMessageSends(boolean val);
/** @param superclass cast=(Class) */
@@ -272,6 +274,7 @@ public static final int /*long*/ class_NSButton = objc_getClass("NSButton");
public static final int /*long*/ class_NSButtonCell = objc_getClass("NSButtonCell");
public static final int /*long*/ class_NSCalendarDate = objc_getClass("NSCalendarDate");
public static final int /*long*/ class_NSCell = objc_getClass("NSCell");
+public static final int /*long*/ class_NSCharacterSet = objc_getClass("NSCharacterSet");
public static final int /*long*/ class_NSClipView = objc_getClass("NSClipView");
public static final int /*long*/ class_NSCoder = objc_getClass("NSCoder");
public static final int /*long*/ class_NSColor = objc_getClass("NSColor");
@@ -292,6 +295,7 @@ public static final int /*long*/ class_NSFileManager = objc_getClass("NSFileMana
public static final int /*long*/ class_NSFont = objc_getClass("NSFont");
public static final int /*long*/ class_NSFontManager = objc_getClass("NSFontManager");
public static final int /*long*/ class_NSFontPanel = objc_getClass("NSFontPanel");
+public static final int /*long*/ class_NSFormatter = objc_getClass("NSFormatter");
public static final int /*long*/ class_NSGradient = objc_getClass("NSGradient");
public static final int /*long*/ class_NSGraphicsContext = objc_getClass("NSGraphicsContext");
public static final int /*long*/ class_NSHTTPCookie = objc_getClass("NSHTTPCookie");
@@ -317,6 +321,7 @@ public static final int /*long*/ class_NSMutableURLRequest = objc_getClass("NSMu
public static final int /*long*/ class_NSNotification = objc_getClass("NSNotification");
public static final int /*long*/ class_NSNotificationCenter = objc_getClass("NSNotificationCenter");
public static final int /*long*/ class_NSNumber = objc_getClass("NSNumber");
+public static final int /*long*/ class_NSNumberFormatter = objc_getClass("NSNumberFormatter");
public static final int /*long*/ class_NSObject = objc_getClass("NSObject");
public static final int /*long*/ class_NSOpenGLContext = objc_getClass("NSOpenGLContext");
public static final int /*long*/ class_NSOpenGLPixelFormat = objc_getClass("NSOpenGLPixelFormat");
@@ -457,10 +462,12 @@ public static final int /*long*/ sel_alertWithMessageText_defaultButton_alternat
public static final int /*long*/ sel_alignment = sel_registerName("alignment");
public static final int /*long*/ sel_allKeys = sel_registerName("allKeys");
public static final int /*long*/ sel_alloc = sel_registerName("alloc");
+public static final int /*long*/ sel_allowsFloats = sel_registerName("allowsFloats");
public static final int /*long*/ sel_alphaComponent = sel_registerName("alphaComponent");
public static final int /*long*/ sel_alphaValue = sel_registerName("alphaValue");
public static final int /*long*/ sel_altKey = sel_registerName("altKey");
public static final int /*long*/ sel_alternateSelectedControlTextColor = sel_registerName("alternateSelectedControlTextColor");
+public static final int /*long*/ sel_alwaysShowsDecimalSeparator = sel_registerName("alwaysShowsDecimalSeparator");
public static final int /*long*/ sel_appendBezierPath_ = sel_registerName("appendBezierPath:");
public static final int /*long*/ sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_ = sel_registerName("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:");
public static final int /*long*/ sel_appendBezierPathWithArcWithCenter_radius_startAngle_endAngle_clockwise_ = sel_registerName("appendBezierPathWithArcWithCenter:radius:startAngle:endAngle:clockwise:");
@@ -520,6 +527,7 @@ public static final int /*long*/ sel_cancel = sel_registerName("cancel");
public static final int /*long*/ sel_cancelTracking = sel_registerName("cancelTracking");
public static final int /*long*/ sel_cascadeTopLeftFromPoint_ = sel_registerName("cascadeTopLeftFromPoint:");
public static final int /*long*/ sel_cell = sel_registerName("cell");
+public static final int /*long*/ sel_cellClass = sel_registerName("cellClass");
public static final int /*long*/ sel_cellSizeForBounds_ = sel_registerName("cellSizeForBounds:");
public static final int /*long*/ sel_changeColor_ = sel_registerName("changeColor:");
public static final int /*long*/ sel_changeFont_ = sel_registerName("changeFont:");
@@ -527,6 +535,7 @@ public static final int /*long*/ sel_charCode = sel_registerName("charCode");
public static final int /*long*/ sel_characterAtIndex_ = sel_registerName("characterAtIndex:");
public static final int /*long*/ sel_characterIndexForGlyphAtIndex_ = sel_registerName("characterIndexForGlyphAtIndex:");
public static final int /*long*/ sel_characterIndexForPoint_ = sel_registerName("characterIndexForPoint:");
+public static final int /*long*/ sel_characterIsMember_ = sel_registerName("characterIsMember:");
public static final int /*long*/ sel_characters = sel_registerName("characters");
public static final int /*long*/ sel_charactersIgnoringModifiers = sel_registerName("charactersIgnoringModifiers");
public static final int /*long*/ sel_chooseFilename_ = sel_registerName("chooseFilename:");
@@ -609,6 +618,8 @@ public static final int /*long*/ sel_dateWithCalendarFormat_timeZone_ = sel_regi
public static final int /*long*/ sel_dateWithTimeIntervalSinceNow_ = sel_registerName("dateWithTimeIntervalSinceNow:");
public static final int /*long*/ sel_dateWithYear_month_day_hour_minute_second_timeZone_ = sel_registerName("dateWithYear:month:day:hour:minute:second:timeZone:");
public static final int /*long*/ sel_dayOfMonth = sel_registerName("dayOfMonth");
+public static final int /*long*/ sel_decimalDigitCharacterSet = sel_registerName("decimalDigitCharacterSet");
+public static final int /*long*/ sel_decimalSeparator = sel_registerName("decimalSeparator");
public static final int /*long*/ sel_declareTypes_owner_ = sel_registerName("declareTypes:owner:");
public static final int /*long*/ sel_defaultCenter = sel_registerName("defaultCenter");
public static final int /*long*/ sel_defaultFlatness = sel_registerName("defaultFlatness");
@@ -838,6 +849,9 @@ public static final int /*long*/ sel_makeKeyAndOrderFront_ = sel_registerName("m
public static final int /*long*/ sel_markedRange = sel_registerName("markedRange");
public static final int /*long*/ sel_markedTextAttributes = sel_registerName("markedTextAttributes");
public static final int /*long*/ sel_maxValue = sel_registerName("maxValue");
+public static final int /*long*/ sel_maximum = sel_registerName("maximum");
+public static final int /*long*/ sel_maximumFractionDigits = sel_registerName("maximumFractionDigits");
+public static final int /*long*/ sel_maximumIntegerDigits = sel_registerName("maximumIntegerDigits");
public static final int /*long*/ sel_menu = sel_registerName("menu");
public static final int /*long*/ sel_menu_willHighlightItem_ = sel_registerName("menu:willHighlightItem:");
public static final int /*long*/ sel_menuDidClose_ = sel_registerName("menuDidClose:");
@@ -846,6 +860,7 @@ public static final int /*long*/ sel_menuNeedsUpdate_ = sel_registerName("menuNe
public static final int /*long*/ sel_menuWillOpen_ = sel_registerName("menuWillOpen:");
public static final int /*long*/ sel_metaKey = sel_registerName("metaKey");
public static final int /*long*/ sel_minValue = sel_registerName("minValue");
+public static final int /*long*/ sel_minimum = sel_registerName("minimum");
public static final int /*long*/ sel_minimumSize = sel_registerName("minimumSize");
public static final int /*long*/ sel_minuteOfHour = sel_registerName("minuteOfHour");
public static final int /*long*/ sel_modifierFlags = sel_registerName("modifierFlags");
@@ -958,6 +973,7 @@ public static final int /*long*/ sel_removeItem_ = sel_registerName("removeItem:
public static final int /*long*/ sel_removeItemAtIndex_ = sel_registerName("removeItemAtIndex:");
public static final int /*long*/ sel_removeItemAtPath_error_ = sel_registerName("removeItemAtPath:error:");
public static final int /*long*/ sel_removeObject_ = sel_registerName("removeObject:");
+public static final int /*long*/ sel_removeObjectAtIndex_ = sel_registerName("removeObjectAtIndex:");
public static final int /*long*/ sel_removeObserver_ = sel_registerName("removeObserver:");
public static final int /*long*/ sel_removeStatusItem_ = sel_registerName("removeStatusItem:");
public static final int /*long*/ sel_removeTabViewItem_ = sel_registerName("removeTabViewItem:");
@@ -1030,6 +1046,7 @@ public static final int /*long*/ sel_setAcceptsMouseMovedEvents_ = sel_registerN
public static final int /*long*/ sel_setAction_ = sel_registerName("setAction:");
public static final int /*long*/ sel_setAlertStyle_ = sel_registerName("setAlertStyle:");
public static final int /*long*/ sel_setAlignment_ = sel_registerName("setAlignment:");
+public static final int /*long*/ sel_setAllowsFloats_ = sel_registerName("setAllowsFloats:");
public static final int /*long*/ sel_setAllowsMixedState_ = sel_registerName("setAllowsMixedState:");
public static final int /*long*/ sel_setAllowsMultipleSelection_ = sel_registerName("setAllowsMultipleSelection:");
public static final int /*long*/ sel_setAlphaValue_ = sel_registerName("setAlphaValue:");
@@ -1053,6 +1070,7 @@ public static final int /*long*/ sel_setButtonType_ = sel_registerName("setButto
public static final int /*long*/ sel_setCacheMode_ = sel_registerName("setCacheMode:");
public static final int /*long*/ sel_setCanChooseDirectories_ = sel_registerName("setCanChooseDirectories:");
public static final int /*long*/ sel_setCanChooseFiles_ = sel_registerName("setCanChooseFiles:");
+public static final int /*long*/ sel_setCellClass_ = sel_registerName("setCellClass:");
public static final int /*long*/ sel_setClip = sel_registerName("setClip");
public static final int /*long*/ sel_setColor_ = sel_registerName("setColor:");
public static final int /*long*/ sel_setColumnAutoresizingStyle_ = sel_registerName("setColumnAutoresizingStyle:");
@@ -1086,6 +1104,7 @@ public static final int /*long*/ sel_setFirstLineHeadIndent_ = sel_registerName(
public static final int /*long*/ sel_setFloatValue_knobProportion_ = sel_registerName("setFloatValue:knobProportion:");
public static final int /*long*/ sel_setFocusRingType_ = sel_registerName("setFocusRingType:");
public static final int /*long*/ sel_setFont_ = sel_registerName("setFont:");
+public static final int /*long*/ sel_setFormatter_ = sel_registerName("setFormatter:");
public static final int /*long*/ sel_setFrame_ = sel_registerName("setFrame:");
public static final int /*long*/ sel_setFrame_display_ = sel_registerName("setFrame:display:");
public static final int /*long*/ sel_setFrameLoadDelegate_ = sel_registerName("setFrameLoadDelegate:");
@@ -1131,20 +1150,28 @@ public static final int /*long*/ sel_setLineWidth_ = sel_registerName("setLineWi
public static final int /*long*/ sel_setMarkedText_selectedRange_ = sel_registerName("setMarkedText:selectedRange:");
public static final int /*long*/ sel_setMaxSize_ = sel_registerName("setMaxSize:");
public static final int /*long*/ sel_setMaxValue_ = sel_registerName("setMaxValue:");
+public static final int /*long*/ sel_setMaximum_ = sel_registerName("setMaximum:");
+public static final int /*long*/ sel_setMaximumFractionDigits_ = sel_registerName("setMaximumFractionDigits:");
+public static final int /*long*/ sel_setMaximumIntegerDigits_ = sel_registerName("setMaximumIntegerDigits:");
public static final int /*long*/ sel_setMenu_ = sel_registerName("setMenu:");
public static final int /*long*/ sel_setMinSize_ = sel_registerName("setMinSize:");
public static final int /*long*/ sel_setMinValue_ = sel_registerName("setMinValue:");
public static final int /*long*/ sel_setMinWidth_ = sel_registerName("setMinWidth:");
+public static final int /*long*/ sel_setMinimum_ = sel_registerName("setMinimum:");
+public static final int /*long*/ sel_setMinimumFractionDigits_ = sel_registerName("setMinimumFractionDigits:");
+public static final int /*long*/ sel_setMinimumIntegerDigits_ = sel_registerName("setMinimumIntegerDigits:");
public static final int /*long*/ sel_setMiterLimit_ = sel_registerName("setMiterLimit:");
public static final int /*long*/ sel_setNeedsDisplay_ = sel_registerName("setNeedsDisplay:");
public static final int /*long*/ sel_setNeedsDisplayInRect_ = sel_registerName("setNeedsDisplayInRect:");
public static final int /*long*/ sel_setNumberOfVisibleItems_ = sel_registerName("setNumberOfVisibleItems:");
+public static final int /*long*/ sel_setNumberStyle_ = sel_registerName("setNumberStyle:");
public static final int /*long*/ sel_setObject_forKey_ = sel_registerName("setObject:forKey:");
public static final int /*long*/ sel_setOnMouseEntered_ = sel_registerName("setOnMouseEntered:");
public static final int /*long*/ sel_setOpaque_ = sel_registerName("setOpaque:");
public static final int /*long*/ sel_setOptions_ = sel_registerName("setOptions:");
public static final int /*long*/ sel_setOutlineTableColumn_ = sel_registerName("setOutlineTableColumn:");
public static final int /*long*/ sel_setPanelFont_isMultiple_ = sel_registerName("setPanelFont:isMultiple:");
+public static final int /*long*/ sel_setPartialStringValidationEnabled_ = sel_registerName("setPartialStringValidationEnabled:");
public static final int /*long*/ sel_setPatternPhase_ = sel_registerName("setPatternPhase:");
public static final int /*long*/ sel_setPixelFormat_ = sel_registerName("setPixelFormat:");
public static final int /*long*/ sel_setPolicyDelegate_ = sel_registerName("setPolicyDelegate:");
@@ -1165,6 +1192,7 @@ public static final int /*long*/ sel_setSize_ = sel_registerName("setSize:");
public static final int /*long*/ sel_setState_ = sel_registerName("setState:");
public static final int /*long*/ sel_setString_ = sel_registerName("setString:");
public static final int /*long*/ sel_setString_forType_ = sel_registerName("setString:forType:");
+public static final int /*long*/ sel_setStringValue_ = sel_registerName("setStringValue:");
public static final int /*long*/ sel_setStroke = sel_registerName("setStroke");
public static final int /*long*/ sel_setSubmenu_ = sel_registerName("setSubmenu:");
public static final int /*long*/ sel_setTabStops_ = sel_registerName("setTabStops:");
@@ -1218,7 +1246,9 @@ public static final int /*long*/ sel_stringByDeletingLastPathComponent = sel_reg
public static final int /*long*/ sel_stringByDeletingPathExtension = sel_registerName("stringByDeletingPathExtension");
public static final int /*long*/ sel_stringByEvaluatingJavaScriptFromString_ = sel_registerName("stringByEvaluatingJavaScriptFromString:");
public static final int /*long*/ sel_stringByReplacingOccurrencesOfString_withString_ = sel_registerName("stringByReplacingOccurrencesOfString:withString:");
+public static final int /*long*/ sel_stringForObjectValue_ = sel_registerName("stringForObjectValue:");
public static final int /*long*/ sel_stringForType_ = sel_registerName("stringForType:");
+public static final int /*long*/ sel_stringValue = sel_registerName("stringValue");
public static final int /*long*/ sel_stringWithCharacters_length_ = sel_registerName("stringWithCharacters:length:");
public static final int /*long*/ sel_stringWithUTF8String_ = sel_registerName("stringWithUTF8String:");
public static final int /*long*/ sel_stroke = sel_registerName("stroke");
@@ -1258,6 +1288,7 @@ public static final int /*long*/ sel_threadDictionary = sel_registerName("thread
public static final int /*long*/ sel_tile = sel_registerName("tile");
public static final int /*long*/ sel_timeZone = sel_registerName("timeZone");
public static final int /*long*/ sel_title = sel_registerName("title");
+public static final int /*long*/ sel_titleCell = sel_registerName("titleCell");
public static final int /*long*/ sel_titleOfSelectedItem = sel_registerName("titleOfSelectedItem");
public static final int /*long*/ sel_titleRectForBounds_ = sel_registerName("titleRectForBounds:");
public static final int /*long*/ sel_transform = sel_registerName("transform");
@@ -3623,6 +3654,8 @@ public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long
/** @method flags=cast */
public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4);
/** @method flags=cast */
+public static final native boolean objc_msgSend_bool(int /*long*/ id, int /*long*/ sel, short arg0);
+/** @method flags=cast */
public static final native double objc_msgSend_fpret(int /*long*/ id, int /*long*/ sel);
/** @method flags=cast */
public static final native double objc_msgSend_fpret(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
index 45a3347191..a01840806a 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Button.java
@@ -248,6 +248,11 @@ void createHandle () {
_setAlignment(style);
}
+void deregister () {
+ super.deregister ();
+ display.removeWidget(((NSControl)view).cell());
+}
+
void drawWidget (int /*long*/ id, NSRect rect) {
if ((style & SWT.ARROW) != 0) {
NSRect frame = view.frame();
@@ -401,6 +406,11 @@ public String getText () {
return text;
}
+void register() {
+ super.register();
+ display.addWidget(((NSControl)view).cell(), this);
+}
+
void releaseWidget () {
super.releaseWidget ();
image = null;
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 f0db17a1fe..71d56b9335 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
@@ -439,6 +439,12 @@ Color defaultForeground () {
return display.getSystemColor (SWT.COLOR_LIST_FOREGROUND);
}
+
+void deregister() {
+ super.deregister();
+ display.removeWidget(((NSControl)view).cell());
+}
+
/**
* Deselects the item at the given zero-relative index in the receiver's
* list. If the item at the index was already deselected, it remains
@@ -885,6 +891,11 @@ public void paste () {
sendEvent (SWT.Modify);
}
+void register() {
+ super.register();
+ display.addWidget(((NSControl)view).cell(), this);
+}
+
void releaseWidget () {
super.releaseWidget ();
selectionRange = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
index 085708feec..d3953014ea 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Composite.java
@@ -152,7 +152,7 @@ boolean accessibilityIsIgnored(int /*long*/ id, int /*long*/ sel) {
if (view != null && id == view.id) {
if (accessible != null) {
id role = accessible.internal_accessibilityAttributeValue(OS.NSAccessibilityRoleAttribute, ACC.CHILDID_SELF);
- return (role == null);
+ if (role != null) return false;
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
index 5479c50286..8b1d1779b9 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java
@@ -115,10 +115,43 @@ int accessibilityActionNames(int /*long*/ id, int /*long*/ sel) {
int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
- if (id == view.id) {
+ if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell().id == id)) {
if (accessible != null) {
+
+ // First, see if the accessible is going to define a set of attributes for the control.
+ // If it does, return that.
NSArray returnValue = accessible.internal_accessibilityAttributeNames(ACC.CHILDID_SELF);
if (returnValue != null) return returnValue.id;
+
+ // If not, see if it will override or augment the standard list.
+ // Help, title, and description can be overridden.
+ NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
+ extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+ extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
+ extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
+
+ for (int i = extraAttributes.count() - 1; i >= 0; i--) {
+ NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
+ if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) == null) {
+ extraAttributes.removeObjectAtIndex(i);
+ }
+ }
+
+ if (extraAttributes.count() > 0) {
+ int superResult = super.accessibilityAttributeNames(id, sel);
+ NSArray baseAttributes = new NSArray(superResult);
+ NSMutableArray mutableAttributes = NSMutableArray.arrayWithCapacity(baseAttributes.count() + 1);
+ mutableAttributes.addObjectsFromArray(baseAttributes);
+
+ for (int i = 0; i < extraAttributes.count(); i++) {
+ id currAttribute = extraAttributes.objectAtIndex(i);
+ if (!mutableAttributes.containsObject(currAttribute)) {
+ mutableAttributes.addObject(currAttribute);
+ }
+ }
+
+ return mutableAttributes.id;
+ }
}
}
@@ -127,7 +160,7 @@ int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
int accessibilityParameterizedAttributeNames(int /*long*/ id, int /*long*/ sel) {
- if (id == view.id) {
+ if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell().id == id)) {
if (accessible != null) {
NSArray returnValue = accessible.internal_accessibilityParameterizedAttributeNames(ACC.CHILDID_SELF);
if (returnValue != null) return returnValue.id;
@@ -153,8 +186,11 @@ boolean accessibilityIsAttributeSettable(int /*long*/ id, int /*long*/ sel, int
int accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
id returnValue = null;
- if (accessible != null) {
- returnValue = accessible.internal_accessibilityFocusedUIElement(ACC.CHILDID_SELF);
+
+ if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell().id == id)) {
+ if (accessible != null) {
+ returnValue = accessible.internal_accessibilityFocusedUIElement(ACC.CHILDID_SELF);
+ }
}
// If we had an accessible and it didn't handle the attribute request, let the
@@ -167,8 +203,11 @@ int accessibilityFocusedUIElement(int /*long*/ id, int /*long*/ sel) {
int accessibilityHitTest(int /*long*/ id, int /*long*/ sel, NSPoint point) {
id returnValue = null;
- if (accessible != null) {
- returnValue = accessible.internal_accessibilityHitTest(point, ACC.CHILDID_SELF);
+
+ if (id == view.id || (view instanceof NSControl && ((NSControl)view).cell().id == id)) {
+ if (accessible != null) {
+ returnValue = accessible.internal_accessibilityHitTest(point, ACC.CHILDID_SELF);
+ }
}
// If we had an accessible and it didn't handle the attribute request, let the
@@ -204,11 +243,9 @@ int accessibilityAttributeValue_forParameter(int /*long*/ id, int /*long*/ sel,
id returnValue = null;
- if (id == view.id) {
- if (accessible != null) {
- id parameter = new id(arg1);
- returnValue = accessible.internal_accessibilityAttributeValue_forParameter(attribute, parameter, ACC.CHILDID_SELF);
- }
+ if (accessible != null) {
+ id parameter = new id(arg1);
+ returnValue = accessible.internal_accessibilityAttributeValue_forParameter(attribute, parameter, ACC.CHILDID_SELF);
}
// If we had an accessible and it didn't handle the attribute request, let the
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 d65cdade67..6c197373d0 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
@@ -1725,6 +1725,15 @@ void addAccessibilityMethods(int /*long*/ cls, int /*long*/ proc2, int /*long*/
OS.class_addMethod(cls, OS.sel_accessibilityActionDescription_, proc3, "@:@");
}
+int registerCellSubclass(int cellClass, int size, int align, String types) {
+ String cellClassName = OS.class_getName(cellClass);
+ int cls = OS.objc_allocateClassPair(cellClass, "SWT" + cellClassName, 0);
+ OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
+ OS.objc_registerClassPair(cls);
+ NSControl.setCellClass(cls);
+ return cls;
+}
+
void initClasses () {
if (OS.objc_lookUpClass ("SWTView") != 0) return;
@@ -1844,6 +1853,10 @@ void initClasses () {
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSButton.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSButton.setCellClass(cls);
+
className = "SWTTableView";
cls = OS.objc_allocateClassPair(OS.class_NSTableView, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -1937,6 +1950,10 @@ void initClasses () {
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSSlider.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSSlider.setCellClass(cls);
+
className = "SWTPopUpButton";
cls = OS.objc_allocateClassPair(OS.class_NSPopUpButton, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -1946,6 +1963,10 @@ void initClasses () {
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSPopUpButton.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSPopUpButton.setCellClass(cls);
+
className = "SWTComboBox";
cls = OS.objc_allocateClassPair(OS.class_NSComboBox, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -1959,6 +1980,10 @@ void initClasses () {
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSComboBox.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSComboBox.setCellClass(cls);
+
className = "SWTDatePicker";
cls = OS.objc_allocateClassPair(OS.class_NSDatePicker, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -1976,6 +2001,10 @@ void initClasses () {
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSImageView.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSImageView.setCellClass(cls);
+
className = "SWTStepper";
cls = OS.objc_allocateClassPair(OS.class_NSStepper, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -1985,6 +2014,10 @@ void initClasses () {
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSStepper.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSStepper.setCellClass(cls);
+
className = "SWTScroller";
cls = OS.objc_allocateClassPair(OS.class_NSScroller, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -1993,6 +2026,10 @@ void initClasses () {
addFrameMethods(cls, setFrameOriginProc, setFrameSizeProc);
addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
OS.objc_registerClassPair(cls);
+
+ cls = registerCellSubclass(NSScroller.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSScroller.setCellClass(cls);
className = "SWTMenuItem";
cls = OS.objc_allocateClassPair(OS.class_NSMenuItem, className, 0);
@@ -2031,6 +2068,10 @@ void initClasses () {
OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSTextField.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSTextField.setCellClass(cls);
+
className = "SWTSearchField";
cls = OS.objc_allocateClassPair(OS.class_NSSearchField, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -2042,6 +2083,10 @@ void initClasses () {
OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
OS.objc_registerClassPair(cls);
+ cls = registerCellSubclass(NSSearchField.cellClass(), size, align, types);
+ addAccessibilityMethods(cls, proc2, proc3, proc4, accessibilityHitTestProc);
+ NSSearchField.setCellClass(cls);
+
className = "SWTSecureTextField";
cls = OS.objc_allocateClassPair(OS.class_NSSecureTextField, className, 0);
OS.class_addIvar(cls, SWT_OBJECT, size, (byte)align, types);
@@ -2052,6 +2097,8 @@ void initClasses () {
OS.class_addMethod(cls, OS.sel_textViewDidChangeSelection_, proc3, "@:@");
OS.class_addMethod(cls, OS.sel_textView_willChangeSelectionFromCharacterRange_toCharacterRange_, textWillChangeSelectionProc, "@:@{NSRange}{NSRange}");
OS.objc_registerClassPair(cls);
+
+ // Don't subclass NSSecureTextFieldCell -- you'll get an NSException from [NSSecureTextField setCellClass:]!
className = "SWTWindow";
cls = OS.objc_allocateClassPair(OS.class_NSWindow, className, 0);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
index 0d0e4af411..79096e70bc 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Group.java
@@ -112,6 +112,8 @@ NSView contentView () {
void deregister () {
super.deregister ();
display.removeWidget (contentView);
+ SWTBox box = (SWTBox)view;
+ display.removeWidget (box.titleCell());
}
void createHandle () {
@@ -160,6 +162,8 @@ float getThemeAlpha () {
void register () {
super.register ();
display.addWidget (contentView, this);
+ SWTBox box = (SWTBox)view;
+ display.addWidget (box.titleCell(), this);
}
void releaseHandle () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
index b652adb972..95ea486607 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Label.java
@@ -201,8 +201,14 @@ NSAttributedString createString() {
void deregister () {
super.deregister ();
- if (textView != null) display.removeWidget (textView);
- if (imageView != null) display.removeWidget (imageView);
+ if (textView != null) {
+ display.removeWidget(textView);
+ display.removeWidget(textView.cell());
+ }
+ if (imageView != null) {
+ display.removeWidget (imageView);
+ display.removeWidget (imageView.cell());
+ }
}
/**
@@ -267,8 +273,14 @@ public String getText () {
void register () {
super.register ();
- if (textView != null) display.addWidget (textView, this);
- if (imageView != null) display.addWidget (imageView, this);
+ if (textView != null) {
+ display.addWidget (textView, this);
+ display.addWidget (textView.cell(), this);
+ }
+ if (imageView != null) {
+ display.addWidget (imageView, this);
+ display.addWidget (imageView.cell(), this);
+ }
}
void releaseHandle () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
index 5ded486e42..4b9c9396cb 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Sash.java
@@ -99,6 +99,23 @@ int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
ourAttributes.addObject(OS.NSAccessibilityNextContentsAttribute);
ourAttributes.addObject(OS.NSAccessibilityPreviousContentsAttribute);
ourAttributes.addObject(OS.NSAccessibilityOrientationAttribute);
+
+ if (accessible != null) {
+ // See if the accessible will override or augment the standard list.
+ // Help, title, and description can be overridden.
+ NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
+ extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+ extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
+ extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
+
+ for (int i = extraAttributes.count() - 1; i >= 0; i--) {
+ NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
+ if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) != null) {
+ ourAttributes.addObject(extraAttributes.objectAtIndex(i));
+ }
+ }
+ }
+
accessibilityAttributes = ourAttributes;
accessibilityAttributes.retain();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
index 1c4e84c1a9..42dc0e0ca5 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Scale.java
@@ -138,6 +138,12 @@ void createHandle () {
view = widget;
}
+void deregister() {
+ super.deregister();
+ display.removeWidget(((NSControl)view).cell());
+}
+
+
/**
* Returns the amount that the receiver's value will be
* modified by when the up/down (or right/left) arrows
@@ -223,6 +229,11 @@ public int getSelection () {
return (int)((NSSlider)view).doubleValue();
}
+void register() {
+ super.register();
+ display.addWidget(((NSControl)view).cell(), this);
+}
+
/**
* Removes the listener from the collection of listeners who will
* be notified when the user changes the receiver's value.
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 5152859dd4..2aa9c2413f 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
@@ -488,6 +488,14 @@ Color defaultForeground () {
return display.getSystemColor (SWT.COLOR_LIST_FOREGROUND);
}
+void deregister() {
+ super.deregister();
+
+ if ((style & SWT.SINGLE) != 0) {
+ display.removeWidget(((NSControl)view).cell());
+ }
+}
+
boolean dragDetect (int x, int y, boolean filter, boolean [] consume) {
if (filter) {
Point selection = getSelection ();
@@ -1136,6 +1144,14 @@ public void paste () {
sendEvent (SWT.Modify);
}
+void register() {
+ super.register();
+
+ if ((style & SWT.SINGLE) != 0) {
+ display.addWidget(((NSControl)view).cell(), this);
+ }
+}
+
void releaseWidget () {
super.releaseWidget ();
hiddenText = message = null;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
index 9ee32a4a59..271aa45add 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolBar.java
@@ -100,7 +100,6 @@ public ToolBar (Composite parent, int style) {
}
}
-// TODO: Return a valid set of attributes for a toolbar.
int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
if (accessibilityAttributes == null) {
@@ -116,6 +115,23 @@ int accessibilityAttributeNames(int /*long*/ id, int /*long*/ sel) {
ourAttributes.addObject(OS.NSAccessibilityEnabledAttribute);
ourAttributes.addObject(OS.NSAccessibilityFocusedAttribute);
ourAttributes.addObject(OS.NSAccessibilityChildrenAttribute);
+
+ if (accessible != null) {
+ // See if the accessible will override or augment the standard list.
+ // Help, title, and description can be overridden.
+ NSMutableArray extraAttributes = NSMutableArray.arrayWithCapacity(3);
+ extraAttributes.addObject(OS.NSAccessibilityHelpAttribute);
+ extraAttributes.addObject(OS.NSAccessibilityDescriptionAttribute);
+ extraAttributes.addObject(OS.NSAccessibilityTitleAttribute);
+
+ for (int i = extraAttributes.count() - 1; i >= 0; i--) {
+ NSString attribute = new NSString(extraAttributes.objectAtIndex(i).id);
+ if (accessible.internal_accessibilityAttributeValue(attribute, ACC.CHILDID_SELF) != null) {
+ ourAttributes.addObject(extraAttributes.objectAtIndex(i));
+ }
+ }
+ }
+
accessibilityAttributes = ourAttributes;
accessibilityAttributes.retain();
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
index 6f14c07593..8c205d21b4 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/ToolItem.java
@@ -133,45 +133,43 @@ public ToolItem (ToolBar parent, int style, int index) {
parent.createItem (this, index);
}
-//int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
-// NSString nsAttributeName = new NSString(arg0);
-// System.out.println("Attribute " + nsAttributeName.getString() + " for " + new NSObject(id).description().getString());
-//
-// if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
-// NSString roleText = ((style & SWT.PUSH) != 0) ? OS.NSAccessibilityButtonRole
-// : ((style & SWT.RADIO) != 0) ? OS.NSAccessibilityRadioButtonRole
-// : ((style & SWT.CHECK) != 0) ? OS.NSAccessibilityCheckBoxRole
-// : ((style & SWT.DROP_DOWN) != 0) ? OS.NSAccessibilityMenuButtonRole
-// : null; // SEPARATOR
-// if (roleText != null) {
-// if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) {
-// return roleText.id;
-// } else { // NSAccessibilityRoleDescriptionAttribute
-// int /*long*/ description = OS.NSAccessibilityRoleDescription (roleText.id, OS.NSAccessibilityToolbarButtonSubrole.id);
-// return description;
-// }
-// }
-// } else if (nsAttributeName.isEqualToString (OS.NSAccessibilitySubroleAttribute)) {
-// NSString subroleText = OS.NSAccessibilityToolbarButtonSubrole;
-// return subroleText.id;
-// } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityTitleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
-// String accessibleText = toolTipText;
-// if (accessibleText == null || accessibleText.equals("")) accessibleText = text;
-// if (!(accessibleText == null || accessibleText.equals(""))) {
-// return NSString.stringWith(accessibleText).id;
-// } else {
-// return NSString.stringWith("").id;
-// }
-// } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityValueAttribute) && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
-// NSNumber value = NSNumber.numberWithInt(selection ? 1 : 0);
-// return value.id;
-// } else if (nsAttributeName.isEqualToString(OS.NSAccessibilityEnabledAttribute)) {
-// NSNumber value = NSNumber.numberWithInt(getEnabled() ? 1 : 0);
-// return value.id;
-// }
-//
-// return super.accessibilityAttributeValue(id, sel, arg0);
-//}
+int accessibilityAttributeValue(int /*long*/ id, int /*long*/ sel, int /*long*/ arg0) {
+ NSString nsAttributeName = new NSString(arg0);
+
+ if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityRoleDescriptionAttribute)) {
+ NSString roleText = ((style & SWT.PUSH) != 0) ? OS.NSAccessibilityButtonRole
+ : ((style & SWT.RADIO) != 0) ? OS.NSAccessibilityRadioButtonRole
+ : ((style & SWT.CHECK) != 0) ? OS.NSAccessibilityCheckBoxRole
+ : ((style & SWT.DROP_DOWN) != 0) ? OS.NSAccessibilityMenuButtonRole
+ : null; // SEPARATOR
+ if (roleText != null) {
+ if (nsAttributeName.isEqualToString (OS.NSAccessibilityRoleAttribute)) {
+ return roleText.id;
+ } else { // NSAccessibilityRoleDescriptionAttribute
+ int /*long*/ description = OS.NSAccessibilityRoleDescription (roleText.id, 0);
+ return description;
+ }
+ }
+ } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityTitleAttribute) || nsAttributeName.isEqualToString (OS.NSAccessibilityDescriptionAttribute)) {
+ return (getText() != null ? NSString.stringWith(getText()).id : NSString.stringWith("").id);
+ } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityHelpAttribute)) {
+ String accessibleText = toolTipText;
+ if (accessibleText == null || accessibleText.equals("")) accessibleText = text;
+ if (!(accessibleText == null || accessibleText.equals(""))) {
+ return NSString.stringWith(accessibleText).id;
+ } else {
+ return NSString.stringWith("").id;
+ }
+ } else if (nsAttributeName.isEqualToString (OS.NSAccessibilityValueAttribute) && (style & (SWT.CHECK | SWT.RADIO)) != 0) {
+ NSNumber value = NSNumber.numberWithInt(selection ? 1 : 0);
+ return value.id;
+ } else if (nsAttributeName.isEqualToString(OS.NSAccessibilityEnabledAttribute)) {
+ NSNumber value = NSNumber.numberWithInt(getEnabled() ? 1 : 0);
+ return value.id;
+ }
+
+ return super.accessibilityAttributeValue(id, sel, arg0);
+}
/**
* Adds the listener to the collection of listeners who will
@@ -312,8 +310,16 @@ NSAttributedString createString() {
void deregister () {
super.deregister ();
display.removeWidget(view);
- if (button != null) display.removeWidget (button);
- if (arrow != null) display.removeWidget (arrow);
+
+ if (button != null) {
+ display.removeWidget (button);
+ display.removeWidget (button.cell());
+ }
+
+ if (arrow != null) {
+ display.removeWidget (arrow);
+ display.removeWidget (arrow.cell());
+ }
}
void destroyWidget() {
@@ -574,8 +580,16 @@ void mouseDown(int /*long*/ id, int /*long*/ sel, int /*long*/ theEvent) {
void register () {
super.register ();
display.addWidget (view, this);
- if (button != null) display.addWidget (button, this);
- if (arrow != null) display.addWidget (arrow, this);
+
+ if (button != null) {
+ display.addWidget (button, this);
+ display.addWidget (button.cell(), this);
+ }
+
+ if (arrow != null) {
+ display.addWidget (arrow, this);
+ display.addWidget (arrow.cell(), this);
+ }
}
void releaseParent () {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
index 7714806168..9e69575de4 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/TrayItem.java
@@ -162,6 +162,7 @@ void createHandle () {
void deregister () {
super.deregister ();
display.removeWidget (view);
+ display.removeWidget(view.cell());
}
void destroyWidget () {
@@ -250,6 +251,7 @@ public boolean getVisible () {
void register () {
super.register ();
display.addWidget (view, this);
+ display.addWidget (((NSControl)view).cell(), this);
}
void releaseHandle () {

Back to the top