//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;

use crate::*;

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

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

impl UIStatusBarManager {
    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(mtm: MainThreadMarker) -> Retained<Self>;

        #[cfg(feature = "UIApplication")]
        #[unsafe(method(statusBarStyle))]
        #[unsafe(method_family = none)]
        pub fn statusBarStyle(&self) -> UIStatusBarStyle;

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

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

/// StatusBarManager.
#[cfg(all(
    feature = "UIResponder",
    feature = "UIScene",
    feature = "UIWindowScene"
))]
impl UIWindowScene {
    extern_methods!(
        #[unsafe(method(statusBarManager))]
        #[unsafe(method_family = none)]
        pub fn statusBarManager(&self) -> Option<Retained<UIStatusBarManager>>;
    );
}
