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.Structs.ExpressionWatch

Contents

- Exported types
- Methods
  - evaluate
  - ref
  - unref
  - unwatch

Description

An opaque structure representing a watched `GtkExpression`.

The contents of `GtkExpressionWatch` should only be accessed through the provided API.

Synopsis

- newtype ExpressionWatch = ExpressionWatch (ManagedPtr ExpressionWatch)
- expressionWatchEvaluate :: (HasCallStack, MonadIO m) => ExpressionWatch -> GValue -> m Bool
- expressionWatchRef :: (HasCallStack, MonadIO m) => ExpressionWatch -> m ExpressionWatch
- expressionWatchUnref :: (HasCallStack, MonadIO m) => ExpressionWatch -> m ()
- expressionWatchUnwatch :: (HasCallStack, MonadIO m) => ExpressionWatch -> m ()

# Exported types

newtype ExpressionWatch Source #

Memory-managed wrapper type.

Constructors

ExpressionWatch (ManagedPtr ExpressionWatch) |

#### Instances

Instances details

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

# Methods

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

Expand

#### Methods

evaluate, ref, unref, unwatch.

#### Getters

None.

#### Setters

None.

## evaluate

expressionWatchEvaluate Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ExpressionWatch | `watch`: a `GtkExpressionWatch`
-> GValue | `value`: an empty `GValue` to be set
-> m Bool | Returns: `TRUE` if the expression could be evaluated and `value` was set

Evaluates the watched expression and on success stores the result in `value`.

This is equivalent to calling `expressionEvaluate` with the expression and this pointer originally used to create `watch`.

## ref

expressionWatchRef Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ExpressionWatch | `watch`: a `GtkExpressionWatch`
-> m ExpressionWatch | Returns: the `GtkExpressionWatch` with an additional reference

Acquires a reference on the given `GtkExpressionWatch`.

## unref

expressionWatchUnref Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ExpressionWatch | `watch`: a `GtkExpressionWatch`
-> m () |

Releases a reference on the given `GtkExpressionWatch`.

If the reference was the last, the resources associated to `self` are freed.

## unwatch

expressionWatchUnwatch Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ExpressionWatch | `watch`: watch to release
-> m () |

Stops watching an expression.

See `expressionWatch` for how the watch was established.