fromFunctionPointer static method
ObjCBlock<NSInteger Function(Pointer<Void> , NSLayoutManager, NSInteger, UnsignedLong)>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrNSInteger Function(Pointer< >Void> arg0, Pointer<ObjCObject> arg1, NSInteger 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<
NSInteger Function(
ffi.Pointer<ffi.Void>,
NSLayoutManager,
NSInteger,
ffi.UnsignedLong,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
NSInteger Function(
ffi.Pointer<ffi.Void> arg0,
ffi.Pointer<objc.ObjCObject> arg1,
NSInteger arg2,
NSUInteger arg3,
)
>
>
ptr,
) =>
objc.ObjCBlock<
NSInteger Function(
ffi.Pointer<ffi.Void>,
NSLayoutManager,
NSInteger,
ffi.UnsignedLong,
)
>(
objc.newPointerBlock(
_ObjCBlock_NSControlCharacterAction_ffiVoid_NSLayoutManager_NSControlCharacterAction_NSUInteger_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);