objc2_event_kit/generated/
EKSource.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(EKObject, NSObject))]
12 #[derive(Debug, PartialEq, Eq, Hash)]
13 #[cfg(feature = "EKObject")]
14 pub struct EKSource;
15);
16
17#[cfg(feature = "EKObject")]
18unsafe impl NSObjectProtocol for EKSource {}
19
20#[cfg(feature = "EKObject")]
21impl EKSource {
22 extern_methods!(
23 #[unsafe(method(sourceIdentifier))]
24 #[unsafe(method_family = none)]
25 pub unsafe fn sourceIdentifier(&self) -> Retained<NSString>;
26
27 #[cfg(feature = "EKTypes")]
28 #[unsafe(method(sourceType))]
29 #[unsafe(method_family = none)]
30 pub unsafe fn sourceType(&self) -> EKSourceType;
31
32 #[unsafe(method(title))]
33 #[unsafe(method_family = none)]
34 pub unsafe fn title(&self) -> Retained<NSString>;
35
36 #[cfg(feature = "EKCalendar")]
37 #[unsafe(method(calendars))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn calendars(&self) -> Retained<NSSet<EKCalendar>>;
41
42 #[cfg(all(feature = "EKCalendar", feature = "EKTypes"))]
43 #[unsafe(method(calendarsForEntityType:))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn calendarsForEntityType(
48 &self,
49 entity_type: EKEntityType,
50 ) -> Retained<NSSet<EKCalendar>>;
51
52 #[unsafe(method(isDelegate))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn isDelegate(&self) -> bool;
56 );
57}
58
59#[cfg(feature = "EKObject")]
61impl EKSource {
62 extern_methods!(
63 #[unsafe(method(init))]
64 #[unsafe(method_family = init)]
65 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67 #[unsafe(method(new))]
68 #[unsafe(method_family = new)]
69 pub unsafe fn new() -> Retained<Self>;
70 );
71}