From: PHO Date: Sat, 9 Oct 2010 05:55:06 +0000 (+0900) Subject: AVLTree.h X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=40230c2d18a8a925f22add7f00e6ac7d98e2d5b3;p=bindings-CarbonCore.git AVLTree.h --- diff --git a/Bindings/CoreServices/CarbonCore/AVLTree.hsc b/Bindings/CoreServices/CarbonCore/AVLTree.hsc new file mode 100644 index 0000000..7692547 --- /dev/null +++ b/Bindings/CoreServices/CarbonCore/AVLTree.hsc @@ -0,0 +1,56 @@ +#include +#include + +module Bindings.CoreServices.CarbonCore.AVLTree where +#strict_import +import Bindings.CoreServices.CarbonCore.MacTypes + +#synonym_t AVLVisitStage, +#num kAVLPreOrder +#num kAVLInOrder +#num kAVLPostOrder + +#synonym_t AVLOrder, +#num kLeftToRight +#num kRightToLeft + +#synonym_t AVLNodeType, +#num kAVLIsTree +#num kAVLIsLeftBranch +#num kAVLIsRightBranch +#num kAVLIsLeaf +#num kAVLNullNode + +#num errItemAlreadyInTree +#num errNotValidTree +#num errItemNotFoundInTree +#num errCanNotInsertWhileWalkProcInProgress +#num errTreeIsLocked + +#starttype struct AVLTreeStruct +# field signature, +# array_field privateStuff, CULong +#stoptype +#synonym_t AVLTreePtr, Ptr + +#callback AVLCompareItemsProcPtr, -> Ptr () -> Ptr () -> -> IO +#callback AVLItemSizeProcPtr , -> Ptr () -> +#callback AVLDisposeItemProcPtr , -> Ptr () -> IO () +#callback AVLWalkProcPtr , -> Ptr () -> -> -> -> -> Ptr () -> IO + +#synonym_t AVLCompareItemsUPP, +#synonym_t AVLItemSizeUPP , +#synonym_t AVLDisposeItemUPP , +#synonym_t AVLWalkUPP , + +#if !__LP64__ +# ccall AVLInit , -> -> -> -> Ptr () -> Ptr -> IO +# ccall AVLDispose , Ptr -> -> IO +# ccall AVLWalk , -> -> -> Ptr () -> IO +# ccall AVLCount , -> Ptr -> IO +# ccall AVLGetIndItem, -> -> Ptr () -> Ptr -> IO +# ccall AVLInsert , -> Ptr () -> IO +# ccall AVLRemove , -> Ptr () -> Ptr () -> Ptr -> IO +# ccall AVLFind , -> Ptr () -> Ptr () -> Ptr -> IO +# ccall AVLGetRefcon , -> Ptr (Ptr ()) -> IO +#endif diff --git a/bindings-carbon-core.cabal b/bindings-carbon-core.cabal index e9ed6e3..90e7dd5 100644 --- a/bindings-carbon-core.cabal +++ b/bindings-carbon-core.cabal @@ -30,6 +30,7 @@ Library Exposed-Modules: Bindings.CoreServices.CarbonCore.AIFF + Bindings.CoreServices.CarbonCore.AVLTree Bindings.CoreServices.CarbonCore.MacTypes C-Sources: