fromFunctionPointer static method
ObjCBlock<Bool Function(Pointer<Void> , NSApplication, NSUserActivity, ObjCBlock<Void Function(NSArray)> )>
fromFunctionPointer()
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<
ffi.Bool Function(
ffi.Pointer<ffi.Void>,
NSApplication,
NSUserActivity,
objc.ObjCBlock<ffi.Void Function(objc.NSArray)>,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
ffi.Bool Function(
ffi.Pointer<ffi.Void> arg0,
ffi.Pointer<objc.ObjCObject> arg1,
ffi.Pointer<objc.ObjCObject> arg2,
ffi.Pointer<objc.ObjCBlockImpl> arg3,
)
>
>
ptr,
) =>
objc.ObjCBlock<
ffi.Bool Function(
ffi.Pointer<ffi.Void>,
NSApplication,
NSUserActivity,
objc.ObjCBlock<ffi.Void Function(objc.NSArray)>,
)
>(
objc.newPointerBlock(
_ObjCBlock_bool_ffiVoid_NSApplication_NSUserActivity_ffiVoidNSArray_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);