use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(UIBarAppearance, NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "UIBarAppearance")]
pub struct UIToolbarAppearance;
);
#[cfg(feature = "UIBarAppearance")]
extern_conformance!(
unsafe impl NSCoding for UIToolbarAppearance {}
);
#[cfg(feature = "UIBarAppearance")]
extern_conformance!(
unsafe impl NSCopying for UIToolbarAppearance {}
);
#[cfg(feature = "UIBarAppearance")]
unsafe impl CopyingHelper for UIToolbarAppearance {
type Result = Self;
}
#[cfg(feature = "UIBarAppearance")]
extern_conformance!(
unsafe impl NSObjectProtocol for UIToolbarAppearance {}
);
#[cfg(feature = "UIBarAppearance")]
extern_conformance!(
unsafe impl NSSecureCoding for UIToolbarAppearance {}
);
#[cfg(feature = "UIBarAppearance")]
impl UIToolbarAppearance {
extern_methods!(
#[cfg(feature = "UIBarButtonItemAppearance")]
#[unsafe(method(buttonAppearance))]
#[unsafe(method_family = none)]
pub fn buttonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
#[cfg(feature = "UIBarButtonItemAppearance")]
#[unsafe(method(setButtonAppearance:))]
#[unsafe(method_family = none)]
pub fn setButtonAppearance(&self, button_appearance: &UIBarButtonItemAppearance);
#[cfg(feature = "UIBarButtonItemAppearance")]
#[unsafe(method(prominentButtonAppearance))]
#[unsafe(method_family = none)]
pub fn prominentButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
#[cfg(feature = "UIBarButtonItemAppearance")]
#[unsafe(method(setProminentButtonAppearance:))]
#[unsafe(method_family = none)]
pub fn setProminentButtonAppearance(
&self,
prominent_button_appearance: &UIBarButtonItemAppearance,
);
#[cfg(feature = "UIBarButtonItemAppearance")]
#[deprecated]
#[unsafe(method(doneButtonAppearance))]
#[unsafe(method_family = none)]
pub fn doneButtonAppearance(&self) -> Retained<UIBarButtonItemAppearance>;
#[cfg(feature = "UIBarButtonItemAppearance")]
#[deprecated]
#[unsafe(method(setDoneButtonAppearance:))]
#[unsafe(method_family = none)]
pub fn setDoneButtonAppearance(&self, done_button_appearance: &UIBarButtonItemAppearance);
);
}
#[cfg(feature = "UIBarAppearance")]
impl UIToolbarAppearance {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "UIDevice")]
#[unsafe(method(initWithIdiom:))]
#[unsafe(method_family = init)]
pub fn initWithIdiom(this: Allocated<Self>, idiom: UIUserInterfaceIdiom) -> Retained<Self>;
#[unsafe(method(initWithBarAppearance:))]
#[unsafe(method_family = init)]
pub fn initWithBarAppearance(
this: Allocated<Self>,
bar_appearance: &UIBarAppearance,
) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
);
}
#[cfg(feature = "UIBarAppearance")]
impl UIToolbarAppearance {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}