objc2_app_kit/generated/
NSWindowTab.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/nswindowtab?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct NSWindowTab;
15);
16
17extern_conformance!(
18    unsafe impl NSObjectProtocol for NSWindowTab {}
19);
20
21impl NSWindowTab {
22    extern_methods!(
23        #[unsafe(method(title))]
24        #[unsafe(method_family = none)]
25        pub fn title(&self) -> Retained<NSString>;
26
27        /// Setter for [`title`][Self::title].
28        ///
29        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
30        #[unsafe(method(setTitle:))]
31        #[unsafe(method_family = none)]
32        pub fn setTitle(&self, title: Option<&NSString>);
33
34        #[unsafe(method(attributedTitle))]
35        #[unsafe(method_family = none)]
36        pub fn attributedTitle(&self) -> Option<Retained<NSAttributedString>>;
37
38        /// Setter for [`attributedTitle`][Self::attributedTitle].
39        ///
40        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
41        #[unsafe(method(setAttributedTitle:))]
42        #[unsafe(method_family = none)]
43        pub fn setAttributedTitle(&self, attributed_title: Option<&NSAttributedString>);
44
45        #[unsafe(method(toolTip))]
46        #[unsafe(method_family = none)]
47        pub fn toolTip(&self) -> Retained<NSString>;
48
49        /// Setter for [`toolTip`][Self::toolTip].
50        ///
51        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
52        #[unsafe(method(setToolTip:))]
53        #[unsafe(method_family = none)]
54        pub fn setToolTip(&self, tool_tip: Option<&NSString>);
55
56        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
57        #[unsafe(method(accessoryView))]
58        #[unsafe(method_family = none)]
59        pub fn accessoryView(&self, mtm: MainThreadMarker) -> Option<Retained<NSView>>;
60
61        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
62        /// Setter for [`accessoryView`][Self::accessoryView].
63        #[unsafe(method(setAccessoryView:))]
64        #[unsafe(method_family = none)]
65        pub fn setAccessoryView(&self, accessory_view: Option<&NSView>);
66    );
67}
68
69/// Methods declared on superclass `NSObject`.
70impl NSWindowTab {
71    extern_methods!(
72        #[unsafe(method(init))]
73        #[unsafe(method_family = init)]
74        pub fn init(this: Allocated<Self>) -> Retained<Self>;
75
76        #[unsafe(method(new))]
77        #[unsafe(method_family = new)]
78        pub fn new() -> Retained<Self>;
79    );
80}
81
82impl DefaultRetained for NSWindowTab {
83    #[inline]
84    fn default_retained() -> Retained<Self> {
85        Self::new()
86    }
87}