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")]
18extern_conformance!(
19 unsafe impl NSObjectProtocol for EKSource {}
20);
21
22#[cfg(feature = "EKObject")]
23impl EKSource {
24 extern_methods!(
25 #[unsafe(method(sourceIdentifier))]
26 #[unsafe(method_family = none)]
27 pub unsafe fn sourceIdentifier(&self) -> Retained<NSString>;
28
29 #[cfg(feature = "EKTypes")]
30 #[unsafe(method(sourceType))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn sourceType(&self) -> EKSourceType;
33
34 #[unsafe(method(title))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn title(&self) -> Retained<NSString>;
37
38 #[cfg(feature = "EKCalendar")]
39 #[unsafe(method(calendars))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn calendars(&self) -> Retained<NSSet<EKCalendar>>;
43
44 #[cfg(all(feature = "EKCalendar", feature = "EKTypes"))]
45 #[unsafe(method(calendarsForEntityType:))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn calendarsForEntityType(
50 &self,
51 entity_type: EKEntityType,
52 ) -> Retained<NSSet<EKCalendar>>;
53
54 #[unsafe(method(isDelegate))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn isDelegate(&self) -> bool;
58 );
59}
60
61#[cfg(feature = "EKObject")]
63impl EKSource {
64 extern_methods!(
65 #[unsafe(method(init))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69 #[unsafe(method(new))]
70 #[unsafe(method_family = new)]
71 pub unsafe fn new() -> Retained<Self>;
72 );
73}