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")]
19extern_conformance!(
20 unsafe impl NSCoding for NSPopoverTouchBarItem {}
21);
22
23#[cfg(feature = "NSTouchBarItem")]
24extern_conformance!(
25 unsafe impl NSObjectProtocol for NSPopoverTouchBarItem {}
26);
27
28#[cfg(feature = "NSTouchBarItem")]
29impl NSPopoverTouchBarItem {
30 extern_methods!(
31 #[cfg(feature = "NSTouchBar")]
32 #[unsafe(method(popoverTouchBar))]
33 #[unsafe(method_family = none)]
34 pub fn popoverTouchBar(&self) -> Retained<NSTouchBar>;
35
36 #[cfg(feature = "NSTouchBar")]
37 #[unsafe(method(setPopoverTouchBar:))]
39 #[unsafe(method_family = none)]
40 pub fn setPopoverTouchBar(&self, popover_touch_bar: &NSTouchBar);
41
42 #[unsafe(method(customizationLabel))]
43 #[unsafe(method_family = none)]
44 pub fn customizationLabel(&self) -> Retained<NSString>;
45
46 #[unsafe(method(setCustomizationLabel:))]
50 #[unsafe(method_family = none)]
51 pub fn setCustomizationLabel(&self, customization_label: Option<&NSString>);
52
53 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
54 #[unsafe(method(collapsedRepresentation))]
55 #[unsafe(method_family = none)]
56 pub fn collapsedRepresentation(&self) -> Retained<NSView>;
57
58 #[cfg(all(feature = "NSResponder", feature = "NSView"))]
59 #[unsafe(method(setCollapsedRepresentation:))]
61 #[unsafe(method_family = none)]
62 pub fn setCollapsedRepresentation(&self, collapsed_representation: &NSView);
63
64 #[cfg(feature = "NSImage")]
65 #[unsafe(method(collapsedRepresentationImage))]
66 #[unsafe(method_family = none)]
67 pub fn collapsedRepresentationImage(&self) -> Option<Retained<NSImage>>;
68
69 #[cfg(feature = "NSImage")]
70 #[unsafe(method(setCollapsedRepresentationImage:))]
72 #[unsafe(method_family = none)]
73 pub fn setCollapsedRepresentationImage(
74 &self,
75 collapsed_representation_image: Option<&NSImage>,
76 );
77
78 #[unsafe(method(collapsedRepresentationLabel))]
79 #[unsafe(method_family = none)]
80 pub fn collapsedRepresentationLabel(&self) -> Retained<NSString>;
81
82 #[unsafe(method(setCollapsedRepresentationLabel:))]
84 #[unsafe(method_family = none)]
85 pub fn setCollapsedRepresentationLabel(&self, collapsed_representation_label: &NSString);
86
87 #[cfg(feature = "NSTouchBar")]
88 #[unsafe(method(pressAndHoldTouchBar))]
89 #[unsafe(method_family = none)]
90 pub fn pressAndHoldTouchBar(&self) -> Option<Retained<NSTouchBar>>;
91
92 #[cfg(feature = "NSTouchBar")]
93 #[unsafe(method(setPressAndHoldTouchBar:))]
95 #[unsafe(method_family = none)]
96 pub fn setPressAndHoldTouchBar(&self, press_and_hold_touch_bar: Option<&NSTouchBar>);
97
98 #[unsafe(method(showsCloseButton))]
99 #[unsafe(method_family = none)]
100 pub fn showsCloseButton(&self) -> bool;
101
102 #[unsafe(method(setShowsCloseButton:))]
104 #[unsafe(method_family = none)]
105 pub fn setShowsCloseButton(&self, shows_close_button: bool);
106
107 #[unsafe(method(showPopover:))]
111 #[unsafe(method_family = none)]
112 pub unsafe fn showPopover(&self, sender: Option<&AnyObject>);
113
114 #[unsafe(method(dismissPopover:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn dismissPopover(&self, sender: Option<&AnyObject>);
120
121 #[cfg(feature = "NSGestureRecognizer")]
122 #[unsafe(method(makeStandardActivatePopoverGestureRecognizer))]
123 #[unsafe(method_family = none)]
124 pub fn makeStandardActivatePopoverGestureRecognizer(&self)
125 -> Retained<NSGestureRecognizer>;
126 );
127}
128
129#[cfg(feature = "NSTouchBarItem")]
131impl NSPopoverTouchBarItem {
132 extern_methods!(
133 #[unsafe(method(initWithIdentifier:))]
134 #[unsafe(method_family = init)]
135 pub fn initWithIdentifier(
136 this: Allocated<Self>,
137 identifier: &NSTouchBarItemIdentifier,
138 ) -> Retained<Self>;
139
140 #[unsafe(method(initWithCoder:))]
144 #[unsafe(method_family = init)]
145 pub unsafe fn initWithCoder(
146 this: Allocated<Self>,
147 coder: &NSCoder,
148 ) -> Option<Retained<Self>>;
149
150 #[unsafe(method(init))]
151 #[unsafe(method_family = init)]
152 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
153 );
154}
155
156#[cfg(feature = "NSTouchBarItem")]
158impl NSPopoverTouchBarItem {
159 extern_methods!(
160 #[unsafe(method(new))]
161 #[unsafe(method_family = new)]
162 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
163 );
164}