gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.ClosureExpression

Description

An expression using a custom GClosure to compute the value from its parameters.

Synopsis

Exported types

class (BoxedPtr o, TypedObject o, IsDescendantOf ClosureExpression o) => IsClosureExpression o Source #

Type class for types which can be safely cast to ClosureExpression, for instance with toClosureExpression.

Instances

Instances details
(BoxedPtr o, TypedObject o, IsDescendantOf ClosureExpression o) => IsClosureExpression o Source # 
Instance details

Defined in GI.Gtk.Objects.ClosureExpression

toClosureExpression :: (MonadIO m, IsClosureExpression o) => o -> m ClosureExpression Source #

Cast to ClosureExpression, 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

closureExpressionNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> GType

valueType: the type of the value that this expression evaluates to

-> GClosure a

closure: closure to call when evaluating this expression. If closure is floating, it is adopted

-> Maybe [Expression]

params: expressions for each parameter

-> m ClosureExpression

Returns: a new GtkExpression

Creates a GtkExpression that calls closure when it is evaluated.

closure is called with the this object and the results of evaluating the params expressions.