| Framework | Foundation/Foundation.h |
| Declared in | IKPictureTaker.h NSAppleEventManager.h NSByteOrder.h NSDate.h NSDecimal.h NSException.h NSGeometry.h NSHashTable.h NSInvocation.h NSMapTable.h NSObjCRuntime.h NSPathUtilities.h NSRange.h NSString.h NSZone.h QTKitDefines.h |
This document describes the data types and constants found in the Foundation framework.
Identifies an Apple event whose handling has been suspended. Can be used to resume handling of the Apple event.
typedef const struct __NSAppleEventManagerSuspension *NSAppleEventManagerSuspensionID;
NSAppleEventManager.h
These constants specify an endian format.
enum _NSByteOrder {
NS_UnknownByteOrder = CFByteOrderUnknown,
NS_LittleEndian = CFByteOrderLittleEndian,
NS_BigEndian = CFByteOrderBigEndian
};
NS_UnknownByteOrderThe byte order is unknown.
Available in Mac OS X v10.0 and later.
Declared in NSByteOrder.h.
NS_LittleEndianThe byte order is little endian.
Available in Mac OS X v10.0 and later.
Declared in NSByteOrder.h.
NS_BigEndianThe byte order is big endian.
Available in Mac OS X v10.0 and later.
Declared in NSByteOrder.h.
These constants are returned by NSHostByteOrder.
NSByteOrder.h
These constants are used to indicate how items in a request are ordered.
typedef enum _NSComparisonResult { NSOrderedAscending = -1, NSOrderedSame, NSOrderedDescending } NSComparisonResult;
NSOrderedAscendingThe left operand is smaller than the right operand.
Available in Mac OS X v10.0 and later.
Declared in NSObjCRuntime.h.
NSOrderedSameThe two operands are equal.
Available in Mac OS X v10.0 and later.
Declared in NSObjCRuntime.h.
NSOrderedDescendingThe left operand is greater than the right operand.
Available in Mac OS X v10.0 and later.
Declared in NSObjCRuntime.h.
These constants are used to indicate how items in a request are ordered, from the first one given in a method invocation or function call to the last (that is, left to right in code).
NSObjCRuntime.h
Used to describe a decimal number.
typedef struct {
signed int _exponent:8;
unsigned int _length:4;
unsigned int _isNegative:1;
unsigned int _isCompact:1;
unsigned int _reserved:18;
unsigned short _mantissa[NSDecimalMaxSize];
} NSDecimal;
The fields of NSDecimal are private.
Used by the functions described in "Decimals".
NSDecimal.h
Allows successive elements of a hash table to be returned each time this structure is passed to NSNextHashEnumeratorItem.
typedef struct {
unsigned _pi;
unsigned _si void *_bs;
} NSHashEnumerator;
The fields of NSHashEnumerator are private.
NSHashTable.h
The opaque data type used by the functions described in "Hash Tables".
typedef struct _NSHashTable NSHashTable;
For Mac OS X v10.5 and later, see also NSHashTable.
NSHashTable.h
Defines a structure that contains the function pointers used to configure behavior of NSHashTable with respect to elements within a hash table.
typedef struct {
unsigned (*hash)(NSHashTable *table, const void *);
BOOL (*isEqual)(NSHashTable *table, const void *, const void *);
void (*retain)(NSHashTable *table, const void *);
void (*release)(NSHashTable *table, void *);
NSString *(*describe)(NSHashTable *table, const void *);
} NSHashTableCallBacks;
hashPoints to the function that must produce hash code for elements of the hash table. If NULL, the pointer value is used as the hash code. Second parameter is the element for which hash code should be produced.
isEqualPoints to the function that compares second and third parameters. If NULL, then == is used for comparison.
retainPoints to the function that increments a reference count for the given element. If NULL, then nothing is done for reference counting.
releasePoints to the function that decrements a reference count for the given element, and if the reference count becomes 0, frees the given element. If NULL, then nothing is done for reference counting or releasing.
describePoints to the function that produces an autoreleased NSString * describing the given element. If NULL, then the hash table produces a generic string description.
All functions must know the types of things in the hash table to be able to operate on them. Sets of predefined call backs are described in "NSHashTable Callbacks".
NSHashTable.hSpecifies a bitfield used to configure the behavior of elements in an instance of NSHashTable.
typedef NSUInteger NSHashTableOptions
NSHashTable.hUsed to describe an integer.
#if __LP64__ typedef long NSInteger; #else typedef int NSInteger; endif
When building 32-bit applications, NSInteger is a 32-bit integer. A 64-bit application treats NSInteger as a 64-bit integer.
IKPictureTaker.h
Allows successive elements of a map table to be returned each time this structure is passed to NSNextMapEnumeratorPair.
typedef struct {
unsigned _pi;
unsigned _si;
void *_bs;
} NSMapEnumerator;
The fields of NSMapEnumerator are private.
NSMapTable.h
The opaque data type used by the functions described in "Map Tables".
typedef struct _NSMapTable NSMapTable;
For Mac OS X v10.5 and later, see also NSMapTable.
NSMapTable.h
The function pointers used to configure behavior of NSMapTable with respect to key elements within a map table.
typedef struct {
unsigned (*hash)(NSMapTable *table, const void *);
BOOL (*isEqual)(NSMapTable *table, const void *, const void *);
void (*retain)(NSMapTable *table, const void *);
void (*release)(NSMapTable *table, void *);
NSString *(*describe)(NSMapTable *table, const void *);
const void *notAKeyMarker;
} NSMapTableKeyCallBacks;
hashPoints to the function which must produce hash code for key elements of the map table. If NULL, the pointer value is used as the hash code. Second parameter is the element for which hash code should be produced.
isEqualPoints to the function which compares second and third parameters. If NULL, then == is used for comparison.
retainPoints to the function which increments a reference count for the given element. If NULL, then nothing is done for reference counting.
releasePoints to the function which decrements a reference count for the given element, and if the reference count becomes zero, frees the given element. If NULL, then nothing is done for reference counting or releasing.
describePoints to the function which produces an autoreleased NSString * describing the given element. If NULL, then the map table produces a generic string description.
notAKeyMarkerNo key put in map table can be this value. An exception is raised if attempt is made to use this value as a key
All functions must know the types of things in the map table to be able to operate on them. Sets of predefined call backs are described in "NSMapTable Key Call Backs".
Two predefined values to use for notAKeyMarker are NSNotAnIntMapKey and NSNotAPointerMapKey.
NSMapTable.hSpecifies a bitfield used to configure the behavior of elements in an instance of NSMapTable.
typedef NSUInteger NSMapTableOptions
NSMapTable.h
The function pointers used to configure behavior of NSMapTable with respect to value elements within a map table.
typedef struct {
void (*retain)(NSMapTable *table, const void *);
void (*release)(NSMapTable *table, void *);
NSString *(*describe)(NSMapTable *table, const void *);
} NSMapTableValueCallBacks;
retainPoints to the function that increments a reference count for the given element. If NULL, then nothing is done for reference counting.
releasePoints to the function that decrements a reference count for the given element, and if the reference count becomes zero, frees the given element. If NULL, then nothing is done for reference counting or releasing.
describePoints to the function that produces an autoreleased NSString * describing the given element. If NULL, then the map table produces a generic string description.
All functions must know the types of things in the map table to be able to operate on them. Sets of predefined call backs are described in "NSMapTable Value Callbacks".
NSMapTable.h
This structure is defined for use by NSInvocation—you should not use it directly.
typedef struct {
enum _NSObjCValueType type;
union {
char charValue;
short shortValue;
long longValue;
long long longlongValue;
float floatValue;
double doubleValue;
bool boolValue;
SEL selectorValue;
id objectValue;
void *pointerValue;
void *structLocation;
char *cStringLocation;
} value;
} NSObjCValue;
The fields of NSObjCValue are private.
NSInvocation.h
Represents a point in a Cartesian coordinate system.
typedef struct _NSPoint {
CGFloat x;
CGFloat y;
} NSPoint;
xThe x coordinate.
yThe y coordinate.
Prior to Mac OS X v10.5 the coordinates were represented by float values rather than CGFloat values.
When building for 64 bit systems, or building 32 bit like 64 bit, NSPoint is typedef’d to CGPoint.
NSGeometry.h
Type indicating a parameter is array of NSPoint structures.
typedef NSPoint *NSPointArray;
NSGeometry.h
Type indicating a parameter is a pointer to an NSPoint structure.
typedef NSPoint *NSPointPointer;
NSGeometry.h
A structure used to describe a portion of a series—such as characters in a string or objects in an NSArray object.
typedef struct _NSRange {
NSUInteger location;
NSUInteger length;
} NSRange;
locationThe start index (0 is the first, as in C arrays).
lengthThe number of items in the range (can be 0).
Foundation functions that operate on ranges include the following:
NSRange.h
Type indicating a parameter is a pointer to an NSRange structure.
typedef NSRange *NSRangePointer;
NSRange.h
Represents a rectangle.
typedef struct _NSRect {
NSPoint origin;
NSSize size;
} NSRect;
originThe origin of the rectangle (its starting x coordinate and y coordinate).
sizeThe width and height of the rectangle, as measured from the origin.
When building for 64 bit systems, or building 32 bit like 64 bit, NSRect is typedef’d to CGRect.
NSGeometry.h
Type indicating a parameter is array of NSRect structures.
typedef NSRect *NSRectArray;
NSGeometry.h
Identifiers used by NSDivideRect to specify the edge of the input rectangle from which the division is measured.
typedef enum _NSRectEdge { NSMinXEdge = 0, NSMinYEdge = 1, NSMaxXEdge = 2, NSMaxYEdge = 3 } NSRectEdge;
NSMinXEdgeSpecifies the left edge of the input rectangle.
The input rectangle is divided vertically, and the leftmost rectangle with the width of amount is placed in slice.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in NSGeometry.h.
NSMinYEdgeSpecifies the bottom edge of the input rectangle.
The input rectangle is divided horizontally, and the bottom rectangle with the height of amount is placed in slice.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in NSGeometry.h.
NSMaxXEdgeSpecifies the right edge of the input rectangle.
The input rectangle is divided vertically, and the rightmost rectangle with the width of amount is placed in slice.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in NSGeometry.h.
NSMaxYEdgeSpecifies the top edge of the input rectangle.
The input rectangle is divided horizontally, and the top rectangle with the height of amount is placed in slice.
Available in Mac OS X v10.0 and later.
Not available to 64-bit applications.
Declared in NSGeometry.h.
The parameters amount and slice are defined by NSDivideRect.
NSGeometry.h
Type indicating a parameter is a pointer to an NSRect structure.
typedef NSRect *NSRectPointer;
NSGeometry.h
These constants specify the location of a variety of directories.
typedef enum {
NSApplicationDirectory = 1,
NSDemoApplicationDirectory,
NSDeveloperApplicationDirectory,
NSAdminApplicationDirectory,
NSLibraryDirectory,
NSDeveloperDirectory,
NSUserDirectory,
NSDocumentationDirectory,
NSDocumentDirectory,
NSCoreServiceDirectory,
NSDesktopDirectory = 12,
NSCachesDirectory = 13,
NSApplicationSupportDirectory = 14,
NSDownloadsDirectory = 15,
NSAllApplicationsDirectory = 100,
NSAllLibrariesDirectory = 101
} NSSearchPathDirectory;
NSApplicationDirectorySupported applications (/Applications).
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSDemoApplicationDirectoryUnsupported applications and demonstration versions.
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSDeveloperApplicationDirectoryDeveloper applications (/Developer/Applications).
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSAdminApplicationDirectorySystem and network administration applications.
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSLibraryDirectoryVarious user-visible documentation, support, and configuration files (/Library).
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSDeveloperDirectoryDeveloper resources (/Developer).
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSUserDirectoryUser home directories (/Users).
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSDocumentationDirectoryDocumentation.
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSDocumentDirectoryDocument directory.
Available in Mac OS X v10.2 and later.
Declared in NSPathUtilities.h.
NSCoreServiceDirectoryLocation of core services (System/Library/CoreServices).
Available in Mac OS X v10.4 and later.
Declared in NSPathUtilities.h.
NSDesktopDirectoryLocation of user’s desktop directory.
Available in Mac OS X v10.4 and later.
Declared in NSPathUtilities.h.
NSCachesDirectoryLocation of discardable cache files (Library/Caches).
Available in Mac OS X v10.4 and later.
Declared in NSPathUtilities.h.
NSApplicationSupportDirectoryLocation of application support files (Library/Application Support).
Available in Mac OS X v10.4 and later.
Declared in NSPathUtilities.h.
NSDownloadsDirectoryLocation of the user’s downloads directory.
The NSDownloadsDirectory flag will only produce a path only when the NSUserDomainMask is provided.
Available in Mac OS X v10.5 and later.
Declared in NSPathUtilities.h.
NSAllApplicationsDirectoryAll directories where applications can occur.
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSAllLibrariesDirectoryAll directories where resources can occur.
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSPathUtilities.h
Search path domain constants specifying base locations for the NSSearchPathDirectory type.
typedef enum {
NSUserDomainMask = 1,
NSLocalDomainMask = 2,
NSNetworkDomainMask = 4,
NSSystemDomainMask = 8,
NSAllDomainsMask = 0x0ffff,
} NSSearchPathDomainMask;
NSUserDomainMaskThe user’s home directory—the place to install user’s personal items (~).
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSLocalDomainMaskLocal to the current machine—the place to install items available to everyone on this machine.
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSNetworkDomainMaskPublicly available location in the local area network—the place to install items available on the network (/Network).
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSSystemDomainMaskProvided by Apple — can’t be modified (/System) .
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSAllDomainsMaskAll domains.
Includes all of the above and future items.
Available in Mac OS X v10.0 and later.
Declared in NSPathUtilities.h.
NSPathUtilities.h
Represents a two-dimensional size.
typedef struct _NSSize {
CGFloat width;
CGFloat height;
} NSSize;
widthThe width.
heightThe height.
Normally, the values of width and height are non-negative. The functions that create an NSSize structure do not prevent you from setting a negative value for these attributes. If the value of width or height is negative, however, the behavior of some methods may be undefined.
Prior to Mac OS X v10.5 the width and height were represented by float values rather than CGFloat values.
When building for 64 bit systems, or building 32 bit like 64 bit, NSSize is typedef’d to CGSize.
NSGeometry.h
Type indicating a parameter is array of NSSize structures.
typedef NSSize *NSSizeArray;
NSGeometry.h
Type indicating parameter is a pointer to an NSSize structure.
typedef NSSize *NSSizePointer;
NSGeometry.h
Type representing string-encoding values.
typedef NSUInteger NSStringEncoding;
See String Encodings for a list of values.
NSString.h
Opaque structure containing endian-independent double value.
typedef struct {
unsigned long long v;
} NSSwappedDouble;
The fields of an NSSwappedDouble are private.
NSByteOrder.h
Opaque type containing an endian-independent float value.
typedef struct {
unsigned long v;
} NSSwappedFloat;
The fields of an NSSwappedFloat are private.
NSByteOrder.hUsed to specify a time interval, in seconds.
typedef double NSTimeInterval;
NSTimeInterval is always specified in seconds; it yields sub-millisecond precision over a range of 10,000 years.
NSDate.h
Used for the function handling exceptions outside of an exception-handling domain.
typedef volatile void NSUncaughtExceptionHandler(NSException *exception);
You can set exception handlers using NSSetUncaughtExceptionHandler.
NSException.hUsed to describe an unsigned integer.
#if __LP64__ typedef long NSUInteger; #else typedef int NSUInteger; endif
When building 32-bit applications, NSUInteger is a 32-bit unsigned integer. A 64-bit application treats NSUInteger as a 64-bit unsigned integer
QTKitDefines.h
Used to identify and manage memory zones.
typedef struct _NSZone NSZone;
NSZone.h
© 2008 Apple Inc. All Rights Reserved. (Last updated: 2008-09-09)