objc2_app_kit/generated/
NSToolbar.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
12/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaridentifier?language=objc)
13pub type NSToolbarIdentifier = NSString;
14
15/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemidentifier?language=objc)
16// NS_TYPED_EXTENSIBLE_ENUM
17pub type NSToolbarItemIdentifier = NSString;
18
19/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaruserinfokey?language=objc)
20// NS_TYPED_ENUM
21pub type NSToolbarUserInfoKey = NSString;
22
23extern "C" {
24    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbaritemkey?language=objc)
25    pub static NSToolbarItemKey: &'static NSToolbarUserInfoKey;
26}
27
28extern "C" {
29    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarnewindexkey?language=objc)
30    pub static NSToolbarNewIndexKey: &'static NSToolbarUserInfoKey;
31}
32
33/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbardisplaymode?language=objc)
34// NS_ENUM
35#[repr(transparent)]
36#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
37pub struct NSToolbarDisplayMode(pub NSUInteger);
38impl NSToolbarDisplayMode {
39    #[doc(alias = "NSToolbarDisplayModeDefault")]
40    pub const Default: Self = Self(0);
41    #[doc(alias = "NSToolbarDisplayModeIconAndLabel")]
42    pub const IconAndLabel: Self = Self(1);
43    #[doc(alias = "NSToolbarDisplayModeIconOnly")]
44    pub const IconOnly: Self = Self(2);
45    #[doc(alias = "NSToolbarDisplayModeLabelOnly")]
46    pub const LabelOnly: Self = Self(3);
47}
48
49unsafe impl Encode for NSToolbarDisplayMode {
50    const ENCODING: Encoding = NSUInteger::ENCODING;
51}
52
53unsafe impl RefEncode for NSToolbarDisplayMode {
54    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
55}
56
57/// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarsizemode?language=objc)
58// NS_ENUM
59#[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"]
60#[repr(transparent)]
61#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
62pub struct NSToolbarSizeMode(pub NSUInteger);
63impl NSToolbarSizeMode {
64    #[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"]
65    #[doc(alias = "NSToolbarSizeModeDefault")]
66    pub const Default: Self = Self(0);
67    #[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"]
68    #[doc(alias = "NSToolbarSizeModeRegular")]
69    pub const Regular: Self = Self(1);
70    #[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"]
71    #[doc(alias = "NSToolbarSizeModeSmall")]
72    pub const Small: Self = Self(2);
73}
74
75unsafe impl Encode for NSToolbarSizeMode {
76    const ENCODING: Encoding = NSUInteger::ENCODING;
77}
78
79unsafe impl RefEncode for NSToolbarSizeMode {
80    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
81}
82
83extern_class!(
84    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbar?language=objc)
85    #[unsafe(super(NSObject))]
86    #[thread_kind = MainThreadOnly]
87    #[derive(Debug, PartialEq, Eq, Hash)]
88    pub struct NSToolbar;
89);
90
91unsafe impl NSObjectProtocol for NSToolbar {}
92
93impl NSToolbar {
94    extern_methods!(
95        /// The identifier is used to form the toolbar's autosave name.
96        /// Toolbars with the same identifier are implicitly synchronized so that they maintain the same state.
97        #[unsafe(method(initWithIdentifier:))]
98        #[unsafe(method_family = init)]
99        pub unsafe fn initWithIdentifier(
100            this: Allocated<Self>,
101            identifier: &NSToolbarIdentifier,
102        ) -> Retained<Self>;
103
104        /// Calls through to -initWithIdentifier: with an empty string identifier.
105        /// Customizable toolbars should use `-initWithIdentifier:` with a unique identifier instead.
106        #[unsafe(method(init))]
107        #[unsafe(method_family = init)]
108        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
109
110        /// Inserts an item with the specified identifier in the receiving toolbar at the specified index.
111        ///
112        /// Any change made will be propagated immediately to all other toolbars with the same identifier.
113        #[unsafe(method(insertItemWithItemIdentifier:atIndex:))]
114        #[unsafe(method_family = none)]
115        pub unsafe fn insertItemWithItemIdentifier_atIndex(
116            &self,
117            item_identifier: &NSToolbarItemIdentifier,
118            index: NSInteger,
119        );
120
121        /// Removes the item at the specified index in the receiving toolbar.
122        ///
123        /// Any change made will be propagated immediately to all other toolbars with the same identifier.
124        #[unsafe(method(removeItemAtIndex:))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn removeItemAtIndex(&self, index: NSInteger);
127
128        /// Removes the item with matching `itemIdentifier` in the receiving toolbar. If multiple items share the same identifier (as is the case with space items) all matching items will be removed. To remove only a single space item, use `-removeItemAtIndex:` instead.
129        ///
130        /// Any change made will be propagated immediately to all other toolbars with the same identifier.
131        #[unsafe(method(removeItemWithItemIdentifier:))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn removeItemWithItemIdentifier(
134            &self,
135            item_identifier: &NSToolbarItemIdentifier,
136        );
137
138        /// Customizable toolbars must have a delegate, and must implement the required `NSToolbarDelegate` methods.
139        #[unsafe(method(delegate))]
140        #[unsafe(method_family = none)]
141        pub unsafe fn delegate(&self) -> Option<Retained<ProtocolObject<dyn NSToolbarDelegate>>>;
142
143        /// This is a [weak property][objc2::topics::weak_property].
144        /// Setter for [`delegate`][Self::delegate].
145        #[unsafe(method(setDelegate:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn setDelegate(&self, delegate: Option<&ProtocolObject<dyn NSToolbarDelegate>>);
148
149        /// Toggles the visibility of the toolbar.
150        /// This property may be modified by the user in toolbars with `allowsUserCustomization` enabled.
151        /// This property is key value observable on macOS 14.0 and higher.
152        #[unsafe(method(isVisible))]
153        #[unsafe(method_family = none)]
154        pub unsafe fn isVisible(&self) -> bool;
155
156        /// Setter for [`isVisible`][Self::isVisible].
157        #[unsafe(method(setVisible:))]
158        #[unsafe(method_family = none)]
159        pub unsafe fn setVisible(&self, visible: bool);
160
161        /// Customizable toolbars (those with delegates) can show a palette which allows users to populate the toolbar with individual items or to reset the toolbar to some default set of items.
162        /// The items and item sets in the palette are specified by the delegate (`-toolbarAllowedItemIdentifiers:` and `-toolbarDefaultItemIdentifiers:`).
163        /// When the user is done configuring, they will dismiss the palette.
164        #[unsafe(method(runCustomizationPalette:))]
165        #[unsafe(method_family = none)]
166        pub unsafe fn runCustomizationPalette(&self, sender: Option<&AnyObject>);
167
168        /// Whether or not the customization palette is currently running.
169        /// On macOS 15.0 and above this property is key value observable.
170        #[unsafe(method(customizationPaletteIsRunning))]
171        #[unsafe(method_family = none)]
172        pub unsafe fn customizationPaletteIsRunning(&self) -> bool;
173
174        /// The current display mode of items in the toolbar.
175        /// In toolbars with `allowsDisplayModeCustomization` enabled this is a user modifiable property.
176        /// This property is key value observable.
177        #[unsafe(method(displayMode))]
178        #[unsafe(method_family = none)]
179        pub unsafe fn displayMode(&self) -> NSToolbarDisplayMode;
180
181        /// Setter for [`displayMode`][Self::displayMode].
182        #[unsafe(method(setDisplayMode:))]
183        #[unsafe(method_family = none)]
184        pub unsafe fn setDisplayMode(&self, display_mode: NSToolbarDisplayMode);
185
186        /// Sets the toolbar's selected item by identifier.
187        /// Use this to force an item identifier to be selected.
188        /// Toolbar manages selection of image items automatically.
189        /// This method can be used to select identifiers of custom view items, or to force a selection change.
190        /// See `-toolbarSelectableItemIdentifiers:` delegate method for more details.
191        /// This property is key value observable.
192        #[unsafe(method(selectedItemIdentifier))]
193        #[unsafe(method_family = none)]
194        pub unsafe fn selectedItemIdentifier(&self) -> Option<Retained<NSToolbarItemIdentifier>>;
195
196        /// Setter for [`selectedItemIdentifier`][Self::selectedItemIdentifier].
197        #[unsafe(method(setSelectedItemIdentifier:))]
198        #[unsafe(method_family = none)]
199        pub unsafe fn setSelectedItemIdentifier(
200            &self,
201            selected_item_identifier: Option<&NSToolbarItemIdentifier>,
202        );
203
204        /// This flag controls whether or not users can configure the toolbar by dragging items around, and whether or not the customization palette can be used.
205        /// The default value is NO, but can be changed at any time.
206        /// For instance, a developer may not want users to be able to edit the toolbar while some event is being processed.
207        #[unsafe(method(allowsUserCustomization))]
208        #[unsafe(method_family = none)]
209        pub unsafe fn allowsUserCustomization(&self) -> bool;
210
211        /// Setter for [`allowsUserCustomization`][Self::allowsUserCustomization].
212        #[unsafe(method(setAllowsUserCustomization:))]
213        #[unsafe(method_family = none)]
214        pub unsafe fn setAllowsUserCustomization(&self, allows_user_customization: bool);
215
216        /// Whether or not the user is allowed to change display modes at run time.
217        /// This functionality is independent of customizing the order of the items themselves.
218        /// Only disable when the functionality or legibility of your toolbar could not be improved by another display mode.
219        /// The user's selection will be persisted using the toolbar's `identifier` when `autosavesConfiguration` is enabled.
220        /// The default is YES for apps linked on macOS 15.0 and above.
221        #[unsafe(method(allowsDisplayModeCustomization))]
222        #[unsafe(method_family = none)]
223        pub unsafe fn allowsDisplayModeCustomization(&self) -> bool;
224
225        /// Setter for [`allowsDisplayModeCustomization`][Self::allowsDisplayModeCustomization].
226        #[unsafe(method(setAllowsDisplayModeCustomization:))]
227        #[unsafe(method_family = none)]
228        pub unsafe fn setAllowsDisplayModeCustomization(
229            &self,
230            allows_display_mode_customization: bool,
231        );
232
233        /// All toolbars with the same name will share the same display attributes, and item order.
234        /// If a toolbar autosaves its configuration, the item identifier will be used as the autosave name.
235        #[unsafe(method(identifier))]
236        #[unsafe(method_family = none)]
237        pub unsafe fn identifier(&self) -> Retained<NSToolbarIdentifier>;
238
239        #[cfg(feature = "NSToolbarItem")]
240        /// Allows you to access all current items in the toolbar.
241        #[unsafe(method(items))]
242        #[unsafe(method_family = none)]
243        pub unsafe fn items(&self) -> Retained<NSArray<NSToolbarItem>>;
244
245        #[cfg(feature = "NSToolbarItem")]
246        /// Allows you to access the current visible items (non clipped).
247        #[unsafe(method(visibleItems))]
248        #[unsafe(method_family = none)]
249        pub unsafe fn visibleItems(&self) -> Option<Retained<NSArray<NSToolbarItem>>>;
250
251        /// An array of itemIdentifiers that represent the current items in the toolbar.
252        /// Setting this property will set the current items in the toolbar by diffing against items that already exist.
253        /// Use this with great caution if `allowsUserCustomization` is enabled as it will override any customizations the user has made.
254        /// This property is key value observable.
255        #[unsafe(method(itemIdentifiers))]
256        #[unsafe(method_family = none)]
257        pub unsafe fn itemIdentifiers(&self) -> Retained<NSArray<NSToolbarItemIdentifier>>;
258
259        /// Setter for [`itemIdentifiers`][Self::itemIdentifiers].
260        #[unsafe(method(setItemIdentifiers:))]
261        #[unsafe(method_family = none)]
262        pub unsafe fn setItemIdentifiers(
263            &self,
264            item_identifiers: &NSArray<NSToolbarItemIdentifier>,
265        );
266
267        /// Items with centered identifiers will be centered together in the Toolbar relative to the window assuming space allows.
268        /// The order of items is initially defined by the default set of identifiers, but may be customized by the user.
269        /// Centered items may not be moved outside of the center set of items by the user.
270        /// This property is archived.
271        #[unsafe(method(centeredItemIdentifiers))]
272        #[unsafe(method_family = none)]
273        pub unsafe fn centeredItemIdentifiers(&self) -> Retained<NSSet<NSToolbarItemIdentifier>>;
274
275        /// Setter for [`centeredItemIdentifiers`][Self::centeredItemIdentifiers].
276        #[unsafe(method(setCenteredItemIdentifiers:))]
277        #[unsafe(method_family = none)]
278        pub unsafe fn setCenteredItemIdentifiers(
279            &self,
280            centered_item_identifiers: &NSSet<NSToolbarItemIdentifier>,
281        );
282
283        /// If `autosavesConfiguration` is YES, the toolbar will automatically write changes the user makes to user defaults.
284        /// Customizable toolbars will want to set this flag to YES.
285        /// Setting this to NO means changes in configuration are not written automatically, however you can use the `configurationDictionary` method to do it yourself.
286        /// Default is NO.
287        #[unsafe(method(autosavesConfiguration))]
288        #[unsafe(method_family = none)]
289        pub unsafe fn autosavesConfiguration(&self) -> bool;
290
291        /// Setter for [`autosavesConfiguration`][Self::autosavesConfiguration].
292        #[unsafe(method(setAutosavesConfiguration:))]
293        #[unsafe(method_family = none)]
294        pub unsafe fn setAutosavesConfiguration(&self, autosaves_configuration: bool);
295
296        /// Typically you should not invoke this method.
297        /// This method is called on window updates with the purpose of validating each of the visible items.
298        /// The toolbar will iterate through the list of visible items, sending each a `-validate` message.
299        /// If this method is invoked directly, all visible items including those with `autovalidates` disabled will get a `-validate` message.
300        #[unsafe(method(validateVisibleItems))]
301        #[unsafe(method_family = none)]
302        pub unsafe fn validateVisibleItems(&self);
303
304        /// When YES, the receiver can dynamically create toolbar items for Action extensions in the toolbar configuration panel.
305        /// To be included, an extension needs to declare NSExtensionServiceAllowsToolbarItem=YES in its Info.plist.
306        /// The default value is NO.
307        #[unsafe(method(allowsExtensionItems))]
308        #[unsafe(method_family = none)]
309        pub unsafe fn allowsExtensionItems(&self) -> bool;
310
311        /// Setter for [`allowsExtensionItems`][Self::allowsExtensionItems].
312        #[unsafe(method(setAllowsExtensionItems:))]
313        #[unsafe(method_family = none)]
314        pub unsafe fn setAllowsExtensionItems(&self, allows_extension_items: bool);
315    );
316}
317
318/// Methods declared on superclass `NSObject`.
319impl NSToolbar {
320    extern_methods!(
321        #[unsafe(method(new))]
322        #[unsafe(method_family = new)]
323        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
324    );
325}
326
327extern_protocol!(
328    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbardelegate?language=objc)
329    pub unsafe trait NSToolbarDelegate: NSObjectProtocol + MainThreadOnly {
330        #[cfg(feature = "NSToolbarItem")]
331        /// Given an item identifier, this method returns an item.
332        /// Note that it is expected that each toolbar receives its own distinct copies and each time this method is called a new item must be returned.
333        /// If the item has a custom view, that view should be in place when the item is returned.
334        /// Finally, do not assume the returned item is going to be added as an active item in the toolbar.
335        /// In fact, the toolbar may ask for items here in order to construct the customization palette.
336        /// If `willBeInsertedIntoToolbar` is YES, the returned item will be inserted, and you can expect `toolbarWillAddItem:` is about to be posted.
337        #[optional]
338        #[unsafe(method(toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar:))]
339        #[unsafe(method_family = none)]
340        unsafe fn toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar(
341            &self,
342            toolbar: &NSToolbar,
343            item_identifier: &NSToolbarItemIdentifier,
344            flag: bool,
345        ) -> Option<Retained<NSToolbarItem>>;
346
347        /// Returns the ordered list of items to be shown in the toolbar by default.
348        /// If during initialization, no overriding values are found in the user defaults, or if the user chooses to revert to the default items this set will be used.
349        #[optional]
350        #[unsafe(method(toolbarDefaultItemIdentifiers:))]
351        #[unsafe(method_family = none)]
352        unsafe fn toolbarDefaultItemIdentifiers(
353            &self,
354            toolbar: &NSToolbar,
355        ) -> Retained<NSArray<NSToolbarItemIdentifier>>;
356
357        /// Returns the list of all allowed items by identifier.
358        /// By default, the toolbar does not assume any items are allowed so every allowed item must be explicitly listed.
359        /// The set of allowed items is used to construct the customization palette.
360        /// The order of items does not necessarily guarantee the order of appearance in the palette.
361        /// At minimum, you should return the default item list.
362        #[optional]
363        #[unsafe(method(toolbarAllowedItemIdentifiers:))]
364        #[unsafe(method_family = none)]
365        unsafe fn toolbarAllowedItemIdentifiers(
366            &self,
367            toolbar: &NSToolbar,
368        ) -> Retained<NSArray<NSToolbarItemIdentifier>>;
369
370        /// Optional method.
371        /// Those wishing to indicate item selection in a toolbar should implement this method to return a non-empty array of selectable item identifiers.
372        /// If implemented, the toolbar will remember and display the selected item with a special highlight.
373        /// A selected item is one whose item identifier matches the current selected item identifier.
374        /// Clicking on an item whose identifier is selectable will automatically update the toolbar's `selectedItemIdentifier` when possible.
375        /// See `selectedItemIdentifier` for more details.
376        #[optional]
377        #[unsafe(method(toolbarSelectableItemIdentifiers:))]
378        #[unsafe(method_family = none)]
379        unsafe fn toolbarSelectableItemIdentifiers(
380            &self,
381            toolbar: &NSToolbar,
382        ) -> Retained<NSArray<NSToolbarItemIdentifier>>;
383
384        /// Items in this set cannot be dragged or removed by the user.
385        #[optional]
386        #[unsafe(method(toolbarImmovableItemIdentifiers:))]
387        #[unsafe(method_family = none)]
388        unsafe fn toolbarImmovableItemIdentifiers(
389            &self,
390            toolbar: &NSToolbar,
391        ) -> Retained<NSSet<NSToolbarItemIdentifier>>;
392
393        /// Whether or not an item can be moved to a specified position in the toolbar.
394        /// If implemented, this method will be called during a user drag and does not necessarily indicate the final position of an item.
395        /// An index of NSNotFound indicates the item would be removed from the toolbar.
396        #[optional]
397        #[unsafe(method(toolbar:itemIdentifier:canBeInsertedAtIndex:))]
398        #[unsafe(method_family = none)]
399        unsafe fn toolbar_itemIdentifier_canBeInsertedAtIndex(
400            &self,
401            toolbar: &NSToolbar,
402            item_identifier: &NSToolbarItemIdentifier,
403            index: NSInteger,
404        ) -> bool;
405
406        /// Before a new item is added to the toolbar, this notification is posted.
407        /// This is the best place to notice a new item is going into the toolbar.
408        /// For instance, if you need to cache a reference to the toolbar item or need to set up some initial state, this is the best place to do it.
409        /// The notification object is the toolbar to which the item is being added.
410        /// The item being added and its new index can be found by referencing `NSToolbarItemKey` and `NSToolbarNewIndexKey` in the userInfo dictionary respectively.
411        #[optional]
412        #[unsafe(method(toolbarWillAddItem:))]
413        #[unsafe(method_family = none)]
414        unsafe fn toolbarWillAddItem(&self, notification: &NSNotification);
415
416        /// After an item is removed from a toolbar the notification is sent.
417        /// This allows the chance to tear down information related to the item that may have been cached.
418        /// The notification object is the toolbar from which the item is being removed.
419        /// The item being removed is found by referencing the `NSToolbarItemKey` in the userInfo.
420        #[optional]
421        #[unsafe(method(toolbarDidRemoveItem:))]
422        #[unsafe(method_family = none)]
423        unsafe fn toolbarDidRemoveItem(&self, notification: &NSNotification);
424    }
425);
426
427extern "C" {
428    /// Notifications
429    ///
430    /// See also [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbarwilladditemnotification?language=objc)
431    pub static NSToolbarWillAddItemNotification: &'static NSNotificationName;
432}
433
434extern "C" {
435    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nstoolbardidremoveitemnotification?language=objc)
436    pub static NSToolbarDidRemoveItemNotification: &'static NSNotificationName;
437}
438
439/// NSDeprecated.
440impl NSToolbar {
441    extern_methods!(
442        #[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"]
443        #[unsafe(method(sizeMode))]
444        #[unsafe(method_family = none)]
445        pub unsafe fn sizeMode(&self) -> NSToolbarSizeMode;
446
447        /// Setter for [`sizeMode`][Self::sizeMode].
448        #[deprecated = "NSToolbarSizeMode is no longer recommended and will be ignored in the future"]
449        #[unsafe(method(setSizeMode:))]
450        #[unsafe(method_family = none)]
451        pub unsafe fn setSizeMode(&self, size_mode: NSToolbarSizeMode);
452
453        #[deprecated = "Use the centeredItemIdentifiers property instead"]
454        #[unsafe(method(centeredItemIdentifier))]
455        #[unsafe(method_family = none)]
456        pub unsafe fn centeredItemIdentifier(&self) -> Option<Retained<NSToolbarItemIdentifier>>;
457
458        /// Setter for [`centeredItemIdentifier`][Self::centeredItemIdentifier].
459        #[deprecated = "Use the centeredItemIdentifiers property instead"]
460        #[unsafe(method(setCenteredItemIdentifier:))]
461        #[unsafe(method_family = none)]
462        pub unsafe fn setCenteredItemIdentifier(
463            &self,
464            centered_item_identifier: Option<&NSToolbarItemIdentifier>,
465        );
466
467        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
468        #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead"]
469        #[unsafe(method(fullScreenAccessoryView))]
470        #[unsafe(method_family = none)]
471        pub unsafe fn fullScreenAccessoryView(&self) -> Option<Retained<NSView>>;
472
473        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
474        /// Setter for [`fullScreenAccessoryView`][Self::fullScreenAccessoryView].
475        #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead"]
476        #[unsafe(method(setFullScreenAccessoryView:))]
477        #[unsafe(method_family = none)]
478        pub unsafe fn setFullScreenAccessoryView(
479            &self,
480            full_screen_accessory_view: Option<&NSView>,
481        );
482
483        #[cfg(feature = "objc2-core-foundation")]
484        #[deprecated = "Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead."]
485        #[unsafe(method(fullScreenAccessoryViewMinHeight))]
486        #[unsafe(method_family = none)]
487        pub unsafe fn fullScreenAccessoryViewMinHeight(&self) -> CGFloat;
488
489        #[cfg(feature = "objc2-core-foundation")]
490        /// Setter for [`fullScreenAccessoryViewMinHeight`][Self::fullScreenAccessoryViewMinHeight].
491        #[deprecated = "Use NSTitlebarAccessoryViewController and its fullScreenMinHeight property with NSWindow instead."]
492        #[unsafe(method(setFullScreenAccessoryViewMinHeight:))]
493        #[unsafe(method_family = none)]
494        pub unsafe fn setFullScreenAccessoryViewMinHeight(
495            &self,
496            full_screen_accessory_view_min_height: CGFloat,
497        );
498
499        #[cfg(feature = "objc2-core-foundation")]
500        #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view's height."]
501        #[unsafe(method(fullScreenAccessoryViewMaxHeight))]
502        #[unsafe(method_family = none)]
503        pub unsafe fn fullScreenAccessoryViewMaxHeight(&self) -> CGFloat;
504
505        #[cfg(feature = "objc2-core-foundation")]
506        /// Setter for [`fullScreenAccessoryViewMaxHeight`][Self::fullScreenAccessoryViewMaxHeight].
507        #[deprecated = "Use NSTitlebarAccessoryViewController with NSWindow instead. The max height of a titlebar accessory is implied by its view's height."]
508        #[unsafe(method(setFullScreenAccessoryViewMaxHeight:))]
509        #[unsafe(method_family = none)]
510        pub unsafe fn setFullScreenAccessoryViewMaxHeight(
511            &self,
512            full_screen_accessory_view_max_height: CGFloat,
513        );
514
515        #[deprecated = "No longer supported"]
516        #[unsafe(method(showsBaselineSeparator))]
517        #[unsafe(method_family = none)]
518        pub unsafe fn showsBaselineSeparator(&self) -> bool;
519
520        /// Setter for [`showsBaselineSeparator`][Self::showsBaselineSeparator].
521        #[deprecated = "No longer supported"]
522        #[unsafe(method(setShowsBaselineSeparator:))]
523        #[unsafe(method_family = none)]
524        pub unsafe fn setShowsBaselineSeparator(&self, shows_baseline_separator: bool);
525
526        #[deprecated = "Use -itemIdentifiers and -displayMode instead."]
527        #[unsafe(method(configurationDictionary))]
528        #[unsafe(method_family = none)]
529        pub unsafe fn configurationDictionary(&self)
530            -> Retained<NSDictionary<NSString, AnyObject>>;
531
532        #[deprecated = "Use -setItemIdentifiers: and -setDisplayMode: instead."]
533        #[unsafe(method(setConfigurationFromDictionary:))]
534        #[unsafe(method_family = none)]
535        pub unsafe fn setConfigurationFromDictionary(
536            &self,
537            config_dict: &NSDictionary<NSString, AnyObject>,
538        );
539    );
540}