//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cgvector?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CGVector {
    pub dx: CGFloat,
    pub dy: CGFloat,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for CGVector {
    const ENCODING: Encoding =
        Encoding::Struct("CGVector", &[<CGFloat>::ENCODING, <CGFloat>::ENCODING]);
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for CGVector {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cgrectedge?language=objc)
// NS_CLOSED_ENUM
#[repr(u32)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum CGRectEdge {
    #[doc(alias = "CGRectMinXEdge")]
    MinXEdge = 0,
    #[doc(alias = "CGRectMinYEdge")]
    MinYEdge = 1,
    #[doc(alias = "CGRectMaxXEdge")]
    MaxXEdge = 2,
    #[doc(alias = "CGRectMaxYEdge")]
    MaxYEdge = 3,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for CGRectEdge {
    const ENCODING: Encoding = u32::ENCODING;
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for CGRectEdge {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cgaffinetransform?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CGAffineTransform {
    pub a: CGFloat,
    pub b: CGFloat,
    pub c: CGFloat,
    pub d: CGFloat,
    pub tx: CGFloat,
    pub ty: CGFloat,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for CGAffineTransform {
    const ENCODING: Encoding = Encoding::Struct(
        "CGAffineTransform",
        &[
            <CGFloat>::ENCODING,
            <CGFloat>::ENCODING,
            <CGFloat>::ENCODING,
            <CGFloat>::ENCODING,
            <CGFloat>::ENCODING,
            <CGFloat>::ENCODING,
        ],
    );
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for CGAffineTransform {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}

/// [Apple's documentation](https://developer.apple.com/documentation/corefoundation/cgaffinetransformcomponents?language=objc)
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct CGAffineTransformComponents {
    pub scale: CGSize,
    pub horizontalShear: CGFloat,
    pub rotation: CGFloat,
    pub translation: CGVector,
}

#[cfg(feature = "objc2")]
unsafe impl Encode for CGAffineTransformComponents {
    const ENCODING: Encoding = Encoding::Struct(
        "CGAffineTransformComponents",
        &[
            <CGSize>::ENCODING,
            <CGFloat>::ENCODING,
            <CGFloat>::ENCODING,
            <CGVector>::ENCODING,
        ],
    );
}

#[cfg(feature = "objc2")]
unsafe impl RefEncode for CGAffineTransformComponents {
    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
