objc2-ui-kit 0.3.2

Bindings to the UIKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// A class you use to handle a Smart Reply suggestion.
    ///
    /// Use the ``smartReply`` string as a signal of the user’s intention when you generate long form text based on the option the user selected.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uismartreplysuggestion?language=objc)
    #[unsafe(super(UIInputSuggestion, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UIInputSuggestion")]
    pub struct UISmartReplySuggestion;
);

#[cfg(feature = "UIInputSuggestion")]
extern_conformance!(
    unsafe impl NSObjectProtocol for UISmartReplySuggestion {}
);

#[cfg(feature = "UIInputSuggestion")]
impl UISmartReplySuggestion {
    extern_methods!(
        /// A string from the Smart Reply option the user selected.
        ///
        /// Use this as a signal of the user’s intention when you generate long form text based on the option the user selected.
        #[unsafe(method(smartReply))]
        #[unsafe(method_family = none)]
        pub fn smartReply(&self) -> Retained<NSString>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "UIInputSuggestion")]
impl UISmartReplySuggestion {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new() -> Retained<Self>;
    );
}

#[cfg(feature = "UIInputSuggestion")]
impl DefaultRetained for UISmartReplySuggestion {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}