use core::ptr::NonNull;
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!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNNotificationResponse;
);
extern_conformance!(
unsafe impl NSCoding for UNNotificationResponse {}
);
extern_conformance!(
unsafe impl NSCopying for UNNotificationResponse {}
);
unsafe impl CopyingHelper for UNNotificationResponse {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UNNotificationResponse {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UNNotificationResponse {}
);
impl UNNotificationResponse {
extern_methods!(
#[cfg(feature = "UNNotification")]
#[unsafe(method(notification))]
#[unsafe(method_family = none)]
pub fn notification(&self) -> Retained<UNNotification>;
#[unsafe(method(actionIdentifier))]
#[unsafe(method_family = none)]
pub fn actionIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl UNNotificationResponse {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(UNNotificationResponse, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UNTextInputNotificationResponse;
);
extern_conformance!(
unsafe impl NSCoding for UNTextInputNotificationResponse {}
);
extern_conformance!(
unsafe impl NSCopying for UNTextInputNotificationResponse {}
);
unsafe impl CopyingHelper for UNTextInputNotificationResponse {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UNTextInputNotificationResponse {}
);
extern_conformance!(
unsafe impl NSSecureCoding for UNTextInputNotificationResponse {}
);
impl UNTextInputNotificationResponse {
extern_methods!(
#[unsafe(method(userText))]
#[unsafe(method_family = none)]
pub fn userText(&self) -> Retained<NSString>;
);
}
impl UNTextInputNotificationResponse {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
impl UNTextInputNotificationResponse {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}