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