focusRingMaskBoundsForFrame method

NSRect focusRingMaskBoundsForFrame(
  1. NSRect cellFrame, {
  2. required NSView inView,
})

focusRingMaskBoundsForFrame:inView:

Implementation

NSRect focusRingMaskBoundsForFrame(
  NSRect cellFrame, {
  required NSView inView,
}) {
  objc.checkOsVersionInternal(
    'NSCell.focusRingMaskBoundsForFrame:inView:',
    iOS: (true, null),
    macOS: (false, (10, 7, 0)),
  );
  final _ptr = pkg_ffi.calloc<NSRect>();
  objc.useMsgSendVariants
      ? _objc_msgSend_2olghrStret(
          _ptr,
          this.ref.pointer,
          _sel_focusRingMaskBoundsForFrame_inView_,
          cellFrame,
          inView.ref.pointer,
        )
      : _ptr.ref = _objc_msgSend_2olghr(
          this.ref.pointer,
          _sel_focusRingMaskBoundsForFrame_inView_,
          cellFrame,
          inView.ref.pointer,
        );
  final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
    ffi.sizeOf<NSRect>(),
    finalizer: pkg_ffi.calloc.nativeFree,
  );
  return ffi.Struct.create<NSRect>(_finalizable);
}