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

GI.Gtk.Objects.CustomFilter

Description

CustomFilter is a Filter that uses a callback to determine whether to include an item or not.

Synopsis

Exported types

newtype CustomFilter Source #

Memory-managed wrapper type.

Constructors

CustomFilter (ManagedPtr CustomFilter) 

Instances

Instances details
Eq CustomFilter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomFilter

GObject CustomFilter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomFilter

ManagedPtrNewtype CustomFilter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomFilter

Methods

toManagedPtr :: CustomFilter -> ManagedPtr CustomFilter

TypedObject CustomFilter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomFilter

Methods

glibType :: IO GType

HasParentTypes CustomFilter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomFilter

IsGValue (Maybe CustomFilter) Source #

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

Instance details

Defined in GI.Gtk.Objects.CustomFilter

Methods

gvalueGType_ :: IO GType

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

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

type ParentTypes CustomFilter Source # 
Instance details

Defined in GI.Gtk.Objects.CustomFilter

type ParentTypes CustomFilter = '[Filter, Object]

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 CustomFilter

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 CustomFilter

-> Maybe CustomFilterFunc

matchFunc: function to filter items

-> m () 

Sets (or unsets) 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.