use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static UNNotificationDefaultActionIdentifier: &'static NSString;
}
extern "C" {
pub static UNNotificationDismissActionIdentifier: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationResponse;
unsafe impl ClassType for UNNotificationResponse {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNNotificationResponse {}
unsafe impl NSCopying for UNNotificationResponse {}
unsafe impl NSObjectProtocol for UNNotificationResponse {}
unsafe impl NSSecureCoding for UNNotificationResponse {}
extern_methods!(
unsafe impl UNNotificationResponse {
#[cfg(feature = "UNNotification")]
#[method_id(@__retain_semantics Other notification)]
pub unsafe fn notification(&self) -> Id<UNNotification>;
#[method_id(@__retain_semantics Other actionIdentifier)]
pub unsafe fn actionIdentifier(&self) -> Id<NSString>;
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
unsafe impl UNNotificationResponse {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNTextInputNotificationResponse;
unsafe impl ClassType for UNTextInputNotificationResponse {
#[inherits(NSObject)]
type Super = UNNotificationResponse;
type Mutability = InteriorMutable;
}
);
unsafe impl NSCoding for UNTextInputNotificationResponse {}
unsafe impl NSCopying for UNTextInputNotificationResponse {}
unsafe impl NSObjectProtocol for UNTextInputNotificationResponse {}
unsafe impl NSSecureCoding for UNTextInputNotificationResponse {}
extern_methods!(
unsafe impl UNTextInputNotificationResponse {
#[method_id(@__retain_semantics Other userText)]
pub unsafe fn userText(&self) -> Id<NSString>;
}
);
extern_methods!(
unsafe impl UNTextInputNotificationResponse {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
}
);
extern_methods!(
unsafe impl UNTextInputNotificationResponse {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);