objc2_ui_kit/generated/
UIActivityCollaborationModeRestriction.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern "C" {
10 #[cfg(feature = "UIActivityItemsConfigurationReading")]
17 pub static UIActivityItemsConfigurationMetadataKeyCollaborationModeRestrictions:
18 &'static UIActivityItemsConfigurationMetadataKey;
19}
20
21#[repr(transparent)]
27#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
28pub struct UIActivityCollaborationMode(pub NSInteger);
29impl UIActivityCollaborationMode {
30 #[doc(alias = "UIActivityCollaborationModeSendCopy")]
31 pub const SendCopy: Self = Self(0);
32 #[doc(alias = "UIActivityCollaborationModeCollaborate")]
33 pub const Collaborate: Self = Self(1);
34}
35
36unsafe impl Encode for UIActivityCollaborationMode {
37 const ENCODING: Encoding = NSInteger::ENCODING;
38}
39
40unsafe impl RefEncode for UIActivityCollaborationMode {
41 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
42}
43
44extern_class!(
45 #[unsafe(super(NSObject))]
52 #[derive(Debug, PartialEq, Eq, Hash)]
53 pub struct UIActivityCollaborationModeRestriction;
54);
55
56extern_conformance!(
57 unsafe impl NSCoding for UIActivityCollaborationModeRestriction {}
58);
59
60extern_conformance!(
61 unsafe impl NSCopying for UIActivityCollaborationModeRestriction {}
62);
63
64unsafe impl CopyingHelper for UIActivityCollaborationModeRestriction {
65 type Result = Self;
66}
67
68extern_conformance!(
69 unsafe impl NSObjectProtocol for UIActivityCollaborationModeRestriction {}
70);
71
72extern_conformance!(
73 unsafe impl NSSecureCoding for UIActivityCollaborationModeRestriction {}
74);
75
76impl UIActivityCollaborationModeRestriction {
77 extern_methods!(
78 #[unsafe(method(disabledMode))]
80 #[unsafe(method_family = none)]
81 pub fn disabledMode(&self) -> UIActivityCollaborationMode;
82
83 #[unsafe(method(alertTitle))]
85 #[unsafe(method_family = none)]
86 pub fn alertTitle(&self) -> Option<Retained<NSString>>;
87
88 #[unsafe(method(alertMessage))]
90 #[unsafe(method_family = none)]
91 pub fn alertMessage(&self) -> Option<Retained<NSString>>;
92
93 #[unsafe(method(alertDismissButtonTitle))]
96 #[unsafe(method_family = none)]
97 pub fn alertDismissButtonTitle(&self) -> Option<Retained<NSString>>;
98
99 #[unsafe(method(alertRecoverySuggestionButtonTitle))]
101 #[unsafe(method_family = none)]
102 pub fn alertRecoverySuggestionButtonTitle(&self) -> Option<Retained<NSString>>;
103
104 #[unsafe(method(alertRecoverySuggestionButtonLaunchURL))]
106 #[unsafe(method_family = none)]
107 pub fn alertRecoverySuggestionButtonLaunchURL(&self) -> Option<Retained<NSURL>>;
108
109 #[unsafe(method(initWithDisabledMode:))]
112 #[unsafe(method_family = init)]
113 pub fn initWithDisabledMode(
114 this: Allocated<Self>,
115 disabled_mode: UIActivityCollaborationMode,
116 ) -> Retained<Self>;
117
118 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:))]
123 #[unsafe(method_family = init)]
124 pub fn initWithDisabledMode_alertTitle_alertMessage(
125 this: Allocated<Self>,
126 disabled_mode: UIActivityCollaborationMode,
127 alert_title: &NSString,
128 alert_message: &NSString,
129 ) -> Retained<Self>;
130
131 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:))]
137 #[unsafe(method_family = init)]
138 pub fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle(
139 this: Allocated<Self>,
140 disabled_mode: UIActivityCollaborationMode,
141 alert_title: &NSString,
142 alert_message: &NSString,
143 alert_dismiss_button_title: &NSString,
144 ) -> Retained<Self>;
145
146 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:alertRecoverySuggestionButtonTitle:alertRecoverySuggestionButtonLaunchURL:))]
154 #[unsafe(method_family = init)]
155 pub fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle_alertRecoverySuggestionButtonTitle_alertRecoverySuggestionButtonLaunchURL(
156 this: Allocated<Self>,
157 disabled_mode: UIActivityCollaborationMode,
158 alert_title: &NSString,
159 alert_message: &NSString,
160 alert_dismiss_button_title: &NSString,
161 alert_recovery_suggestion_button_title: &NSString,
162 alert_recovery_suggestion_button_launch_url: &NSURL,
163 ) -> Retained<Self>;
164
165 #[unsafe(method(init))]
166 #[unsafe(method_family = init)]
167 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
168
169 #[unsafe(method(new))]
170 #[unsafe(method_family = new)]
171 pub unsafe fn new() -> Retained<Self>;
172
173 #[unsafe(method(description))]
174 #[unsafe(method_family = none)]
175 pub fn description(&self) -> Retained<NSString>;
176 );
177}