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 UIBarButtonItemBadge;
);
extern_conformance!(
unsafe impl NSCoding for UIBarButtonItemBadge {}
);
extern_conformance!(
unsafe impl NSCopying for UIBarButtonItemBadge {}
);
unsafe impl CopyingHelper for UIBarButtonItemBadge {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UIBarButtonItemBadge {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UIBarButtonItemBadge {}
);
impl UIBarButtonItemBadge {
extern_methods!(
#[unsafe(method(badgeWithCount:))]
#[unsafe(method_family = none)]
pub fn badgeWithCount(count: NSUInteger, mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(badgeWithString:))]
#[unsafe(method_family = none)]
pub fn badgeWithString(string_value: &NSString, mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(indicatorBadge))]
#[unsafe(method_family = none)]
pub fn indicatorBadge(mtm: MainThreadMarker) -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(stringValue))]
#[unsafe(method_family = none)]
pub fn stringValue(&self) -> Option<Retained<NSString>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(backgroundColor))]
#[unsafe(method_family = none)]
pub fn backgroundColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setBackgroundColor:))]
#[unsafe(method_family = none)]
pub fn setBackgroundColor(&self, background_color: Option<&UIColor>);
#[cfg(feature = "UIColor")]
#[unsafe(method(foregroundColor))]
#[unsafe(method_family = none)]
pub fn foregroundColor(&self) -> Option<Retained<UIColor>>;
#[cfg(feature = "UIColor")]
#[unsafe(method(setForegroundColor:))]
#[unsafe(method_family = none)]
pub fn setForegroundColor(&self, foreground_color: Option<&UIColor>);
#[cfg(feature = "UIFont")]
#[unsafe(method(font))]
#[unsafe(method_family = none)]
pub fn font(&self) -> Option<Retained<UIFont>>;
#[cfg(feature = "UIFont")]
#[unsafe(method(setFont:))]
#[unsafe(method_family = none)]
pub fn setFont(&self, font: Option<&UIFont>);
);
}
impl UIBarButtonItemBadge {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}
#[cfg(all(feature = "UIBarButtonItem", feature = "UIBarItem"))]
impl UIBarButtonItem {
extern_methods!(
#[unsafe(method(badge))]
#[unsafe(method_family = none)]
pub fn badge(&self) -> Option<Retained<UIBarButtonItemBadge>>;
#[unsafe(method(setBadge:))]
#[unsafe(method_family = none)]
pub fn setBadge(&self, badge: Option<&UIBarButtonItemBadge>);
);
}