NSPasteboard: define new constants

Define new constants for NSPasteboard type identifiers. Most of them are
aliases to the old "Pboard"-style types, although some new ones are not
fully implemented:

* NSPasteboardTypePNG
* NSPasteboardTypeSound
* NSPasteboardTypeMultipleTextSelection
* NSPasteboardTypeTextFinderOptions
This commit is contained in:
Daniel Ferreira 2017-07-18 03:41:57 +10:00 committed by Ivan Vučica
parent f665887c68
commit 9e80b07531
3 changed files with 66 additions and 10 deletions

View file

@ -175,6 +175,26 @@ APPKIT_EXPORT NSString *NSRulerPboard;
*/
APPKIT_EXPORT NSString *NSPasteboardCommunicationException;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
APPKIT_EXPORT NSString *const NSPasteboardTypeString;
APPKIT_EXPORT NSString *const NSPasteboardTypePDF;
APPKIT_EXPORT NSString *const NSPasteboardTypeTIFF;
APPKIT_EXPORT NSString *const NSPasteboardTypePNG;
APPKIT_EXPORT NSString *const NSPasteboardTypeRTF;
APPKIT_EXPORT NSString *const NSPasteboardTypeRTFD;
APPKIT_EXPORT NSString *const NSPasteboardTypeHTML;
APPKIT_EXPORT NSString *const NSPasteboardTypeTabularText;
APPKIT_EXPORT NSString *const NSPasteboardTypeFont;
APPKIT_EXPORT NSString *const NSPasteboardTypeRuler;
APPKIT_EXPORT NSString *const NSPasteboardTypeColor;
APPKIT_EXPORT NSString *const NSPasteboardTypeSound;
APPKIT_EXPORT NSString *const NSPasteboardTypeMultipleTextSelection;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
APPKIT_EXPORT NSString *const NSPasteboardTypeTextFinderOptions;
#endif
#endif
@interface NSPasteboard : NSObject
{

View file

@ -553,6 +553,15 @@
#import "GNUstepGUI/GSServicesManager.h"
#import "GNUstepGUI/GSPasteboardServer.h"
/*
* FIXME
* We should learn to handle
* NSPasteboardTypePNG
* NSPasteboardTypeSound
* NSPasteboardTypeMultipleTextSelection
* NSPasteboardTypeTextFinderOptions
*/
static NSString *contentsPrefix = @"NSTypedFileContentsPboardType:";
static NSString *namePrefix = @"NSTypedFilenamesPboardType:";

View file

@ -266,23 +266,50 @@ NSString *NSImageRepRegistryChangedNotification =
@"NSImageRepRegistryChangedNotification";
// Pasteboard Type Globals
NSString *NSStringPboardType = @"NSStringPboardType";
NSString *NSColorPboardType = @"NSColorPboardType";
NSString *const NSPasteboardTypeString = @"NSStringPboardType";
NSString *const NSStringPboardType = NSPasteboardTypeString;
NSString *const NSPasteboardTypeColor = @"NSColorPboardType";
NSString *const NSColorPboardType = NSPasteboardTypeColor;
NSString *const NSPasteboardTypeFont = @"NSFontPboardType";
NSString *const NSFontPboardType = NSPasteboardTypeFont;
NSString *const NSPasteboardTypeRuler = @"NSRulerPboardType";
NSString *const NSRulerPboardType = NSPasteboardTypeRuler;
NSString *const NSPasteboardTypeTabularText = @"NSTabularTextPboardType";
NSString *const NSTabularTextPboardType = NSPasteboardTypeTabularText;
NSString *const NSPasteboardTypeRTF = @"NSRTFPboardType";
NSString *const NSRTFPboardType = NSPasteboardTypeRTF;
NSString *const NSPasteboardTypeRTFD = @"NSRTFDPboardType";
NSString *const NSRTFDPboardType = NSPasteboardTypeRTFD;
NSString *const NSPasteboardTypeTIFF = @"NSTIFFPboardType";
NSString *const NSTIFFPboardType = NSPasteboardTypeTIFF;
NSString *const NSPasteboardTypePDF = @"NSPDFPboardType";
NSString *const NSPDFPboardType = NSPasteboardTypePDF;
NSString *const NSPasteboardTypeHTML = @"NSHTMLPboardType";
NSString *const NSHTMLPboardType = NSPasteboardTypeHTML;
NSString *NSPasteboardTypePNG = @"NSPasteboardTypePNG";
NSString *NSPasteboardTypeSound = @"NSPasteboardTypeSound";
NSString *NSPasteboardTypeMultipleTextSelection =
@"NSPasteboardTypeMultipleTextSelection";
NSString *NSPasteboardTypeTextFinderOptions =
@"NSPasteboardTypeTextFinderOptions";
NSString *NSFileContentsPboardType = @"NSFileContentsPboardType";
NSString *NSFilenamesPboardType = @"NSFilenamesPboardType";
NSString *NSFontPboardType = @"NSFontPboardType";
NSString *NSRulerPboardType = @"NSRulerPboardType";
NSString *NSPostScriptPboardType = @"NSPostScriptPboardType";
NSString *NSTabularTextPboardType = @"NSTabularTextPboardType";
NSString *NSRTFPboardType = @"NSRTFPboardType";
NSString *NSRTFDPboardType = @"NSRTFDPboardType";
NSString *NSTIFFPboardType = @"NSTIFFPboardType";
NSString *NSDataLinkPboardType = @"NSDataLinkPboardType";
NSString *NSGeneralPboardType = @"NSGeneralPboardType";
NSString *NSPDFPboardType = @"NSPDFPboardType";
NSString *NSPICTPboardType = @"NSPICTPboardType";
NSString *NSURLPboardType = @"NSURLPboardType";
NSString *NSHTMLPboardType = @"NSHTMLPboardType";
NSString *NSVCardPboardType = @"NSVCardPboardType";
NSString *NSFilesPromisePboardType = @"NSFilesPromisePboardType";