1use 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#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct NSButtonType(pub NSUInteger);
17impl NSButtonType {
18 #[doc(alias = "NSButtonTypeMomentaryLight")]
19 pub const MomentaryLight: Self = Self(0);
20 #[doc(alias = "NSButtonTypePushOnPushOff")]
21 pub const PushOnPushOff: Self = Self(1);
22 #[doc(alias = "NSButtonTypeToggle")]
23 pub const Toggle: Self = Self(2);
24 #[doc(alias = "NSButtonTypeSwitch")]
25 pub const Switch: Self = Self(3);
26 #[doc(alias = "NSButtonTypeRadio")]
27 pub const Radio: Self = Self(4);
28 #[doc(alias = "NSButtonTypeMomentaryChange")]
29 pub const MomentaryChange: Self = Self(5);
30 #[doc(alias = "NSButtonTypeOnOff")]
31 pub const OnOff: Self = Self(6);
32 #[doc(alias = "NSButtonTypeMomentaryPushIn")]
33 pub const MomentaryPushIn: Self = Self(7);
34 #[doc(alias = "NSButtonTypeAccelerator")]
35 pub const Accelerator: Self = Self(8);
36 #[doc(alias = "NSButtonTypeMultiLevelAccelerator")]
37 pub const MultiLevelAccelerator: Self = Self(9);
38}
39
40unsafe impl Encode for NSButtonType {
41 const ENCODING: Encoding = NSUInteger::ENCODING;
42}
43
44unsafe impl RefEncode for NSButtonType {
45 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
46}
47
48#[repr(transparent)]
51#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
52pub struct NSBezelStyle(pub NSUInteger);
53impl NSBezelStyle {
54 #[doc(alias = "NSBezelStyleAutomatic")]
56 pub const Automatic: Self = Self(0);
57 #[doc(alias = "NSBezelStylePush")]
59 pub const Push: Self = Self(1);
60 #[doc(alias = "NSBezelStyleFlexiblePush")]
62 pub const FlexiblePush: Self = Self(2);
63 #[doc(alias = "NSBezelStyleDisclosure")]
65 pub const Disclosure: Self = Self(5);
66 #[doc(alias = "NSBezelStyleCircular")]
68 pub const Circular: Self = Self(7);
69 #[doc(alias = "NSBezelStyleHelpButton")]
71 pub const HelpButton: Self = Self(9);
72 #[doc(alias = "NSBezelStyleSmallSquare")]
74 pub const SmallSquare: Self = Self(10);
75 #[doc(alias = "NSBezelStyleToolbar")]
77 pub const Toolbar: Self = Self(11);
78 #[doc(alias = "NSBezelStyleAccessoryBarAction")]
80 pub const AccessoryBarAction: Self = Self(12);
81 #[doc(alias = "NSBezelStyleAccessoryBar")]
83 pub const AccessoryBar: Self = Self(13);
84 #[doc(alias = "NSBezelStylePushDisclosure")]
86 pub const PushDisclosure: Self = Self(14);
87 #[doc(alias = "NSBezelStyleBadge")]
89 pub const Badge: Self = Self(15);
90 #[doc(alias = "NSBezelStyleGlass")]
92 pub const Glass: Self = Self(16);
93 #[doc(alias = "NSBezelStyleShadowlessSquare")]
95 #[deprecated]
96 pub const ShadowlessSquare: Self = Self(6);
97 #[doc(alias = "NSBezelStyleTexturedSquare")]
99 #[deprecated]
100 pub const TexturedSquare: Self = Self(8);
101 #[doc(alias = "NSBezelStyleRounded")]
103 #[deprecated]
104 pub const Rounded: Self = Self(NSBezelStyle::Push.0);
105 #[doc(alias = "NSBezelStyleRegularSquare")]
107 #[deprecated]
108 pub const RegularSquare: Self = Self(NSBezelStyle::FlexiblePush.0);
109 #[doc(alias = "NSBezelStyleTexturedRounded")]
111 #[deprecated]
112 pub const TexturedRounded: Self = Self(NSBezelStyle::Toolbar.0);
113 #[doc(alias = "NSBezelStyleRoundRect")]
115 #[deprecated]
116 pub const RoundRect: Self = Self(NSBezelStyle::AccessoryBarAction.0);
117 #[doc(alias = "NSBezelStyleRecessed")]
119 #[deprecated]
120 pub const Recessed: Self = Self(NSBezelStyle::AccessoryBar.0);
121 #[doc(alias = "NSBezelStyleRoundedDisclosure")]
123 #[deprecated]
124 pub const RoundedDisclosure: Self = Self(NSBezelStyle::PushDisclosure.0);
125 #[doc(alias = "NSBezelStyleInline")]
127 #[deprecated]
128 pub const Inline: Self = Self(NSBezelStyle::Badge.0);
129}
130
131unsafe impl Encode for NSBezelStyle {
132 const ENCODING: Encoding = NSUInteger::ENCODING;
133}
134
135unsafe impl RefEncode for NSBezelStyle {
136 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
137}
138
139extern_class!(
140 #[unsafe(super(NSActionCell, NSCell, NSObject))]
142 #[derive(Debug, PartialEq, Eq, Hash)]
143 #[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
144 pub struct NSButtonCell;
145);
146
147#[cfg(all(
148 feature = "NSAccessibilityProtocols",
149 feature = "NSActionCell",
150 feature = "NSCell"
151))]
152extern_conformance!(
153 unsafe impl NSAccessibility for NSButtonCell {}
154);
155
156#[cfg(all(
157 feature = "NSAccessibilityProtocols",
158 feature = "NSActionCell",
159 feature = "NSCell"
160))]
161extern_conformance!(
162 unsafe impl NSAccessibilityElementProtocol for NSButtonCell {}
163);
164
165#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
166extern_conformance!(
167 unsafe impl NSCoding for NSButtonCell {}
168);
169
170#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
171extern_conformance!(
172 unsafe impl NSCopying for NSButtonCell {}
173);
174
175#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
176unsafe impl CopyingHelper for NSButtonCell {
177 type Result = Self;
178}
179
180#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
181extern_conformance!(
182 unsafe impl NSObjectProtocol for NSButtonCell {}
183);
184
185#[cfg(all(
186 feature = "NSActionCell",
187 feature = "NSCell",
188 feature = "NSUserInterfaceItemIdentification"
189))]
190extern_conformance!(
191 unsafe impl NSUserInterfaceItemIdentification for NSButtonCell {}
192);
193
194#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
195impl NSButtonCell {
196 extern_methods!(
197 #[unsafe(method(initTextCell:))]
198 #[unsafe(method_family = init)]
199 pub fn initTextCell(this: Allocated<Self>, string: &NSString) -> Retained<Self>;
200
201 #[cfg(feature = "NSImage")]
202 #[unsafe(method(initImageCell:))]
203 #[unsafe(method_family = init)]
204 pub fn initImageCell(this: Allocated<Self>, image: Option<&NSImage>) -> Retained<Self>;
205
206 #[unsafe(method(initWithCoder:))]
210 #[unsafe(method_family = init)]
211 pub unsafe fn initWithCoder(this: Allocated<Self>, coder: &NSCoder) -> Retained<Self>;
212
213 #[unsafe(method(bezelStyle))]
214 #[unsafe(method_family = none)]
215 pub fn bezelStyle(&self) -> NSBezelStyle;
216
217 #[unsafe(method(setBezelStyle:))]
219 #[unsafe(method_family = none)]
220 pub fn setBezelStyle(&self, bezel_style: NSBezelStyle);
221
222 #[unsafe(method(setButtonType:))]
223 #[unsafe(method_family = none)]
224 pub fn setButtonType(&self, r#type: NSButtonType);
225
226 #[unsafe(method(highlightsBy))]
227 #[unsafe(method_family = none)]
228 pub fn highlightsBy(&self) -> NSCellStyleMask;
229
230 #[unsafe(method(setHighlightsBy:))]
232 #[unsafe(method_family = none)]
233 pub fn setHighlightsBy(&self, highlights_by: NSCellStyleMask);
234
235 #[unsafe(method(showsStateBy))]
236 #[unsafe(method_family = none)]
237 pub fn showsStateBy(&self) -> NSCellStyleMask;
238
239 #[unsafe(method(setShowsStateBy:))]
241 #[unsafe(method_family = none)]
242 pub fn setShowsStateBy(&self, shows_state_by: NSCellStyleMask);
243
244 #[unsafe(method(title))]
245 #[unsafe(method_family = none)]
246 pub fn title(&self) -> Retained<NSString>;
247
248 #[unsafe(method(setTitle:))]
252 #[unsafe(method_family = none)]
253 pub fn setTitle(&self, title: Option<&NSString>);
254
255 #[unsafe(method(attributedTitle))]
256 #[unsafe(method_family = none)]
257 pub fn attributedTitle(&self) -> Retained<NSAttributedString>;
258
259 #[unsafe(method(setAttributedTitle:))]
263 #[unsafe(method_family = none)]
264 pub fn setAttributedTitle(&self, attributed_title: &NSAttributedString);
265
266 #[unsafe(method(alternateTitle))]
267 #[unsafe(method_family = none)]
268 pub fn alternateTitle(&self) -> Retained<NSString>;
269
270 #[unsafe(method(setAlternateTitle:))]
274 #[unsafe(method_family = none)]
275 pub fn setAlternateTitle(&self, alternate_title: &NSString);
276
277 #[unsafe(method(attributedAlternateTitle))]
278 #[unsafe(method_family = none)]
279 pub fn attributedAlternateTitle(&self) -> Retained<NSAttributedString>;
280
281 #[unsafe(method(setAttributedAlternateTitle:))]
285 #[unsafe(method_family = none)]
286 pub fn setAttributedAlternateTitle(&self, attributed_alternate_title: &NSAttributedString);
287
288 #[cfg(feature = "NSImage")]
289 #[unsafe(method(alternateImage))]
290 #[unsafe(method_family = none)]
291 pub fn alternateImage(&self) -> Option<Retained<NSImage>>;
292
293 #[cfg(feature = "NSImage")]
294 #[unsafe(method(setAlternateImage:))]
296 #[unsafe(method_family = none)]
297 pub fn setAlternateImage(&self, alternate_image: Option<&NSImage>);
298
299 #[unsafe(method(imagePosition))]
300 #[unsafe(method_family = none)]
301 pub fn imagePosition(&self) -> NSCellImagePosition;
302
303 #[unsafe(method(setImagePosition:))]
305 #[unsafe(method_family = none)]
306 pub fn setImagePosition(&self, image_position: NSCellImagePosition);
307
308 #[unsafe(method(imageScaling))]
309 #[unsafe(method_family = none)]
310 pub fn imageScaling(&self) -> NSImageScaling;
311
312 #[unsafe(method(setImageScaling:))]
314 #[unsafe(method_family = none)]
315 pub fn setImageScaling(&self, image_scaling: NSImageScaling);
316
317 #[unsafe(method(keyEquivalent))]
318 #[unsafe(method_family = none)]
319 pub fn keyEquivalent(&self) -> Retained<NSString>;
320
321 #[unsafe(method(setKeyEquivalent:))]
325 #[unsafe(method_family = none)]
326 pub fn setKeyEquivalent(&self, key_equivalent: &NSString);
327
328 #[cfg(feature = "NSEvent")]
329 #[unsafe(method(keyEquivalentModifierMask))]
330 #[unsafe(method_family = none)]
331 pub fn keyEquivalentModifierMask(&self) -> NSEventModifierFlags;
332
333 #[cfg(feature = "NSEvent")]
334 #[unsafe(method(setKeyEquivalentModifierMask:))]
336 #[unsafe(method_family = none)]
337 pub fn setKeyEquivalentModifierMask(
338 &self,
339 key_equivalent_modifier_mask: NSEventModifierFlags,
340 );
341
342 #[unsafe(method(isTransparent))]
343 #[unsafe(method_family = none)]
344 pub fn isTransparent(&self) -> bool;
345
346 #[unsafe(method(setTransparent:))]
348 #[unsafe(method_family = none)]
349 pub fn setTransparent(&self, transparent: bool);
350
351 #[unsafe(method(isOpaque))]
352 #[unsafe(method_family = none)]
353 pub fn isOpaque(&self) -> bool;
354
355 #[unsafe(method(imageDimsWhenDisabled))]
356 #[unsafe(method_family = none)]
357 pub fn imageDimsWhenDisabled(&self) -> bool;
358
359 #[unsafe(method(setImageDimsWhenDisabled:))]
361 #[unsafe(method_family = none)]
362 pub fn setImageDimsWhenDisabled(&self, image_dims_when_disabled: bool);
363
364 #[unsafe(method(showsBorderOnlyWhileMouseInside))]
365 #[unsafe(method_family = none)]
366 pub fn showsBorderOnlyWhileMouseInside(&self) -> bool;
367
368 #[unsafe(method(setShowsBorderOnlyWhileMouseInside:))]
370 #[unsafe(method_family = none)]
371 pub fn setShowsBorderOnlyWhileMouseInside(
372 &self,
373 shows_border_only_while_mouse_inside: bool,
374 );
375
376 #[cfg(feature = "NSSound")]
377 #[unsafe(method(sound))]
378 #[unsafe(method_family = none)]
379 pub fn sound(&self) -> Option<Retained<NSSound>>;
380
381 #[cfg(feature = "NSSound")]
382 #[unsafe(method(setSound:))]
384 #[unsafe(method_family = none)]
385 pub fn setSound(&self, sound: Option<&NSSound>);
386
387 #[cfg(feature = "NSColor")]
388 #[unsafe(method(backgroundColor))]
389 #[unsafe(method_family = none)]
390 pub fn backgroundColor(&self) -> Option<Retained<NSColor>>;
391
392 #[cfg(feature = "NSColor")]
393 #[unsafe(method(setBackgroundColor:))]
397 #[unsafe(method_family = none)]
398 pub fn setBackgroundColor(&self, background_color: Option<&NSColor>);
399
400 #[unsafe(method(setPeriodicDelay:interval:))]
401 #[unsafe(method_family = none)]
402 pub fn setPeriodicDelay_interval(&self, delay: c_float, interval: c_float);
403
404 #[unsafe(method(getPeriodicDelay:interval:))]
409 #[unsafe(method_family = none)]
410 pub unsafe fn getPeriodicDelay_interval(
411 &self,
412 delay: NonNull<c_float>,
413 interval: NonNull<c_float>,
414 );
415
416 #[unsafe(method(performClick:))]
420 #[unsafe(method_family = none)]
421 pub unsafe fn performClick(&self, sender: Option<&AnyObject>);
422
423 #[cfg(feature = "NSEvent")]
424 #[unsafe(method(mouseEntered:))]
425 #[unsafe(method_family = none)]
426 pub fn mouseEntered(&self, event: &NSEvent);
427
428 #[cfg(feature = "NSEvent")]
429 #[unsafe(method(mouseExited:))]
430 #[unsafe(method_family = none)]
431 pub fn mouseExited(&self, event: &NSEvent);
432
433 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
434 #[unsafe(method(drawBezelWithFrame:inView:))]
435 #[unsafe(method_family = none)]
436 pub fn drawBezelWithFrame_inView(&self, frame: NSRect, control_view: &NSView);
437
438 #[cfg(all(feature = "NSImage", feature = "NSResponder", feature = "NSView"))]
439 #[unsafe(method(drawImage:withFrame:inView:))]
440 #[unsafe(method_family = none)]
441 pub fn drawImage_withFrame_inView(
442 &self,
443 image: &NSImage,
444 frame: NSRect,
445 control_view: &NSView,
446 );
447
448 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
449 #[unsafe(method(drawTitle:withFrame:inView:))]
450 #[unsafe(method_family = none)]
451 pub fn drawTitle_withFrame_inView(
452 &self,
453 title: &NSAttributedString,
454 frame: NSRect,
455 control_view: &NSView,
456 ) -> NSRect;
457 );
458}
459
460#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
462impl NSButtonCell {
463 extern_methods!(
464 #[unsafe(method(init))]
465 #[unsafe(method_family = init)]
466 pub fn init(this: Allocated<Self>) -> Retained<Self>;
467 );
468}
469
470#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
472impl NSButtonCell {
473 extern_methods!(
474 #[unsafe(method(new))]
475 #[unsafe(method_family = new)]
476 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
477 );
478}
479
480#[deprecated]
483#[repr(transparent)]
484#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
485pub struct NSGradientType(pub NSUInteger);
486impl NSGradientType {
487 #[doc(alias = "NSGradientNone")]
488 #[deprecated]
489 pub const None: Self = Self(0);
490 #[doc(alias = "NSGradientConcaveWeak")]
491 #[deprecated]
492 pub const ConcaveWeak: Self = Self(1);
493 #[doc(alias = "NSGradientConcaveStrong")]
494 #[deprecated]
495 pub const ConcaveStrong: Self = Self(2);
496 #[doc(alias = "NSGradientConvexWeak")]
497 #[deprecated]
498 pub const ConvexWeak: Self = Self(3);
499 #[doc(alias = "NSGradientConvexStrong")]
500 #[deprecated]
501 pub const ConvexStrong: Self = Self(4);
502}
503
504unsafe impl Encode for NSGradientType {
505 const ENCODING: Encoding = NSUInteger::ENCODING;
506}
507
508unsafe impl RefEncode for NSGradientType {
509 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
510}
511
512#[deprecated]
514pub static NSMomentaryLightButton: NSButtonType = NSButtonType(NSButtonType::MomentaryLight.0);
515
516#[deprecated]
518pub static NSPushOnPushOffButton: NSButtonType = NSButtonType(NSButtonType::PushOnPushOff.0);
519
520#[deprecated]
522pub static NSToggleButton: NSButtonType = NSButtonType(NSButtonType::Toggle.0);
523
524#[deprecated]
526pub static NSSwitchButton: NSButtonType = NSButtonType(NSButtonType::Switch.0);
527
528#[deprecated]
530pub static NSRadioButton: NSButtonType = NSButtonType(NSButtonType::Radio.0);
531
532#[deprecated]
534pub static NSMomentaryChangeButton: NSButtonType = NSButtonType(NSButtonType::MomentaryChange.0);
535
536#[deprecated]
538pub static NSOnOffButton: NSButtonType = NSButtonType(NSButtonType::OnOff.0);
539
540#[deprecated]
542pub static NSMomentaryPushInButton: NSButtonType = NSButtonType(NSButtonType::MomentaryPushIn.0);
543
544#[deprecated]
546pub static NSAcceleratorButton: NSButtonType = NSButtonType(NSButtonType::Accelerator.0);
547
548#[deprecated]
550pub static NSMultiLevelAcceleratorButton: NSButtonType =
551 NSButtonType(NSButtonType::MultiLevelAccelerator.0);
552
553#[deprecated = "This constant is misnamed and has the same effect as NSButtonTypeMomentaryLight. Use that name instead, or switch to NSButtonTypeMomentaryPushIn."]
555pub static NSMomentaryPushButton: NSButtonType = NSButtonType(NSButtonType::MomentaryLight.0);
556
557#[deprecated = "This constant is misnamed and has the same effect as NSButtonTypeMomentaryPushIn. Use that name instead, or switch to NSButtonTypeMomentaryLight."]
559pub static NSMomentaryLight: NSButtonType = NSButtonType(NSButtonType::MomentaryPushIn.0);
560
561#[deprecated]
563pub static NSRoundedBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::Push.0);
564
565#[deprecated]
567pub static NSRegularSquareBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::FlexiblePush.0);
568
569#[deprecated]
571pub static NSDisclosureBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::Disclosure.0);
572
573#[deprecated]
575pub static NSShadowlessSquareBezelStyle: NSBezelStyle =
576 NSBezelStyle(NSBezelStyle::ShadowlessSquare.0);
577
578#[deprecated]
580pub static NSCircularBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::Circular.0);
581
582#[deprecated]
584pub static NSTexturedSquareBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::TexturedSquare.0);
585
586#[deprecated]
588pub static NSHelpButtonBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::HelpButton.0);
589
590#[deprecated]
592pub static NSSmallSquareBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::SmallSquare.0);
593
594#[deprecated]
596pub static NSTexturedRoundedBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::Toolbar.0);
597
598#[deprecated]
600pub static NSRoundRectBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::AccessoryBarAction.0);
601
602#[deprecated]
604pub static NSRecessedBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::AccessoryBar.0);
605
606#[deprecated]
608pub static NSRoundedDisclosureBezelStyle: NSBezelStyle =
609 NSBezelStyle(NSBezelStyle::PushDisclosure.0);
610
611#[deprecated]
613pub static NSInlineBezelStyle: NSBezelStyle = NSBezelStyle(NSBezelStyle::Badge.0);
614
615#[deprecated = "This bezel style is obsolete and should not be used."]
617pub static NSSmallIconButtonBezelStyle: NSBezelStyle = NSBezelStyle(2);
618
619#[deprecated]
621pub static NSThickSquareBezelStyle: NSBezelStyle = NSBezelStyle(3);
622
623#[deprecated]
625pub static NSThickerSquareBezelStyle: NSBezelStyle = NSBezelStyle(4);
626
627#[cfg(all(feature = "NSActionCell", feature = "NSCell"))]
629impl NSButtonCell {
630 extern_methods!(
631 #[deprecated = "The gradientType property is unused, and setting it has no effect."]
632 #[unsafe(method(gradientType))]
633 #[unsafe(method_family = none)]
634 pub fn gradientType(&self) -> NSGradientType;
635
636 #[deprecated = "The gradientType property is unused, and setting it has no effect."]
638 #[unsafe(method(setGradientType:))]
639 #[unsafe(method_family = none)]
640 pub fn setGradientType(&self, gradient_type: NSGradientType);
641
642 #[deprecated = "Mnemonics are not used on macOS. Set the title property directly instead."]
646 #[unsafe(method(setTitleWithMnemonic:))]
647 #[unsafe(method_family = none)]
648 pub unsafe fn setTitleWithMnemonic(&self, string_with_ampersand: Option<&NSString>);
649
650 #[deprecated = "Mnemonics are not used on macOS. Set the alternateTitle property directly instead."]
654 #[unsafe(method(setAlternateTitleWithMnemonic:))]
655 #[unsafe(method_family = none)]
656 pub unsafe fn setAlternateTitleWithMnemonic(
657 &self,
658 string_with_ampersand: Option<&NSString>,
659 );
660
661 #[deprecated = "Mnemonics are not used on macOS. Calling this method has no effect."]
662 #[unsafe(method(setAlternateMnemonicLocation:))]
663 #[unsafe(method_family = none)]
664 pub fn setAlternateMnemonicLocation(&self, location: NSUInteger);
665
666 #[deprecated = "Mnemonics are not used on macOS. This property always returns NSNotFound."]
667 #[unsafe(method(alternateMnemonicLocation))]
668 #[unsafe(method_family = none)]
669 pub fn alternateMnemonicLocation(&self) -> NSUInteger;
670
671 #[deprecated = "Mnemonics are not used on macOS. This property always returns an empty string."]
672 #[unsafe(method(alternateMnemonic))]
673 #[unsafe(method_family = none)]
674 pub fn alternateMnemonic(&self) -> Option<Retained<NSString>>;
675
676 #[cfg(feature = "NSFont")]
677 #[deprecated = "The keyEquivalentFont property is no longer used. It always returns the NSButtonCell's font, and setting it has no effect."]
678 #[unsafe(method(keyEquivalentFont))]
679 #[unsafe(method_family = none)]
680 pub fn keyEquivalentFont(&self) -> Option<Retained<NSFont>>;
681
682 #[cfg(feature = "NSFont")]
683 #[deprecated = "The keyEquivalentFont property is no longer used. It always returns the NSButtonCell's font, and setting it has no effect."]
685 #[unsafe(method(setKeyEquivalentFont:))]
686 #[unsafe(method_family = none)]
687 pub fn setKeyEquivalentFont(&self, key_equivalent_font: Option<&NSFont>);
688
689 #[cfg(feature = "objc2-core-foundation")]
690 #[deprecated = "The keyEquivalentFont property is no longer used. Setting it has no effect."]
691 #[unsafe(method(setKeyEquivalentFont:size:))]
692 #[unsafe(method_family = none)]
693 pub fn setKeyEquivalentFont_size(&self, font_name: &NSString, font_size: CGFloat);
694 );
695}