Gtk4 VAPI: error: too few arguments to function ‘gtk_cclosure_expression_new’
Hello, The following code
expression = new Gtk.CClosureExpression(typeof(string), null, null, (Callback)my_func_callback);
produce the following corresponding c code by valac
_tmp12_ = (GtkCClosureExpression*) gtk_cclosure_expression_new (G_TYPE_STRING, NULL, 0, NULL, (GCallback) gtk4_demo_main_window_my_func_callback);
Although the corresponding c api as follows:
GtkExpression *
gtk_cclosure_expression_new (GType value_type,
GClosureMarshal marshal,
guint n_params,
GtkExpression **params,
GCallback callback_func,
gpointer user_data,
GClosureNotify user_destroy);
Vala emits the following error
error: too few arguments to function ‘gtk_cclosure_expression_new’
46 | expression = new Gtk.CClosureExpression(typeof(string), null, null, (Callback)my_func_callback);
The last 2 Arguments user_data
and user_destroy
are missing from vapi
public CClosureExpression (GLib.Type value_type, GLib.ClosureMarshal marshal, [CCode (array_length_cname = "n_params", array_length_pos = 2.5, array_length_type = "guint")] owned Gtk.Expression[] @params, owned GLib.Callback callback_func);