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