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 UIBarItem;
);
extern_conformance!(
unsafe impl NSCoding for UIBarItem {}
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIBarItem {}
);
#[cfg(feature = "UIAppearance")]
extern_conformance!(
unsafe impl UIAppearance for UIBarItem {}
);
impl UIBarItem {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[unsafe(method(isEnabled))]
#[unsafe(method_family = none)]
pub fn isEnabled(&self) -> bool;
#[unsafe(method(setEnabled:))]
#[unsafe(method_family = none)]
pub fn setEnabled(&self, enabled: bool);
#[unsafe(method(title))]
#[unsafe(method_family = none)]
pub fn title(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setTitle:))]
#[unsafe(method_family = none)]
pub fn setTitle(&self, title: Option<&NSString>);
#[cfg(feature = "UIImage")]
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub fn image(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setImage:))]
#[unsafe(method_family = none)]
pub fn setImage(&self, image: Option<&UIImage>);
#[cfg(feature = "UIImage")]
#[unsafe(method(landscapeImagePhone))]
#[unsafe(method_family = none)]
pub fn landscapeImagePhone(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setLandscapeImagePhone:))]
#[unsafe(method_family = none)]
pub fn setLandscapeImagePhone(&self, landscape_image_phone: Option<&UIImage>);
#[cfg(feature = "UIImage")]
#[unsafe(method(largeContentSizeImage))]
#[unsafe(method_family = none)]
pub fn largeContentSizeImage(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setLargeContentSizeImage:))]
#[unsafe(method_family = none)]
pub fn setLargeContentSizeImage(&self, large_content_size_image: Option<&UIImage>);
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(imageInsets))]
#[unsafe(method_family = none)]
pub fn imageInsets(&self) -> UIEdgeInsets;
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(setImageInsets:))]
#[unsafe(method_family = none)]
pub fn setImageInsets(&self, image_insets: UIEdgeInsets);
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(landscapeImagePhoneInsets))]
#[unsafe(method_family = none)]
pub fn landscapeImagePhoneInsets(&self) -> UIEdgeInsets;
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(setLandscapeImagePhoneInsets:))]
#[unsafe(method_family = none)]
pub fn setLandscapeImagePhoneInsets(&self, landscape_image_phone_insets: UIEdgeInsets);
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(largeContentSizeImageInsets))]
#[unsafe(method_family = none)]
pub fn largeContentSizeImageInsets(&self) -> UIEdgeInsets;
#[cfg(all(feature = "UIGeometry", feature = "objc2-core-foundation"))]
#[unsafe(method(setLargeContentSizeImageInsets:))]
#[unsafe(method_family = none)]
pub fn setLargeContentSizeImageInsets(&self, large_content_size_image_insets: UIEdgeInsets);
#[unsafe(method(tag))]
#[unsafe(method_family = none)]
pub fn tag(&self) -> NSInteger;
#[unsafe(method(setTag:))]
#[unsafe(method_family = none)]
pub fn setTag(&self, tag: NSInteger);
#[cfg(feature = "UIControl")]
#[unsafe(method(setTitleTextAttributes:forState:))]
#[unsafe(method_family = none)]
pub unsafe fn setTitleTextAttributes_forState(
&self,
attributes: Option<&NSDictionary<NSAttributedStringKey, AnyObject>>,
state: UIControlState,
);
#[cfg(feature = "UIControl")]
#[unsafe(method(titleTextAttributesForState:))]
#[unsafe(method_family = none)]
pub fn titleTextAttributesForState(
&self,
state: UIControlState,
) -> Option<Retained<NSDictionary<NSAttributedStringKey, AnyObject>>>;
);
}
impl UIBarItem {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}