use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;
ns_enum!(
#[underlying(NSInteger)]
pub enum NSMenuItemBadgeType {
NSMenuItemBadgeTypeNone = 0,
NSMenuItemBadgeTypeUpdates = 1,
NSMenuItemBadgeTypeNewItems = 2,
NSMenuItemBadgeTypeAlerts = 3,
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "AppKit_NSMenuItemBadge")]
pub struct NSMenuItemBadge;
#[cfg(feature = "AppKit_NSMenuItemBadge")]
unsafe impl ClassType for NSMenuItemBadge {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "AppKit_NSMenuItemBadge")]
unsafe impl NSCopying for NSMenuItemBadge {}
#[cfg(feature = "AppKit_NSMenuItemBadge")]
unsafe impl NSObjectProtocol for NSMenuItemBadge {}
extern_methods!(
#[cfg(feature = "AppKit_NSMenuItemBadge")]
unsafe impl NSMenuItemBadge {
#[method_id(@__retain_semantics Other updatesWithCount:)]
pub unsafe fn updatesWithCount(item_count: NSInteger) -> Id<Self>;
#[method_id(@__retain_semantics New newItemsWithCount:)]
pub unsafe fn newItemsWithCount(item_count: NSInteger) -> Id<Self>;
#[method_id(@__retain_semantics Other alertsWithCount:)]
pub unsafe fn alertsWithCount(item_count: NSInteger) -> Id<Self>;
#[method_id(@__retain_semantics Init initWithCount:type:)]
pub unsafe fn initWithCount_type(
this: Allocated<Self>,
item_count: NSInteger,
r#type: NSMenuItemBadgeType,
) -> Id<Self>;
#[method_id(@__retain_semantics Init initWithCount:)]
pub unsafe fn initWithCount(this: Allocated<Self>, item_count: NSInteger) -> Id<Self>;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Init initWithString:)]
pub unsafe fn initWithString(this: Allocated<Self>, string: &NSString) -> Id<Self>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method(itemCount)]
pub unsafe fn itemCount(&self) -> NSInteger;
#[method(type)]
pub unsafe fn r#type(&self) -> NSMenuItemBadgeType;
#[cfg(feature = "Foundation_NSString")]
#[method_id(@__retain_semantics Other stringValue)]
pub unsafe fn stringValue(&self) -> Option<Id<NSString>>;
}
);
extern_methods!(
#[cfg(feature = "AppKit_NSMenuItemBadge")]
unsafe impl NSMenuItemBadge {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);