objc2_ui_kit/generated/
UILocalNotification.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
18 pub struct UILocalNotification;
19);
20
21unsafe impl NSCoding for UILocalNotification {}
22
23unsafe impl NSCopying for UILocalNotification {}
24
25unsafe impl CopyingHelper for UILocalNotification {
26 type Result = Self;
27}
28
29unsafe impl NSObjectProtocol for UILocalNotification {}
30
31impl UILocalNotification {
32 extern_methods!(
33 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
34 #[unsafe(method(init))]
35 #[unsafe(method_family = init)]
36 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
37
38 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
39 #[unsafe(method(initWithCoder:))]
40 #[unsafe(method_family = init)]
41 pub unsafe fn initWithCoder(
42 this: Allocated<Self>,
43 coder: &NSCoder,
44 ) -> Option<Retained<Self>>;
45
46 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
47 #[unsafe(method(fireDate))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn fireDate(&self) -> Option<Retained<NSDate>>;
50
51 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
53 #[unsafe(method(setFireDate:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn setFireDate(&self, fire_date: Option<&NSDate>);
56
57 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
58 #[unsafe(method(timeZone))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn timeZone(&self) -> Option<Retained<NSTimeZone>>;
61
62 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
64 #[unsafe(method(setTimeZone:))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn setTimeZone(&self, time_zone: Option<&NSTimeZone>);
67
68 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
69 #[unsafe(method(repeatInterval))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn repeatInterval(&self) -> NSCalendarUnit;
72
73 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
75 #[unsafe(method(setRepeatInterval:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn setRepeatInterval(&self, repeat_interval: NSCalendarUnit);
78
79 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
80 #[unsafe(method(repeatCalendar))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn repeatCalendar(&self) -> Option<Retained<NSCalendar>>;
83
84 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
86 #[unsafe(method(setRepeatCalendar:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setRepeatCalendar(&self, repeat_calendar: Option<&NSCalendar>);
89
90 #[cfg(feature = "objc2-core-location")]
91 #[unsafe(method(region))]
92 #[unsafe(method_family = none)]
93 pub unsafe fn region(&self) -> Option<Retained<CLRegion>>;
94
95 #[cfg(feature = "objc2-core-location")]
96 #[unsafe(method(setRegion:))]
98 #[unsafe(method_family = none)]
99 pub unsafe fn setRegion(&self, region: Option<&CLRegion>);
100
101 #[unsafe(method(regionTriggersOnce))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn regionTriggersOnce(&self) -> bool;
104
105 #[unsafe(method(setRegionTriggersOnce:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn setRegionTriggersOnce(&self, region_triggers_once: bool);
109
110 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
111 #[unsafe(method(alertBody))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn alertBody(&self) -> Option<Retained<NSString>>;
114
115 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
117 #[unsafe(method(setAlertBody:))]
118 #[unsafe(method_family = none)]
119 pub unsafe fn setAlertBody(&self, alert_body: Option<&NSString>);
120
121 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
122 #[unsafe(method(hasAction))]
123 #[unsafe(method_family = none)]
124 pub unsafe fn hasAction(&self) -> bool;
125
126 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
128 #[unsafe(method(setHasAction:))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn setHasAction(&self, has_action: bool);
131
132 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
133 #[unsafe(method(alertAction))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn alertAction(&self) -> Option<Retained<NSString>>;
136
137 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
139 #[unsafe(method(setAlertAction:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setAlertAction(&self, alert_action: Option<&NSString>);
142
143 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
144 #[unsafe(method(alertLaunchImage))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn alertLaunchImage(&self) -> Option<Retained<NSString>>;
147
148 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
150 #[unsafe(method(setAlertLaunchImage:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setAlertLaunchImage(&self, alert_launch_image: Option<&NSString>);
153
154 #[unsafe(method(alertTitle))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn alertTitle(&self) -> Option<Retained<NSString>>;
157
158 #[unsafe(method(setAlertTitle:))]
160 #[unsafe(method_family = none)]
161 pub unsafe fn setAlertTitle(&self, alert_title: Option<&NSString>);
162
163 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
164 #[unsafe(method(soundName))]
165 #[unsafe(method_family = none)]
166 pub unsafe fn soundName(&self) -> Option<Retained<NSString>>;
167
168 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
170 #[unsafe(method(setSoundName:))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn setSoundName(&self, sound_name: Option<&NSString>);
173
174 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
175 #[unsafe(method(applicationIconBadgeNumber))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn applicationIconBadgeNumber(&self) -> NSInteger;
178
179 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
181 #[unsafe(method(setApplicationIconBadgeNumber:))]
182 #[unsafe(method_family = none)]
183 pub unsafe fn setApplicationIconBadgeNumber(
184 &self,
185 application_icon_badge_number: NSInteger,
186 );
187
188 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
189 #[unsafe(method(userInfo))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn userInfo(&self) -> Option<Retained<NSDictionary>>;
192
193 #[deprecated = "Use UserNotifications Framework's UNNotificationRequest"]
195 #[unsafe(method(setUserInfo:))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn setUserInfo(&self, user_info: Option<&NSDictionary>);
198
199 #[unsafe(method(category))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn category(&self) -> Option<Retained<NSString>>;
202
203 #[unsafe(method(setCategory:))]
205 #[unsafe(method_family = none)]
206 pub unsafe fn setCategory(&self, category: Option<&NSString>);
207 );
208}
209
210impl UILocalNotification {
212 extern_methods!(
213 #[unsafe(method(new))]
214 #[unsafe(method_family = new)]
215 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
216 );
217}
218
219extern "C" {
220 pub static UILocalNotificationDefaultSoundName: &'static NSString;
222}