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::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;

use crate::*;

extern_class!(
    /// A class that represents a message conversation.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uimessageconversationcontext?language=objc)
    #[unsafe(super(UIConversationContext, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "UIConversationContext")]
    pub struct UIMessageConversationContext;
);

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

#[cfg(feature = "UIConversationContext")]
impl UIMessageConversationContext {
    extern_methods!(
        /// A Boolean value that indicates whether the message thread is "junk", such as spam.
        #[unsafe(method(isJunk))]
        #[unsafe(method_family = none)]
        pub fn isJunk(&self) -> bool;

        /// Setter for [`isJunk`][Self::isJunk].
        #[unsafe(method(setIsJunk:))]
        #[unsafe(method_family = none)]
        pub fn setIsJunk(&self, is_junk: bool);
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "UIConversationContext")]
impl UIMessageConversationContext {
    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 = "UIConversationContext")]
impl DefaultRetained for UIMessageConversationContext {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}