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

GI.Gtk.Objects.CustomFilter

Description

GtkCustomFilter determines whether to include items with a callback.

Synopsis

Exported types

class (GObject o, IsDescendantOf CustomFilter o) => IsCustomFilter o Source #

Type class for types which can be safely cast to CustomFilter, for instance with toCustomFilter.

Instances

Instances details
(GObject o, IsDescendantOf CustomFilter o) => IsCustomFilter o Source # 
Instance details

Defined in GI.Gtk.Objects.CustomFilter

toCustomFilter :: (MonadIO m, IsCustomFilter o) => o -> m CustomFilter Source #

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

Methods

new

customFilterNew Source #

Arguments

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

matchFunc: function to filter items

-> m CustomFilter

Returns: a new GtkCustomFilter

Creates a new filter using the given matchFunc to filter items.

If matchFunc is Nothing, the filter matches all items.

If the filter func changes its filtering behavior, filterChanged needs to be called.

setFilterFunc

customFilterSetFilterFunc Source #

Arguments

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

self: a GtkCustomFilter

-> Maybe CustomFilterFunc

matchFunc: function to filter items

-> m () 

Sets the function used for filtering items.

If matchFunc is Nothing, the filter matches all items.

If the filter func changes its filtering behavior, filterChanged needs to be called.

If a previous function was set, its userDestroy will be called now.