//! 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::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;

use crate::*;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsvariablestatusitemlength?language=objc)
#[cfg(feature = "objc2-core-foundation")]
pub static NSVariableStatusItemLength: CGFloat = -1.0 as _;

/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nssquarestatusitemlength?language=objc)
#[cfg(feature = "objc2-core-foundation")]
pub static NSSquareStatusItemLength: CGFloat = -2.0 as _;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsstatusbar?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSStatusBar;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for NSStatusBar {}
);

impl NSStatusBar {
    extern_methods!(
        #[unsafe(method(systemStatusBar))]
        #[unsafe(method_family = none)]
        pub fn systemStatusBar() -> Retained<NSStatusBar>;

        #[cfg(all(feature = "NSStatusItem", feature = "objc2-core-foundation"))]
        #[unsafe(method(statusItemWithLength:))]
        #[unsafe(method_family = none)]
        pub fn statusItemWithLength(&self, length: CGFloat) -> Retained<NSStatusItem>;

        #[cfg(feature = "NSStatusItem")]
        #[unsafe(method(removeStatusItem:))]
        #[unsafe(method_family = none)]
        pub fn removeStatusItem(&self, item: &NSStatusItem);

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

        #[cfg(feature = "objc2-core-foundation")]
        #[unsafe(method(thickness))]
        #[unsafe(method_family = none)]
        pub fn thickness(&self) -> CGFloat;
    );
}

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