use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(UILayoutGuide, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UILayoutGuide")]
pub struct UITrackingLayoutGuide;
);
#[cfg(feature = "UILayoutGuide")]
extern_conformance!(
unsafe impl NSCoding for UITrackingLayoutGuide {}
);
#[cfg(feature = "UILayoutGuide")]
extern_conformance!(
unsafe impl NSObjectProtocol for UITrackingLayoutGuide {}
);
#[cfg(feature = "UILayoutGuide")]
impl UITrackingLayoutGuide {
extern_methods!(
#[cfg(all(feature = "NSLayoutConstraint", feature = "UIGeometry"))]
#[unsafe(method(setConstraints:activeWhenNearEdge:))]
#[unsafe(method_family = none)]
pub fn setConstraints_activeWhenNearEdge(
&self,
tracking_constraints: &NSArray<NSLayoutConstraint>,
edge: NSDirectionalRectEdge,
);
#[cfg(all(feature = "NSLayoutConstraint", feature = "UIGeometry"))]
#[unsafe(method(constraintsActiveWhenNearEdge:))]
#[unsafe(method_family = none)]
pub fn constraintsActiveWhenNearEdge(
&self,
edge: NSDirectionalRectEdge,
) -> Retained<NSArray<NSLayoutConstraint>>;
#[cfg(all(feature = "NSLayoutConstraint", feature = "UIGeometry"))]
#[unsafe(method(setConstraints:activeWhenAwayFromEdge:))]
#[unsafe(method_family = none)]
pub fn setConstraints_activeWhenAwayFromEdge(
&self,
tracking_constraints: &NSArray<NSLayoutConstraint>,
edge: NSDirectionalRectEdge,
);
#[cfg(all(feature = "NSLayoutConstraint", feature = "UIGeometry"))]
#[unsafe(method(constraintsActiveWhenAwayFromEdge:))]
#[unsafe(method_family = none)]
pub fn constraintsActiveWhenAwayFromEdge(
&self,
edge: NSDirectionalRectEdge,
) -> Retained<NSArray<NSLayoutConstraint>>;
#[unsafe(method(removeAllTrackedConstraints))]
#[unsafe(method_family = none)]
pub fn removeAllTrackedConstraints(&self);
);
}
#[cfg(feature = "UILayoutGuide")]
impl UITrackingLayoutGuide {
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>;
);
}