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

Contents

- Exported types
- Methods
  - getObject
  - new

Description

A `GObject` value in a `GtkExpression`.

Synopsis

- newtype ObjectExpression = ObjectExpression (ManagedPtr ObjectExpression)
- class (BoxedPtr o, TypedObject o, IsDescendantOf ObjectExpression o) => IsObjectExpression o
- toObjectExpression :: (MonadIO m, IsObjectExpression o) => o -> m ObjectExpression
- objectExpressionGetObject :: (HasCallStack, MonadIO m, IsObjectExpression a) => a -> m (Maybe Object)
- objectExpressionNew :: (HasCallStack, MonadIO m, IsObject a) => a -> m ObjectExpression

# Exported types

newtype ObjectExpression Source #

Memory-managed wrapper type.

Constructors

ObjectExpression (ManagedPtr ObjectExpression) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf ObjectExpression o) => IsObjectExpression o Source #

Type class for types which can be safely cast to `ObjectExpression`, for instance with `toObjectExpression`.

#### Instances

Instances details

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

toObjectExpression :: (MonadIO m, IsObjectExpression o) => o -> m ObjectExpression Source #

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

getObject, getValueType.

#### Setters

None.

## getObject

objectExpressionGetObject Source #

Arguments

:: (HasCallStack, MonadIO m, IsObjectExpression a) |
=> a | `expression`: an object `GtkExpression`
-> m (Maybe Object) | Returns: the object, or `NULL`

Gets the object that the expression evaluates to.

## new

objectExpressionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsObject a) |
=> a | `object`: object to watch
-> m ObjectExpression | Returns: a new `GtkExpression`

Creates an expression evaluating to the given `object` with a weak reference.

Once the `object` is disposed, it will fail to evaluate.

This expression is meant to break reference cycles.

If you want to keep a reference to `object`, use `ConstantExpression`.`new`().