objc2-app-kit 0.3.2

Bindings to the AppKit framework
Documentation
//! 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::*;

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

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

impl NSWindowTabGroup {
    extern_methods!(
        #[cfg(feature = "NSWindow")]
        #[unsafe(method(identifier))]
        #[unsafe(method_family = none)]
        pub fn identifier(&self) -> Retained<NSWindowTabbingIdentifier>;

        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(windows))]
        #[unsafe(method_family = none)]
        pub fn windows(&self) -> Retained<NSArray<NSWindow>>;

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

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

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

        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(selectedWindow))]
        #[unsafe(method_family = none)]
        pub fn selectedWindow(&self) -> Option<Retained<NSWindow>>;

        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
        /// Setter for [`selectedWindow`][Self::selectedWindow].
        ///
        /// This is a [weak property][objc2::topics::weak_property].
        #[unsafe(method(setSelectedWindow:))]
        #[unsafe(method_family = none)]
        pub fn setSelectedWindow(&self, selected_window: Option<&NSWindow>);

        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(addWindow:))]
        #[unsafe(method_family = none)]
        pub fn addWindow(&self, window: &NSWindow);

        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(insertWindow:atIndex:))]
        #[unsafe(method_family = none)]
        pub fn insertWindow_atIndex(&self, window: &NSWindow, index: NSInteger);

        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
        #[unsafe(method(removeWindow:))]
        #[unsafe(method_family = none)]
        pub fn removeWindow(&self, window: &NSWindow);
    );
}

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