fromFunctionPointer static method
ObjCBlock<CGRect Function(Int, CGRect)>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrCGRect Function(Int arg0, CGRect arg1)> >
Creates a block from a C function pointer.
This block must be invoked by native code running on the same thread as the isolate that registered it. Invoking the block on the wrong thread will result in a crash.
Implementation
static objc.ObjCBlock<objc.CGRect Function(ffi.Int, objc.CGRect)> fromFunctionPointer(
ffi.Pointer<ffi.NativeFunction<objc.CGRect Function(ffi.Int arg0, objc.CGRect arg1)>> ptr,
) => objc.ObjCBlock<objc.CGRect Function(ffi.Int, objc.CGRect)>(
objc.newPointerBlock(_ObjCBlock_CGRect_ffiInt_CGRect_fnPtrCallable, ptr.cast()),
retain: false,
release: true,
);