gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Structs.TreeIter

Contents

- Exported types
- Methods
  - copy
  - free
- Properties
  - stamp
  - userData
  - userData2
  - userData3

Description

The `GtkTreeIter` is the primary structure for accessing a `GtkTreeModel`. Models are expected to put a unique integer in the `stamp` member, and put model-specific data in the three `userData` members.

Synopsis

- newtype TreeIter = TreeIter (ManagedPtr TreeIter)
- newZeroTreeIter :: MonadIO m => m TreeIter
- treeIterCopy :: (HasCallStack, MonadIO m) => TreeIter -> m TreeIter
- treeIterFree :: (HasCallStack, MonadIO m) => TreeIter -> m ()
- getTreeIterStamp :: MonadIO m => TreeIter -> m Int32
- setTreeIterStamp :: MonadIO m => TreeIter -> Int32 -> m ()
- clearTreeIterUserData :: MonadIO m => TreeIter -> m ()
- getTreeIterUserData :: MonadIO m => TreeIter -> m (Ptr ())
- setTreeIterUserData :: MonadIO m => TreeIter -> Ptr () -> m ()
- clearTreeIterUserData2 :: MonadIO m => TreeIter -> m ()
- getTreeIterUserData2 :: MonadIO m => TreeIter -> m (Ptr ())
- setTreeIterUserData2 :: MonadIO m => TreeIter -> Ptr () -> m ()
- clearTreeIterUserData3 :: MonadIO m => TreeIter -> m ()
- getTreeIterUserData3 :: MonadIO m => TreeIter -> m (Ptr ())
- setTreeIterUserData3 :: MonadIO m => TreeIter -> Ptr () -> m ()

# Exported types

newtype TreeIter Source #

Memory-managed wrapper type.

Constructors

TreeIter (ManagedPtr TreeIter) |

#### Instances

Instances details

Eq TreeIter Source # |
Instance details Defined in GI.Gtk.Structs.TreeIter Methods (==) :: TreeIter -> TreeIter -> Bool Source # (/=) :: TreeIter -> TreeIter -> Bool Source #
GBoxed TreeIter Source # |
Instance details Defined in GI.Gtk.Structs.TreeIter
ManagedPtrNewtype TreeIter Source # |
Instance details Defined in GI.Gtk.Structs.TreeIter Methods toManagedPtr :: TreeIter -> ManagedPtr TreeIter Source #
TypedObject TreeIter Source # |
Instance details Defined in GI.Gtk.Structs.TreeIter Methods glibType :: IO GType Source #
HasParentTypes TreeIter Source # |
Instance details Defined in GI.Gtk.Structs.TreeIter
tag ~ 'AttrSet => Constructible TreeIter tag Source # |
Instance details Defined in GI.Gtk.Structs.TreeIter Methods new :: MonadIO m => (ManagedPtr TreeIter -> TreeIter) -> [AttrOp TreeIter tag] -> m TreeIter Source #
IsGValue (Maybe TreeIter) Source # | Convert `TreeIter` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Structs.TreeIter Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe TreeIter -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe TreeIter) Source #
type ParentTypes TreeIter Source # |
Instance details Defined in GI.Gtk.Structs.TreeIter type ParentTypes TreeIter = '[] :: [Type]

newZeroTreeIter :: MonadIO m => m TreeIter Source #

Construct a `TreeIter` struct initialized to zero.

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

copy, free.

#### Getters

None.

#### Setters

None.

## copy

treeIterCopy Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TreeIter | `iter`: a `GtkTreeIter`
-> m TreeIter | Returns: a newly-allocated copy of `iter`

Deprecated: (Since version 4.10)

Creates a dynamically allocated tree iterator as a copy of `iter`.

This function is not intended for use in applications, because you can just copy the structs by value (`GtkTreeIter new_iter = iter;`). You must free this iter with `treeIterFree`.

## free

treeIterFree Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> TreeIter | `iter`: a dynamically allocated tree iterator
-> m () |

Deprecated: (Since version 4.10)

Frees an iterator that has been allocated by `treeIterCopy`.

This function is mainly used for language bindings.

# Properties

## stamp

a unique stamp to catch invalid iterators

getTreeIterStamp :: MonadIO m => TreeIter -> m Int32 Source #

Get the value of the “`stamp`” field. When overloading is enabled, this is equivalent to

    get treeIter #stamp

setTreeIterStamp :: MonadIO m => TreeIter -> Int32 -> m () Source #

Set the value of the “`stamp`” field. When overloading is enabled, this is equivalent to

    set treeIter [ #stamp := value ]

## userData

model-specific data

clearTreeIterUserData :: MonadIO m => TreeIter -> m () Source #

Set the value of the “`user_data`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #userData

getTreeIterUserData :: MonadIO m => TreeIter -> m (Ptr ()) Source #

Get the value of the “`user_data`” field. When overloading is enabled, this is equivalent to

    get treeIter #userData

setTreeIterUserData :: MonadIO m => TreeIter -> Ptr () -> m () Source #

Set the value of the “`user_data`” field. When overloading is enabled, this is equivalent to

    set treeIter [ #userData := value ]

## userData2

model-specific data

clearTreeIterUserData2 :: MonadIO m => TreeIter -> m () Source #

Set the value of the “`user_data2`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #userData2

getTreeIterUserData2 :: MonadIO m => TreeIter -> m (Ptr ()) Source #

Get the value of the “`user_data2`” field. When overloading is enabled, this is equivalent to

    get treeIter #userData2

setTreeIterUserData2 :: MonadIO m => TreeIter -> Ptr () -> m () Source #

Set the value of the “`user_data2`” field. When overloading is enabled, this is equivalent to

    set treeIter [ #userData2 := value ]

## userData3

model-specific data

clearTreeIterUserData3 :: MonadIO m => TreeIter -> m () Source #

Set the value of the “`user_data3`” field to `Nothing`. When overloading is enabled, this is equivalent to

    clear #userData3

getTreeIterUserData3 :: MonadIO m => TreeIter -> m (Ptr ()) Source #

Get the value of the “`user_data3`” field. When overloading is enabled, this is equivalent to

    get treeIter #userData3

setTreeIterUserData3 :: MonadIO m => TreeIter -> Ptr () -> m () Source #

Set the value of the “`user_data3`” field. When overloading is enabled, this is equivalent to

    set treeIter [ #userData3 := value ]