| 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 |
GI.Gio.Objects.ListStore
Contents
Description
- newtype ListStore = ListStore (ManagedPtr ListStore)
- class GObject o => IsListStore o
- toListStore :: IsListStore o => o -> IO ListStore
- noListStore :: Maybe ListStore
- data ListStoreAppendMethodInfo
- listStoreAppend :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> m ()
- data ListStoreInsertMethodInfo
- listStoreInsert :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> Word32 -> b -> m ()
- data ListStoreInsertSortedMethodInfo
- listStoreInsertSorted :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) => a -> b -> CompareDataFunc -> m Word32
- listStoreNew :: (HasCallStack, MonadIO m) => GType -> m ListStore
- data ListStoreRemoveMethodInfo
- listStoreRemove :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> m ()
- data ListStoreRemoveAllMethodInfo
- listStoreRemoveAll :: (HasCallStack, MonadIO m, IsListStore a) => a -> m ()
- data ListStoreSortMethodInfo
- listStoreSort :: (HasCallStack, MonadIO m, IsListStore a) => a -> CompareDataFunc -> m ()
- data ListStoreSpliceMethodInfo
- listStoreSplice :: (HasCallStack, MonadIO m, IsListStore a) => a -> Word32 -> Word32 -> [Object] -> m ()
- data ListStoreItemTypePropertyInfo
- constructListStoreItemType :: IsListStore o => GType -> IO (GValueConstruct o)
- getListStoreItemType :: (MonadIO m, IsListStore o) => o -> m GType
- listStoreItemType :: AttrLabelProxy "itemType"
Exported types
Constructors
| ListStore (ManagedPtr ListStore) |
Instances
| GObject ListStore Source # | |
| IsObject ListStore Source # | |
| IsListModel ListStore Source # | |
| IsListStore ListStore Source # | |
| ((~) * info (ResolveListStoreMethod t ListStore), MethodInfo * info ListStore p) => IsLabel t (ListStore -> p) Source # | |
| ((~) * info (ResolveListStoreMethod t ListStore), MethodInfo * info ListStore p) => IsLabelProxy t (ListStore -> p) Source # | |
| HasAttributeList * ListStore Source # | |
| type AttributeList ListStore Source # | |
| type SignalList ListStore Source # | |
class GObject o => IsListStore o Source #
Instances
toListStore :: IsListStore o => o -> IO ListStore Source #
Methods
append
data ListStoreAppendMethodInfo Source #
Instances
| ((~) * signature (b -> m ()), MonadIO m, IsListStore a, IsObject b) => MethodInfo * ListStoreAppendMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) | |
| => a |
|
| -> b |
|
| -> m () |
Appends item to store. item must be of type ListStore:item-type.
This function takes a ref on item.
Use listStoreSplice to append multiple items at the same time
efficiently.
Since: 2.44
insert
data ListStoreInsertMethodInfo Source #
Instances
| ((~) * signature (Word32 -> b -> m ()), MonadIO m, IsListStore a, IsObject b) => MethodInfo * ListStoreInsertMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) | |
| => a |
|
| -> Word32 |
|
| -> b |
|
| -> m () |
Inserts item into store at position. item must be of type
ListStore:item-type or derived from it. position must be smaller
than the length of the list, or equal to it to append.
This function takes a ref on item.
Use listStoreSplice to insert multiple items at the same time
efficiently.
Since: 2.44
insertSorted
data ListStoreInsertSortedMethodInfo Source #
Instances
| ((~) * signature (b -> CompareDataFunc -> m Word32), MonadIO m, IsListStore a, IsObject b) => MethodInfo * ListStoreInsertSortedMethodInfo a signature Source # | |
listStoreInsertSorted Source #
Arguments
| :: (HasCallStack, MonadIO m, IsListStore a, IsObject b) | |
| => a |
|
| -> b |
|
| -> CompareDataFunc |
|
| -> m Word32 | Returns: the position at which |
Inserts item into store at a position to be determined by the
compareFunc.
The list must already be sorted before calling this function or the result is undefined. Usually you would approach this by only ever inserting items by way of this function.
This function takes a ref on item.
Since: 2.44
new
remove
data ListStoreRemoveMethodInfo Source #
Instances
| ((~) * signature (Word32 -> m ()), MonadIO m, IsListStore a) => MethodInfo * ListStoreRemoveMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsListStore a) | |
| => a |
|
| -> Word32 |
|
| -> m () |
Removes the item from store that is at position. position must be
smaller than the current length of the list.
Use listStoreSplice to remove multiple items at the same time
efficiently.
Since: 2.44
removeAll
data ListStoreRemoveAllMethodInfo Source #
Instances
| ((~) * signature (m ()), MonadIO m, IsListStore a) => MethodInfo * ListStoreRemoveAllMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsListStore a) | |
| => a |
|
| -> m () |
Removes all items from store.
Since: 2.44
sort
data ListStoreSortMethodInfo Source #
Instances
| ((~) * signature (CompareDataFunc -> m ()), MonadIO m, IsListStore a) => MethodInfo * ListStoreSortMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsListStore a) | |
| => a |
|
| -> CompareDataFunc |
|
| -> m () |
Sort the items in store according to compareFunc.
Since: 2.46
splice
data ListStoreSpliceMethodInfo Source #
Instances
| ((~) * signature (Word32 -> Word32 -> [Object] -> m ()), MonadIO m, IsListStore a) => MethodInfo * ListStoreSpliceMethodInfo a signature Source # | |
Arguments
| :: (HasCallStack, MonadIO m, IsListStore a) | |
| => a |
|
| -> Word32 |
|
| -> Word32 |
|
| -> [Object] |
|
| -> m () |
Changes store by removing nRemovals items and adding nAdditions
items to it. additions must contain nAdditions items of type
ListStore:item-type. Nothing is not permitted.
This function is more efficient than listStoreInsert and
listStoreRemove, because it only emits
ListModel::items-changed once for the change.
This function takes a ref on each item in additions.
The parameters position and nRemovals must be correct (ie:
position + nRemovals must be less than or equal to the length of
the list at the time this function is called).
Since: 2.44
Properties
itemType
data ListStoreItemTypePropertyInfo Source #
Instances
constructListStoreItemType :: IsListStore o => GType -> IO (GValueConstruct o) Source #
getListStoreItemType :: (MonadIO m, IsListStore o) => o -> m GType Source #
listStoreItemType :: AttrLabelProxy "itemType" Source #