objc2_app_kit/generated/
NSSharingCollaborationModeRestriction.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct NSSharingCollaborationMode(pub NSInteger);
17impl NSSharingCollaborationMode {
18 #[doc(alias = "NSSharingCollaborationModeSendCopy")]
19 pub const SendCopy: Self = Self(0);
20 #[doc(alias = "NSSharingCollaborationModeCollaborate")]
21 pub const Collaborate: Self = Self(1);
22}
23
24unsafe impl Encode for NSSharingCollaborationMode {
25 const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for NSSharingCollaborationMode {
29 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32extern_class!(
33 #[unsafe(super(NSObject))]
40 #[derive(Debug, PartialEq, Eq, Hash)]
41 pub struct NSSharingCollaborationModeRestriction;
42);
43
44extern_conformance!(
45 unsafe impl NSCoding for NSSharingCollaborationModeRestriction {}
46);
47
48extern_conformance!(
49 unsafe impl NSCopying for NSSharingCollaborationModeRestriction {}
50);
51
52unsafe impl CopyingHelper for NSSharingCollaborationModeRestriction {
53 type Result = Self;
54}
55
56extern_conformance!(
57 unsafe impl NSObjectProtocol for NSSharingCollaborationModeRestriction {}
58);
59
60extern_conformance!(
61 unsafe impl NSSecureCoding for NSSharingCollaborationModeRestriction {}
62);
63
64impl NSSharingCollaborationModeRestriction {
65 extern_methods!(
66 #[unsafe(method(disabledMode))]
68 #[unsafe(method_family = none)]
69 pub fn disabledMode(&self) -> NSSharingCollaborationMode;
70
71 #[unsafe(method(alertTitle))]
73 #[unsafe(method_family = none)]
74 pub fn alertTitle(&self) -> Option<Retained<NSString>>;
75
76 #[unsafe(method(alertMessage))]
78 #[unsafe(method_family = none)]
79 pub fn alertMessage(&self) -> Option<Retained<NSString>>;
80
81 #[unsafe(method(alertDismissButtonTitle))]
84 #[unsafe(method_family = none)]
85 pub fn alertDismissButtonTitle(&self) -> Option<Retained<NSString>>;
86
87 #[unsafe(method(alertRecoverySuggestionButtonTitle))]
89 #[unsafe(method_family = none)]
90 pub fn alertRecoverySuggestionButtonTitle(&self) -> Option<Retained<NSString>>;
91
92 #[unsafe(method(alertRecoverySuggestionButtonLaunchURL))]
94 #[unsafe(method_family = none)]
95 pub fn alertRecoverySuggestionButtonLaunchURL(&self) -> Option<Retained<NSURL>>;
96
97 #[unsafe(method(initWithDisabledMode:))]
100 #[unsafe(method_family = init)]
101 pub fn initWithDisabledMode(
102 this: Allocated<Self>,
103 disabled_mode: NSSharingCollaborationMode,
104 ) -> Retained<Self>;
105
106 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:))]
111 #[unsafe(method_family = init)]
112 pub fn initWithDisabledMode_alertTitle_alertMessage(
113 this: Allocated<Self>,
114 disabled_mode: NSSharingCollaborationMode,
115 alert_title: &NSString,
116 alert_message: &NSString,
117 ) -> Retained<Self>;
118
119 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:))]
125 #[unsafe(method_family = init)]
126 pub fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle(
127 this: Allocated<Self>,
128 disabled_mode: NSSharingCollaborationMode,
129 alert_title: &NSString,
130 alert_message: &NSString,
131 alert_dismiss_button_title: &NSString,
132 ) -> Retained<Self>;
133
134 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:alertRecoverySuggestionButtonTitle:alertRecoverySuggestionButtonLaunchURL:))]
142 #[unsafe(method_family = init)]
143 pub fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle_alertRecoverySuggestionButtonTitle_alertRecoverySuggestionButtonLaunchURL(
144 this: Allocated<Self>,
145 disabled_mode: NSSharingCollaborationMode,
146 alert_title: &NSString,
147 alert_message: &NSString,
148 alert_dismiss_button_title: &NSString,
149 alert_recovery_suggestion_button_title: &NSString,
150 alert_recovery_suggestion_button_launch_url: &NSURL,
151 ) -> Retained<Self>;
152
153 #[unsafe(method(init))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
156
157 #[unsafe(method(new))]
158 #[unsafe(method_family = new)]
159 pub unsafe fn new() -> Retained<Self>;
160 );
161}