use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(feature = "NSApplication")]
pub static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0 as _;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSDockTile;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSDockTile {}
);
impl NSDockTile {
extern_methods!(
#[unsafe(method(size))]
#[unsafe(method_family = none)]
pub fn size(&self) -> NSSize;
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
#[unsafe(method(contentView))]
#[unsafe(method_family = none)]
pub fn contentView(&self, mtm: MainThreadMarker) -> Option<Retained<NSView>>;
#[cfg(all(feature = "NSResponder", feature = "NSView"))]
#[unsafe(method(setContentView:))]
#[unsafe(method_family = none)]
pub fn setContentView(&self, content_view: Option<&NSView>);
#[unsafe(method(display))]
#[unsafe(method_family = none)]
pub fn display(&self);
#[unsafe(method(showsApplicationBadge))]
#[unsafe(method_family = none)]
pub fn showsApplicationBadge(&self) -> bool;
#[unsafe(method(setShowsApplicationBadge:))]
#[unsafe(method_family = none)]
pub fn setShowsApplicationBadge(&self, shows_application_badge: bool);
#[unsafe(method(badgeLabel))]
#[unsafe(method_family = none)]
pub fn badgeLabel(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setBadgeLabel:))]
#[unsafe(method_family = none)]
pub fn setBadgeLabel(&self, badge_label: Option<&NSString>);
#[unsafe(method(owner))]
#[unsafe(method_family = none)]
pub fn owner(&self) -> Option<Retained<AnyObject>>;
);
}
impl NSDockTile {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub fn new() -> Retained<Self>;
);
}
impl DefaultRetained for NSDockTile {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_protocol!(
pub unsafe trait NSDockTilePlugIn: NSObjectProtocol {
#[unsafe(method(setDockTile:))]
#[unsafe(method_family = none)]
fn setDockTile(&self, dock_tile: Option<&NSDockTile>);
#[cfg(feature = "NSMenu")]
#[optional]
#[unsafe(method(dockMenu))]
#[unsafe(method_family = none)]
fn dockMenu(&self, mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
}
);