objc2_app_kit/generated/
NSWindowTabGroup.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nswindowtabgroup?language=objc)
12    #[unsafe(super(NSObject))]
13    #[thread_kind = MainThreadOnly]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct NSWindowTabGroup;
16);
17
18unsafe impl NSObjectProtocol for NSWindowTabGroup {}
19
20impl NSWindowTabGroup {
21    extern_methods!(
22        #[cfg(feature = "NSWindow")]
23        #[unsafe(method(identifier))]
24        #[unsafe(method_family = none)]
25        pub unsafe fn identifier(&self) -> Retained<NSWindowTabbingIdentifier>;
26
27        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
28        #[unsafe(method(windows))]
29        #[unsafe(method_family = none)]
30        pub fn windows(&self) -> Retained<NSArray<NSWindow>>;
31
32        #[unsafe(method(isOverviewVisible))]
33        #[unsafe(method_family = none)]
34        pub unsafe fn isOverviewVisible(&self) -> bool;
35
36        /// Setter for [`isOverviewVisible`][Self::isOverviewVisible].
37        #[unsafe(method(setOverviewVisible:))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn setOverviewVisible(&self, overview_visible: bool);
40
41        #[unsafe(method(isTabBarVisible))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn isTabBarVisible(&self) -> bool;
44
45        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
46        #[unsafe(method(selectedWindow))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn selectedWindow(&self) -> Option<Retained<NSWindow>>;
49
50        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
51        /// This is a [weak property][objc2::topics::weak_property].
52        /// Setter for [`selectedWindow`][Self::selectedWindow].
53        #[unsafe(method(setSelectedWindow:))]
54        #[unsafe(method_family = none)]
55        pub fn setSelectedWindow(&self, selected_window: Option<&NSWindow>);
56
57        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
58        #[unsafe(method(addWindow:))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn addWindow(&self, window: &NSWindow);
61
62        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
63        #[unsafe(method(insertWindow:atIndex:))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn insertWindow_atIndex(&self, window: &NSWindow, index: NSInteger);
66
67        #[cfg(all(feature = "NSResponder", feature = "NSWindow"))]
68        #[unsafe(method(removeWindow:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn removeWindow(&self, window: &NSWindow);
71    );
72}
73
74/// Methods declared on superclass `NSObject`.
75impl NSWindowTabGroup {
76    extern_methods!(
77        #[unsafe(method(init))]
78        #[unsafe(method_family = init)]
79        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
80
81        #[unsafe(method(new))]
82        #[unsafe(method_family = new)]
83        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
84    );
85}