Mercurial > projects > dstep
comparison dstep/corefoundation/CFBag.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.CFBag; | |
8 | |
9 import dstep.corefoundation.CFBase; | |
10 import dstep.objc.bridge.Bridge; | |
11 import dstep.objc.objc : id; | |
12 | |
13 struct __CFBag; | |
14 alias __CFBag* CFBagRef; | |
15 alias __CFBag* CFMutableBagRef; | |
16 | |
17 extern (C) | |
18 { | |
19 alias ubyte function (void*, void*) CFBagEqualCallBack; | |
20 alias void* function (CFAllocatorRef, void*) CFBagRetainCallBack; | |
21 alias uint function (void*) CFBagHashCallBack; | |
22 alias CFStringRef function (void*) CFBagCopyDescriptionCallBack; | |
23 alias void function (CFAllocatorRef, void*) CFBagReleaseCallBack; | |
24 alias void function (void*, void*) CFBagApplierFunction; | |
25 } | |
26 | |
27 extern (C) | |
28 { | |
29 extern | |
30 { | |
31 const CFBagCallBacks kCFTypeBagCallBacks; | |
32 const CFBagCallBacks kCFCopyStringBagCallBacks; | |
33 } | |
34 } | |
35 | |
36 struct CFBagCallBacks | |
37 { | |
38 int version_; | |
39 CFBagRetainCallBack* retain; | |
40 CFBagReleaseCallBack* release; | |
41 CFBagCopyDescriptionCallBack* copyDescription; | |
42 CFBagEqualCallBack* equal; | |
43 CFBagHashCallBack* hash; | |
44 } | |
45 | |
46 extern (C) | |
47 { | |
48 uint CFBagGetTypeID (); | |
49 CFBagRef CFBagCreate (CFAllocatorRef allocator, void** values, int numValues, CFBagCallBacks* callBacks); | |
50 CFBagRef CFBagCreateCopy (CFAllocatorRef allocator, CFBagRef theBag); | |
51 CFMutableBagRef CFBagCreateMutable (CFAllocatorRef allocator, int capacity, CFBagCallBacks* callBacks); | |
52 CFMutableBagRef CFBagCreateMutableCopy (CFAllocatorRef allocator, int capacity, CFBagRef theBag); | |
53 int CFBagGetCount (CFBagRef theBag); | |
54 int CFBagGetCountOfValue (CFBagRef theBag, void* value); | |
55 ubyte CFBagContainsValue (CFBagRef theBag, void* value); | |
56 void* CFBagGetValue (CFBagRef theBag, void* value); | |
57 ubyte CFBagGetValueIfPresent (CFBagRef theBag, void* candidate, void** value); | |
58 void CFBagGetValues (CFBagRef theBag, void** values); | |
59 void CFBagApplyFunction (CFBagRef theBag, CFBagApplierFunction* applier, void* context); | |
60 void CFBagAddValue (CFMutableBagRef theBag, void* value); | |
61 void CFBagReplaceValue (CFMutableBagRef theBag, void* value); | |
62 void CFBagSetValue (CFMutableBagRef theBag, void* value); | |
63 void CFBagRemoveValue (CFMutableBagRef theBag, void* value); | |
64 void CFBagRemoveAllValues (CFMutableBagRef theBag); | |
65 } |