view dstep/corefoundation/CFTree.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.CFTree;

import dstep.corefoundation.CFBase;
import dstep.objc.bridge.Bridge;
import dstep.objc.objc : id;

struct __CFTree;
alias __CFTree* CFTreeRef;

extern (C)
{
	alias void function (void*) CFTreeReleaseCallBack;
	alias void* function (void*) CFTreeRetainCallBack;
	alias CFStringRef function (void*) CFTreeCopyDescriptionCallBack;
	alias void function (void*, void*) CFTreeApplierFunction;
}

struct CFTreeContext
{
	int version_;
	void* info;
	CFTreeRetainCallBack* retain;
	CFTreeReleaseCallBack* release;
	CFTreeCopyDescriptionCallBack* copyDescription;
}

extern (C)
{
	uint CFTreeGetTypeID ();
	CFTreeRef CFTreeCreate (CFAllocatorRef allocator, CFTreeContext* context);
	CFTreeRef CFTreeGetParent (CFTreeRef tree);
	CFTreeRef CFTreeGetNextSibling (CFTreeRef tree);
	CFTreeRef CFTreeGetFirstChild (CFTreeRef tree);
	void CFTreeGetContext (CFTreeRef tree, CFTreeContext* context);
	int CFTreeGetChildCount (CFTreeRef tree);
	CFTreeRef CFTreeGetChildAtIndex (CFTreeRef tree, int idx);
	void CFTreeGetChildren (CFTreeRef tree, CFTreeRef* children);
	void CFTreeApplyFunctionToChildren (CFTreeRef tree, CFTreeApplierFunction* applier, void* context);
	CFTreeRef CFTreeFindRoot (CFTreeRef tree);
	void CFTreeSetContext (CFTreeRef tree, CFTreeContext* context);
	void CFTreePrependChild (CFTreeRef tree, CFTreeRef newChild);
	void CFTreeAppendChild (CFTreeRef tree, CFTreeRef newChild);
	void CFTreeInsertSibling (CFTreeRef tree, CFTreeRef newSibling);
	void CFTreeRemove (CFTreeRef tree);
	void CFTreeRemoveAllChildren (CFTreeRef tree);
	void CFTreeSortChildren (CFTreeRef tree, CFComparatorFunction* comparator, void* context);
}