Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h3
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport.extras1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBox.java4
-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/NSControl.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java14
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Combo.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Control.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Text.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java2
28 files changed, 101 insertions, 83 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
index 1b9fd53cf8..741596e1fe 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/cocoa/org/eclipse/swt/accessibility/Accessible.java
@@ -1722,14 +1722,14 @@ public class Accessible {
// FIXME: Doesn't account for right-to-left text?
switch (docAttributes.alignment) {
case SWT.CENTER:
- osAlignment = OS.NSCenterTextAlignment;
+ osAlignment = OS.NSTextAlignmentCenter;
break;
case SWT.RIGHT:
- osAlignment = OS.NSRightTextAlignment;
+ osAlignment = OS.NSTextAlignmentRight;
break;
case SWT.LEFT:
default:
- osAlignment = OS.NSLeftTextAlignment;
+ osAlignment = OS.NSTextAlignmentLeft;
break;
}
paragraphDict.setValue(NSNumber.numberWithInt(osAlignment), NSString.stringWith("AXTextAlignment"));
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 58e3a92bae..671bcfe0cc 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -4842,6 +4842,18 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSModalPanelRunLoopMode)
}
#endif
+#ifndef NO_NSNotFound
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSNotFound)
+ (JNIEnv *env, jclass that)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSNotFound_FUNC);
+ rc = (jintLong)NSNotFound;
+ OS_NATIVE_EXIT(env, that, NSNotFound_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_NSNumberOfColorComponents
JNIEXPORT jintLong JNICALL OS_NATIVE(NSNumberOfColorComponents)
(JNIEnv *env, jclass that, jintLong arg0)
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 05d934f65f..a89c16b082 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -364,6 +364,7 @@ char * OS_nativeFunctionNames[] = {
"NSLinkAttributeName",
"NSLocaleLanguageCode",
"NSModalPanelRunLoopMode",
+ "NSNotFound",
"NSNumberOfColorComponents",
"NSObliquenessAttributeName",
"NSOutlineViewColumnDidMoveNotification",
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 6d43bdd89c..2c674064f8 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -374,6 +374,7 @@ typedef enum {
NSLinkAttributeName_FUNC,
NSLocaleLanguageCode_FUNC,
NSModalPanelRunLoopMode_FUNC,
+ NSNotFound_FUNC,
NSNumberOfColorComponents_FUNC,
NSObliquenessAttributeName_FUNC,
NSOutlineViewColumnDidMoveNotification_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 41934477dc..abe13bd574 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
@@ -4837,7 +4837,6 @@
<enum name="NSButtLineCapStyle" swt_gen="true"></enum>
<enum name="NSCancelButton" swt_gen="true"></enum>
<enum name="NSCarriageReturnCharacter" swt_gen="true"></enum>
- <enum name="NSCenterTextAlignment" swt_gen="true"></enum>
<enum name="NSClockAndCalendarDatePickerStyle" swt_gen="true"></enum>
<enum name="NSClosableWindowMask" swt_gen="true"></enum>
<enum name="NSClosePathBezierPathElement" swt_gen="true"></enum>
@@ -4900,7 +4899,6 @@
<enum name="NSImageOverlaps" swt_gen="true"></enum>
<enum name="NSInformationalAlertStyle" swt_gen="true"></enum>
<enum name="NSItalicFontMask" swt_gen="true"></enum>
- <enum name="NSJustifiedTextAlignment" swt_gen="true"></enum>
<enum name="NSKeyDown" swt_gen="true"></enum>
<enum name="NSKeyUp" swt_gen="true"></enum>
<enum name="NSLandscapeOrientation" swt_gen="true"></enum>
@@ -4911,7 +4909,6 @@
<enum name="NSLeftMouseUp" swt_gen="true"></enum>
<enum name="NSLeftMouseUpMask" swt_gen="true"></enum>
<enum name="NSLeftTabStopType" swt_gen="true"></enum>
- <enum name="NSLeftTextAlignment" swt_gen="true"></enum>
<enum name="NSLineBreakByClipping" swt_gen="true"></enum>
<enum name="NSLineBreakByTruncatingMiddle" swt_gen="true"></enum>
<enum name="NSLineBreakByTruncatingTail" swt_gen="true"></enum>
@@ -4969,7 +4966,6 @@
<enum name="NSRightMouseDown" swt_gen="true"></enum>
<enum name="NSRightMouseDragged" swt_gen="true"></enum>
<enum name="NSRightMouseUp" swt_gen="true"></enum>
- <enum name="NSRightTextAlignment" swt_gen="true"></enum>
<enum name="NSRoundLineCapStyle" swt_gen="true"></enum>
<enum name="NSRoundLineJoinStyle" swt_gen="true"></enum>
<enum name="NSRoundedBezelStyle" swt_gen="true"></enum>
@@ -5002,6 +4998,11 @@
<enum name="NSTableViewSolidVerticalGridLineMask" swt_gen="true"></enum>
<enum name="NSTerminateCancel" swt_gen="true"></enum>
<enum name="NSTerminateNow" swt_gen="true"></enum>
+ <enum name="NSTextAlignmentCenter" swt_gen="true"></enum>
+ <enum name="NSTextAlignmentJustified" swt_gen="true"></enum>
+ <enum name="NSTextAlignmentLeft" swt_gen="true"></enum>
+ <enum name="NSTextAlignmentNatural" swt_gen="true"></enum>
+ <enum name="NSTextAlignmentRight" swt_gen="true"></enum>
<enum name="NSTextFieldAndStepperDatePickerStyle" swt_gen="true"></enum>
<enum name="NSTextFieldDatePickerStyle" swt_gen="true"></enum>
<enum name="NSTitledWindowMask" swt_gen="true"></enum>
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 bb2a47bf9a..627e0b12fc 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
@@ -1194,6 +1194,7 @@
<constant name="NSDefaultRunLoopMode" swt_gen="true"></constant>
<constant name="NSErrorFailingURLStringKey" swt_gen="true"></constant>
<constant name="NSLocaleLanguageCode" swt_gen="true"></constant>
+ <constant name="NSNotFound" swt_gen="true"></constant>
<enum name="NSAllApplicationsDirectory" swt_gen="true"></enum>
<enum name="NSAllDomainsMask" swt_gen="true"></enum>
<enum name="NSCachesDirectory" swt_gen="true"></enum>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
index b878d3d673..9ecf4a149d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSBitmapImageRep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -95,9 +95,9 @@ public long /*int*/ samplesPerPixel() {
return OS.objc_msgSend(this.id, OS.sel_samplesPerPixel);
}
-public static id imageRepWithContentsOfFile(NSString filename) {
+public static NSImageRep imageRepWithContentsOfFile(NSString filename) {
long /*int*/ result = OS.objc_msgSend(OS.class_NSBitmapImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
- return result != 0 ? new id(result) : null;
+ return result != 0 ? new NSImageRep(result) : null;
}
}
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 85a456a456..35fde20761 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public void setBoxType(long /*int*/ boxType) {
OS.objc_msgSend(this.id, OS.sel_setBoxType_, boxType);
}
-public void setContentView(id contentView) {
+public void setContentView(NSView contentView) {
OS.objc_msgSend(this.id, OS.sel_setContentView_, contentView != null ? contentView.id : 0);
}
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 c739336179..28e1ddf491 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -140,7 +140,7 @@ public void setFont(NSFont font) {
OS.objc_msgSend(this.id, OS.sel_setFont_, font != null ? font.id : 0);
}
-public void setFormatter(id formatter) {
+public void setFormatter(NSFormatter formatter) {
OS.objc_msgSend(this.id, OS.sel_setFormatter_, formatter != null ? formatter.id : 0);
}
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 a3525c9d40..29d3ca84c3 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -79,8 +79,8 @@ public void setBaseWritingDirection(long /*int*/ baseWritingDirection) {
OS.objc_msgSend(this.id, OS.sel_setBaseWritingDirection_, baseWritingDirection);
}
-public void setCell(NSCell aCell) {
- OS.objc_msgSend(this.id, OS.sel_setCell_, aCell != null ? aCell.id : 0);
+public void setCell(NSCell cell) {
+ OS.objc_msgSend(this.id, OS.sel_setCell_, cell != null ? cell.id : 0);
}
public static void setCellClass(long /*int*/ factoryId) {
@@ -99,7 +99,7 @@ public void setFont(NSFont font) {
OS.objc_msgSend(this.id, OS.sel_setFont_, font != null ? font.id : 0);
}
-public void setFormatter(id formatter) {
+public void setFormatter(NSFormatter formatter) {
OS.objc_msgSend(this.id, OS.sel_setFormatter_, formatter != null ? formatter.id : 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
index 29e2889dfe..152a3c06ff 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSImageRep.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -41,9 +41,9 @@ public boolean hasAlpha() {
return OS.objc_msgSend_bool(this.id, OS.sel_hasAlpha);
}
-public static id imageRepWithContentsOfFile(NSString filename) {
+public static NSImageRep imageRepWithContentsOfFile(NSString filename) {
long /*int*/ result = OS.objc_msgSend(OS.class_NSImageRep, OS.sel_imageRepWithContentsOfFile_, filename != null ? filename.id : 0);
- return result != 0 ? new id(result) : null;
+ return result != 0 ? new NSImageRep(result) : null;
}
public long /*int*/ pixelsHigh() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
index 5f3f2e6ad1..2c01e4e199 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSObject.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -194,8 +194,8 @@ public void addEventListener(NSString type, id listener, boolean useCapture) {
OS.objc_msgSend(this.id, OS.sel_addEventListener_listener_useCapture_, type != null ? type.id : 0, listener != null ? listener.id : 0, useCapture);
}
-public void handleEvent(DOMEvent evt) {
- OS.objc_msgSend(this.id, OS.sel_handleEvent_, evt != null ? evt.id : 0);
+public void handleEvent(DOMEvent event) {
+ OS.objc_msgSend(this.id, OS.sel_handleEvent_, event != null ? event.id : 0);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java
index abf81f2475..333a18b97b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSString.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -62,8 +62,8 @@ public void getCharacters(char[] buffer) {
OS.objc_msgSend(this.id, OS.sel_getCharacters_, buffer);
}
-public void getCharacters(char[] buffer, NSRange aRange) {
- OS.objc_msgSend(this.id, OS.sel_getCharacters_range_, buffer, aRange);
+public void getCharacters(char[] buffer, NSRange range) {
+ OS.objc_msgSend(this.id, OS.sel_getCharacters_range_, buffer, range);
}
public NSString initWithCharacters(char[] characters, long /*int*/ length) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java
index 451be6237a..ac51a831e9 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTableColumn.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -51,7 +51,7 @@ public void setEditable(boolean editable) {
OS.objc_msgSend(this.id, OS.sel_setEditable_, editable);
}
-public void setHeaderCell(id headerCell) {
+public void setHeaderCell(NSTableHeaderCell headerCell) {
OS.objc_msgSend(this.id, OS.sel_setHeaderCell_, headerCell != null ? headerCell.id : 0);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java
index b77e3afb67..c3e9586ff5 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextContainer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -30,8 +30,8 @@ public NSSize containerSize() {
return result;
}
-public NSTextContainer initWithContainerSize(NSSize size) {
- long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithContainerSize_, size);
+public NSTextContainer initWithContainerSize(NSSize aContainerSize) {
+ long /*int*/ result = OS.objc_msgSend(this.id, OS.sel_initWithContainerSize_, aContainerSize);
return result == this.id ? this : (result != 0 ? new NSTextContainer(result) : null);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java
index 94d4557872..736bc6bbda 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSTextStorage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -24,8 +24,8 @@ public NSTextStorage(id id) {
super(id);
}
-public void addLayoutManager(NSLayoutManager obj) {
- OS.objc_msgSend(this.id, OS.sel_addLayoutManager_, obj != null ? obj.id : 0);
+public void addLayoutManager(NSLayoutManager aLayoutManager) {
+ OS.objc_msgSend(this.id, OS.sel_addLayoutManager_, aLayoutManager != null ? aLayoutManager.id : 0);
}
public NSArray paragraphs() {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java
index 7b62b9b659..6ebfb3a2fc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSWindow.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -276,12 +276,12 @@ public void setCollectionBehavior(long /*int*/ collectionBehavior) {
OS.objc_msgSend(this.id, OS.sel_setCollectionBehavior_, collectionBehavior);
}
-public void setContentView(id contentView) {
+public void setContentView(NSView contentView) {
OS.objc_msgSend(this.id, OS.sel_setContentView_, contentView != null ? contentView.id : 0);
}
-public void setDefaultButtonCell(NSButtonCell defButt) {
- OS.objc_msgSend(this.id, OS.sel_setDefaultButtonCell_, defButt != null ? defButt.id : 0);
+public void setDefaultButtonCell(NSButtonCell defaultButtonCell) {
+ OS.objc_msgSend(this.id, OS.sel_setDefaultButtonCell_, defaultButtonCell != null ? defaultButtonCell.id : 0);
}
public void setDelegate(id delegate) {
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 3ab61a3d9d..ccd13c6be6 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
@@ -2405,7 +2405,6 @@ public static final int NSBoxSeparator = 2;
public static final int NSButtLineCapStyle = 0;
public static final int NSCancelButton = 0;
public static final int NSCarriageReturnCharacter = 13;
-public static final int NSCenterTextAlignment = 2;
public static final int NSClockAndCalendarDatePickerStyle = 1;
public static final int NSClosableWindowMask = 2;
public static final int NSClosePathBezierPathElement = 3;
@@ -2468,7 +2467,6 @@ public static final int NSImageOnly = 1;
public static final int NSImageOverlaps = 6;
public static final int NSInformationalAlertStyle = 1;
public static final int NSItalicFontMask = 1;
-public static final int NSJustifiedTextAlignment = 3;
public static final int NSKeyDown = 10;
public static final int NSKeyUp = 11;
public static final int NSLandscapeOrientation = 1;
@@ -2479,7 +2477,6 @@ public static final int NSLeftMouseDraggedMask = 64;
public static final int NSLeftMouseUp = 2;
public static final int NSLeftMouseUpMask = 4;
public static final int NSLeftTabStopType = 0;
-public static final int NSLeftTextAlignment = 0;
public static final int NSLineBreakByClipping = 2;
public static final int NSLineBreakByTruncatingMiddle = 5;
public static final int NSLineBreakByTruncatingTail = 4;
@@ -2537,7 +2534,6 @@ public static final int NSResizableWindowMask = 8;
public static final int NSRightMouseDown = 3;
public static final int NSRightMouseDragged = 7;
public static final int NSRightMouseUp = 4;
-public static final int NSRightTextAlignment = 1;
public static final int NSRoundLineCapStyle = 1;
public static final int NSRoundLineJoinStyle = 1;
public static final int NSRoundedBezelStyle = 1;
@@ -2570,6 +2566,11 @@ public static final int NSTableViewNoColumnAutoresizing = 0;
public static final int NSTableViewSolidVerticalGridLineMask = 1;
public static final int NSTerminateCancel = 0;
public static final int NSTerminateNow = 1;
+public static final int NSTextAlignmentCenter = 2;
+public static final int NSTextAlignmentJustified = 3;
+public static final int NSTextAlignmentLeft = 0;
+public static final int NSTextAlignmentNatural = 4;
+public static final int NSTextAlignmentRight = 1;
public static final int NSTextFieldAndStepperDatePickerStyle = 0;
public static final int NSTextFieldDatePickerStyle = 2;
public static final int NSTitledWindowMask = 1;
@@ -2652,7 +2653,6 @@ public static final int kCTWritingDirectionRightToLeft = 1;
public static final int NSAllApplicationsDirectory = 100;
public static final int NSAllDomainsMask = 65535;
public static final int NSCachesDirectory = 13;
-public static final int NSNotFound = 2147483647;
public static final int NSOrderedSame = 0;
public static final int NSURLCredentialPersistenceForSession = 1;
public static final int NSURLErrorBadURL = -1000;
@@ -3257,6 +3257,8 @@ public static final NSString NSErrorFailingURLStringKey = new NSString(NSErrorFa
/** @method flags=const */
public static final native long /*int*/ NSLocaleLanguageCode();
public static final NSString NSLocaleLanguageCode = new NSString(NSLocaleLanguageCode());
+/** @method flags=const */
+public static final native long /*int*/ NSNotFound();
/** Functions */
@@ -3719,9 +3721,9 @@ public static final native double /*float*/ CTFontGetDescent(long /*int*/ font);
*/
public static final native double /*float*/ CTFontGetLeading(long /*int*/ font);
/**
- * @param string cast=(CFAttributedStringRef)
+ * @param attrString cast=(CFAttributedStringRef)
*/
-public static final native long /*int*/ CTLineCreateWithAttributedString(long /*int*/ string);
+public static final native long /*int*/ CTLineCreateWithAttributedString(long /*int*/ attrString);
/**
* @param line cast=(CTLineRef)
* @param context cast=(CGContextRef)
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
index 5518a229ec..aa34d74012 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Device.java
@@ -542,7 +542,7 @@ protected void init () {
COLOR_WHITE = new Color (this, 0xFF,0xFF,0xFF);
paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle().alloc().init();
- paragraphStyle.setAlignment(OS.NSLeftTextAlignment);
+ paragraphStyle.setAlignment(OS.NSTextAlignmentLeft);
paragraphStyle.setLineBreakMode(OS.NSLineBreakByClipping);
NSArray tabs = new NSArray(new NSArray().alloc().init());
paragraphStyle.setTabStops(tabs);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
index 9b59c15111..40604f2608 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/TextLayout.java
@@ -158,17 +158,17 @@ void computeRuns() {
defaultFont.addTraits(attrStr, range);
//TODO ascend descent wrap
NSMutableParagraphStyle paragraph = (NSMutableParagraphStyle)new NSMutableParagraphStyle().alloc().init();
- int align = OS.NSLeftTextAlignment;
+ int align = OS.NSTextAlignmentLeft;
if (wrapWidth != -1) {
if (justify) {
- align = OS.NSJustifiedTextAlignment;
+ align = OS.NSTextAlignmentJustified;
} else {
switch (alignment) {
case SWT.CENTER:
- align = OS.NSCenterTextAlignment;
+ align = OS.NSTextAlignmentCenter;
break;
case SWT.RIGHT:
- align = OS.NSRightTextAlignment;
+ align = OS.NSTextAlignmentRight;
}
}
}
@@ -2302,9 +2302,9 @@ int untranslateOffset (int offset) {
* @exception SWTException <ul>
* <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
* </ul>
- *
- * @noreference This method is not intended to be referenced by clients.
- *
+ *
+ * @noreference This method is not intended to be referenced by clients.
+ *
* DO NOT USE This might be removed in 4.8
* @since 3.107
*/
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 e5e0fa1c39..8933a0c735 100644
--- 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
@@ -678,7 +678,7 @@ boolean dragDetect(int x, int y, boolean filter, boolean[] consume) {
textViewMouse.x = x;
textViewMouse.y = y;
long /*int*/ charPosition = feAsTextView.characterIndexForInsertionAtPoint(textViewMouse);
- if (charPosition != OS.NSNotFound && charPosition >= selectedRange.location && charPosition < (selectedRange.location + selectedRange.length)) {
+ 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;
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 3bb21dd6da..28326751b9 100644
--- 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
@@ -995,11 +995,11 @@ NSAttributedString createString (String string, Font font, double /*float*/ [] f
NSMutableParagraphStyle paragraphStyle = (NSMutableParagraphStyle)new NSMutableParagraphStyle ().alloc ().init ();
paragraphStyle.setLineBreakMode (wrap ? OS.NSLineBreakByWordWrapping : OS.NSLineBreakByClipping);
if (alignment != 0) {
- int align = OS.NSLeftTextAlignment;
+ int align = OS.NSTextAlignmentLeft;
if ((alignment & SWT.CENTER) != 0) {
- align = OS.NSCenterTextAlignment;
+ align = OS.NSTextAlignmentCenter;
} else if ((alignment & SWT.RIGHT) != 0) {
- align = OS.NSRightTextAlignment;
+ align = OS.NSTextAlignmentRight;
}
paragraphStyle.setAlignment (align);
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
index a93a43aa1f..1a512ee825 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/IME.java
@@ -108,7 +108,7 @@ long /*int*/ attributedSubstringFromRange (long /*int*/ id, long /*int*/ sel, lo
@Override
long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
- if (!isInlineEnabled ()) return OS.NSNotFound;
+ if (!isInlineEnabled ()) return OS.NSNotFound();
NSPoint pt = new NSPoint ();
OS.memmove (pt, point, NSPoint.sizeof);
NSView view = parent.view;
@@ -120,7 +120,7 @@ long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*i
event.y = (int) pt.y;
sendEvent (SWT.ImeComposition, event);
int offset = event.index + event.count;
- return offset != -1 ? offset : OS.NSNotFound;
+ return offset != -1 ? offset : OS.NSNotFound();
}
@Override
@@ -374,7 +374,7 @@ NSRange markedRange (long /*int*/ id, long /*int*/ sel) {
range.location = startOffset;
range.length = text.length ();
} else {
- range.location = OS.NSNotFound;
+ range.location = OS.NSNotFound();
}
return range;
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
index 4a128c4cc3..e8c69efd49 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Link.java
@@ -184,7 +184,7 @@ void createHandle () {
widget.setAutoresizingMask (OS.NSViewWidthSizable | OS.NSViewHeightSizable);
widget.textContainer().setLineFragmentPadding(2);
widget.setFont(getFont().handle);
- widget.setAlignment (OS.NSLeftTextAlignment);
+ widget.setAlignment (OS.NSTextAlignmentLeft);
NSMutableDictionary dict = NSMutableDictionary.dictionaryWithCapacity(4);
dict.setDictionary(widget.selectedTextAttributes());
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
index e7fd076cf1..8895d0b2a3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Table.java
@@ -3487,13 +3487,13 @@ void tableView_willDisplayCell_forTableColumn_row (long /*int*/ id, long /*int*/
color = NSColor.disabledControlTextColor();
}
int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
- int alignment = OS.NSLeftTextAlignment;
+ int alignment = OS.NSTextAlignmentLeft;
if (columnCount > 0) {
int style = columns [index].style;
if ((style & SWT.CENTER) != 0) {
- alignment = OS.NSCenterTextAlignment;
+ alignment = OS.NSTextAlignmentCenter;
} else if ((style & SWT.RIGHT) != 0) {
- alignment = OS.NSRightTextAlignment;
+ alignment = OS.NSTextAlignmentRight;
}
}
Font font = item.cellFont != null ? item.cellFont [index] : null;
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 feec034ccb..8ae557f57e 100644
--- 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
@@ -530,9 +530,9 @@ void createHandle () {
* Fix is to use NSJustifiedTextAlignment instead, since for
* a single line of text, justified has the same effect as left aligned.
*/
- int align = ((style & SWT.SEARCH) != 0) ? OS.NSJustifiedTextAlignment : OS.NSLeftTextAlignment;
- if ((style & SWT.CENTER) != 0) align = OS.NSCenterTextAlignment;
- if ((style & SWT.RIGHT) != 0) align = OS.NSRightTextAlignment;
+ int align = ((style & SWT.SEARCH) != 0) ? OS.NSTextAlignmentJustified : OS.NSTextAlignmentLeft;
+ if ((style & SWT.CENTER) != 0) align = OS.NSTextAlignmentCenter;
+ if ((style & SWT.RIGHT) != 0) align = OS.NSTextAlignmentRight;
widget.setAlignment (align);
NSCell cell = widget.cell();
cell.setWraps(false);
@@ -567,9 +567,9 @@ void createHandle () {
textContainer.setContainerSize (csize);
}
- int align = OS.NSLeftTextAlignment;
- if ((style & SWT.CENTER) != 0) align = OS.NSCenterTextAlignment;
- if ((style & SWT.RIGHT) != 0) align = OS.NSRightTextAlignment;
+ int align = OS.NSTextAlignmentLeft;
+ if ((style & SWT.CENTER) != 0) align = OS.NSTextAlignmentCenter;
+ if ((style & SWT.RIGHT) != 0) align = OS.NSTextAlignmentRight;
widget.setAlignment (align);
// widget.setTarget(widget);
// widget.setAction(OS.sel_sendSelection);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
index 450af730e3..b922b2f0b6 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Tree.java
@@ -1368,10 +1368,10 @@ public Rectangle getClientArea () {
Rectangle rect = super.getClientArea ();
/*
* OSX version < 10.11 - The origin of the tree is the top-left of the rows
- * of the table, not the header. We adjust the y value and height of the rect
+ * of the table, not the header. We adjust the y value and height of the rect
* accordingly, to include the header.
- *
- * OSX 10.11 & above - The origin of the tree is the header and the header's
+ *
+ * OSX 10.11 & above - The origin of the tree is the header and the header's
* height is already included in the rect. Hence, we return the rect as is.
*/
if (OS.VERSION_MMB < OS.VERSION_MMB (10, 11, 0)) {
@@ -1916,7 +1916,7 @@ public TreeItem getTopItem () {
point.y = rect.y;
/*
* In OSX 10.11, the origin of the tree is the header, not the top-left of the rows.
- * Offset the point's y coordinate accordingly.
+ * Offset the point's y coordinate accordingly.
*/
if (OS.VERSION_MMB >= OS.VERSION_MMB (10, 11, 0)) {
NSTableHeaderView headerView = ((NSTableView) view).headerView ();
@@ -2280,13 +2280,13 @@ void outlineView_willDisplayCell_forTableColumn_item (long /*int*/ id, long /*in
color = NSColor.disabledControlTextColor();
}
int direction = (style & SWT.RIGHT_TO_LEFT) != 0 ? OS.NSWritingDirectionRightToLeft : OS.NSWritingDirectionLeftToRight;
- int alignment = OS.NSLeftTextAlignment;
+ int alignment = OS.NSTextAlignmentLeft;
if (columnCount > 0) {
int style = columns [index].style;
if ((style & SWT.CENTER) != 0) {
- alignment = OS.NSCenterTextAlignment;
+ alignment = OS.NSTextAlignmentCenter;
} else if ((style & SWT.RIGHT) != 0) {
- alignment = OS.NSRightTextAlignment;
+ alignment = OS.NSTextAlignmentRight;
}
}
Font font = item.cellFont != null ? item.cellFont [index] : null;
@@ -3352,7 +3352,7 @@ public void setTopItem (TreeItem item) {
pt.y = widget.frameOfCellAtColumn(0, row).y;
/*
* In OSX 10.11, the origin of the tree is the header, not the top-left of the rows.
- * Offset the point's y coordinate accordingly.
+ * Offset the point's y coordinate accordingly.
*/
if (OS.VERSION_MMB >= OS.VERSION_MMB(10, 11, 0)) {
if (widget.headerView() != null) {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
index 9d14565027..2c581a42f3 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Widget.java
@@ -357,7 +357,7 @@ boolean canDragRowsWithIndexes_atPoint(long /*int*/ id, long /*int*/ sel, long /
}
long /*int*/ characterIndexForPoint (long /*int*/ id, long /*int*/ sel, long /*int*/ point) {
- return OS.NSNotFound;
+ return OS.NSNotFound();
}
long /*int*/ columnAtPoint(long /*int*/ id, long /*int*/ sel, NSPoint point) {

Back to the top