gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.CustomSorter

Description

GtkCustomSorter is a GtkSorter implementation that sorts via a callback function.

Synopsis

Exported types

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

Instances details
(GObject o, IsDescendantOf CustomSorter o) => IsCustomSorter o Source # 
Instance details

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

new

customSorterNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe CompareDataFunc

sortFunc: the GCompareDataFunc to use for sorting

-> m CustomSorter

Returns: a new GtkCustomSorter

Creates a new GtkSorter that works by calling sortFunc to compare items.

If sortFunc is Nothing, all items are considered equal.

setSortFunc

customSorterSetSortFunc Source #

Arguments

:: (HasCallStack, MonadIO m, IsCustomSorter a) 
=> a

self: a GtkCustomSorter

-> Maybe CompareDataFunc

sortFunc: function to sort items

-> 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.