1 /* Copyright (c) 2006-2007 Christopher J. W. Lloyd
3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
9 #import <Foundation/Foundation.h>
10 #import <AppKit/AppKitExport.h>
12 // New Pasteboard Types (added in 10.6) and interchangeable with the old pasteboard types in Cocotron
13 APPKIT_EXPORT NSString
*const NSPasteboardTypeString
;
14 APPKIT_EXPORT NSString
*const NSPasteboardTypePDF
;
15 APPKIT_EXPORT NSString
*const NSPasteboardTypeTIFF
;
16 APPKIT_EXPORT NSString
*const NSPasteboardTypeRTF
;
17 APPKIT_EXPORT NSString
*const NSPasteboardTypeRTFD
;
18 APPKIT_EXPORT NSString
*const NSPasteboardTypeHTML
;
19 APPKIT_EXPORT NSString
*const NSPasteboardTypeTabularText
;
20 APPKIT_EXPORT NSString
*const NSPasteboardTypeFont
;
21 APPKIT_EXPORT NSString
*const NSPasteboardTypeRuler
;
22 APPKIT_EXPORT NSString
*const NSPasteboardTypeColor
;
24 // Old Pasteboard Types
25 APPKIT_EXPORT NSString
*const NSColorPboardType
;
26 APPKIT_EXPORT NSString
*const NSFileContentsPboardType
;
27 APPKIT_EXPORT NSString
*const NSFilenamesPboardType
;
28 APPKIT_EXPORT NSString
*const NSFontPboardType
;
29 APPKIT_EXPORT NSString
*const NSPDFPboardType
;
30 APPKIT_EXPORT NSString
*const NSPICTPboardType
;
31 APPKIT_EXPORT NSString
*const NSPostScriptPboardType
;
32 APPKIT_EXPORT NSString
*const NSRTFDPboardType
;
33 APPKIT_EXPORT NSString
*const NSRTFPboardType
;
34 APPKIT_EXPORT NSString
*const NSRulerPboardType
;
35 APPKIT_EXPORT NSString
*const NSStringPboardType
;
36 APPKIT_EXPORT NSString
*const NSTabularTextPboardType
;
37 APPKIT_EXPORT NSString
*const NSTIFFPboardType
;
38 APPKIT_EXPORT NSString
*const NSURLPboardType
;
40 APPKIT_EXPORT NSString
*const NSDragPboard
;
41 APPKIT_EXPORT NSString
*const NSFindPboard
;
42 APPKIT_EXPORT NSString
*const NSFontPboard
;
43 APPKIT_EXPORT NSString
*const NSGeneralPboard
;
44 APPKIT_EXPORT NSString
*const NSRulerPboard
;
46 @interface NSPasteboard
: NSObject
48 + (NSPasteboard
*)generalPasteboard
;
49 + (NSPasteboard
*)pasteboardWithName
:(NSString
*)name
;
54 - (NSString
*)availableTypeFromArray
:(NSArray
*)types
;
56 - (NSData
*)dataForType
:(NSString
*)type
;
57 - (NSString
*)stringForType
:(NSString
*)type
;
58 - propertyListForType
:(NSString
*)type
;
60 - (int)declareTypes
:(NSArray
*)types owner
:owner
;
61 - (int)addTypes
:(NSArray
*)types owner
:(id
)owner
;
63 - (BOOL
)setData
:(NSData
*)data forType
:(NSString
*)type
;
64 - (BOOL
)setString
:(NSString
*)string forType
:(NSString
*)type
;
65 - (BOOL
)setPropertyList
:plist forType
:(NSString
*)type
;
69 @interface
NSObject (NSPasteboard
)
70 - (void)pasteboard
:(NSPasteboard
*)sender provideDataForType
:(NSString
*)type
;
71 - (void)pasteboardChangedOwner
:(NSPasteboard
*)sender
;