fromFunctionPointer static method
ObjCBlock<Void Function(UnsignedChar, UnsignedLongLong, Pointer<__CFError> )>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrVoid Function(UnsignedChar, UnsignedLongLong, Pointer< >__CFError> )>
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.Void Function(
ffi.UnsignedChar,
ffi.UnsignedLongLong,
ffi.Pointer<__CFError>,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(Boolean arg0, UInt64 arg1, CFErrorRef arg2)
>
>
ptr,
) =>
objc.ObjCBlock<
ffi.Void Function(
ffi.UnsignedChar,
ffi.UnsignedLongLong,
ffi.Pointer<__CFError>,
)
>(
objc.newPointerBlock(
_ObjCBlock_ffiVoid_Boolean_UInt64_CFErrorRef_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);