home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.2 (Developer)
/
NS_dev_3.2.iso
/
NextDeveloper
/
Headers
/
appkit
/
Pasteboard.h
< prev
next >
Wrap
Text File
|
1992-02-21
|
4KB
|
112 lines
/*
Pasteboard.h
Application Kit, Release 2.0
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#import <objc/Object.h>
#import <objc/hashtable.h>
#import <machkit/NXData.h>
/* standard Pasteboard types */
extern NXAtom NXAsciiPboardType;
extern NXAtom NXPostScriptPboardType;
extern NXAtom NXTIFFPboardType;
extern NXAtom NXRTFPboardType;
extern NXAtom NXFilenamePboardType;
extern NXAtom NXTabularTextPboardType;
extern NXAtom NXFontPboardType;
extern NXAtom NXRulerPboardType;
extern NXAtom NXFileContentsPboardType;
extern NXAtom NXColorPboardType;
/* historical type names - please change to new ones */
#define NXAsciiPboard NXAsciiPboardType
#define NXPostScriptPboard NXPostScriptPboardType
#define NXTIFFPboard NXTIFFPboardType
#define NXRTFPboard NXRTFPboardType
#define NXFilenamePboard NXFilenamePboardType
#define NXTabularTextPboard NXTabularTextPboardType
#define NXFindInfoPboard NXFindPboardType
/* standard Pasteboard names */
extern NXAtom NXGeneralPboard;
extern NXAtom NXFontPboard;
extern NXAtom NXRulerPboard;
extern NXAtom NXFindPboard;
extern NXAtom NXDragPboard;
/* historical names - please change to new ones */
#define NXSelectionPBName ((Object *)NXGeneralPboard)
#define NXRulerPBName ((Object *)NXRulerPboard)
#define NXFontPBName ((Object *)NXFontPboard)
#define NXFindInfoPBName ((Object *)NXFindPboard)
#define NXSelectionPboard ((Object *)NXGeneralPboard)
extern NXAtom NXCreateFilenamePboardType(const char *fileType);
extern NXAtom NXCreateFileContentsPboardType(const char *fileType);
extern const char *NXGetFileType(const char *pboardType);
extern const char **NXGetFileTypes(const char *const *pboardTypes);
@interface Pasteboard : Object
{
id owner;
int _realChangeCount;
int _ourChangeCount;
port_t _server;
id *_ownerArray;
int _numTypes;
NXAtom *_typesArray;
port_t _client;
BOOL *_typesProvided;
NXAtom _name;
NXAtom _host;
int _serverVersion;
unsigned int _reservedPasteboard4;
}
+ new;
+ newName:(const char *)name;
+ newUnique;
+ (NXAtom *)typesFilterableTo:(const char *)type;
+ newByFilteringFile:(const char *)filename;
+ newByFilteringData:(NXData *)data ofType:(const char *)type;
+ newByFilteringTypesInPasteboard:(Pasteboard *)pboard;
+ allocFromZone:(NXZone *)zone;
+ alloc;
- (NXAtom)name;
- free;
- freeGlobally;
- (int)declareTypes:(const char *const *)newTypes num:(int)numTypes owner:newOwner;
- (int)addTypes:(const char *const *)newTypes num:(int)numTypes owner:newOwner;
- (int)changeCount;
- writeType:(const char *)dataType data:(const char *)theData length:(int)numBytes;
- writeType:(const char *)dataType fromStream:(NXStream *)stream;
- (const NXAtom *)types;
- (const char *)findAvailableTypeFrom:(const char *const *)types num:(int)numTypes;
- readType:(const char *)dataType data:(char **)theData length:(int *)numBytes;
- (NXStream *)readTypeToStream:(const char *)dataType;
/* deallocate stream with NXCloseMemory(stream, NX_FREEBUFFER) */
- deallocatePasteboardData:(char *)data length:(int)numBytes;
@end
@interface Pasteboard(FileContents)
- (BOOL)writeFileContents:(const char *)filename;
- (char *)readFileContentsType:(const char *)type toFile:(const char *)filename;
@end
@interface Object(PasteboardOwner)
- pasteboard:sender provideData:(NXAtom)type;
- pasteboardChangedOwner:sender;
@end