fromFunctionPointer static method
ObjCBlock<NSImage? Function(Pointer<Void> , CGRect, NSTextContainer?, UnsignedLong)>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrPointer< >ObjCObject> Function(Pointer<Void> arg0, CGRect arg1, Pointer<ObjCObject> arg2, NSUInteger 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<
NSImage? Function(
ffi.Pointer<ffi.Void>,
objc.CGRect,
NSTextContainer?,
ffi.UnsignedLong,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
ffi.Pointer<objc.ObjCObject> Function(
ffi.Pointer<ffi.Void> arg0,
objc.CGRect arg1,
ffi.Pointer<objc.ObjCObject> arg2,
NSUInteger arg3,
)
>
>
ptr,
) =>
objc.ObjCBlock<
NSImage? Function(
ffi.Pointer<ffi.Void>,
objc.CGRect,
NSTextContainer?,
ffi.UnsignedLong,
)
>(
objc.newPointerBlock(
_ObjCBlock_NSImage_ffiVoid_CGRect_NSTextContainer_NSUInteger_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);