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

Contents

- Exported types
- Methods
  - new

Description

A `GtkExpression` that tries to evaluate each of its expressions until it succeeds.

If all expressions fail to evaluate, the `GtkTryExpression`'s evaluation fails as well.

Since: 4.22

Synopsis

- newtype TryExpression = TryExpression (ManagedPtr TryExpression)
- class (BoxedPtr o, TypedObject o, IsDescendantOf TryExpression o) => IsTryExpression o
- toTryExpression :: (MonadIO m, IsTryExpression o) => o -> m TryExpression
- tryExpressionNew :: (HasCallStack, MonadIO m) => [Expression] -> m TryExpression

# Exported types

newtype TryExpression Source #

Memory-managed wrapper type.

Constructors

TryExpression (ManagedPtr TryExpression) |

#### Instances

Instances details

Eq TryExpression Source # |
Instance details Defined in GI.Gtk.Objects.TryExpression Methods (==) :: TryExpression -> TryExpression -> Bool Source # (/=) :: TryExpression -> TryExpression -> Bool Source #
BoxedPtr TryExpression Source # |
Instance details Defined in GI.Gtk.Objects.TryExpression Methods boxedPtrCopy :: TryExpression -> IO TryExpression Source # boxedPtrFree :: TryExpression -> IO () Source #
ManagedPtrNewtype TryExpression Source # |
Instance details Defined in GI.Gtk.Objects.TryExpression Methods toManagedPtr :: TryExpression -> ManagedPtr TryExpression Source #
TypedObject TryExpression Source # |
Instance details Defined in GI.Gtk.Objects.TryExpression Methods glibType :: IO GType Source #
HasParentTypes TryExpression Source # |
Instance details Defined in GI.Gtk.Objects.TryExpression
type ParentTypes TryExpression Source # |
Instance details Defined in GI.Gtk.Objects.TryExpression type ParentTypes TryExpression = '[Expression]

class (BoxedPtr o, TypedObject o, IsDescendantOf TryExpression o) => IsTryExpression o Source #

Type class for types which can be safely cast to `TryExpression`, for instance with `toTryExpression`.

#### Instances

Instances details

(BoxedPtr o, TypedObject o, IsDescendantOf TryExpression o) => IsTryExpression o Source # |
Instance details Defined in GI.Gtk.Objects.TryExpression

toTryExpression :: (MonadIO m, IsTryExpression o) => o -> m TryExpression Source #

Cast to `TryExpression`, 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

bind, evaluate, isStatic, ref, unref, watch.

#### Getters

getValueType.

#### Setters

None.

## new

tryExpressionNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> [Expression] | `expressions`: The array of expressions
-> m TryExpression | Returns: a new `GtkExpression`

Creates a `GtkExpression` with an array of expressions.

When evaluated, the `GtkTryExpression` tries to evaluate each of its expressions until it succeeds. If all expressions fail to evaluate, the `GtkTryExpression`'s evaluation fails as well.

The value type of the expressions in the array must match.

Since: 4.22