convertRect method

CGRect convertRect(
  1. CGRect rect, {
  2. UIWindow? toWindow,
})

convertRect:toWindow:

Implementation

objc.CGRect convertRect(objc.CGRect rect, {UIWindow? toWindow}) {
  objc.checkOsVersionInternal('UIWindow.convertRect:toWindow:', iOS: (false, (2, 0, 0)));
  final _ptr = pkg_ffi.calloc<objc.CGRect>();
  objc.useMsgSendVariants
      ? _objc_msgSend_2olghrStret(
          _ptr,
          this.ref.pointer,
          _sel_convertRect_toWindow_,
          rect,
          toWindow?.ref.pointer ?? ffi.nullptr,
        )
      : _ptr.ref = _objc_msgSend_2olghr(
          this.ref.pointer,
          _sel_convertRect_toWindow_,
          rect,
          toWindow?.ref.pointer ?? ffi.nullptr,
        );
  final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
    ffi.sizeOf<objc.CGRect>(),
    finalizer: pkg_ffi.calloc.nativeFree,
  );
  return ffi.Struct.create<objc.CGRect>(_finalizable);
}