Hoogle Search

Within LTS Haskell 24.3 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. type ListModelItemsChangedCallback = Word32 -> Word32 -> Word32 -> IO ()

    gi-gio GI.Gio.Interfaces.ListModel

    This signal is emitted whenever items were added to or removed from list. At position, removed items were removed and added items were added in their place. Note: If removed != added, the positions of all later items in the model change. Since: 2.44

  2. afterListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ((?self :: a) => ListModelItemsChangedCallback) -> m SignalHandlerId

    gi-gio GI.Gio.Interfaces.ListModel

    Connect a signal handler for the itemsChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after listModel #itemsChanged callback
    
    By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.

  3. listModelGetItem :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> m (Maybe Object)

    gi-gio GI.Gio.Interfaces.ListModel

    Get the item at position. If position is greater than the number of items in list, Nothing is returned. Nothing is never returned for an index that is smaller than the length of the list. This function is meant to be used by language bindings in place of g_list_model_get_item(). See also: listModelGetNItems Since: 2.44

  4. listModelGetItemType :: (HasCallStack, MonadIO m, IsListModel a) => a -> m GType

    gi-gio GI.Gio.Interfaces.ListModel

    Gets the type of the items in list. All items returned from g_list_model_get_item() are of the type returned by this function, or a subtype, or if the type is an interface, they are an implementation of that interface. The item type of a ListModel can not change during the life of the model. Since: 2.44

  5. listModelGetNItems :: (HasCallStack, MonadIO m, IsListModel a) => a -> m Word32

    gi-gio GI.Gio.Interfaces.ListModel

    Gets the number of items in list. Depending on the model implementation, calling this function may be less efficient than iterating the list with increasing values for position until g_list_model_get_item() returns Nothing. Since: 2.44

  6. listModelItemsChanged :: (HasCallStack, MonadIO m, IsListModel a) => a -> Word32 -> Word32 -> Word32 -> m ()

    gi-gio GI.Gio.Interfaces.ListModel

    Emits the ListModel::itemsChanged signal on list. This function should only be called by classes implementing ListModel. It has to be called after the internal representation of list has been updated, because handlers connected to this signal might query the new state of the list. Implementations must only make changes to the model (as visible to its consumer) in places that will not cause problems for that consumer. For models that are driven directly by a write API (such as ListStore), changes can be reported in response to uses of that API. For models that represent remote data, changes should only be made from a fresh mainloop dispatch. It is particularly not permitted to make changes in response to a call to the ListModel consumer API. Stated another way: in general, it is assumed that code making a series of accesses to the model via the API, without returning to the mainloop, and without calling other code, will continue to view the same contents of the model. Since: 2.44

  7. onListModelItemsChanged :: (IsListModel a, MonadIO m) => a -> ((?self :: a) => ListModelItemsChangedCallback) -> m SignalHandlerId

    gi-gio GI.Gio.Interfaces.ListModel

    Connect a signal handler for the itemsChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on listModel #itemsChanged callback
    

  8. toListModel :: (MonadIO m, IsListModel o) => o -> m ListModel

    gi-gio GI.Gio.Interfaces.ListModel

    Cast to ListModel, for types for which this is known to be safe. For general casts, use castTo.

  9. catchSTM :: Exception e => STM a -> (e -> STM a) -> STM a

    relude Relude.Lifted.Concurrent

    Exception handling within STM actions. catchSTM m f catches any exception thrown by m using throwSTM, using the function f to handle the exception. If an exception is thrown, any changes made by m are rolled back, but changes prior to m persist.

  10. throwSTM :: Exception e => e -> STM a

    relude Relude.Lifted.Concurrent

    A variant of throw that can only be used within the STM monad. Throwing an exception in STM aborts the transaction and propagates the exception. If the exception is caught via catchSTM, only the changes enclosed by the catch are rolled back; changes made outside of catchSTM persist. If the exception is not caught inside of the STM, it is re-thrown by atomically, and the entire STM is rolled back. Although throwSTM has a type that is an instance of the type of throw, the two functions are subtly different:

    throw e    `seq` x  ===> throw e
    throwSTM e `seq` x  ===> x
    
    The first example will cause the exception e to be raised, whereas the second one won't. In fact, throwSTM will only cause an exception to be raised when it is used within the STM monad. The throwSTM variant should be used in preference to throw to raise an exception within the STM monad because it guarantees ordering with respect to other STM operations, whereas throw does not.

Page 51 of many | Previous | Next