28#ifndef __COREFOUNDATION_CFBASE_H__
29#define __COREFOUNDATION_CFBASE_H__
34#if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
35#define __LITTLE_ENDIAN__ 1
38#include <CoreFoundation/CFAvailability.h>
39#include <GNUstepBase/GSVersionMacros.h>
44typedef unsigned char Boolean;
45typedef unsigned char UInt8;
46typedef signed char SInt8;
47typedef unsigned short UInt16;
48typedef signed short SInt16;
49typedef unsigned int UInt32;
50typedef signed int SInt32;
51typedef unsigned long long UInt64;
52typedef signed long long SInt64;
53typedef SInt32 OSStatus;
56typedef double Float64;
57typedef UInt16 UniChar;
58typedef UInt8 *StringPtr;
59typedef const StringPtr *ConstStringPtr;
60typedef UInt8 Str255[256];
61typedef const Str255 *ConstStr255Param;
63typedef SInt16 RegionCode;
64typedef SInt16 LangCode;
65typedef SInt16 ScriptCode;
66typedef UInt32 FourCharCode;
67#ifndef OSTYPE_DECLARED
68typedef FourCharCode OSType;
69#define OSTYPE_DECLARED
72typedef SInt8 SignedByte;
75typedef UInt32 UTF32Char;
77typedef UInt16 UTF16Char;
78typedef UInt8 UTF8Char;
80#if !defined(CF_EXTERN_C_BEGIN)
81#if defined(__cplusplus)
82#define CF_EXTERN_C_BEGIN extern "C" {
83#define CF_EXTERN_C_END }
85#define CF_EXTERN_C_BEGIN
86#define CF_EXTERN_C_END
91#if defined(BUILDING_SELF)
92#if defined(__cplusplus)
93#define CF_EXPORT extern "C" __declspec(dllexport)
95#define CF_EXPORT extern __declspec(dllexport)
98#if defined(__cplusplus)
99#define CF_EXPORT extern "C" __declspec(dllimport)
101#define CF_EXPORT extern __declspec(dllimport)
105#if defined(__cplusplus)
106#define CF_EXPORT extern "C"
108#define CF_EXPORT extern
112#if !defined(__bool_true_false_are_defined)
124#if !defined(CF_INLINE)
125#if defined(__GNUC__) && (__GNUC__ >= 4)
126#define CF_INLINE static __inline__ __attribute__((always_inline))
127#elif defined(__GNUC__)
128#define CF_INLINE static __inline__
129#elif defined(__MWERKS__) || defined(__cplusplus)
130#define CF_INLINE static inline
131#elif defined(_MSC_VER)
132#define CF_INLINE static __inline
134#define CF_INLINE static __inline__
136#define CF_INLINE static inline
140#if defined(__GNUC__) || defined(__llvm__)
141#define GS_PURE_FUNCTION __attribute__((pure))
143#define GS_PURE_FUNCTION
150typedef unsigned long CFTypeID;
151typedef const void *CFTypeRef;
197 kCFCompareLessThan = -1,
198 kCFCompareEqualTo = 0,
199 kCFCompareGreaterThan = 1
209typedef CFComparisonResult (*CFComparatorFunction) (
const void *val1,
217CF_EXPORT
const double kCFCoreFoundationVersionNumber;
218#define kCFCoreFoundationVersionNumber10_0 196.40
219#define kCFCoreFoundationVersionNumber10_0_3 196.50
220#define kCFCoreFoundationVersionNumber10_1 226.00
221#define kCFCoreFoundationVersionNumber10_1_1 226.00
222#define kCFCoreFoundationVersionNumber10_1_2 227.20
223#define kCFCoreFoundationVersionNumber10_1_3 227.20
224#define kCFCoreFoundationVersionNumber10_1_4 227.30
225#define kCFCoreFoundationVersionNumber10_2 263.00
226#define kCFCoreFoundationVersionNumber10_2_1 263.10
227#define kCFCoreFoundationVersionNumber10_2_2 263.10
228#define kCFCoreFoundationVersionNumber10_2_3 263.30
229#define kCFCoreFoundationVersionNumber10_2_4 263.30
230#define kCFCoreFoundationVersionNumber10_2_5 263.50
231#define kCFCoreFoundationVersionNumber10_2_6 263.50
232#define kCFCoreFoundationVersionNumber10_2_7 263.50
233#define kCFCoreFoundationVersionNumber10_2_8 263.50
234#define kCFCoreFoundationVersionNumber10_3 299.00
235#define kCFCoreFoundationVersionNumber10_3_1 299.00
236#define kCFCoreFoundationVersionNumber10_3_2 299.00
237#define kCFCoreFoundationVersionNumber10_3_3 299.30
238#define kCFCoreFoundationVersionNumber10_3_4 299.31
239#define kCFCoreFoundationVersionNumber10_3_5 299.31
240#define kCFCoreFoundationVersionNumber10_3_6 299.32
241#define kCFCoreFoundationVersionNumber10_3_7 299.33
242#define kCFCoreFoundationVersionNumber10_3_8 299.33
243#define kCFCoreFoundationVersionNumber10_3_9 299.35
244#define kCFCoreFoundationVersionNumber10_4 368.00
245#define kCFCoreFoundationVersionNumber10_4_1 368.10
246#define kCFCoreFoundationVersionNumber10_4_2 368.11
247#define kCFCoreFoundationVersionNumber10_4_3 368.18
248#define kCFCoreFoundationVersionNumber10_4_4_Intel 368.26
249#define kCFCoreFoundationVersionNumber10_4_4_PowerPC 368.25
250#define kCFCoreFoundationVersionNumber10_4_5_Intel 368.26
251#define kCFCoreFoundationVersionNumber10_4_5_PowerPC 368.25
252#define kCFCoreFoundationVersionNumber10_4_6_Intel 368.26
253#define kCFCoreFoundationVersionNumber10_4_6_PowerPC 368.25
254#define kCFCoreFoundationVersionNumber10_4_7 368.27
255#define kCFCoreFoundationVersionNumber10_4_8 368.27
256#define kCFCoreFoundationVersionNumber10_4_9 368.28
257#define kCFCoreFoundationVersionNumber10_4_10 368.28
258#define kCFCoreFoundationVersionNumber10_4_11 368.31
259#define kCFCoreFoundationVersionNumber10_5 476.00
260#define kCFCoreFoundationVersionNumber10_5_1 476.00
261#define kCFCoreFoundationVersionNumber10_5_2 476.10
262#define kCFCoreFoundationVersionNumber10_5_3 476.13
263#define kCFCoreFoundationVersionNumber10_5_4 476.14
264#define kCFCoreFoundationVersionNumber10_5_5 476.15
265#define kCFCoreFoundationVersionNumber10_5_6 476.17
269#if __has_feature(attribute_cf_returns_retained)
270#define CF_RETURNS_RETAINED __attribute__((cf_returns_retained))
272#define CF_RETURNS_RETAINED
275#if __has_feature(attribute_cf_returns_not_retained)
276#define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained))
278#define CF_RETURNS_NOT_RETAINED
283typedef CFTypeRef CFPropertyListRef;
287typedef const struct __CFString *CFStringRef;
290typedef struct __CFString *CFMutableStringRef;
303typedef void *(*CFAllocatorAllocateCallBack) (
CFIndex allocSize,
305typedef void (*CFAllocatorDeallocateCallBack) (
void *ptr,
void *info);
306typedef void *(*CFAllocatorReallocateCallBack) (
void *ptr,
312typedef const void *(*CFAllocatorRetainCallBack) (
const void *info);
313typedef void (*CFAllocatorReleaseCallBack) (
const void *info);
314typedef CFStringRef (*CFAllocatorCopyDescriptionCallBack) (
const void *info);
320 CFAllocatorRetainCallBack retain;
321 CFAllocatorReleaseCallBack release;
322 CFAllocatorCopyDescriptionCallBack copyDescription;
323 CFAllocatorAllocateCallBack allocate;
324 CFAllocatorReallocateCallBack reallocate;
325 CFAllocatorDeallocateCallBack deallocate;
326 CFAllocatorPreferredSizeCallBack preferredSize;
343#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
388CF_EXPORT
void *CFAllocatorReallocate (
CFAllocatorRef allocator,
void *ptr,
396CFAllocatorGetContext (
CFAllocatorRef allocator, CFAllocatorContext * context);
398CF_EXPORT CFTypeID CFAllocatorGetTypeID (
void);
408CF_EXPORT CFStringRef CFCopyDescription (CFTypeRef cf);
410CF_EXPORT CFStringRef CFCopyTypeIDDescription (CFTypeID typeID);
412CF_EXPORT Boolean CFEqual (CFTypeRef cf1, CFTypeRef cf2);
416CF_EXPORT
CFIndex CFGetRetainCount (CFTypeRef cf);
418CF_EXPORT CFTypeID CFGetTypeID (CFTypeRef cf);
422#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
423CF_EXPORT CFTypeRef CFMakeCollectable (CFTypeRef cf);
426CF_EXPORT
void CFRelease (CFTypeRef cf);
428CF_EXPORT CFTypeRef CFRetain (CFTypeRef cf);
430CF_EXPORT CFTypeRef CFAutorelease(CFTypeRef arg);
432#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
433CF_EXPORT
void *_CFBridgingRelease (CFTypeRef cf);
434CF_EXPORT CFTypeRef _CFBridgingRetain (
void *obj);
436#if __has_feature(objc_arc)
437#define CFBridgingRetain(x) (__bridge_retained CFTypeRef)(x)
438#define CFBridgingRelease(x) (__bridge_transfer id)(x)
440#define CFBridgingRetain(x) _CFBridgingRetain((void *)(x))
441#define CFBridgingRelease(x) (id)_CFBridgingRelease((x))
443#define CFBridgingRetain(x) _CFBridgingRetain((void *)(x))
444#define CFBridgingRelease(x) _CFBridgingRelease((x))
454#if OS_API_VERSION(MAC_OS_X_VERSION_10_2, GS_API_LATEST)
455typedef struct __CFNull *CFNullRef;
457CF_EXPORT CFNullRef kCFNull;
459CFTypeID CFNullGetTypeID (
void);
CFIndex location
Definition CFBase.h:173
CFIndex length
Definition CFBase.h:175
unsigned long CFOptionFlags
Definition CFBase.h:163
signed long CFIndex
Definition CFBase.h:165
CFRange CFRangeMake(CFIndex location, CFIndex length)
Definition CFBase.h:185
unsigned long CFHashCode
Definition CFBase.h:159
CFAllocatorRef kCFAllocatorUseContext
Definition CFBase.h:355
void CFAllocatorDeallocate(CFAllocatorRef allocator, void *ptr)
CFAllocatorRef kCFAllocatorNull
Definition CFBase.h:351
CFAllocatorRef kCFAllocatorMallocZone
Definition CFBase.h:346
const struct __CFAllocator * CFAllocatorRef
A reference to a CFAllocator object.
Definition CFBase.h:301
CFAllocatorRef CFAllocatorCreate(CFAllocatorRef allocator, CFAllocatorContext *context)
CFAllocatorRef kCFAllocatorDefault
Definition CFBase.h:334
CFAllocatorRef kCFAllocatorMalloc
Definition CFBase.h:342
CFAllocatorRef kCFAllocatorSystemDefault
Definition CFBase.h:339
void * CFAllocatorAllocate(CFAllocatorRef allocator, CFIndex size, CFOptionFlags hint)