static ffi.Pointer<ffi.Void> toPointer(ViewArea? val) { if (val == null) { return ffi.nullptr; } final result = malloc.call<ViewAreaNative>(); result.ref = toNative(val); return result.cast(); }