frameRectForContentRect static method
frameRectForContentRect:styleMask:
Implementation
static NSRect frameRectForContentRect(
NSRect cRect, {
required NSWindowStyleMask styleMask,
}) {
objc.checkOsVersionInternal(
'NSWindow.frameRectForContentRect:styleMask:',
iOS: (true, null),
);
final _ptr = pkg_ffi.calloc<NSRect>();
objc.useMsgSendVariants
? _objc_msgSend_11qsrbrStret(
_ptr,
_class_NSWindow,
_sel_frameRectForContentRect_styleMask_,
cRect,
styleMask.value,
)
: _ptr.ref = _objc_msgSend_11qsrbr(
_class_NSWindow,
_sel_frameRectForContentRect_styleMask_,
cRect,
styleMask.value,
);
final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
ffi.sizeOf<NSRect>(),
finalizer: pkg_ffi.calloc.nativeFree,
);
return ffi.Struct.create<NSRect>(_finalizable);
}