objc2_ui_kit/generated/
UICalendarSelectionMultiDate.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(UICalendarSelection, NSObject))]
13 #[thread_kind = MainThreadOnly]
14 #[derive(Debug, PartialEq, Eq, Hash)]
15 #[cfg(feature = "UICalendarSelection")]
16 pub struct UICalendarSelectionMultiDate;
17);
18
19#[cfg(feature = "UICalendarSelection")]
20unsafe impl NSObjectProtocol for UICalendarSelectionMultiDate {}
21
22#[cfg(feature = "UICalendarSelection")]
23impl UICalendarSelectionMultiDate {
24 extern_methods!(
25 #[unsafe(method(selectedDates))]
27 #[unsafe(method_family = none)]
28 pub unsafe fn selectedDates(&self) -> Retained<NSArray<NSDateComponents>>;
29
30 #[unsafe(method(setSelectedDates:))]
32 #[unsafe(method_family = none)]
33 pub unsafe fn setSelectedDates(&self, selected_dates: &NSArray<NSDateComponents>);
34
35 #[unsafe(method(setSelectedDates:animated:))]
37 #[unsafe(method_family = none)]
38 pub unsafe fn setSelectedDates_animated(
39 &self,
40 selected_dates: &NSArray<NSDateComponents>,
41 animated: bool,
42 );
43
44 #[unsafe(method(delegate))]
46 #[unsafe(method_family = none)]
47 pub unsafe fn delegate(
48 &self,
49 ) -> Option<Retained<ProtocolObject<dyn UICalendarSelectionMultiDateDelegate>>>;
50
51 #[unsafe(method(initWithDelegate:))]
53 #[unsafe(method_family = init)]
54 pub unsafe fn initWithDelegate(
55 this: Allocated<Self>,
56 delegate: Option<&ProtocolObject<dyn UICalendarSelectionMultiDateDelegate>>,
57 ) -> Retained<Self>;
58 );
59}
60
61#[cfg(feature = "UICalendarSelection")]
63impl UICalendarSelectionMultiDate {
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(mtm: MainThreadMarker) -> Retained<Self>;
72 );
73}
74
75extern_protocol!(
76 pub unsafe trait UICalendarSelectionMultiDateDelegate: NSObjectProtocol {
78 #[cfg(feature = "UICalendarSelection")]
79 #[unsafe(method(multiDateSelection:didSelectDate:))]
86 #[unsafe(method_family = none)]
87 unsafe fn multiDateSelection_didSelectDate(
88 &self,
89 selection: &UICalendarSelectionMultiDate,
90 date_components: &NSDateComponents,
91 );
92
93 #[cfg(feature = "UICalendarSelection")]
94 #[unsafe(method(multiDateSelection:didDeselectDate:))]
101 #[unsafe(method_family = none)]
102 unsafe fn multiDateSelection_didDeselectDate(
103 &self,
104 selection: &UICalendarSelectionMultiDate,
105 date_components: &NSDateComponents,
106 );
107
108 #[cfg(feature = "UICalendarSelection")]
109 #[optional]
119 #[unsafe(method(multiDateSelection:canSelectDate:))]
120 #[unsafe(method_family = none)]
121 unsafe fn multiDateSelection_canSelectDate(
122 &self,
123 selection: &UICalendarSelectionMultiDate,
124 date_components: &NSDateComponents,
125 ) -> bool;
126
127 #[cfg(feature = "UICalendarSelection")]
128 #[optional]
138 #[unsafe(method(multiDateSelection:canDeselectDate:))]
139 #[unsafe(method_family = none)]
140 unsafe fn multiDateSelection_canDeselectDate(
141 &self,
142 selection: &UICalendarSelectionMultiDate,
143 date_components: &NSDateComponents,
144 ) -> bool;
145 }
146);