use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIBarButtonItemStateAppearance;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIBarButtonItemStateAppearance {}
);
impl UIBarButtonItemStateAppearance {
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(mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(titleTextAttributes))]
#[unsafe(method_family = none)]
pub fn titleTextAttributes(
&self,
) -> Retained<NSDictionary<NSAttributedStringKey, AnyObject>>;
#[unsafe(method(setTitleTextAttributes:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitleTextAttributes(
&self,
title_text_attributes: &NSDictionary<NSAttributedStringKey, AnyObject>,
);
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(titlePositionAdjustment))]
#[unsafe(method_family = none)]
pub fn titlePositionAdjustment(&self) -> UIOffset;
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(setTitlePositionAdjustment:))]
#[unsafe(method_family = none)]
pub fn setTitlePositionAdjustment(&self, title_position_adjustment: UIOffset);
#[cfg(feature = "UIImage")]
#[unsafe(method(backgroundImage))]
#[unsafe(method_family = none)]
pub fn backgroundImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setBackgroundImage:))]
#[unsafe(method_family = none)]
pub fn setBackgroundImage(&self, background_image: Option<&UIImage>);
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(backgroundImagePositionAdjustment))]
#[unsafe(method_family = none)]
pub fn backgroundImagePositionAdjustment(&self) -> UIOffset;
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(setBackgroundImagePositionAdjustment:))]
#[unsafe(method_family = none)]
pub fn setBackgroundImagePositionAdjustment(
&self,
background_image_position_adjustment: UIOffset,
);
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIBarButtonItemAppearance;
);
extern_conformance!(
unsafe impl NSCoding for UIBarButtonItemAppearance {}
);
extern_conformance!(
unsafe impl NSCopying for UIBarButtonItemAppearance {}
);
unsafe impl CopyingHelper for UIBarButtonItemAppearance {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UIBarButtonItemAppearance {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UIBarButtonItemAppearance {}
);
impl UIBarButtonItemAppearance {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "UIBarButtonItem")]
#[unsafe(method(initWithStyle:))]
#[unsafe(method_family = init)]
pub fn initWithStyle(this: Allocated<Self>, style: UIBarButtonItemStyle) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
#[unsafe(method(copy))]
#[unsafe(method_family = copy)]
pub fn copy(&self) -> Retained<Self>;
#[cfg(feature = "UIBarButtonItem")]
#[unsafe(method(configureWithDefaultForStyle:))]
#[unsafe(method_family = none)]
pub fn configureWithDefaultForStyle(&self, style: UIBarButtonItemStyle);
#[unsafe(method(normal))]
#[unsafe(method_family = none)]
pub fn normal(&self) -> Retained<UIBarButtonItemStateAppearance>;
#[unsafe(method(highlighted))]
#[unsafe(method_family = none)]
pub fn highlighted(&self) -> Retained<UIBarButtonItemStateAppearance>;
#[unsafe(method(disabled))]
#[unsafe(method_family = none)]
pub fn disabled(&self) -> Retained<UIBarButtonItemStateAppearance>;
#[unsafe(method(focused))]
#[unsafe(method_family = none)]
pub fn focused(&self) -> Retained<UIBarButtonItemStateAppearance>;
);
}
impl UIBarButtonItemAppearance {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}