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
44unsafe impl NSCoding for NSSharingCollaborationModeRestriction {}
45
46unsafe impl NSCopying for NSSharingCollaborationModeRestriction {}
47
48unsafe impl CopyingHelper for NSSharingCollaborationModeRestriction {
49 type Result = Self;
50}
51
52unsafe impl NSObjectProtocol for NSSharingCollaborationModeRestriction {}
53
54unsafe impl NSSecureCoding for NSSharingCollaborationModeRestriction {}
55
56impl NSSharingCollaborationModeRestriction {
57 extern_methods!(
58 #[unsafe(method(disabledMode))]
60 #[unsafe(method_family = none)]
61 pub unsafe fn disabledMode(&self) -> NSSharingCollaborationMode;
62
63 #[unsafe(method(alertTitle))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn alertTitle(&self) -> Option<Retained<NSString>>;
67
68 #[unsafe(method(alertMessage))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn alertMessage(&self) -> Option<Retained<NSString>>;
72
73 #[unsafe(method(alertDismissButtonTitle))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn alertDismissButtonTitle(&self) -> Option<Retained<NSString>>;
78
79 #[unsafe(method(alertRecoverySuggestionButtonTitle))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn alertRecoverySuggestionButtonTitle(&self) -> Option<Retained<NSString>>;
83
84 #[unsafe(method(alertRecoverySuggestionButtonLaunchURL))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn alertRecoverySuggestionButtonLaunchURL(&self) -> Option<Retained<NSURL>>;
88
89 #[unsafe(method(initWithDisabledMode:))]
92 #[unsafe(method_family = init)]
93 pub unsafe fn initWithDisabledMode(
94 this: Allocated<Self>,
95 disabled_mode: NSSharingCollaborationMode,
96 ) -> Retained<Self>;
97
98 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:))]
103 #[unsafe(method_family = init)]
104 pub unsafe fn initWithDisabledMode_alertTitle_alertMessage(
105 this: Allocated<Self>,
106 disabled_mode: NSSharingCollaborationMode,
107 alert_title: &NSString,
108 alert_message: &NSString,
109 ) -> Retained<Self>;
110
111 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:))]
117 #[unsafe(method_family = init)]
118 pub unsafe fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle(
119 this: Allocated<Self>,
120 disabled_mode: NSSharingCollaborationMode,
121 alert_title: &NSString,
122 alert_message: &NSString,
123 alert_dismiss_button_title: &NSString,
124 ) -> Retained<Self>;
125
126 #[unsafe(method(initWithDisabledMode:alertTitle:alertMessage:alertDismissButtonTitle:alertRecoverySuggestionButtonTitle:alertRecoverySuggestionButtonLaunchURL:))]
134 #[unsafe(method_family = init)]
135 pub unsafe fn initWithDisabledMode_alertTitle_alertMessage_alertDismissButtonTitle_alertRecoverySuggestionButtonTitle_alertRecoverySuggestionButtonLaunchURL(
136 this: Allocated<Self>,
137 disabled_mode: NSSharingCollaborationMode,
138 alert_title: &NSString,
139 alert_message: &NSString,
140 alert_dismiss_button_title: &NSString,
141 alert_recovery_suggestion_button_title: &NSString,
142 alert_recovery_suggestion_button_launch_url: &NSURL,
143 ) -> Retained<Self>;
144
145 #[unsafe(method(init))]
146 #[unsafe(method_family = init)]
147 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
148
149 #[unsafe(method(new))]
150 #[unsafe(method_family = new)]
151 pub unsafe fn new() -> Retained<Self>;
152 );
153}