Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLakshmi Shanmugam2017-01-30 09:08:42 +0000
committerLakshmi Shanmugam2017-01-30 13:19:18 +0000
commit55bc8ccdf93884ded248da653cf987e19ca1d532 (patch)
treeff68074a52d8a80368a4597a25329d08e846e9e6 /bundles/org.eclipse.swt/Eclipse SWT PI/cocoa
parent080cd6f525875782f8dd06eaa3e3996b265970f5 (diff)
downloadeclipse.platform.swt-55bc8ccdf93884ded248da653cf987e19ca1d532.tar.gz
eclipse.platform.swt-55bc8ccdf93884ded248da653cf987e19ca1d532.tar.xz
eclipse.platform.swt-55bc8ccdf93884ded248da653cf987e19ca1d532.zip
Bug 302448 - Use new clipboard constants
Replaced old deprecated clipboard constants with new ones. Replaced writeToPasteboard with writeObjects.
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os.c74
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/library/os_stats.h8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/AppKitFull.bridgesupport.extras16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/OS.java22
7 files changed, 70 insertions, 70 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 6d13033cb9..fb0d2a45ca 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -4759,18 +4759,6 @@ fail:
}
#endif
-#ifndef NO_NSHTMLPboardType
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSHTMLPboardType)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSHTMLPboardType_FUNC);
- rc = (jintLong)NSHTMLPboardType;
- OS_NATIVE_EXIT(env, that, NSHTMLPboardType_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSLigatureAttributeName
JNIEXPORT jintLong JNICALL OS_NATIVE(NSLigatureAttributeName)
(JNIEnv *env, jclass that)
@@ -4867,6 +4855,42 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSParagraphStyleAttributeName)
}
#endif
+#ifndef NO_NSPasteboardTypeHTML
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSPasteboardTypeHTML)
+ (JNIEnv *env, jclass that)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSPasteboardTypeHTML_FUNC);
+ rc = (jintLong)NSPasteboardTypeHTML;
+ OS_NATIVE_EXIT(env, that, NSPasteboardTypeHTML_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_NSPasteboardTypeRTF
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSPasteboardTypeRTF)
+ (JNIEnv *env, jclass that)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSPasteboardTypeRTF_FUNC);
+ rc = (jintLong)NSPasteboardTypeRTF;
+ OS_NATIVE_EXIT(env, that, NSPasteboardTypeRTF_FUNC);
+ return rc;
+}
+#endif
+
+#ifndef NO_NSPasteboardTypeString
+JNIEXPORT jintLong JNICALL OS_NATIVE(NSPasteboardTypeString)
+ (JNIEnv *env, jclass that)
+{
+ jintLong rc = 0;
+ OS_NATIVE_ENTER(env, that, NSPasteboardTypeString_FUNC);
+ rc = (jintLong)NSPasteboardTypeString;
+ OS_NATIVE_EXIT(env, that, NSPasteboardTypeString_FUNC);
+ return rc;
+}
+#endif
+
#ifndef NO_NSPointInRect
JNIEXPORT jboolean JNICALL OS_NATIVE(NSPointInRect)
(JNIEnv *env, jclass that, jobject arg0, jobject arg1)
@@ -5042,18 +5066,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSPrintSpoolJob)
}
#endif
-#ifndef NO_NSRTFPboardType
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSRTFPboardType)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSRTFPboardType_FUNC);
- rc = (jintLong)NSRTFPboardType;
- OS_NATIVE_EXIT(env, that, NSRTFPboardType_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSRange_1sizeof
JNIEXPORT jint JNICALL OS_NATIVE(NSRange_1sizeof)
(JNIEnv *env, jclass that)
@@ -5152,18 +5164,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(NSStrikethroughStyleAttributeName)
}
#endif
-#ifndef NO_NSStringPboardType
-JNIEXPORT jintLong JNICALL OS_NATIVE(NSStringPboardType)
- (JNIEnv *env, jclass that)
-{
- jintLong rc = 0;
- OS_NATIVE_ENTER(env, that, NSStringPboardType_FUNC);
- rc = (jintLong)NSStringPboardType;
- OS_NATIVE_EXIT(env, that, NSStringPboardType_FUNC);
- return rc;
-}
-#endif
-
#ifndef NO_NSStrokeWidthAttributeName
JNIEXPORT jintLong JNICALL OS_NATIVE(NSStrokeWidthAttributeName)
(JNIEnv *env, jclass that)
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 307695a9b1..1e02574e98 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -358,7 +358,6 @@ char * OS_nativeFunctionNames[] = {
"NSFontAttributeName",
"NSForegroundColorAttributeName",
"NSGetSizeAndAlignment",
- "NSHTMLPboardType",
"NSIntersectionRect",
"NSLigatureAttributeName",
"NSLinkAttributeName",
@@ -368,6 +367,9 @@ char * OS_nativeFunctionNames[] = {
"NSObliquenessAttributeName",
"NSOutlineViewColumnDidMoveNotification",
"NSParagraphStyleAttributeName",
+ "NSPasteboardTypeHTML",
+ "NSPasteboardTypeRTF",
+ "NSPasteboardTypeString",
"NSPointInRect",
"NSPoint_1sizeof",
"NSPrintAllPages",
@@ -382,7 +384,6 @@ char * OS_nativeFunctionNames[] = {
"NSPrintSavePath",
"NSPrintScalingFactor",
"NSPrintSpoolJob",
- "NSRTFPboardType",
"NSRange_1sizeof",
"NSRectFillUsingOperation",
"NSRect_1sizeof",
@@ -391,7 +392,6 @@ char * OS_nativeFunctionNames[] = {
"NSSpellingStateAttributeName",
"NSStrikethroughColorAttributeName",
"NSStrikethroughStyleAttributeName",
- "NSStringPboardType",
"NSStrokeWidthAttributeName",
"NSSystemColorsDidChangeNotification",
"NSTIFFPboardType",
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 546b8b682b..0d9f8e770d 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -368,7 +368,6 @@ typedef enum {
NSFontAttributeName_FUNC,
NSForegroundColorAttributeName_FUNC,
NSGetSizeAndAlignment_FUNC,
- NSHTMLPboardType_FUNC,
NSIntersectionRect_FUNC,
NSLigatureAttributeName_FUNC,
NSLinkAttributeName_FUNC,
@@ -378,6 +377,9 @@ typedef enum {
NSObliquenessAttributeName_FUNC,
NSOutlineViewColumnDidMoveNotification_FUNC,
NSParagraphStyleAttributeName_FUNC,
+ NSPasteboardTypeHTML_FUNC,
+ NSPasteboardTypeRTF_FUNC,
+ NSPasteboardTypeString_FUNC,
NSPointInRect_FUNC,
NSPoint_1sizeof_FUNC,
NSPrintAllPages_FUNC,
@@ -392,7 +394,6 @@ typedef enum {
NSPrintSavePath_FUNC,
NSPrintScalingFactor_FUNC,
NSPrintSpoolJob_FUNC,
- NSRTFPboardType_FUNC,
NSRange_1sizeof_FUNC,
NSRectFillUsingOperation_FUNC,
NSRect_1sizeof_FUNC,
@@ -401,7 +402,6 @@ typedef enum {
NSSpellingStateAttributeName_FUNC,
NSStrikethroughColorAttributeName_FUNC,
NSStrikethroughStyleAttributeName_FUNC,
- NSStringPboardType_FUNC,
NSStrokeWidthAttributeName_FUNC,
NSSystemColorsDidChangeNotification_FUNC,
NSTIFFPboardType_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 4e3933d433..ca9f470a9d 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
@@ -2329,6 +2329,10 @@
<method selector="types" swt_gen="true">
<retval swt_gen="true"></retval>
</method>
+ <method selector="writeObjects:" swt_gen="true">
+ <arg swt_gen="true"></arg>
+ <retval swt_gen="true"></retval>
+ </method>
</class>
<class name="NSPathCell" swt_superclass="NSActionCell">
</class>
@@ -3890,15 +3894,11 @@
<retval swt_gen="true"></retval>
</method>
</class>
- <class name="NSURL" swt_gen="true">
+ <class name="NSURL" swt_gen="mixed">
<method class_method="true" selector="URLFromPasteboard:" swt_gen="true">
<arg swt_gen="true"></arg>
<retval swt_gen="true"></retval>
</method>
- <method selector="writeToPasteboard:" swt_gen="true">
- <arg swt_gen="true"></arg>
- <retval swt_gen="true"></retval>
- </method>
</class>
<class name="NSUserDefaultsController" swt_superclass="NSController">
</class>
@@ -4717,13 +4717,15 @@
<constant name="NSFilenamesPboardType" swt_gen="true"></constant>
<constant name="NSFontAttributeName" swt_gen="true"></constant>
<constant name="NSForegroundColorAttributeName" swt_gen="true"></constant>
- <constant name="NSHTMLPboardType" swt_gen="true"></constant>
<constant name="NSLigatureAttributeName" swt_gen="true"></constant>
<constant name="NSLinkAttributeName" swt_gen="true"></constant>
<constant name="NSModalPanelRunLoopMode" swt_gen="true"></constant>
<constant name="NSObliquenessAttributeName" swt_gen="true"></constant>
<constant name="NSOutlineViewColumnDidMoveNotification" swt_gen="true"></constant>
<constant name="NSParagraphStyleAttributeName" swt_gen="true"></constant>
+ <constant name="NSPasteboardTypeHTML" swt_gen="true"></constant>
+ <constant name="NSPasteboardTypeRTF" swt_gen="true"></constant>
+ <constant name="NSPasteboardTypeString" swt_gen="true"></constant>
<constant name="NSPrintAllPages" swt_gen="true"></constant>
<constant name="NSPrintCopies" swt_gen="true"></constant>
<constant name="NSPrintFirstPage" swt_gen="true"></constant>
@@ -4736,11 +4738,9 @@
<constant name="NSPrintSavePath" swt_gen="true"></constant>
<constant name="NSPrintScalingFactor" swt_gen="true"></constant>
<constant name="NSPrintSpoolJob" swt_gen="true"></constant>
- <constant name="NSRTFPboardType" swt_gen="true"></constant>
<constant name="NSSpellingStateAttributeName" swt_gen="true"></constant>
<constant name="NSStrikethroughColorAttributeName" swt_gen="true"></constant>
<constant name="NSStrikethroughStyleAttributeName" swt_gen="true"></constant>
- <constant name="NSStringPboardType" swt_gen="true"></constant>
<constant name="NSStrokeWidthAttributeName" swt_gen="true"></constant>
<constant name="NSSystemColorsDidChangeNotification" swt_gen="true"></constant>
<constant name="NSTIFFPboardType" swt_gen="true"></constant>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java
index b39d72dcea..55dbb0d25b 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSPasteboard.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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,4 +79,8 @@ public NSArray types() {
return result != 0 ? new NSArray(result) : null;
}
+public boolean writeObjects(NSArray objects) {
+ return OS.objc_msgSend_bool(this.id, OS.sel_writeObjects_, objects != null ? objects.id : 0);
+}
+
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java
index 6de4194ffe..c6fbb70537 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa/NSURL.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -29,10 +29,6 @@ public static NSURL URLFromPasteboard(NSPasteboard pasteBoard) {
return result != 0 ? new NSURL(result) : null;
}
-public void writeToPasteboard(NSPasteboard pasteBoard) {
- OS.objc_msgSend(this.id, OS.sel_writeToPasteboard_, pasteBoard != null ? pasteBoard.id : 0);
-}
-
public static NSURL URLWithString(NSString URLString) {
long /*int*/ result = OS.objc_msgSend(OS.class_NSURL, OS.sel_URLWithString_, URLString != null ? URLString.id : 0);
return result != 0 ? new NSURL(result) : null;
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 131b24253d..ddef5763f8 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
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2017 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
@@ -2325,8 +2325,8 @@ public static final long /*int*/ sel_windowWithWindowNumber_ = sel_registerName(
public static final long /*int*/ sel_windows = sel_registerName("windows");
public static final long /*int*/ sel_worksWhenModal = sel_registerName("worksWhenModal");
public static final long /*int*/ sel_wraps = sel_registerName("wraps");
+public static final long /*int*/ sel_writeObjects_ = sel_registerName("writeObjects:");
public static final long /*int*/ sel_writeSelectionToPasteboard_types_ = sel_registerName("writeSelectionToPasteboard:types:");
-public static final long /*int*/ sel_writeToPasteboard_ = sel_registerName("writeToPasteboard:");
public static final long /*int*/ sel_yearOfCommonEra = sel_registerName("yearOfCommonEra");
public static final long /*int*/ sel_zoom_ = sel_registerName("zoom:");
@@ -3046,9 +3046,6 @@ public static final NSString NSFontAttributeName = new NSString(NSFontAttributeN
public static final native long /*int*/ NSForegroundColorAttributeName();
public static final NSString NSForegroundColorAttributeName = new NSString(NSForegroundColorAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSHTMLPboardType();
-public static final NSString NSHTMLPboardType = new NSString(NSHTMLPboardType());
-/** @method flags=const */
public static final native long /*int*/ NSLigatureAttributeName();
public static final NSString NSLigatureAttributeName = new NSString(NSLigatureAttributeName());
/** @method flags=const */
@@ -3067,6 +3064,15 @@ public static final NSString NSOutlineViewColumnDidMoveNotification = new NSStri
public static final native long /*int*/ NSParagraphStyleAttributeName();
public static final NSString NSParagraphStyleAttributeName = new NSString(NSParagraphStyleAttributeName());
/** @method flags=const */
+public static final native long /*int*/ NSPasteboardTypeHTML();
+public static final NSString NSPasteboardTypeHTML = new NSString(NSPasteboardTypeHTML());
+/** @method flags=const */
+public static final native long /*int*/ NSPasteboardTypeRTF();
+public static final NSString NSPasteboardTypeRTF = new NSString(NSPasteboardTypeRTF());
+/** @method flags=const */
+public static final native long /*int*/ NSPasteboardTypeString();
+public static final NSString NSPasteboardTypeString = new NSString(NSPasteboardTypeString());
+/** @method flags=const */
public static final native long /*int*/ NSPrintAllPages();
public static final NSString NSPrintAllPages = new NSString(NSPrintAllPages());
/** @method flags=const */
@@ -3103,9 +3109,6 @@ public static final NSString NSPrintScalingFactor = new NSString(NSPrintScalingF
public static final native long /*int*/ NSPrintSpoolJob();
public static final NSString NSPrintSpoolJob = new NSString(NSPrintSpoolJob());
/** @method flags=const */
-public static final native long /*int*/ NSRTFPboardType();
-public static final NSString NSRTFPboardType = new NSString(NSRTFPboardType());
-/** @method flags=const */
public static final native long /*int*/ NSSpellingStateAttributeName();
public static final NSString NSSpellingStateAttributeName = new NSString(NSSpellingStateAttributeName());
/** @method flags=const */
@@ -3115,9 +3118,6 @@ public static final NSString NSStrikethroughColorAttributeName = new NSString(NS
public static final native long /*int*/ NSStrikethroughStyleAttributeName();
public static final NSString NSStrikethroughStyleAttributeName = new NSString(NSStrikethroughStyleAttributeName());
/** @method flags=const */
-public static final native long /*int*/ NSStringPboardType();
-public static final NSString NSStringPboardType = new NSString(NSStringPboardType());
-/** @method flags=const */
public static final native long /*int*/ NSStrokeWidthAttributeName();
public static final NSString NSStrokeWidthAttributeName = new NSString(NSStrokeWidthAttributeName());
/** @method flags=const */

Back to the top