fromFunctionPointer static method
ObjCBlock<NSEdgeInsets Function(Pointer<Void> , NSCollectionView, NSCollectionViewLayout, Long)>
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<
objc.NSEdgeInsets Function(
ffi.Pointer<ffi.Void>,
NSCollectionView,
NSCollectionViewLayout,
ffi.Long,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
objc.NSEdgeInsets Function(
ffi.Pointer<ffi.Void> arg0,
ffi.Pointer<objc.ObjCObject> arg1,
ffi.Pointer<objc.ObjCObject> arg2,
NSInteger arg3,
)
>
>
ptr,
) =>
objc.ObjCBlock<
objc.NSEdgeInsets Function(
ffi.Pointer<ffi.Void>,
NSCollectionView,
NSCollectionViewLayout,
ffi.Long,
)
>(
objc.newPointerBlock(
_ObjCBlock_NSEdgeInsets_ffiVoid_NSCollectionView_NSCollectionViewLayout_NSInteger_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);