Mercurial > projects > dstep
comparison dstep/corefoundation/CFFileDescriptor.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.CFFileDescriptor; | |
8 | |
9 import dstep.corefoundation.CFBase; | |
10 import dstep.corefoundation.CFRunLoop; | |
11 import dstep.objc.bridge.Bridge; | |
12 import dstep.objc.objc : id; | |
13 | |
14 alias int CFFileDescriptorNativeDescriptor; | |
15 struct __CFFileDescriptor; | |
16 alias __CFFileDescriptor* CFFileDescriptorRef; | |
17 | |
18 extern (C) | |
19 { | |
20 alias void function (CFFileDescriptorRef, uint, void*) CFFileDescriptorCallBack; | |
21 } | |
22 | |
23 enum | |
24 { | |
25 kCFFileDescriptorReadCallBack = 1 << 0, | |
26 kCFFileDescriptorWriteCallBack = 1 << 1 | |
27 } | |
28 | |
29 struct CFFileDescriptorContext | |
30 { | |
31 int version_; | |
32 void* info; | |
33 } | |
34 | |
35 extern (C) | |
36 { | |
37 uint CFFileDescriptorGetTypeID (); | |
38 CFFileDescriptorRef CFFileDescriptorCreate (CFAllocatorRef allocator, int fd, ubyte closeOnInvalidate, CFFileDescriptorCallBack* callout, CFFileDescriptorContext* context); | |
39 int CFFileDescriptorGetNativeDescriptor (CFFileDescriptorRef f); | |
40 void CFFileDescriptorGetContext (CFFileDescriptorRef f, CFFileDescriptorContext* context); | |
41 void CFFileDescriptorEnableCallBacks (CFFileDescriptorRef f, uint callBackTypes); | |
42 void CFFileDescriptorDisableCallBacks (CFFileDescriptorRef f, uint callBackTypes); | |
43 void CFFileDescriptorInvalidate (CFFileDescriptorRef f); | |
44 ubyte CFFileDescriptorIsValid (CFFileDescriptorRef f); | |
45 CFRunLoopSourceRef CFFileDescriptorCreateRunLoopSource (CFAllocatorRef allocator, CFFileDescriptorRef f, int order); | |
46 } |