Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
GtkCustomSorter
is a GtkSorter
implementation that sorts via a callback
function.
Synopsis
- newtype CustomSorter = CustomSorter (ManagedPtr CustomSorter)
- class (GObject o, IsDescendantOf CustomSorter o) => IsCustomSorter o
- toCustomSorter :: (MonadIO m, IsCustomSorter o) => o -> m CustomSorter
- customSorterNew :: (HasCallStack, MonadIO m) => Maybe CompareDataFunc -> m CustomSorter
- customSorterSetSortFunc :: (HasCallStack, MonadIO m, IsCustomSorter a) => a -> Maybe CompareDataFunc -> m ()
Exported types
newtype CustomSorter Source #
Memory-managed wrapper type.
CustomSorter (ManagedPtr CustomSorter) |
Instances
Eq CustomSorter Source # | |
Defined in GI.Gtk.Objects.CustomSorter (==) :: CustomSorter -> CustomSorter -> Bool # (/=) :: CustomSorter -> CustomSorter -> Bool # | |
GObject CustomSorter Source # | |
Defined in GI.Gtk.Objects.CustomSorter | |
ManagedPtrNewtype CustomSorter Source # | |
Defined in GI.Gtk.Objects.CustomSorter toManagedPtr :: CustomSorter -> ManagedPtr CustomSorter | |
TypedObject CustomSorter Source # | |
Defined in GI.Gtk.Objects.CustomSorter | |
HasParentTypes CustomSorter Source # | |
Defined in GI.Gtk.Objects.CustomSorter | |
IsGValue (Maybe CustomSorter) Source # | Convert |
Defined in GI.Gtk.Objects.CustomSorter gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe CustomSorter -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe CustomSorter) | |
type ParentTypes CustomSorter Source # | |
Defined in GI.Gtk.Objects.CustomSorter |
class (GObject o, IsDescendantOf CustomSorter o) => IsCustomSorter o Source #
Type class for types which can be safely cast to CustomSorter
, for instance with toCustomSorter
.
Instances
(GObject o, IsDescendantOf CustomSorter o) => IsCustomSorter o Source # | |
Defined in GI.Gtk.Objects.CustomSorter |
toCustomSorter :: (MonadIO m, IsCustomSorter o) => o -> m CustomSorter Source #
Cast to CustomSorter
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, changed, compare, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getOrder, getProperty, getQdata.
Setters
new
:: (HasCallStack, MonadIO m) | |
=> Maybe CompareDataFunc |
|
-> m CustomSorter | Returns: a new |
Creates a new GtkSorter
that works by calling
sortFunc
to compare items.
If sortFunc
is Nothing
, all items are considered equal.
setSortFunc
customSorterSetSortFunc Source #
:: (HasCallStack, MonadIO m, IsCustomSorter a) | |
=> a |
|
-> Maybe CompareDataFunc |
|
-> m () |
Sets (or unsets) the function used for sorting items.
If sortFunc
is Nothing
, all items are considered equal.
If the sort func changes its sorting behavior,
sorterChanged
needs to be called.
If a previous function was set, its userDestroy
will be
called now.