Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- newtype TreePath = TreePath (ManagedPtr TreePath)
- noTreePath :: Maybe TreePath
- data TreePathAppendIndexMethodInfo
- treePathAppendIndex :: (HasCallStack, MonadIO m) => TreePath -> Int32 -> m ()
- data TreePathCompareMethodInfo
- treePathCompare :: (HasCallStack, MonadIO m) => TreePath -> TreePath -> m Int32
- data TreePathCopyMethodInfo
- treePathCopy :: (HasCallStack, MonadIO m) => TreePath -> m TreePath
- data TreePathDownMethodInfo
- treePathDown :: (HasCallStack, MonadIO m) => TreePath -> m ()
- data TreePathFreeMethodInfo
- treePathFree :: (HasCallStack, MonadIO m) => TreePath -> m ()
- data TreePathGetDepthMethodInfo
- treePathGetDepth :: (HasCallStack, MonadIO m) => TreePath -> m Int32
- data TreePathGetIndicesMethodInfo
- treePathGetIndices :: (HasCallStack, MonadIO m) => TreePath -> m [Int32]
- data TreePathIsAncestorMethodInfo
- treePathIsAncestor :: (HasCallStack, MonadIO m) => TreePath -> TreePath -> m Bool
- data TreePathIsDescendantMethodInfo
- treePathIsDescendant :: (HasCallStack, MonadIO m) => TreePath -> TreePath -> m Bool
- treePathNew :: (HasCallStack, MonadIO m) => m TreePath
- treePathNewFirst :: (HasCallStack, MonadIO m) => m TreePath
- treePathNewFromIndices :: (HasCallStack, MonadIO m) => [Int32] -> m TreePath
- treePathNewFromString :: (HasCallStack, MonadIO m) => Text -> m TreePath
- data TreePathNextMethodInfo
- treePathNext :: (HasCallStack, MonadIO m) => TreePath -> m ()
- data TreePathPrependIndexMethodInfo
- treePathPrependIndex :: (HasCallStack, MonadIO m) => TreePath -> Int32 -> m ()
- data TreePathPrevMethodInfo
- treePathPrev :: (HasCallStack, MonadIO m) => TreePath -> m Bool
- data TreePathToStringMethodInfo
- treePathToString :: (HasCallStack, MonadIO m) => TreePath -> m Text
- data TreePathUpMethodInfo
- treePathUp :: (HasCallStack, MonadIO m) => TreePath -> m Bool
Exported types
Methods
appendIndex
data TreePathAppendIndexMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * TreePathAppendIndexMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> Int32 |
|
-> m () |
Appends a new index to a path.
As a result, the depth of the path is increased.
compare
data TreePathCompareMethodInfo Source #
((~) * signature (TreePath -> m Int32), MonadIO m) => MethodInfo * TreePathCompareMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> TreePath |
|
-> m Int32 | Returns: the relative positions of |
Compares two paths.
If a
appears before b
in a tree, then -1 is returned.
If b
appears before a
, then 1 is returned.
If the two nodes are equal, then 0 is returned.
copy
data TreePathCopyMethodInfo Source #
((~) * signature (m TreePath), MonadIO m) => MethodInfo * TreePathCopyMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m TreePath | Returns: a new |
Creates a new TreePath
-struct as a copy of path
.
down
data TreePathDownMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * TreePathDownMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m () |
Moves path
to point to the first child of the current path.
free
data TreePathFreeMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * TreePathFreeMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m () |
Frees path
. If path
is Nothing
, it simply returns.
getDepth
data TreePathGetDepthMethodInfo Source #
((~) * signature (m Int32), MonadIO m) => MethodInfo * TreePathGetDepthMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m Int32 | Returns: The depth of |
Returns the current depth of path
.
getIndices
data TreePathGetIndicesMethodInfo Source #
((~) * signature (m [Int32]), MonadIO m) => MethodInfo * TreePathGetIndicesMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m [Int32] | Returns: The current
indices, or |
Returns the current indices of path
.
This is an array of integers, each representing a node in a tree. It also returns the number of elements in the array. The array should not be freed.
Since: 3.0
isAncestor
data TreePathIsAncestorMethodInfo Source #
((~) * signature (TreePath -> m Bool), MonadIO m) => MethodInfo * TreePathIsAncestorMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> TreePath |
|
-> m Bool | Returns: |
Returns True
if descendant
is a descendant of path
.
isDescendant
data TreePathIsDescendantMethodInfo Source #
((~) * signature (TreePath -> m Bool), MonadIO m) => MethodInfo * TreePathIsDescendantMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> TreePath |
|
-> m Bool | Returns: |
Returns True
if path
is a descendant of ancestor
.
new
:: (HasCallStack, MonadIO m) | |
=> m TreePath | Returns: A newly created |
Creates a new TreePath
-struct.
This refers to a row.
newFirst
:: (HasCallStack, MonadIO m) | |
=> m TreePath | Returns: A new |
Creates a new TreePath
-struct.
The string representation of this path is “0”.
newFromIndices
treePathNewFromIndices Source #
:: (HasCallStack, MonadIO m) | |
=> [Int32] |
|
-> m TreePath | Returns: A newly created |
Creates a new path with the given indices
array of length
.
Since: 3.12
newFromString
treePathNewFromString Source #
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m TreePath |
Creates a new TreePath
-struct initialized to path
.
path
is expected to be a colon separated list of numbers.
For example, the string “10:4:0” would create a path of depth
3 pointing to the 11th child of the root node, the 5th
child of that 11th child, and the 1st child of that 5th child.
If an invalid path string is passed in, Nothing
is returned.
next
data TreePathNextMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * TreePathNextMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m () |
Moves the path
to point to the next node at the current depth.
prependIndex
data TreePathPrependIndexMethodInfo Source #
((~) * signature (Int32 -> m ()), MonadIO m) => MethodInfo * TreePathPrependIndexMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> Int32 |
|
-> m () |
Prepends a new index to a path.
As a result, the depth of the path is increased.
prev
data TreePathPrevMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * TreePathPrevMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m Bool | Returns: |
Moves the path
to point to the previous node at the
current depth, if it exists.
toString
data TreePathToStringMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * TreePathToStringMethodInfo TreePath signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> TreePath |
|
-> m Text | Returns: A newly-allocated string.
Must be freed with |
Generates a string representation of the path.
This string is a “:” separated list of numbers. For example, “4:10:0:3” would be an acceptable return value for this string.
up
data TreePathUpMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * TreePathUpMethodInfo TreePath signature Source # | |