gi-gtk-4.0.8: 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

newtype CustomSorter Source #

Memory-managed wrapper type.

Constructors

CustomSorter (ManagedPtr CustomSorter) 

Instances

Instances details
Eq CustomSorter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomSorter

GObject CustomSorter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomSorter

ManagedPtrNewtype CustomSorter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomSorter

Methods

toManagedPtr :: CustomSorter -> ManagedPtr CustomSorter

TypedObject CustomSorter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomSorter

Methods

glibType :: IO GType

HasParentTypes CustomSorter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomSorter

IsGValue (Maybe CustomSorter) Source #

Convert CustomSorter to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Objects.CustomSorter

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe CustomSorter -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe CustomSorter)

type ParentTypes CustomSorter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomSorter

type ParentTypes CustomSorter = '[Sorter, Object]

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.