Framework |
CoreFoundation/CoreFoundation.h |
Companion guide | |
Declared in | CFBase.h |
Core Foundation defines a number of miscellaneous symbols that are either used by many different opaque types, such as CFIndex
, or apply to Core Foundation as a whole, such as kCFCoreFoundationVersionNumber
. These symbols are collected together and documented here.
Declares and initializes a CFRange
structure.
CFRange CFRangeMake ( CFIndex loc, CFIndex len );
The starting location of the range.
The length of the range.
An initialized structure of type CFRange
.
This is an in-line convenience function for creating initialized CFRange
structures.
CFBase.h
Callback function that compares two values. You provide a pointer to this callback in certain Core Foundation sorting functions.
typedef CFComparisonResult (*CFComparatorFunction) ( const void *val1, const void *val2, void *context );
If you name your function MyCallBack
, you would declare it like this:
CFComparisonResult MyCallBack ( const void *val1, const void *val2, void *context );
The first value to compare.
The second value to compare.
An untyped pointer to the context of the evaluation.
The meaning of this value and its use are defined by each comparator function. This value is usually passed to a sort function, such as CFArraySortValues
, which then passes it, unchanged, to the comparator function.
A CFComparisonResult
value that indicates whether the val1 is equal to, less than, or greater than val2. See “Comparison Results” for a list of possible values.
If you need to sort the elements in a collection using special criteria, you can implement a comparator function with the signature defined by this prototype. You pass a pointer to this function in one of the “sort” functions, such as CFArray's CFArraySortValues
.
You can also pass pointers to standard Core Foundation comparator functions such as CFStringCompare
and CFDateCompare
.
CFBase.h
An integer type used throughout Core Foundation in several programmatic roles: as an array index and for count, size, and length parameters and return values.
typedef SInt32 CFIndex;
Core Foundation types as CFIndex
all parameters and return values that might grow over time as the processor's address size changes. On architectures where pointer sizes are a different size (say, 64 bits) CFIndex
might be declared to be also 64 bits, independent of the size of int
.
If you type your own variables that interact with Core Foundation as CFIndex
, your code will have a higher degree of source compatibility in the future.
CFBase.h
A bitfield used for passing special allocation and other requests into Core Foundation functions.
typedef UInt32 CFOptionFlags;
The flag bits are specific to particular opaque types and functions in Core Foundation.
CFBase.h
A structure representing a range of sequential items in a container, such as characters in a buffer or elements in a collection.
struct CFRange { CFIndex location; CFIndex length; }; typedef struct CFRange CFRange;
location
An integer representing the starting location of the range.
length
An integer representing the number of items in the range.
CFBase.h
Constants returned by comparison functions, indicating whether a value is equal to, less than, or greater than another value.
enum CFComparisonResult { kCFCompareLessThan = -1, kCFCompareEqualTo = 0, kCFCompareGreaterThan = 1 }; typedef enum CFComparisonResult CFComparisonResult;
kCFCompareLessThan
Returned by a comparison function if the first value is less than the second value.
Available in Mac OS X v10.0 and later.
Declared in CFBase.h
.
kCFCompareEqualTo
Returned by a comparison function if the first value is equal to the second value.
Available in Mac OS X v10.0 and later.
Declared in CFBase.h
.
kCFCompareGreaterThan
Returned by a comparison function if the first value is greater than the second value.
Available in Mac OS X v10.0 and later.
Declared in CFBase.h
.
CFBase.h
Special value returned when a Core Foundation function cannot locate a requested value.
enum { kCFNotFound = -1 };
kCFNotFound
A constant that indicates that a search operation did not succeed in locating the target value.
Available in Mac OS X v10.0 and later.
Declared in CFBase.h
.
CFBase.h
Current version number of the Core Foundation framework.
double kCFCoreFoundationVersionNumber;
kCFCoreFoundationVersionNumber
The current version of the Core Foundation framework. Compare this value to the values in “Framework Version Numbers.” Although this variable was added to the CFBase.h header file in Mac OS X v10.1, it was available and can be used in Mac OS X v10.0.
Available in Mac OS X v10.1 and later.
Declared in CFBase.h
.
CFBase.h
Version numbers of the Core Foundation framework.
#define kCFCoreFoundationVersionNumber10_0 196.4 #define kCFCoreFoundationVersionNumber10_0_3 196.5 #define kCFCoreFoundationVersionNumber10_1 226.0 #define kCFCoreFoundationVersionNumber10_1_2 227.2 #define kCFCoreFoundationVersionNumber10_1_4 227.3 #define kCFCoreFoundationVersionNumber10_2 263.0 #define kCFCoreFoundationVersionNumber10_2_1 263.10 #define kCFCoreFoundationVersionNumber10_2_2 263.10 #define kCFCoreFoundationVersionNumber10_2_3 263.30 #define kCFCoreFoundationVersionNumber10_2_4 263.30 #define kCFCoreFoundationVersionNumber10_2_5 263.50 #define kCFCoreFoundationVersionNumber10_2_6 263.50 #define kCFCoreFoundationVersionNumber10_2_7 263.50 #define kCFCoreFoundationVersionNumber10_2_8 263.50 #define kCFCoreFoundationVersionNumber10_3 299.00 #define kCFCoreFoundationVersionNumber10_3_1 299.00 #define kCFCoreFoundationVersionNumber10_3_2 299.00 #define kCFCoreFoundationVersionNumber10_3_3 299.30 #define kCFCoreFoundationVersionNumber10_3_4 299.31 #define kCFCoreFoundationVersionNumber10_3_5 299.31 #define kCFCoreFoundationVersionNumber10_3_6 299.32 #define kCFCoreFoundationVersionNumber10_3_7 299.33 #define kCFCoreFoundationVersionNumber10_3_8 299.33 #define kCFCoreFoundationVersionNumber10_3_9 299.35 #define kCFCoreFoundationVersionNumber10_4 368.00 #define kCFCoreFoundationVersionNumber10_4_1 368.10 #define kCFCoreFoundationVersionNumber10_4_2 368.11 #define kCFCoreFoundationVersionNumber10_4_3 368.18 #define kCFCoreFoundationVersionNumber10_4_4_Intel 368.26 #define kCFCoreFoundationVersionNumber10_4_4_PowerPC 368.25 #define kCFCoreFoundationVersionNumber10_4_5_Intel 368.26 #define kCFCoreFoundationVersionNumber10_4_5_PowerPC 368.25 #define kCFCoreFoundationVersionNumber10_4_6_Intel 368.26 #define kCFCoreFoundationVersionNumber10_4_6_PowerPC 368.25 #define kCFCoreFoundationVersionNumber10_4_7 368.27
kCFCoreFoundationVersionNumber10_0
The Core Foundation framework version in Mac OS X version 10.0.
Available in Mac OS X v10.1 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_0_3
The Core Foundation framework version in Mac OS X version 10.0.3.
Available in Mac OS X v10.1 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_1
The Core Foundation framework version in Mac OS X version 10.1.
Available in Mac OS X v10.2 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_1_2
The Core Foundation framework version in Mac OS X version 10.1.2.
Available in Mac OS X v10.3 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_1_4
The Core Foundation framework version in Mac OS X version 10.1.4.
Available in Mac OS X v10.3 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2
The Core Foundation framework version in Mac OS X version 10.2.
Available in Mac OS X v10.3 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_1
The Core Foundation framework version in Mac OS X version 10.2.1.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_2
The Core Foundation framework version in Mac OS X version 10.2.2.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_3
The Core Foundation framework version in Mac OS X version 10.2.3.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_4
The Core Foundation framework version in Mac OS X version 10.2.4.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_5
The Core Foundation framework version in Mac OS X version 10.2.5.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_6
The Core Foundation framework version in Mac OS X version 10.2.6.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_7
The Core Foundation framework version in Mac OS X version 10.2.7.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_2_8
The Core Foundation framework version in Mac OS X version 10.2.8.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3
The Core Foundation framework version in Mac OS X version 10.3.
Available in Mac OS X v10.4 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_1
The Core Foundation framework version in Mac OS X version 10.3.1.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_2
The Core Foundation framework version in Mac OS X version 10.3.2.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_3
The Core Foundation framework version in Mac OS X version 10.3.3.
Available in Mac OS X v10.4 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_4
The Core Foundation framework version in Mac OS X version 10.3.4.
Available in Mac OS X v10.4 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_5
The Core Foundation framework version in Mac OS X version 10.3.5.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_6
The Core Foundation framework version in Mac OS X version 10.3.6.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_7
The Core Foundation framework version in Mac OS X version 10.3.7.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_8
The Core Foundation framework version in Mac OS X version 10.3.8.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_3_9
The Core Foundation framework version in Mac OS X version 10.3.9.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4
The Core Foundation framework version in Mac OS X version 10.4.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_1
The Core Foundation framework version in Mac OS X version 10.4.1.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_2
The Core Foundation framework version in Mac OS X version 10.4.2.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_3
The Core Foundation framework version in Mac OS X version 10.4.3.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_4_Intel
The Core Foundation framework version in Mac OS X version 10.4.4 on Intel-based Macintosh computers.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_4_PowerPC
The Core Foundation framework version in Mac OS X version 10.4.4 on PowerPC-based Macintosh computers.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_5_Intel
The Core Foundation framework version in Mac OS X version 10.4.5 on Intel-based Macintosh computers.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_5_PowerPC
The Core Foundation framework version in Mac OS X version 10.4.5 on PowerPC-based Macintosh computers.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_6_Intel
The Core Foundation framework version in Mac OS X version 10.4.6 on Intel-based Macintosh computers.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_6_PowerPC
The Core Foundation framework version in Mac OS X version 10.4.6 on PowerPC-based Macintosh computers.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
kCFCoreFoundationVersionNumber10_4_7
The Core Foundation framework version in Mac OS X version 10.4.7.
Available in Mac OS X v10.5 and later.
Declared in CFBase.h
.
Compare these values to the value of the kCFCoreFoundationVersionNumber
variable to identify on which version of the Core Foundation framework your code is executing.
CFBase.h
© 2003, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-01-15)