//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsappkitversionnumberwithdocktilepluginsupport?language=objc)
#[cfg(feature = "NSApplication")]
pub static NSAppKitVersionNumberWithDockTilePlugInSupport: NSAppKitVersion = 1001.0 as _;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdocktile?language=objc)
    #[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 unsafe fn size(&self) -> NSSize;

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[unsafe(method(contentView))]
        #[unsafe(method_family = none)]
        pub unsafe fn contentView(&self, mtm: MainThreadMarker) -> Option<Retained<NSView>>;

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        /// Setter for [`contentView`][Self::contentView].
        #[unsafe(method(setContentView:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setContentView(&self, content_view: Option<&NSView>);

        #[unsafe(method(display))]
        #[unsafe(method_family = none)]
        pub unsafe fn display(&self);

        #[unsafe(method(showsApplicationBadge))]
        #[unsafe(method_family = none)]
        pub unsafe fn showsApplicationBadge(&self) -> bool;

        /// Setter for [`showsApplicationBadge`][Self::showsApplicationBadge].
        #[unsafe(method(setShowsApplicationBadge:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setShowsApplicationBadge(&self, shows_application_badge: bool);

        #[unsafe(method(badgeLabel))]
        #[unsafe(method_family = none)]
        pub unsafe fn badgeLabel(&self) -> Option<Retained<NSString>>;

        /// Setter for [`badgeLabel`][Self::badgeLabel].
        #[unsafe(method(setBadgeLabel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setBadgeLabel(&self, badge_label: Option<&NSString>);

        #[unsafe(method(owner))]
        #[unsafe(method_family = none)]
        pub unsafe fn owner(&self) -> Option<Retained<AnyObject>>;
    );
}

/// Methods declared on superclass `NSObject`.
impl NSDockTile {
    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() -> Retained<Self>;
    );
}

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsdocktileplugin?language=objc)
    pub unsafe trait NSDockTilePlugIn: NSObjectProtocol {
        #[unsafe(method(setDockTile:))]
        #[unsafe(method_family = none)]
        unsafe fn setDockTile(&self, dock_tile: Option<&NSDockTile>);

        #[cfg(feature = "NSMenu")]
        #[optional]
        #[unsafe(method(dockMenu))]
        #[unsafe(method_family = none)]
        unsafe fn dockMenu(&self, mtm: MainThreadMarker) -> Option<Retained<NSMenu>>;
    }
);
