fromFunctionPointer static method
ObjCBlock<NSView? Function(Pointer<Void> , NSRange, Pointer<NSRect> , Pointer<NSRange> )>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrPointer< >ObjCObject> Function(Pointer<Void> arg0, NSRange arg1, NSRectPointer arg2, NSRangePointer arg3)>
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<
NSView? Function(
ffi.Pointer<ffi.Void>,
objc.NSRange,
ffi.Pointer<NSRect>,
ffi.Pointer<NSRange>,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObject> Function(
ffi.Pointer<ffi.Void> arg0,
NSRange arg1,
NSRectPointer arg2,
NSRangePointer arg3,
)
>
>
ptr,
) =>
objc.ObjCBlock<
NSView? Function(
ffi.Pointer<ffi.Void>,
objc.NSRange,
ffi.Pointer<NSRect>,
ffi.Pointer<NSRange>,
)
>(
objc.newPointerBlock(
_ObjCBlock_NSView_ffiVoid_NSRange_NSRectPointer_NSRangePointer_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);