fromFunctionPointer static method
ObjCBlock<Void Function(NSObject, NSObject?, ObjCBlock<Void Function(NSObject?)> )>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrVoid Function(sec_protocol_metadata_t arg0, dispatch_data_t arg1, sec_protocol_pre_shared_key_selection_complete_t arg2)> >
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(
objc.NSObject,
objc.NSObject?,
objc.ObjCBlock<ffi.Void Function(objc.NSObject?)>,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
ffi.Void Function(
sec_protocol_metadata_t arg0,
dispatch_data_t arg1,
sec_protocol_pre_shared_key_selection_complete_t arg2,
)
>
>
ptr,
) =>
objc.ObjCBlock<
ffi.Void Function(
objc.NSObject,
objc.NSObject?,
objc.ObjCBlock<ffi.Void Function(objc.NSObject?)>,
)
>(
objc.newPointerBlock(
_ObjCBlock_ffiVoid_secprotocolmetadatat_dispatchdatat_secprotocolpresharedkeyselectioncompletet_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);