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

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nslayoutanchor?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSLayoutAnchor<AnchorType: ?Sized = AnyObject>;
);

unsafe impl<AnchorType: ?Sized + NSCoding> NSCoding for NSLayoutAnchor<AnchorType> {}

unsafe impl<AnchorType: ?Sized> NSCopying for NSLayoutAnchor<AnchorType> {}

unsafe impl<AnchorType: ?Sized + Message> CopyingHelper for NSLayoutAnchor<AnchorType> {
    type Result = Self;
}

unsafe impl<AnchorType: ?Sized> NSObjectProtocol for NSLayoutAnchor<AnchorType> {}

impl<AnchorType: Message> NSLayoutAnchor<AnchorType> {
    extern_methods!(
        #[cfg(feature = "NSLayoutConstraint")]
        #[must_use]
        #[unsafe(method(constraintEqualToAnchor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintEqualToAnchor(
            &self,
            anchor: &NSLayoutAnchor<AnchorType>,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(feature = "NSLayoutConstraint")]
        #[must_use]
        #[unsafe(method(constraintGreaterThanOrEqualToAnchor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintGreaterThanOrEqualToAnchor(
            &self,
            anchor: &NSLayoutAnchor<AnchorType>,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(feature = "NSLayoutConstraint")]
        #[must_use]
        #[unsafe(method(constraintLessThanOrEqualToAnchor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintLessThanOrEqualToAnchor(
            &self,
            anchor: &NSLayoutAnchor<AnchorType>,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintEqualToAnchor:constant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintEqualToAnchor_constant(
            &self,
            anchor: &NSLayoutAnchor<AnchorType>,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintGreaterThanOrEqualToAnchor:constant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintGreaterThanOrEqualToAnchor_constant(
            &self,
            anchor: &NSLayoutAnchor<AnchorType>,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintLessThanOrEqualToAnchor:constant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintLessThanOrEqualToAnchor_constant(
            &self,
            anchor: &NSLayoutAnchor<AnchorType>,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[unsafe(method(name))]
        #[unsafe(method_family = none)]
        pub unsafe fn name(&self) -> Retained<NSString>;

        #[unsafe(method(item))]
        #[unsafe(method_family = none)]
        pub unsafe fn item(&self) -> Option<Retained<AnyObject>>;

        #[unsafe(method(hasAmbiguousLayout))]
        #[unsafe(method_family = none)]
        pub unsafe fn hasAmbiguousLayout(&self) -> bool;

        #[cfg(feature = "NSLayoutConstraint")]
        #[unsafe(method(constraintsAffectingLayout))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintsAffectingLayout(&self) -> Retained<NSArray<NSLayoutConstraint>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl<AnchorType: Message> NSLayoutAnchor<AnchorType> {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nslayoutxaxisanchor?language=objc)
    #[unsafe(super(NSLayoutAnchor, NSObject))]
    #[derive(Debug)]
    pub struct NSLayoutXAxisAnchor;
);

unsafe impl NSCoding for NSLayoutXAxisAnchor {}

unsafe impl NSCopying for NSLayoutXAxisAnchor {}

unsafe impl CopyingHelper for NSLayoutXAxisAnchor {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSLayoutXAxisAnchor {}

impl NSLayoutXAxisAnchor {
    extern_methods!(
        #[unsafe(method(anchorWithOffsetToAnchor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn anchorWithOffsetToAnchor(
            &self,
            other_anchor: &NSLayoutXAxisAnchor,
        ) -> Retained<NSLayoutDimension>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintEqualToSystemSpacingAfterAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintEqualToSystemSpacingAfterAnchor_multiplier(
            &self,
            anchor: &NSLayoutXAxisAnchor,
            multiplier: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintGreaterThanOrEqualToSystemSpacingAfterAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingAfterAnchor_multiplier(
            &self,
            anchor: &NSLayoutXAxisAnchor,
            multiplier: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintLessThanOrEqualToSystemSpacingAfterAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintLessThanOrEqualToSystemSpacingAfterAnchor_multiplier(
            &self,
            anchor: &NSLayoutXAxisAnchor,
            multiplier: CGFloat,
        ) -> Retained<NSLayoutConstraint>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSLayoutXAxisAnchor {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nslayoutyaxisanchor?language=objc)
    #[unsafe(super(NSLayoutAnchor, NSObject))]
    #[derive(Debug)]
    pub struct NSLayoutYAxisAnchor;
);

unsafe impl NSCoding for NSLayoutYAxisAnchor {}

unsafe impl NSCopying for NSLayoutYAxisAnchor {}

unsafe impl CopyingHelper for NSLayoutYAxisAnchor {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSLayoutYAxisAnchor {}

impl NSLayoutYAxisAnchor {
    extern_methods!(
        #[unsafe(method(anchorWithOffsetToAnchor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn anchorWithOffsetToAnchor(
            &self,
            other_anchor: &NSLayoutYAxisAnchor,
        ) -> Retained<NSLayoutDimension>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintEqualToSystemSpacingBelowAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintEqualToSystemSpacingBelowAnchor_multiplier(
            &self,
            anchor: &NSLayoutYAxisAnchor,
            multiplier: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintGreaterThanOrEqualToSystemSpacingBelowAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintGreaterThanOrEqualToSystemSpacingBelowAnchor_multiplier(
            &self,
            anchor: &NSLayoutYAxisAnchor,
            multiplier: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintLessThanOrEqualToSystemSpacingBelowAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintLessThanOrEqualToSystemSpacingBelowAnchor_multiplier(
            &self,
            anchor: &NSLayoutYAxisAnchor,
            multiplier: CGFloat,
        ) -> Retained<NSLayoutConstraint>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSLayoutYAxisAnchor {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nslayoutdimension?language=objc)
    #[unsafe(super(NSLayoutAnchor, NSObject))]
    #[derive(Debug)]
    pub struct NSLayoutDimension;
);

unsafe impl NSCoding for NSLayoutDimension {}

unsafe impl NSCopying for NSLayoutDimension {}

unsafe impl CopyingHelper for NSLayoutDimension {
    type Result = Self;
}

unsafe impl NSObjectProtocol for NSLayoutDimension {}

impl NSLayoutDimension {
    extern_methods!(
        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintEqualToConstant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintEqualToConstant(&self, c: CGFloat) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintGreaterThanOrEqualToConstant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintGreaterThanOrEqualToConstant(
            &self,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintLessThanOrEqualToConstant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintLessThanOrEqualToConstant(
            &self,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintEqualToAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintEqualToAnchor_multiplier(
            &self,
            anchor: &NSLayoutDimension,
            m: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintGreaterThanOrEqualToAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier(
            &self,
            anchor: &NSLayoutDimension,
            m: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintLessThanOrEqualToAnchor:multiplier:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier(
            &self,
            anchor: &NSLayoutDimension,
            m: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintEqualToAnchor:multiplier:constant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintEqualToAnchor_multiplier_constant(
            &self,
            anchor: &NSLayoutDimension,
            m: CGFloat,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintGreaterThanOrEqualToAnchor:multiplier:constant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintGreaterThanOrEqualToAnchor_multiplier_constant(
            &self,
            anchor: &NSLayoutDimension,
            m: CGFloat,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;

        #[cfg(all(feature = "NSLayoutConstraint", feature = "objc2-core-foundation"))]
        #[must_use]
        #[unsafe(method(constraintLessThanOrEqualToAnchor:multiplier:constant:))]
        #[unsafe(method_family = none)]
        pub unsafe fn constraintLessThanOrEqualToAnchor_multiplier_constant(
            &self,
            anchor: &NSLayoutDimension,
            m: CGFloat,
            c: CGFloat,
        ) -> Retained<NSLayoutConstraint>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSLayoutDimension {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}
