frameRectForContentRect$1 method

CGRect frameRectForContentRect$1(
  1. NSRect contentRect
)

frameRectForContentRect:

Implementation

NSRect frameRectForContentRect$1(NSRect contentRect) {
  objc.checkOsVersionInternal(
    'NSWindow.frameRectForContentRect:',
    iOS: (true, null),
  );
  final _ptr = pkg_ffi.calloc<NSRect>();
  objc.useMsgSendVariants
      ? _objc_msgSend_1gn1s3dStret(
          _ptr,
          this.ref.pointer,
          _sel_frameRectForContentRect_,
          contentRect,
        )
      : _ptr.ref = _objc_msgSend_1gn1s3d(
          this.ref.pointer,
          _sel_frameRectForContentRect_,
          contentRect,
        );
  final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
    ffi.sizeOf<NSRect>(),
    finalizer: pkg_ffi.calloc.nativeFree,
  );
  return ffi.Struct.create<NSRect>(_finalizable);
}