castFromPointer static method

ObjCBlock<UnsignedLong Function(Pointer<Void>, Pointer<NSFastEnumerationState>, Pointer<Pointer<ObjCObject>>, UnsignedLong)> castFromPointer(
  1. Pointer<ObjCBlockImpl> pointer, {
  2. bool retain = false,
  3. bool release = false,
})

Returns a block that wraps the given raw block pointer.

Implementation

static objc.ObjCBlock<
  ffi.UnsignedLong Function(
    ffi.Pointer<ffi.Void>,
    ffi.Pointer<objc.NSFastEnumerationState>,
    ffi.Pointer<ffi.Pointer<objc.ObjCObject>>,
    ffi.UnsignedLong,
  )
>
castFromPointer(
  ffi.Pointer<objc.ObjCBlockImpl> pointer, {
  bool retain = false,
  bool release = false,
}) =>
    objc.ObjCBlock<
      ffi.UnsignedLong Function(
        ffi.Pointer<ffi.Void>,
        ffi.Pointer<objc.NSFastEnumerationState>,
        ffi.Pointer<ffi.Pointer<objc.ObjCObject>>,
        ffi.UnsignedLong,
      )
    >(pointer, retain: retain, release: release);