fromFunctionPointer static method
ObjCBlock<CGSize Function(Pointer<Void> , CGSize)>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrCGSize Function(Pointer< >Void> , CGSize)>
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.CGSize Function(ffi.Pointer<ffi.Void>, objc.CGSize)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
NSSize Function(ffi.Pointer<ffi.Void> arg0, NSSize arg1)
>
>
ptr,
) => objc.ObjCBlock<objc.CGSize Function(ffi.Pointer<ffi.Void>, objc.CGSize)>(
objc.newPointerBlock(
_ObjCBlock_NSSize_ffiVoid_NSSize_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);