use core::ffi::*;
use core::ptr::NonNull;
use objc2_core_foundation::*;
use crate::*;
extern "C" {
pub static CGPointZero: CGPoint;
}
extern "C" {
pub static CGSizeZero: CGSize;
}
extern "C" {
pub static CGRectZero: CGRect;
}
extern "C" {
pub static CGRectNull: CGRect;
}
extern "C" {
pub static CGRectInfinite: CGRect;
}
#[inline]
pub extern "C-unwind" fn CGRectGetMinX(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetMinX(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetMinX(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectGetMidX(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetMidX(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetMidX(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectGetMaxX(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetMaxX(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetMaxX(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectGetMinY(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetMinY(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetMinY(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectGetMidY(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetMidY(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetMidY(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectGetMaxY(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetMaxY(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetMaxY(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectGetWidth(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetWidth(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetWidth(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectGetHeight(rect: CGRect) -> CGFloat {
extern "C-unwind" {
fn CGRectGetHeight(rect: CGRect) -> CGFloat;
}
unsafe { CGRectGetHeight(rect) }
}
#[inline]
pub extern "C-unwind" fn CGPointEqualToPoint(point1: CGPoint, point2: CGPoint) -> bool {
extern "C-unwind" {
fn CGPointEqualToPoint(point1: CGPoint, point2: CGPoint) -> bool;
}
unsafe { CGPointEqualToPoint(point1, point2) }
}
#[inline]
pub extern "C-unwind" fn CGSizeEqualToSize(size1: CGSize, size2: CGSize) -> bool {
extern "C-unwind" {
fn CGSizeEqualToSize(size1: CGSize, size2: CGSize) -> bool;
}
unsafe { CGSizeEqualToSize(size1, size2) }
}
#[inline]
pub extern "C-unwind" fn CGRectEqualToRect(rect1: CGRect, rect2: CGRect) -> bool {
extern "C-unwind" {
fn CGRectEqualToRect(rect1: CGRect, rect2: CGRect) -> bool;
}
unsafe { CGRectEqualToRect(rect1, rect2) }
}
#[must_use]
#[inline]
pub extern "C-unwind" fn CGRectStandardize(rect: CGRect) -> CGRect {
extern "C-unwind" {
fn CGRectStandardize(rect: CGRect) -> CGRect;
}
unsafe { CGRectStandardize(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectIsEmpty(rect: CGRect) -> bool {
extern "C-unwind" {
fn CGRectIsEmpty(rect: CGRect) -> bool;
}
unsafe { CGRectIsEmpty(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectIsNull(rect: CGRect) -> bool {
extern "C-unwind" {
fn CGRectIsNull(rect: CGRect) -> bool;
}
unsafe { CGRectIsNull(rect) }
}
#[inline]
pub extern "C-unwind" fn CGRectIsInfinite(rect: CGRect) -> bool {
extern "C-unwind" {
fn CGRectIsInfinite(rect: CGRect) -> bool;
}
unsafe { CGRectIsInfinite(rect) }
}
#[must_use]
#[inline]
pub extern "C-unwind" fn CGRectInset(rect: CGRect, dx: CGFloat, dy: CGFloat) -> CGRect {
extern "C-unwind" {
fn CGRectInset(rect: CGRect, dx: CGFloat, dy: CGFloat) -> CGRect;
}
unsafe { CGRectInset(rect, dx, dy) }
}
#[must_use]
#[inline]
pub extern "C-unwind" fn CGRectIntegral(rect: CGRect) -> CGRect {
extern "C-unwind" {
fn CGRectIntegral(rect: CGRect) -> CGRect;
}
unsafe { CGRectIntegral(rect) }
}
#[must_use]
#[inline]
pub extern "C-unwind" fn CGRectUnion(r1: CGRect, r2: CGRect) -> CGRect {
extern "C-unwind" {
fn CGRectUnion(r1: CGRect, r2: CGRect) -> CGRect;
}
unsafe { CGRectUnion(r1, r2) }
}
#[must_use]
#[inline]
pub extern "C-unwind" fn CGRectIntersection(r1: CGRect, r2: CGRect) -> CGRect {
extern "C-unwind" {
fn CGRectIntersection(r1: CGRect, r2: CGRect) -> CGRect;
}
unsafe { CGRectIntersection(r1, r2) }
}
#[must_use]
#[inline]
pub extern "C-unwind" fn CGRectOffset(rect: CGRect, dx: CGFloat, dy: CGFloat) -> CGRect {
extern "C-unwind" {
fn CGRectOffset(rect: CGRect, dx: CGFloat, dy: CGFloat) -> CGRect;
}
unsafe { CGRectOffset(rect, dx, dy) }
}
extern "C-unwind" {
pub fn CGRectDivide(
rect: CGRect,
slice: NonNull<CGRect>,
remainder: NonNull<CGRect>,
amount: CGFloat,
edge: CGRectEdge,
);
}
#[inline]
pub extern "C-unwind" fn CGRectContainsPoint(rect: CGRect, point: CGPoint) -> bool {
extern "C-unwind" {
fn CGRectContainsPoint(rect: CGRect, point: CGPoint) -> bool;
}
unsafe { CGRectContainsPoint(rect, point) }
}
#[inline]
pub extern "C-unwind" fn CGRectContainsRect(rect1: CGRect, rect2: CGRect) -> bool {
extern "C-unwind" {
fn CGRectContainsRect(rect1: CGRect, rect2: CGRect) -> bool;
}
unsafe { CGRectContainsRect(rect1, rect2) }
}
#[inline]
pub extern "C-unwind" fn CGRectIntersectsRect(rect1: CGRect, rect2: CGRect) -> bool {
extern "C-unwind" {
fn CGRectIntersectsRect(rect1: CGRect, rect2: CGRect) -> bool;
}
unsafe { CGRectIntersectsRect(rect1, rect2) }
}
#[inline]
pub extern "C-unwind" fn CGPointCreateDictionaryRepresentation(
point: CGPoint,
) -> CFRetained<CFDictionary> {
extern "C-unwind" {
fn CGPointCreateDictionaryRepresentation(point: CGPoint) -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { CGPointCreateDictionaryRepresentation(point) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
extern "C-unwind" {
pub fn CGPointMakeWithDictionaryRepresentation(
dict: Option<&CFDictionary>,
point: *mut CGPoint,
) -> bool;
}
#[inline]
pub extern "C-unwind" fn CGSizeCreateDictionaryRepresentation(
size: CGSize,
) -> CFRetained<CFDictionary> {
extern "C-unwind" {
fn CGSizeCreateDictionaryRepresentation(size: CGSize) -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { CGSizeCreateDictionaryRepresentation(size) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
extern "C-unwind" {
pub fn CGSizeMakeWithDictionaryRepresentation(
dict: Option<&CFDictionary>,
size: *mut CGSize,
) -> bool;
}
#[inline]
pub extern "C-unwind" fn CGRectCreateDictionaryRepresentation(
param1: CGRect,
) -> CFRetained<CFDictionary> {
extern "C-unwind" {
fn CGRectCreateDictionaryRepresentation(param1: CGRect) -> Option<NonNull<CFDictionary>>;
}
let ret = unsafe { CGRectCreateDictionaryRepresentation(param1) };
let ret = ret.expect("function was marked as returning non-null, but actually returned NULL");
unsafe { CFRetained::from_raw(ret) }
}
extern "C-unwind" {
pub fn CGRectMakeWithDictionaryRepresentation(
dict: Option<&CFDictionary>,
rect: *mut CGRect,
) -> bool;
}