diff options
author | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-06-22 17:33:46 -0400 |
---|---|---|
committer | Silenio Quarti <silenio_quarti@ca.ibm.com> | 2012-06-22 17:33:46 -0400 |
commit | f57bfc6f6b21043911a0f475af171f3f120888f2 (patch) | |
tree | ac3d9cb0316a42a17f324781392f8f7bf47d2dd0 | |
parent | 066de63c98ed4e9f7a0fb031abd659c80a8f3c05 (diff) | |
download | eclipse.platform.swt-f57bfc6f6b21043911a0f475af171f3f120888f2.tar.gz eclipse.platform.swt-f57bfc6f6b21043911a0f475af171f3f120888f2.tar.xz eclipse.platform.swt-f57bfc6f6b21043911a0f475af171f3f120888f2.zip |
Bug 377597 - Mac OS X cursor blinking dos not honor NSTextInsertionPointBlinkPeriod
3 files changed, 17 insertions, 1 deletions
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 f556849dd2..7b1602cdb9 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 @@ -1127,6 +1127,15 @@ </class> <class name="NSUniqueIDSpecifier" swt_superclass="NSScriptObjectSpecifier"> </class> + <class name="NSUserDefaults" swt_gen="mixed"> + <method selector="objectForKey:" swt_gen="true"> + <arg swt_gen="true"></arg> + <retval swt_gen="true"></retval> + </method> + <method class_method="true" selector="standardUserDefaults" swt_gen="true"> + <retval swt_gen="true"></retval> + </method> + </class> <class name="NSValue" swt_gen="mixed"> <method selector="objCType" swt_gen="true"> <retval swt_gen="true"></retval> 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 e18fd42a20..9601f15d95 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 @@ -852,6 +852,7 @@ public static final int /*long*/ class_NSURLDownload = objc_getClass("NSURLDownl public static final int /*long*/ class_NSURLProtectionSpace = objc_getClass("NSURLProtectionSpace"); public static final int /*long*/ class_NSURLRequest = objc_getClass("NSURLRequest"); public static final int /*long*/ class_NSUndoManager = objc_getClass("NSUndoManager"); +public static final int /*long*/ class_NSUserDefaults = objc_getClass("NSUserDefaults"); public static final int /*long*/ class_NSValue = objc_getClass("NSValue"); public static final int /*long*/ class_NSView = objc_getClass("NSView"); public static final int /*long*/ class_NSWindow = objc_getClass("NSWindow"); @@ -2072,6 +2073,7 @@ public static final int /*long*/ sel_skipDescendents = sel_registerName("skipDes public static final int /*long*/ sel_smallSystemFontSize = sel_registerName("smallSystemFontSize"); public static final int /*long*/ sel_sortIndicatorRectForBounds_ = sel_registerName("sortIndicatorRectForBounds:"); public static final int /*long*/ sel_standardPreferences = sel_registerName("standardPreferences"); +public static final int /*long*/ sel_standardUserDefaults = sel_registerName("standardUserDefaults"); public static final int /*long*/ sel_standardWindowButton_ = sel_registerName("standardWindowButton:"); public static final int /*long*/ sel_startAnimation_ = sel_registerName("startAnimation:"); public static final int /*long*/ sel_state = sel_registerName("state"); 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 798f1d6189..a6b1299851 100644 --- 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 @@ -128,6 +128,7 @@ public class Display extends Device { boolean sendEvent; int clickCountButton, clickCount; + int blinkTime; Control currentControl, trackingControl, tooltipControl; Widget tooltipTarget; @@ -1299,7 +1300,7 @@ public static Display getCurrent () { int getCaretBlinkTime () { // checkDevice (); - return 560; + return blinkTime; } /** @@ -2224,6 +2225,10 @@ protected void init () { markedAttributes.retain (); textView.release (); + id blink = NSUserDefaults.standardUserDefaults().objectForKey(NSString.stringWith("NSTextInsertionPointBlinkPeriod")); + if (blink != null) blinkTime = (int)new NSNumber(blink).integerValue(); + if (blinkTime == 0) blinkTime = 560; + isPainting = (NSMutableArray)new NSMutableArray().alloc(); isPainting = isPainting.initWithCapacity(12); } |