Bindgen::CallBuilder::CppToCrystalProc
Builder for calls made from C++ to Crystal. Used for callbacks, Qt signals and virtual method overrides.
Constants
Name of the local holding the Crystal object of the C++ object, in the
C++ virtual method and in the Proc of its Crystal override, see
#build and CrystalFromCpp#build.
Its type, void *.
Constructors
Instance methods
Calls the method, using the proc_name to call-through to Crystal.
If lambda is true, instead of invoking the method, builds a C++
lambda expression that wraps the invocation, capturing proc_name by
value, or the capture given instead, like proc = hold(f).
With crystal_object, the CrystalProc of a virtual method override
takes the Crystal object of the C++ object as its first argument, the
local _crystal_ of CppMethod::VirtualBody, see CRYSTAL_OBJECT:
the Proc captures nothing, so the C++ object doesn't refer to the
Crystal object, which would keep both from being collected.