fromFunctionPointer static method
ObjCBlock<NSUInteger Function(Pointer<Void> , NSTokenFieldCell, Pointer<ObjCObject> )>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrNSUInteger Function(Pointer< >Void> arg0, NSPasteboardType arg1, Pointer<ObjCObject> 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<
NSUInteger Function(
ffi.Pointer<ffi.Void>,
NSTokenFieldCell,
ffi.Pointer<objc.ObjCObject>,
)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<
NSUInteger Function(
ffi.Pointer<ffi.Void> arg0,
ffi.Pointer<objc.ObjCObject> arg1,
ffi.Pointer<objc.ObjCObject> arg2,
)
>
>
ptr,
) =>
objc.ObjCBlock<
NSUInteger Function(
ffi.Pointer<ffi.Void>,
NSTokenFieldCell,
ffi.Pointer<objc.ObjCObject>,
)
>(
objc.newPointerBlock(
_ObjCBlock_NSTokenStyle_ffiVoid_NSTokenFieldCell_objcObjCObject_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);