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

Contents

- Exported types
- Methods
  - getExpression
  - getInvert
  - new
  - setExpression
  - setInvert
- Properties
  - expression
  - invert

Description

Evaluates a boolean expression to determine whether to include items.

Synopsis

- newtype BoolFilter = BoolFilter (ManagedPtr BoolFilter)
- class (GObject o, IsDescendantOf BoolFilter o) => IsBoolFilter o
- toBoolFilter :: (MonadIO m, IsBoolFilter o) => o -> m BoolFilter
- boolFilterGetExpression :: (HasCallStack, MonadIO m, IsBoolFilter a) => a -> m (Maybe Expression)
- boolFilterGetInvert :: (HasCallStack, MonadIO m, IsBoolFilter a) => a -> m Bool
- boolFilterNew :: (HasCallStack, MonadIO m, IsExpression a) => Maybe a -> m BoolFilter
- boolFilterSetExpression :: (HasCallStack, MonadIO m, IsBoolFilter a, IsExpression b) => a -> Maybe b -> m ()
- boolFilterSetInvert :: (HasCallStack, MonadIO m, IsBoolFilter a) => a -> Bool -> m ()
- clearBoolFilterExpression :: (MonadIO m, IsBoolFilter o) => o -> m ()
- constructBoolFilterExpression :: (IsBoolFilter o, MonadIO m, IsExpression a) => a -> m (GValueConstruct o)
- getBoolFilterExpression :: (MonadIO m, IsBoolFilter o) => o -> m (Maybe Expression)
- setBoolFilterExpression :: (MonadIO m, IsBoolFilter o, IsExpression a) => o -> a -> m ()
- constructBoolFilterInvert :: (IsBoolFilter o, MonadIO m) => Bool -> m (GValueConstruct o)
- getBoolFilterInvert :: (MonadIO m, IsBoolFilter o) => o -> m Bool
- setBoolFilterInvert :: (MonadIO m, IsBoolFilter o) => o -> Bool -> m ()

# Exported types

newtype BoolFilter Source #

Memory-managed wrapper type.

Constructors

BoolFilter (ManagedPtr BoolFilter) |

#### Instances

Instances details

Eq BoolFilter Source # |
Instance details Defined in GI.Gtk.Objects.BoolFilter Methods (==) :: BoolFilter -> BoolFilter -> Bool Source # (/=) :: BoolFilter -> BoolFilter -> Bool Source #
GObject BoolFilter Source # |
Instance details Defined in GI.Gtk.Objects.BoolFilter
ManagedPtrNewtype BoolFilter Source # |
Instance details Defined in GI.Gtk.Objects.BoolFilter Methods toManagedPtr :: BoolFilter -> ManagedPtr BoolFilter Source #
TypedObject BoolFilter Source # |
Instance details Defined in GI.Gtk.Objects.BoolFilter Methods glibType :: IO GType Source #
HasParentTypes BoolFilter Source # |
Instance details Defined in GI.Gtk.Objects.BoolFilter
IsGValue (Maybe BoolFilter) Source # | Convert `BoolFilter` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.BoolFilter Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe BoolFilter -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe BoolFilter) Source #
type ParentTypes BoolFilter Source # |
Instance details Defined in GI.Gtk.Objects.BoolFilter type ParentTypes BoolFilter = '[Filter, Object]

class (GObject o, IsDescendantOf BoolFilter o) => IsBoolFilter o Source #

Type class for types which can be safely cast to `BoolFilter`, for instance with `toBoolFilter`.

#### Instances

Instances details

(GObject o, IsDescendantOf BoolFilter o) => IsBoolFilter o Source # |
Instance details Defined in GI.Gtk.Objects.BoolFilter

toBoolFilter :: (MonadIO m, IsBoolFilter o) => o -> m BoolFilter Source #

Cast to `BoolFilter`, 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, getExpression, getInvert, getProperty, getQdata, getStrictness.

#### Setters

setData, setDataFull, setExpression, setInvert, setProperty.

## getExpression

boolFilterGetExpression Source #

Arguments

:: (HasCallStack, MonadIO m, IsBoolFilter a) |
=> a | `self`: a bool filter
-> m (Maybe Expression) | Returns: the expression

Gets the expression that the filter evaluates for each item.

## getInvert

boolFilterGetInvert Source #

Arguments

:: (HasCallStack, MonadIO m, IsBoolFilter a) |
=> a | `self`: a bool filter
-> m Bool | Returns: true if the filter inverts

Returns whether the filter inverts the expression.

## new

boolFilterNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsExpression a) |
=> Maybe a | `expression`: the expression to evaluate
-> m BoolFilter | Returns: a new `GtkBoolFilter`

Creates a new bool filter.

## setExpression

boolFilterSetExpression Source #

Arguments

:: (HasCallStack, MonadIO m, IsBoolFilter a, IsExpression b) |
=> a | `self`: a bool filter
-> Maybe b | `expression`: the expression
-> m () |

Sets the expression that the filter uses to check if items should be filtered.

The expression must have a value type of `G_TYPE_BOOLEAN`.

## setInvert

boolFilterSetInvert Source #

Arguments

:: (HasCallStack, MonadIO m, IsBoolFilter a) |
=> a | `self`: a bool filter
-> Bool | `invert`: true to invert
-> m () |

Sets whether the filter should invert the expression.

# Properties

## expression

The boolean expression to evaluate on each item.

clearBoolFilterExpression :: (MonadIO m, IsBoolFilter o) => o -> m () Source #

Set the value of the “`expression`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #expression

constructBoolFilterExpression :: (IsBoolFilter o, MonadIO m, IsExpression a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`expression`” property. This is rarely needed directly, but it is used by `new`.

getBoolFilterExpression :: (MonadIO m, IsBoolFilter o) => o -> m (Maybe Expression) Source #

Get the value of the “`expression`” property. When overloading is enabled, this is equivalent to

    get boolFilter #expression

setBoolFilterExpression :: (MonadIO m, IsBoolFilter o, IsExpression a) => o -> a -> m () Source #

Set the value of the “`expression`” property. When overloading is enabled, this is equivalent to

    set boolFilter [ #expression := value ]

## invert

If the expression result should be inverted.

constructBoolFilterInvert :: (IsBoolFilter o, MonadIO m) => Bool -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`invert`” property. This is rarely needed directly, but it is used by `new`.

getBoolFilterInvert :: (MonadIO m, IsBoolFilter o) => o -> m Bool Source #

Get the value of the “`invert`” property. When overloading is enabled, this is equivalent to

    get boolFilter #invert

setBoolFilterInvert :: (MonadIO m, IsBoolFilter o) => o -> Bool -> m () Source #

Set the value of the “`invert`” property. When overloading is enabled, this is equivalent to

    set boolFilter [ #invert := value ]