Mercurial > projects > dstep
view dstep/corefoundation/CFData.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 source
/** * 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.CFData; import dstep.corefoundation.CFBase; import dstep.objc.bridge.Bridge; import dstep.objc.objc : id; struct __CFData; alias __CFData* CFDataRef; alias __CFData* CFMutableDataRef; extern (C) { uint CFDataGetTypeID (); CFDataRef CFDataCreate (CFAllocatorRef allocator, char* bytes, int length); CFDataRef CFDataCreateWithBytesNoCopy (CFAllocatorRef allocator, char* bytes, int length, CFAllocatorRef bytesDeallocator); CFDataRef CFDataCreateCopy (CFAllocatorRef allocator, CFDataRef theData); CFMutableDataRef CFDataCreateMutable (CFAllocatorRef allocator, int capacity); CFMutableDataRef CFDataCreateMutableCopy (CFAllocatorRef allocator, int capacity, CFDataRef theData); int CFDataGetLength (CFDataRef theData); char* CFDataGetBytePtr (CFDataRef theData); char* CFDataGetMutableBytePtr (CFMutableDataRef theData); void CFDataGetBytes (CFDataRef theData, CFRange range, char* buffer); void CFDataSetLength (CFMutableDataRef theData, int length); void CFDataIncreaseLength (CFMutableDataRef theData, int extraLength); void CFDataAppendBytes (CFMutableDataRef theData, char* bytes, int length); void CFDataReplaceBytes (CFMutableDataRef theData, CFRange range, char* newBytes, int newLength); void CFDataDeleteBytes (CFMutableDataRef theData, CFRange range); }