objc2_app_kit/generated/
NSTitlebarAccessoryViewController.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::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstitlebaraccessoryviewcontroller?language=objc)
14    #[unsafe(super(NSViewController, NSResponder, NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
17    pub struct NSTitlebarAccessoryViewController;
18);
19
20#[cfg(all(
21    feature = "NSAnimation",
22    feature = "NSResponder",
23    feature = "NSViewController"
24))]
25extern_conformance!(
26    unsafe impl NSAnimatablePropertyContainer for NSTitlebarAccessoryViewController {}
27);
28
29#[cfg(all(
30    feature = "NSAnimation",
31    feature = "NSResponder",
32    feature = "NSViewController"
33))]
34extern_conformance!(
35    unsafe impl NSAnimationDelegate for NSTitlebarAccessoryViewController {}
36);
37
38#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
39extern_conformance!(
40    unsafe impl NSCoding for NSTitlebarAccessoryViewController {}
41);
42
43#[cfg(all(
44    feature = "NSKeyValueBinding",
45    feature = "NSResponder",
46    feature = "NSViewController"
47))]
48extern_conformance!(
49    unsafe impl NSEditor for NSTitlebarAccessoryViewController {}
50);
51
52#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
53extern_conformance!(
54    unsafe impl NSObjectProtocol for NSTitlebarAccessoryViewController {}
55);
56
57#[cfg(all(
58    feature = "NSResponder",
59    feature = "NSStoryboardSegue",
60    feature = "NSViewController"
61))]
62extern_conformance!(
63    unsafe impl NSSeguePerforming for NSTitlebarAccessoryViewController {}
64);
65
66#[cfg(all(
67    feature = "NSResponder",
68    feature = "NSUserInterfaceItemIdentification",
69    feature = "NSViewController"
70))]
71extern_conformance!(
72    unsafe impl NSUserInterfaceItemIdentification for NSTitlebarAccessoryViewController {}
73);
74
75#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
76impl NSTitlebarAccessoryViewController {
77    extern_methods!(
78        #[cfg(feature = "NSLayoutConstraint")]
79        #[unsafe(method(layoutAttribute))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn layoutAttribute(&self) -> NSLayoutAttribute;
82
83        #[cfg(feature = "NSLayoutConstraint")]
84        /// Setter for [`layoutAttribute`][Self::layoutAttribute].
85        #[unsafe(method(setLayoutAttribute:))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn setLayoutAttribute(&self, layout_attribute: NSLayoutAttribute);
88
89        #[cfg(feature = "objc2-core-foundation")]
90        #[unsafe(method(fullScreenMinHeight))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn fullScreenMinHeight(&self) -> CGFloat;
93
94        #[cfg(feature = "objc2-core-foundation")]
95        /// Setter for [`fullScreenMinHeight`][Self::fullScreenMinHeight].
96        #[unsafe(method(setFullScreenMinHeight:))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn setFullScreenMinHeight(&self, full_screen_min_height: CGFloat);
99
100        #[unsafe(method(isHidden))]
101        #[unsafe(method_family = none)]
102        pub unsafe fn isHidden(&self) -> bool;
103
104        /// Setter for [`isHidden`][Self::isHidden].
105        #[unsafe(method(setHidden:))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn setHidden(&self, hidden: bool);
108
109        #[unsafe(method(automaticallyAdjustsSize))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn automaticallyAdjustsSize(&self) -> bool;
112
113        /// Setter for [`automaticallyAdjustsSize`][Self::automaticallyAdjustsSize].
114        #[unsafe(method(setAutomaticallyAdjustsSize:))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn setAutomaticallyAdjustsSize(&self, automatically_adjusts_size: bool);
117
118        #[unsafe(method(viewWillAppear))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn viewWillAppear(&self);
121
122        #[unsafe(method(viewDidAppear))]
123        #[unsafe(method_family = none)]
124        pub unsafe fn viewDidAppear(&self);
125
126        #[unsafe(method(viewDidDisappear))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn viewDidDisappear(&self);
129    );
130}
131
132/// Methods declared on superclass `NSViewController`.
133#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
134impl NSTitlebarAccessoryViewController {
135    extern_methods!(
136        #[cfg(feature = "NSNib")]
137        #[unsafe(method(initWithNibName:bundle:))]
138        #[unsafe(method_family = init)]
139        pub unsafe fn initWithNibName_bundle(
140            this: Allocated<Self>,
141            nib_name_or_nil: Option<&NSNibName>,
142            nib_bundle_or_nil: Option<&NSBundle>,
143        ) -> Retained<Self>;
144
145        #[unsafe(method(initWithCoder:))]
146        #[unsafe(method_family = init)]
147        pub unsafe fn initWithCoder(
148            this: Allocated<Self>,
149            coder: &NSCoder,
150        ) -> Option<Retained<Self>>;
151    );
152}
153
154/// Methods declared on superclass `NSResponder`.
155#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
156impl NSTitlebarAccessoryViewController {
157    extern_methods!(
158        #[unsafe(method(init))]
159        #[unsafe(method_family = init)]
160        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
161    );
162}
163
164/// Methods declared on superclass `NSObject`.
165#[cfg(all(feature = "NSResponder", feature = "NSViewController"))]
166impl NSTitlebarAccessoryViewController {
167    extern_methods!(
168        #[unsafe(method(new))]
169        #[unsafe(method_family = new)]
170        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
171    );
172}