Class (GI Class)

Gtk-4.0GtkConstantExpression

A constant value in a Gtk.Expression.

Hierarchy (View Summary)

Index

Constructors

Properties

Methods

Methods - Inherited from Gtk.Expression

Constructors

Properties

Methods

  • Gets the value that a constant expression evaluates to.

    Returns unknown

    the value

Methods - Inherited from Gtk.Expression

  • Bind target's property named property to self.

    The value that self evaluates to is set via g_object_set() on target. This is repeated whenever self changes to ensure that the object's property stays synchronized with self.

    If self's evaluation fails, target's property is not updated. You can ensure that this doesn't happen by using a fallback expression.

    Note that this function takes ownership of self. If you want to keep it around, you should Gtk.Expression.ref it beforehand.

    Parameters

    • target: GObject.Object

      the target object to bind to

    • property: string

      name of the property on target to bind to

    • Optionalthis_: GObject.Object

      the this argument for the evaluation of self

    Returns ExpressionWatch

    a Gtk.ExpressionWatch

  • Evaluates the given expression and on success stores the result in value.

    The GObject.GType of value will be the type given by Gtk.Expression.get_value_type.

    It is possible that expressions cannot be evaluated - for example when the expression references objects that have been destroyed or set to NULL. In that case value will remain empty and FALSE will be returned.

    Parameters

    Returns boolean

    TRUE if the expression could be evaluated

Interfaces

SignalSignatures