Application Kit Constants Reference
| Framework | /System/Library/Frameworks/AppKit.framework |
| Declared in | AppKitErrors.h NSErrors.h NSGraphics.h NSInterfaceStyle.h NSNibDeclarations.h NSWindow.h |
Overview
This document describes the constants defined in the Application Kit framework that are not defined in, or are not described in, a document for an individual class.
See Application Kit Data Types Reference for descriptions of other constants defined in enumerations.
Constants
There are three types of constant in this document: global variables, errors, and exceptions.
Global Variables
Color Space Names
Color-space names designate predefined color spaces.
NSString *NSCalibratedWhiteColorSpace; NSString *NSCalibratedBlackColorSpace; NSString *NSCalibratedRGBColorSpace; NSString *NSDeviceWhiteColorSpace; NSString *NSDeviceBlackColorSpace; NSString *NSDeviceRGBColorSpace; NSString *NSDeviceCMYKColorSpace; NSString *NSNamedColorSpace; NSString *NSPatternColorSpace; NSString *NSCustomColorSpace;
Constants
NSCalibratedWhiteColorSpaceCalibrated color space with white and alpha components (pure white is 1.0)
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSCalibratedBlackColorSpaceCalibrated color space with black and alpha components (pure black is 1.0)
Available in OS X v10.0 and later.
Deprecated in OS X v10.6.
Declared in
NSGraphics.h.NSCalibratedRGBColorSpaceCalibrated color space with red, green, blue, and alpha components.
You can also create a color with HSB (hue, saturation, brightness) and alpha components and can extract these components.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSDeviceWhiteColorSpaceDevice-dependent color space with white and alpha components (pure white is 1.0)
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSDeviceBlackColorSpaceDevice-dependent color space with black and alpha components (pure black is 1.0)
Available in OS X v10.0 and later.
Deprecated in OS X v10.6.
Declared in
NSGraphics.h.NSDeviceRGBColorSpaceDevice-dependent color space with red, green, blue, and alpha components.
You can also create a color with HSB (hue, saturation, brightness) and alpha components and can extract these components.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSDeviceCMYKColorSpaceDevice-dependent color space with cyan, magenta, yellow, black, and alpha components
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSNamedColorSpaceCatalog name and color name components
The components of this color space are indexes into lists or catalogs of prepared colors. The catalogs of named colors come with lookup tables that are able to generate the correct color on a given device.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSPatternColorSpacePattern image (tiled)
Identifies a pattern color space, which is simply an image that is repeated over and over again in a tiled pattern.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSCustomColorSpaceCustom
NSColorSpaceobject and floating-point components describing a color in that spaceA custom color-space object represents a color space that is not necessarily predefined by the Application Kit. See “Working With Color Spaces” for information on creating custom color-space objects.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.
Discussion
You can use a color-space name in certain methods of NSColor that create or convert color objects. The name identifies the color space to be used for the operation.
Declared In
NSGraphics.hGrayscale Values
These constants are the standard gray values for the 2-bit deep grayscale color space.
const float NSWhite; const float NSLightGray; const float NSDarkGray; const float NSBlack;
Constants
NSWhiteA constant that specifies the white shade in the 2-bit deep grayscale color space.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSLightGrayA constant that specifies the light gray shade in the 2-bit deep grayscale color space.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSDarkGrayA constant that specifies the dark gray shade in the 2-bit deep grayscale color space.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.NSBlackA constant that specifies the black shade in the 2-bit deep grayscale color space.
Available in OS X v10.0 and later.
Declared in
NSGraphics.h.
NSInterfaceStyleDefault
NSInterfaceStyleDefault can be used to override the platform’s default interface style.
NSString *NSInterfaceStyleDefault;
Constants
NSInterfaceStyleDefaultFor more information, see the function
NSInterfaceStyleForKey.Available in OS X v10.0 and later.
Deprecated in OS X v10.8.
Declared in
NSInterfaceStyle.h.
Interface Builder Constants
Type qualifiers used by Interface Builder to synchronize with Xcode. For more information, see Communicating With Objects in Cocoa Fundamentals Guide.
#define IBAction void #define IBOutlet
Constants
IBActionType qualifier used by Interface Builder to synchronize actions added programmatically with its internal list of action methods defined for a project.
Available in OS X v10.0 and later.
Declared in
NSNibDeclarations.h.IBOutletIdentifier used to qualify an instance-variable declaration so that Interface Builder can synchronize the display and connection of outlets with Xcode.
Available in OS X v10.0 and later.
Declared in
NSNibDeclarations.h.
NSWindow—Sizes
Obsolete constant values. Do not use.
NSSize NSIconSize; NSSize NSTokenSize;
Constants
NSIconSizeObsolete constant values. Do not use.
Available in OS X v10.0 through OS X v10.3.
Declared in
NSWindow.h.NSTokenSizeObsolete constant values. Do not use.
Available in OS X v10.0 through OS X v10.3.
Declared in
NSWindow.h.
Errors
Attributed String Errors
These constants represent errors generated by NSAttributedString.
enum {
NSTextReadInapplicableDocumentTypeError = 65806,
NSTextWriteInapplicableDocumentTypeError = 66062,
NSTextReadWriteErrorMinimum = 65792,
NSTextReadWriteErrorMaximum = 66303
};
Constants
NSTextReadInapplicableDocumentTypeErrorIndicates a problem reading data with the specified format.
Available in OS X v10.4 and later.
Declared in
AppKitErrors.h.NSTextWriteInapplicableDocumentTypeErrorIndicates a problem writing data of the specified format.
Available in OS X v10.4 and later.
Declared in
AppKitErrors.h.NSTextReadWriteErrorMinimumThe beginning of a range of error codes reserved for future use.
Available in OS X v10.4 and later.
Declared in
AppKitErrors.h.NSTextReadWriteErrorMaximumThe end of a range of error codes reserved for future use.
Available in OS X v10.4 and later.
Declared in
AppKitErrors.h.
Discussion
These constants are returned in an NSError object.
Services Error Codes
These constants represent errors returned by application services.
enum {
NSServiceApplicationNotFoundError = 66560,
NSServiceApplicationLaunchFailedError = 66561,
NSServiceRequestTimedOutError = 66562,
NSServiceInvalidPasteboardDataError = 66563,
NSServiceMalformedServiceDictionaryError = 66564,
NSServiceMiscellaneousError = 66800,
NSServiceErrorMinimum = 66560,
NSServiceErrorMaximum = 66817
};
Constants
NSServiceApplicationNotFoundErrorThe service provider could not be found.
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.NSServiceApplicationLaunchFailedErrorThe service providing application could not be launched. This will typically contain an underlying error with an Launch Services error code.
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.NSServiceRequestTimedOutErrorThe service providing application did not open its service listening port in time, or the app didn't respond to the request in time; see the Console log to figure out which (the errors are typically reported the same way to the user).
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.NSServiceInvalidPasteboardDataErrorThe service providing app did not return a pasteboard with any of the promised types, or we couldn't write the data from the pasteboard to the object receiving the returned data.
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.NSServiceMalformedServiceDictionaryErrorThe service dictionary did not contain the necessary keys. Messages will typically be logged to the console giving more details.
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.NSServiceMiscellaneousErrorOther errors, representing programmatic mistakes in the service consuming application. These show a generic error message to the user.
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.NSServiceErrorMinimumInclusive service error range, for checking future error codes.
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.NSServiceErrorMaximumInclusive service error range, for checking future error codes.
Available in OS X v10.5 and later.
Declared in
AppKitErrors.h.
Exceptions
Application Kit Exception Names
These constants name the exceptions that the Application Kit can raise.
NSString *NSTextLineTooLongException; NSString *NSTextNoSelectionException; NSString *NSWordTablesWriteException; NSString *NSWordTablesReadException; NSString *NSTextReadException; NSString *NSTextWriteException; NSString *NSPasteboardCommunicationException; NSString *NSPrintingCommunicationException; NSString *NSAbortModalException; NSString *NSAbortPrintingException; NSString *NSIllegalSelectorException; NSString *NSAppKitVirtualMemoryException; NSString *NSBadRTFDirectiveException; NSString *NSBadRTFFontTableException; NSString *NSBadRTFStyleSheetException; NSString *NSTypedStreamVersionException; NSString *NSTIFFException; NSString *NSPrintPackageException; NSString *NSBadRTFColorTableException; NSString *NSDraggingException; NSString *NSColorListIOException; NSString *NSColorListNotEditableException; NSString *NSBadBitmapParametersException; NSString *NSWindowServerCommunicationException; NSString *NSFontUnavailableException; NSString *NSPPDIncludeNotFoundException; NSString *NSPPDParseException; NSString *NSPPDIncludeStackOverflowException; NSString *NSPPDIncludeStackUnderflowException; NSString *NSRTFPropertyStackOverflowException; NSString *NSAppKitIgnoredException; NSString *NSBadComparisonException; NSString *NSImageCacheException; NSString *NSNibLoadingException; NSString *NSBrowserIllegalDelegateException; NSString *NSAccessibilityException;
Constants
NSTextLineTooLongExceptionException generated if a line is too long in a
NSTextobject.Available in OS X v10.0 and later.
Declared in
NSErrors.h.NSTextNoSelectionExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSWordTablesWriteExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSWordTablesReadExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSTextReadExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSTextWriteExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSPasteboardCommunicationExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSPrintingCommunicationExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSAbortModalExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSAbortPrintingExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSIllegalSelectorExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSAppKitVirtualMemoryExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSBadRTFDirectiveExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSBadRTFFontTableExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSBadRTFStyleSheetExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSTypedStreamVersionExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSTIFFExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSPrintPackageExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSBadRTFColorTableExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSDraggingExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSColorListIOExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSColorListNotEditableExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSBadBitmapParametersExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSWindowServerCommunicationExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSFontUnavailableExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSPPDIncludeNotFoundExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSPPDParseExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSPPDIncludeStackOverflowExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSPPDIncludeStackUnderflowExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSRTFPropertyStackOverflowExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSAppKitIgnoredExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSBadComparisonExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSImageCacheExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSNibLoadingExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSBrowserIllegalDelegateExceptionAvailable in OS X v10.0 and later.
Declared in
NSErrors.h.NSAccessibilityExceptionAvailable in OS X v10.2 and later.
Declared in
NSErrors.h.
Declared In
NSErrors.h© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-06-02)