On Tuesday, 30 July 2019 at 09:33:04 UTC, Ron Tarrant wrote:
Some things are almost impossible to research. For instance, in
the GtkD wrapper code—specifically the Widget.d file—the
following function definition appears:
gulong addOnDraw(bool delegate(Scoped!Context, Widget) dlg,
ConnectFlags connectFlags=cast(ConnectFlags)0)
{
return Signals.connect(this, "draw", dlg, connectFlags ^
ConnectFlags.SWAPPED);
}
Scoped is a struct defined here:
https://github.com/gtkd-developers/GtkD/blob/e14091fb2df4d05348061f274c131700af89fb16/generated/gtkd/glib/c/types.d#L56
Looking at its source code, it seems it's a way to force the call
of "destroy" method of wrapped object (Context in your case) when
the struct goes out of its scope (and d-tor is called)
Andrea