gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.CustomFilter

Contents

- Exported types
- Methods
  - new
  - setFilterFunc

Description

Determines whether to include items with a callback.

Synopsis

- newtype CustomFilter = CustomFilter (ManagedPtr CustomFilter)
- class (GObject o, IsDescendantOf CustomFilter o) => IsCustomFilter o
- toCustomFilter :: (MonadIO m, IsCustomFilter o) => o -> m CustomFilter
- customFilterNew :: (HasCallStack, MonadIO m) => Maybe CustomFilterFunc -> m CustomFilter
- customFilterSetFilterFunc :: (HasCallStack, MonadIO m, IsCustomFilter a) => a -> Maybe CustomFilterFunc -> m ()

# 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 Methods (==) :: CustomFilter -> CustomFilter -> Bool Source # (/=) :: CustomFilter -> CustomFilter -> Bool Source #
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 Source #
TypedObject CustomFilter Source # |
Instance details Defined in GI.Gtk.Objects.CustomFilter Methods glibType :: IO GType Source #
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 Source # gvalueSet_ :: Ptr GValue -> Maybe CustomFilter -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe CustomFilter) Source #
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

### Click to display all available methods, including inherited ones

Expand

#### Methods

bindProperty, bindPropertyFull, changed, forceFloating, freezeNotify, getv, isFloating, match, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getData, getProperty, getQdata, getStrictness.

#### Setters

setData, setDataFull, setFilterFunc, setProperty.

## 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 function to filter items.

If `matchFunc` is `NULL`, 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 custom filter
-> Maybe CustomFilterFunc | `matchFunc`: function to filter items
-> m () |

Sets the function used for filtering items.

If `matchFunc` is `NULL`, 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.