Skip to content

Gtk.CClosureExpression

class — extends Expression

A variant of GtkClosureExpression using a C closure.

Constructors

new

@classmethod
def new(cls, value_type: type | GObject.Type, marshal: GObject.ClosureMarshal | None, params: list[Expression], callback_func: GObject.Callback) -> CClosureExpression

Creates a GtkExpression that calls callback_func when it is evaluated.

This function is a variant of ClosureExpression.new that creates a GClosure by calling g_cclosure_new() with the given callback_func, user_data and user_destroy.

Parameters:

  • value_type — the type of the value that this expression evaluates to
  • marshal — marshaller used for creating a closure
  • params — expressions for each parameter
  • callback_func — callback used for creating a closure