comparison dstep/corefoundation/CFSet.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.CFSet;
8
9 import dstep.corefoundation.CFBase;
10 import dstep.objc.bridge.Bridge;
11 import dstep.objc.objc : id;
12 import bindings = dstep.corefoundation.CFSet_bindings;
13
14 struct __CFSet;
15 alias __CFSet* CFSetRef;
16 alias __CFSet* CFMutableSetRef;
17
18 extern (C)
19 {
20 alias uint function (void*) CFSetHashCallBack;
21 alias CFStringRef function (void*) CFSetCopyDescriptionCallBack;
22 alias void function (CFAllocatorRef, void*) CFSetReleaseCallBack;
23 alias void* function (CFAllocatorRef, void*) CFSetRetainCallBack;
24 alias void function (void*, void*) CFSetApplierFunction;
25 alias ubyte function (void*, void*) CFSetEqualCallBack;
26 }
27
28 extern (C)
29 {
30 extern
31 {
32 const CFSetCallBacks kCFTypeSetCallBacks;
33 const CFSetCallBacks kCFCopyStringSetCallBacks;
34 }
35 }
36
37 struct CFSetCallBacks
38 {
39 int version_;
40 CFSetRetainCallBack* retain;
41 CFSetReleaseCallBack* release;
42 CFSetCopyDescriptionCallBack* copyDescription;
43 CFSetEqualCallBack* equal;
44 CFSetHashCallBack* hash;
45 }
46
47 extern (C)
48 {
49 uint CFSetGetTypeID ();
50 CFSetRef CFSetCreate (CFAllocatorRef allocator, void** values, int numValues, CFSetCallBacks* callBacks);
51 CFSetRef CFSetCreateCopy (CFAllocatorRef allocator, CFSetRef theSet);
52 CFMutableSetRef CFSetCreateMutable (CFAllocatorRef allocator, int capacity, CFSetCallBacks* callBacks);
53 CFMutableSetRef CFSetCreateMutableCopy (CFAllocatorRef allocator, int capacity, CFSetRef theSet);
54 int CFSetGetCount (CFSetRef theSet);
55 int CFSetGetCountOfValue (CFSetRef theSet, void* value);
56 ubyte CFSetContainsValue (CFSetRef theSet, void* value);
57 void* CFSetGetValue (CFSetRef theSet, void* value);
58 ubyte CFSetGetValueIfPresent (CFSetRef theSet, void* candidate, void** value);
59 void CFSetGetValues (CFSetRef theSet, void** values);
60 void CFSetApplyFunction (CFSetRef theSet, CFSetApplierFunction* applier, void* context);
61 void CFSetAddValue (CFMutableSetRef theSet, void* value);
62 void CFSetReplaceValue (CFMutableSetRef theSet, void* value);
63 void CFSetSetValue (CFMutableSetRef theSet, void* value);
64 void CFSetRemoveValue (CFMutableSetRef theSet, void* value);
65 void CFSetRemoveAllValues (CFMutableSetRef theSet);
66 }