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

Contents

- Exported types
- Methods
  - getExpression
  - getPspec
  - new
  - newForPspec

Description

A `GObject` property value in a `GtkExpression`.

Synopsis

- newtype PropertyExpression = PropertyExpression (ManagedPtr PropertyExpression)
- class (BoxedPtr o, TypedObject o, IsDescendantOf PropertyExpression o) => IsPropertyExpression o
- toPropertyExpression :: (MonadIO m, IsPropertyExpression o) => o -> m PropertyExpression
- propertyExpressionGetExpression :: (HasCallStack, MonadIO m, IsPropertyExpression a) => a -> m (Maybe Expression)
- propertyExpressionGetPspec :: (HasCallStack, MonadIO m, IsPropertyExpression a) => a -> m GParamSpec
- propertyExpressionNew :: (HasCallStack, MonadIO m, IsExpression a) => GType -> Maybe a -> Text -> m PropertyExpression
- propertyExpressionNewForPspec :: (HasCallStack, MonadIO m, IsExpression a) => Maybe a -> GParamSpec -> m PropertyExpression

# Exported types

newtype PropertyExpression Source #

Memory-managed wrapper type.

Constructors

PropertyExpression (ManagedPtr PropertyExpression) |

#### Instances

Instances details

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

class (BoxedPtr o, TypedObject o, IsDescendantOf PropertyExpression o) => IsPropertyExpression o Source #

Type class for types which can be safely cast to `PropertyExpression`, for instance with `toPropertyExpression`.

#### Instances

Instances details

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

toPropertyExpression :: (MonadIO m, IsPropertyExpression o) => o -> m PropertyExpression Source #

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

getExpression, getPspec, getValueType.

#### Setters

None.

## getExpression

propertyExpressionGetExpression Source #

Arguments

:: (HasCallStack, MonadIO m, IsPropertyExpression a) |
=> a | `expression`: a property `GtkExpression`
-> m (Maybe Expression) | Returns: the object expression

Gets the expression specifying the object of a property expression.

## getPspec

propertyExpressionGetPspec Source #

Arguments

:: (HasCallStack, MonadIO m, IsPropertyExpression a) |
=> a | `expression`: a property `GtkExpression`
-> m GParamSpec | Returns: the `GParamSpec` for the property

Gets the `GParamSpec` specifying the property of a property expression.

## new

propertyExpressionNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsExpression a) |
=> GType | `thisType`: The type to expect for the this type
-> Maybe a | `expression`: Expression to evaluate to get the object to query or `NULL` to query the `this` object
-> Text | `propertyName`: name of the property
-> m PropertyExpression | Returns: a new `GtkExpression`

Creates an expression that looks up a property.

The object to use is found by evaluating the `expression`, or using the `this` argument when `expression` is `NULL`.

If the resulting object conforms to `this_type`, its property named `property_name` will be queried. Otherwise, this expression's evaluation will fail.

The given `this_type` must have a property with `property_name`.

## newForPspec

propertyExpressionNewForPspec Source #

Arguments

:: (HasCallStack, MonadIO m, IsExpression a) |
=> Maybe a | `expression`: Expression to evaluate to get the object to query or `NULL` to query the `this` object
-> GParamSpec | `pspec`: the `GParamSpec` for the property to query
-> m PropertyExpression | Returns: a new `GtkExpression`

Creates an expression that looks up a property.

The object to use is found by evaluating the `expression`, or using the `this` argument when `expression` is `NULL`.

If the resulting object conforms to `this_type`, its property specified by `pspec` will be queried. Otherwise, this expression's evaluation will fail.