Mercurial > projects > dstep
comparison dstep/corefoundation/CFArray.d @ 11:07194b026fa4
Added bindings to a couple of frameworks, new license + some other things
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Sat, 01 Aug 2009 15:03:28 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
10:27e00625790b | 11:07194b026fa4 |
---|---|
1 /** | |
2 * Copyright: Copyright (c) 2009 Jacob Carlborg. | |
3 * Authors: Jacob Carlborg | |
4 * Version: Initial created: Jul 12, 2009 | |
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) | |
6 */ | |
7 module dstep.corefoundation.CFArray; | |
8 | |
9 import dstep.corefoundation.CFBase; | |
10 import dstep.objc.bridge.Bridge; | |
11 import dstep.objc.objc : id; | |
12 | |
13 struct __CFArray; | |
14 alias __CFArray* CFArrayRef; | |
15 alias __CFArray* CFMutableArrayRef; | |
16 | |
17 extern (C) | |
18 { | |
19 alias void function (void*, void*) CFArrayApplierFunction; | |
20 alias ubyte function (void*, void*) CFArrayEqualCallBack; | |
21 alias CFStringRef function (void*) CFArrayCopyDescriptionCallBack; | |
22 alias void function (CFAllocatorRef, void*) CFArrayReleaseCallBack; | |
23 alias void* function (CFAllocatorRef, void*) CFArrayRetainCallBack; | |
24 } | |
25 | |
26 extern (C) | |
27 { | |
28 extern | |
29 { | |
30 const CFArrayCallBacks kCFTypeArrayCallBacks; | |
31 } | |
32 } | |
33 | |
34 struct CFArrayCallBacks | |
35 { | |
36 int version_; | |
37 CFArrayRetainCallBack* retain; | |
38 CFArrayReleaseCallBack* release; | |
39 CFArrayCopyDescriptionCallBack* copyDescription; | |
40 CFArrayEqualCallBack* equal; | |
41 } | |
42 | |
43 extern (C) | |
44 { | |
45 uint CFArrayGetTypeID (); | |
46 CFArrayRef CFArrayCreate (CFAllocatorRef allocator, void** values, int numValues, CFArrayCallBacks* callBacks); | |
47 CFArrayRef CFArrayCreateCopy (CFAllocatorRef allocator, CFArrayRef theArray); | |
48 CFMutableArrayRef CFArrayCreateMutable (CFAllocatorRef allocator, int capacity, CFArrayCallBacks* callBacks); | |
49 CFMutableArrayRef CFArrayCreateMutableCopy (CFAllocatorRef allocator, int capacity, CFArrayRef theArray); | |
50 int CFArrayGetCount (CFArrayRef theArray); | |
51 int CFArrayGetCountOfValue (CFArrayRef theArray, CFRange range, void* value); | |
52 ubyte CFArrayContainsValue (CFArrayRef theArray, CFRange range, void* value); | |
53 void* CFArrayGetValueAtIndex (CFArrayRef theArray, int idx); | |
54 void CFArrayGetValues (CFArrayRef theArray, CFRange range, void** values); | |
55 void CFArrayApplyFunction (CFArrayRef theArray, CFRange range, CFArrayApplierFunction* applier, void* context); | |
56 int CFArrayGetFirstIndexOfValue (CFArrayRef theArray, CFRange range, void* value); | |
57 int CFArrayGetLastIndexOfValue (CFArrayRef theArray, CFRange range, void* value); | |
58 int CFArrayBSearchValues (CFArrayRef theArray, CFRange range, void* value, CFComparatorFunction* comparator, void* context); | |
59 void CFArrayAppendValue (CFMutableArrayRef theArray, void* value); | |
60 void CFArrayInsertValueAtIndex (CFMutableArrayRef theArray, int idx, void* value); | |
61 void CFArraySetValueAtIndex (CFMutableArrayRef theArray, int idx, void* value); | |
62 void CFArrayRemoveValueAtIndex (CFMutableArrayRef theArray, int idx); | |
63 void CFArrayRemoveAllValues (CFMutableArrayRef theArray); | |
64 void CFArrayReplaceValues (CFMutableArrayRef theArray, CFRange range, void** newValues, int newCount); | |
65 void CFArrayExchangeValuesAtIndices (CFMutableArrayRef theArray, int idx1, int idx2); | |
66 void CFArraySortValues (CFMutableArrayRef theArray, CFRange range, CFComparatorFunction* comparator, void* context); | |
67 void CFArrayAppendArray (CFMutableArrayRef theArray, CFArrayRef otherArray, CFRange otherRange); | |
68 } |