Mercurial > projects > dstep
diff dstep/corefoundation/CFMachPort.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dstep/corefoundation/CFMachPort.d Sat Aug 01 15:03:28 2009 +0200 @@ -0,0 +1,43 @@ +/** + * Copyright: Copyright (c) 2009 Jacob Carlborg. + * Authors: Jacob Carlborg + * Version: Initial created: Jul 12, 2009 + * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0) + */ +module dstep.corefoundation.CFMachPort; + +import dstep.corefoundation.CFBase; +import dstep.corefoundation.CFLocale; +import dstep.corefoundation.CFRunLoop; +//import dstep.mach.port; +import dstep.objc.bridge.Bridge; +import dstep.objc.objc : id; + +struct __CFMachPort; +alias __CFMachPort* CFMachPortRef; + +extern (C) +{ + alias void function (CFMachPortRef, void*, int, void*) CFMachPortCallBack; + alias void function (CFMachPortRef, void*) CFMachPortInvalidationCallBack; +} + +struct CFMachPortContext +{ + int version_; + void* info; +} + +extern (C) +{ + uint CFMachPortGetTypeID (); + CFMachPortRef CFMachPortCreate (CFAllocatorRef allocator, CFMachPortCallBack* callout, CFMachPortContext* context, char* shouldFreeInfo); + CFMachPortRef CFMachPortCreateWithPort (CFAllocatorRef allocator, uint portNum, CFMachPortCallBack* callout, CFMachPortContext* context, char* shouldFreeInfo); + uint CFMachPortGetPort (CFMachPortRef port); + void CFMachPortGetContext (CFMachPortRef port, CFMachPortContext* context); + void CFMachPortInvalidate (CFMachPortRef port); + ubyte CFMachPortIsValid (CFMachPortRef port); + CFMachPortInvalidationCallBack* CFMachPortGetInvalidationCallBack (CFMachPortRef port); + void CFMachPortSetInvalidationCallBack (CFMachPortRef port, CFMachPortInvalidationCallBack* callout); + CFRunLoopSourceRef CFMachPortCreateRunLoopSource (CFAllocatorRef allocator, CFMachPortRef port, int order); +} \ No newline at end of file