objc2_app_kit/generated/
NSPopoverTouchBarItem.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSTouchBarItem, NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 #[cfg(feature = "NSTouchBarItem")]
15 pub struct NSPopoverTouchBarItem;
16);
17
18#[cfg(feature = "NSTouchBarItem")]
19unsafe impl NSCoding for NSPopoverTouchBarItem {}
20
21#[cfg(feature = "NSTouchBarItem")]
22unsafe impl NSObjectProtocol for NSPopoverTouchBarItem {}
23
24#[cfg(feature = "NSTouchBarItem")]
25impl NSPopoverTouchBarItem {
26 extern_methods!(
27 #[cfg(feature = "NSTouchBar")]
28 #[unsafe(method(popoverTouchBar))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn popoverTouchBar(&self) -> Retained<NSTouchBar>;
31
32 #[cfg(feature = "NSTouchBar")]
33 #[unsafe(method(setPopoverTouchBar:))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn setPopoverTouchBar(&self, popover_touch_bar: &NSTouchBar);
37
38 #[unsafe(method(customizationLabel))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn customizationLabel(&self) -> Retained<NSString>;
41
42 #[unsafe(method(setCustomizationLabel:))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
46
47 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
48 #[unsafe(method(collapsedRepresentation))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn collapsedRepresentation(&self) -> Retained<NSView>;
51
52 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
53 #[unsafe(method(setCollapsedRepresentation:))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn setCollapsedRepresentation(&self, collapsed_representation: &NSView);
57
58 #[cfg(feature = "NSImage")]
59 #[unsafe(method(collapsedRepresentationImage))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn collapsedRepresentationImage(&self) -> Option<Retained<NSImage>>;
62
63 #[cfg(feature = "NSImage")]
64 #[unsafe(method(setCollapsedRepresentationImage:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setCollapsedRepresentationImage(
68 &self,
69 collapsed_representation_image: Option<&NSImage>,
70 );
71
72 #[unsafe(method(collapsedRepresentationLabel))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn collapsedRepresentationLabel(&self) -> Retained<NSString>;
75
76 #[unsafe(method(setCollapsedRepresentationLabel:))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn setCollapsedRepresentationLabel(
80 &self,
81 collapsed_representation_label: &NSString,
82 );
83
84 #[cfg(feature = "NSTouchBar")]
85 #[unsafe(method(pressAndHoldTouchBar))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn pressAndHoldTouchBar(&self) -> Option<Retained<NSTouchBar>>;
88
89 #[cfg(feature = "NSTouchBar")]
90 #[unsafe(method(setPressAndHoldTouchBar:))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn setPressAndHoldTouchBar(&self, press_and_hold_touch_bar: Option<&NSTouchBar>);
94
95 #[unsafe(method(showsCloseButton))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn showsCloseButton(&self) -> bool;
98
99 #[unsafe(method(setShowsCloseButton:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setShowsCloseButton(&self, shows_close_button: bool);
103
104 #[unsafe(method(showPopover:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn showPopover(&self, sender: Option<&AnyObject>);
107
108 #[unsafe(method(dismissPopover:))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn dismissPopover(&self, sender: Option<&AnyObject>);
111
112 #[cfg(feature = "NSGestureRecognizer")]
113 #[unsafe(method(makeStandardActivatePopoverGestureRecognizer))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn makeStandardActivatePopoverGestureRecognizer(
116 &self,
117 ) -> Retained<NSGestureRecognizer>;
118 );
119}
120
121#[cfg(feature = "NSTouchBarItem")]
123impl NSPopoverTouchBarItem {
124 extern_methods!(
125 #[unsafe(method(initWithIdentifier:))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn initWithIdentifier(
128 this: Allocated<Self>,
129 identifier: &NSTouchBarItemIdentifier,
130 ) -> Retained<Self>;
131
132 #[unsafe(method(initWithCoder:))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn initWithCoder(
135 this: Allocated<Self>,
136 coder: &NSCoder,
137 ) -> Option<Retained<Self>>;
138
139 #[unsafe(method(init))]
140 #[unsafe(method_family = init)]
141 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
142 );
143}
144
145#[cfg(feature = "NSTouchBarItem")]
147impl NSPopoverTouchBarItem {
148 extern_methods!(
149 #[unsafe(method(new))]
150 #[unsafe(method_family = new)]
151 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
152 );
153}