From 6e99d1730da179bba71d9097aa327fa9e16bea93 Mon Sep 17 00:00:00 2001 From: Lakshmi Shanmugam Date: Mon, 19 Oct 2015 15:17:10 +0530 Subject: Bug 302448 - Use new clipboard constants Replaced old clipboard constants with new ones. Replaced writeToPasteboard with writeObjects.--- .../internal/cocoa/AppKitFull.bridgesupport.extras | 16 ++++++++-------- .../org/eclipse/swt/internal/cocoa/NSPasteboard.java | 6 +++++- .../cocoa/org/eclipse/swt/internal/cocoa/NSURL.java | 6 +----- .../cocoa/org/eclipse/swt/internal/cocoa/OS.java | 20 ++++++++++---------- 4 files changed, 24 insertions(+), 24 deletions(-) (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/cocoa/org/eclipse/swt/internal/cocoa') 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 b49e3f442b..ac1df968a8 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 @@ -2325,6 +2325,10 @@ + + + + @@ -3886,15 +3890,11 @@ - + - - - - @@ -4704,13 +4704,15 @@ - + + + @@ -4723,11 +4725,9 @@ - - 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..ff41a4e7b1 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, 2015 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..53d1f6c5f8 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, 2015 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 7f0a660ae6..b6ff1f6788 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 @@ -2322,8 +2322,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:"); @@ -3042,9 +3042,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 */ @@ -3063,6 +3060,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 */ @@ -3099,9 +3105,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 */ @@ -3111,9 +3114,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 */ -- cgit v1.2.3