home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J (Developer)
/
os42jdev.iso
/
NextDeveloper
/
OpenStepConversion
/
IntermediateFrameworks3
/
AppKit.framework
/
Headers
/
NSImage.h
< prev
next >
Wrap
Text File
|
1994-09-29
|
4KB
|
135 lines
/*
NXImage.h
Application Kit, Release 2.0
Copyright (c) 1988, 1989, 1990, NeXT, Inc. All rights reserved.
*/
#import <Foundation/NSObject.h>
#import "NSColor.h"
#import "NSImageRep.h"
#import "NSPasteboard.h"
#import <objc/List.h>
#import <objc/zone.h>
#import "NSGraphics.h"
@interface NSImage : NSObject
{
char *name;
NSSize _size;
struct __imageFlags {
#ifdef __BIG_ENDIAN__
unsigned int scalable:1;
unsigned int dataRetained:1;
unsigned int flipDraw:1;
unsigned int uniqueWindow:1;
unsigned int uniqueWasExplicitlySet:1;
unsigned int sizeWasExplicitlySet:1;
unsigned int builtIn:1;
unsigned int needsToExpand:1;
unsigned int useEPSOnResolutionMismatch:1;
unsigned int colorMatchPreferred:1;
unsigned int multipleResolutionMatching:1;
unsigned int dontFreeName:1;
unsigned int subImage:1;
unsigned int aSynch:1;
unsigned int archiveByName:1;
unsigned int unboundedCacheDepth:1;
#else
unsigned int unboundedCacheDepth:1;
unsigned int archiveByName:1;
unsigned int aSynch:1;
unsigned int subImage:1;
unsigned int dontFreeName:1;
unsigned int multipleResolutionMatching:1;
unsigned int colorMatchPreferred:1;
unsigned int useEPSOnResolutionMismatch:1;
unsigned int needsToExpand:1;
unsigned int builtIn:1;
unsigned int sizeWasExplicitlySet:1;
unsigned int uniqueWasExplicitlySet:1;
unsigned int uniqueWindow:1;
unsigned int flipDraw:1;
unsigned int dataRetained:1;
unsigned int scalable:1;
#endif
} _flags;
short _reservedShort;
void *_reps;
List *_repList;
NSColor *_color;
int _reservedInt;
}
+ imageNamed:(NSString *)name;
- (id)initWithSize:(NSSize)aSize;
- (id)initWithData:(NSData *)data; /* when archived, saves contents */
- (id)initWithContentsOfFile:(NSString *)fileName; /* when archived, saves contents */
- (id)initByReferencingFile:(NSString *)fileName; /* when archived, saves fileName */
- (id)initWithPasteboard:(NSPasteboard *)pasteboard;
- setSize:(NSSize)aSize;
- (NSSize)size;
- (BOOL)setName:(NSString *)string;
- (NSString *)name;
- setFlipped:(BOOL)flag;
- (BOOL)isFlipped;
- setScalesWhenResized:(BOOL)flag;
- (BOOL)scalesWhenResized;
- setDataRetained:(BOOL)flag;
- (BOOL)isDataRetained;
- setCachedSeparately:(BOOL)flag;
- (BOOL)isCachedSeparately;
- setCacheDepthMatchesImageDepth:(BOOL)flag;
- (BOOL)cacheDepthMatchesImageDepth;
- setBackgroundColor:(NSColor *)aColor;
- (NSColor *)backgroundColor;
- setUsesEPSOnResolutionMismatch:(BOOL)flag;
- (BOOL)usesEPSOnResolutionMismatch;
- setPrefersColorMatch:(BOOL)flag;
- (BOOL)prefersColorMatch;
- setMatchesOnMultipleResolution:(BOOL)flag;
- (BOOL)matchesOnMultipleResolution;
- dissolveToPoint:(NSPoint)point fraction:(float)delta;
- dissolveToPoint:(NSPoint)point fromRect:(NSRect)rect fraction:(float)delta;
- compositeToPoint:(NSPoint)point operation:(int)op;
- compositeToPoint:(NSPoint)point fromRect:(NSRect)rect operation:(int)op;
- (BOOL)drawRepresentation:(NSImageRep *)imageRep inRect:(NSRect)rect;
- recache;
- (NSData *)TIFFRepresentation;
- (NSData *)TIFFRepresentationUsingCompression:(int)compression factor:(float)aFloat;
- (NSArray *)representations;
- (void)addRepresentations:(NSArray *)imageReps;
- (BOOL)addRepresentation:(NSImageRep *)imageRepresentation;
- removeRepresentation:(NSImageRep *)imageRepresentation;
- (BOOL)isValid;
- (BOOL)lockFocus;
- (BOOL)lockFocusOnRepresentation:(NSImageRep *)imageRepresentation;
- unlockFocus;
- (NSImageRep *)bestRepresentationForDevice:(NSDictionary *)deviceDescription;
- setDelegate:(id)anObject;
- delegate;
/* These return union of all the types registered with NSImageRep.
*/
+ (NSArray *)imageUnfilteredFileTypes;
+ (NSArray *)imageUnfilteredPasteboardTypes;
+ (NSArray *)imageFileTypes;
+ (NSArray *)imagePasteboardTypes;
+ (BOOL)canInitWithPasteboard:(NSPasteboard *)pasteboard;
@end
@interface NSObject(NSImageDelegate)
- (NSImage *)imageDidNotDraw:sender inRect:(NSRect)aRect;
@end
@interface NSBundle(NSBundleImageExtension)
- (NSString *)pathForImageResource:(NSString *)name;
@end