objc2_user_notifications/generated/
UNNotificationResponse.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern "C" {
10 pub static UNNotificationDefaultActionIdentifier: &'static NSString;
12}
13
14extern "C" {
15 pub static UNNotificationDismissActionIdentifier: &'static NSString;
17}
18
19extern_class!(
20 #[unsafe(super(NSObject))]
22 #[derive(Debug, PartialEq, Eq, Hash)]
23 pub struct UNNotificationResponse;
24);
25
26extern_conformance!(
27 unsafe impl NSCoding for UNNotificationResponse {}
28);
29
30extern_conformance!(
31 unsafe impl NSCopying for UNNotificationResponse {}
32);
33
34unsafe impl CopyingHelper for UNNotificationResponse {
35 type Result = Self;
36}
37
38extern_conformance!(
39 unsafe impl NSObjectProtocol for UNNotificationResponse {}
40);
41
42extern_conformance!(
43 unsafe impl NSSecureCoding for UNNotificationResponse {}
44);
45
46impl UNNotificationResponse {
47 extern_methods!(
48 #[cfg(feature = "UNNotification")]
49 #[unsafe(method(notification))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn notification(&self) -> Retained<UNNotification>;
52
53 #[unsafe(method(actionIdentifier))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn actionIdentifier(&self) -> Retained<NSString>;
56
57 #[unsafe(method(init))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
60 );
61}
62
63impl UNNotificationResponse {
65 extern_methods!(
66 #[unsafe(method(new))]
67 #[unsafe(method_family = new)]
68 pub unsafe fn new() -> Retained<Self>;
69 );
70}
71
72extern_class!(
73 #[unsafe(super(UNNotificationResponse, NSObject))]
75 #[derive(Debug, PartialEq, Eq, Hash)]
76 pub struct UNTextInputNotificationResponse;
77);
78
79extern_conformance!(
80 unsafe impl NSCoding for UNTextInputNotificationResponse {}
81);
82
83extern_conformance!(
84 unsafe impl NSCopying for UNTextInputNotificationResponse {}
85);
86
87unsafe impl CopyingHelper for UNTextInputNotificationResponse {
88 type Result = Self;
89}
90
91extern_conformance!(
92 unsafe impl NSObjectProtocol for UNTextInputNotificationResponse {}
93);
94
95extern_conformance!(
96 unsafe impl NSSecureCoding for UNTextInputNotificationResponse {}
97);
98
99impl UNTextInputNotificationResponse {
100 extern_methods!(
101 #[unsafe(method(userText))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn userText(&self) -> Retained<NSString>;
104 );
105}
106
107impl UNTextInputNotificationResponse {
109 extern_methods!(
110 #[unsafe(method(init))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
113 );
114}
115
116impl UNTextInputNotificationResponse {
118 extern_methods!(
119 #[unsafe(method(new))]
120 #[unsafe(method_family = new)]
121 pub unsafe fn new() -> Retained<Self>;
122 );
123}