//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
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/uikit/uilayoutguide?language=objc)
    #[unsafe(super(NSObject))]
    #[thread_kind = MainThreadOnly]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UILayoutGuide;
);

extern_conformance!(
    unsafe impl NSCoding for UILayoutGuide {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for UILayoutGuide {}
);

impl UILayoutGuide {
    extern_methods!(
        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(layoutFrame))]
        #[unsafe(method_family = none)]
        pub fn layoutFrame(&self) -> CGRect;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        #[unsafe(method(owningView))]
        #[unsafe(method_family = none)]
        pub fn owningView(&self) -> Option<Retained<UIView>>;

        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
        /// Setter for [`owningView`][Self::owningView].
        ///
        /// This is a [weak property][objc2::topics::weak_property].
        #[unsafe(method(setOwningView:))]
        #[unsafe(method_family = none)]
        pub fn setOwningView(&self, owning_view: Option<&UIView>);

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

        /// Setter for [`identifier`][Self::identifier].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setIdentifier:))]
        #[unsafe(method_family = none)]
        pub fn setIdentifier(&self, identifier: &NSString);

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(leadingAnchor))]
        #[unsafe(method_family = none)]
        pub fn leadingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(trailingAnchor))]
        #[unsafe(method_family = none)]
        pub fn trailingAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(leftAnchor))]
        #[unsafe(method_family = none)]
        pub fn leftAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(rightAnchor))]
        #[unsafe(method_family = none)]
        pub fn rightAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(topAnchor))]
        #[unsafe(method_family = none)]
        pub fn topAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(bottomAnchor))]
        #[unsafe(method_family = none)]
        pub fn bottomAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(widthAnchor))]
        #[unsafe(method_family = none)]
        pub fn widthAnchor(&self) -> Retained<NSLayoutDimension>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(heightAnchor))]
        #[unsafe(method_family = none)]
        pub fn heightAnchor(&self) -> Retained<NSLayoutDimension>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(centerXAnchor))]
        #[unsafe(method_family = none)]
        pub fn centerXAnchor(&self) -> Retained<NSLayoutXAxisAnchor>;

        #[cfg(feature = "NSLayoutAnchor")]
        #[unsafe(method(centerYAnchor))]
        #[unsafe(method_family = none)]
        pub fn centerYAnchor(&self) -> Retained<NSLayoutYAxisAnchor>;
    );
}

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

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