Copyright (c) 1994, NeXT, Inc. All rights reserved.
*/
#import <Foundation/Foundation.h>
#import <DPSClient/dpsclient.h>
@class NSColor;
/* Predefined colorspace names.
*/
extern NSString *NSCalibratedWhiteColorSpace; /* 1.0 == white */
extern NSString *NSCalibratedBlackColorSpace; /* 1.0 == black */
extern NSString *NSCalibratedRGBColorSpace;
extern NSString *NSDeviceWhiteColorSpace; /* 1.0 == white */
extern NSString *NSDeviceBlackColorSpace; /* 1.0 == black */
extern NSString *NSDeviceRGBColorSpace;
extern NSString *NSDeviceCMYKColorSpace;
extern NSString *NSNamedColorSpace; /* Used for "catalog" colors */
extern NSString *NSCustomColorSpace; /* Used to indicate a custom gstate in images */
/* NSWindowDepth defines the values used in setting window depth limits. "0" indicates default depth. Window depths should not be made persistent as they will not be the same across systems. Use the functions NSBPSFromDepth(), NSColorSpaceFromDepth(), NSBitsPerPixelFromDepth(), and NSPlanarFromDepth() to extract info from an NSWindowDepth. Use NSBestDepth() to compute window depths. NSBestDepth() will try to accomodate all the parameters (match or better); if there are multiple matches, it gives the closest, with matching colorSpace first, then bps, then planar, then bpp. bpp is "bits per pixel"; 0 indicates default (same as the number of bits per plane, either bps or bps * NSNumberOfColorComponents()); other values maybe used as hints to provide backing stores of different configuration; for instance, 8 bit color. exactMatch is optional and indicates whether all the parameters matched exactly.
*/
typedef int NSWindowDepth;
extern NSWindowDepth NSBestDepth (NSString *colorSpace, int bps, int bpp, BOOL planar, BOOL *exactMatch);
extern void NSDrawBitmap(NSRect rect, int width, int height, int bps, int spp, int bpp, int bpr, BOOL isPlanar, BOOL hasAlpha, NSString *colorSpaceName, const unsigned char *const data[5]);