objc2_user_notifications/generated/
UNNotificationResponse.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern "C" {
10    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationdefaultactionidentifier?language=objc)
11    pub static UNNotificationDefaultActionIdentifier: &'static NSString;
12}
13
14extern "C" {
15    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationdismissactionidentifier?language=objc)
16    pub static UNNotificationDismissActionIdentifier: &'static NSString;
17}
18
19extern_class!(
20    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/unnotificationresponse?language=objc)
21    #[unsafe(super(NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    pub struct UNNotificationResponse;
24);
25
26unsafe impl NSCoding for UNNotificationResponse {}
27
28unsafe impl NSCopying for UNNotificationResponse {}
29
30unsafe impl CopyingHelper for UNNotificationResponse {
31    type Result = Self;
32}
33
34unsafe impl NSObjectProtocol for UNNotificationResponse {}
35
36unsafe impl NSSecureCoding for UNNotificationResponse {}
37
38impl UNNotificationResponse {
39    extern_methods!(
40        #[cfg(feature = "UNNotification")]
41        #[unsafe(method(notification))]
42        #[unsafe(method_family = none)]
43        pub unsafe fn notification(&self) -> Retained<UNNotification>;
44
45        #[unsafe(method(actionIdentifier))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn actionIdentifier(&self) -> Retained<NSString>;
48
49        #[unsafe(method(init))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
52    );
53}
54
55/// Methods declared on superclass `NSObject`.
56impl UNNotificationResponse {
57    extern_methods!(
58        #[unsafe(method(new))]
59        #[unsafe(method_family = new)]
60        pub unsafe fn new() -> Retained<Self>;
61    );
62}
63
64extern_class!(
65    /// [Apple's documentation](https://developer.apple.com/documentation/usernotifications/untextinputnotificationresponse?language=objc)
66    #[unsafe(super(UNNotificationResponse, NSObject))]
67    #[derive(Debug, PartialEq, Eq, Hash)]
68    pub struct UNTextInputNotificationResponse;
69);
70
71unsafe impl NSCoding for UNTextInputNotificationResponse {}
72
73unsafe impl NSCopying for UNTextInputNotificationResponse {}
74
75unsafe impl CopyingHelper for UNTextInputNotificationResponse {
76    type Result = Self;
77}
78
79unsafe impl NSObjectProtocol for UNTextInputNotificationResponse {}
80
81unsafe impl NSSecureCoding for UNTextInputNotificationResponse {}
82
83impl UNTextInputNotificationResponse {
84    extern_methods!(
85        #[unsafe(method(userText))]
86        #[unsafe(method_family = none)]
87        pub unsafe fn userText(&self) -> Retained<NSString>;
88    );
89}
90
91/// Methods declared on superclass `UNNotificationResponse`.
92impl UNTextInputNotificationResponse {
93    extern_methods!(
94        #[unsafe(method(init))]
95        #[unsafe(method_family = init)]
96        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
97    );
98}
99
100/// Methods declared on superclass `NSObject`.
101impl UNTextInputNotificationResponse {
102    extern_methods!(
103        #[unsafe(method(new))]
104        #[unsafe(method_family = new)]
105        pub unsafe fn new() -> Retained<Self>;
106    );
107}