objc2-intents 0.3.2

Bindings to the Intents 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 objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inobject?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct INObject;
);

#[cfg(feature = "INSpeakable")]
extern_conformance!(
    unsafe impl INSpeakable for INObject {}
);

extern_conformance!(
    unsafe impl NSCoding for INObject {}
);

extern_conformance!(
    unsafe impl NSCopying for INObject {}
);

unsafe impl CopyingHelper for INObject {
    type Result = Self;
}

extern_conformance!(
    unsafe impl NSObjectProtocol for INObject {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for INObject {}
);

impl INObject {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(initWithIdentifier:displayString:pronunciationHint:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithIdentifier_displayString_pronunciationHint(
            this: Allocated<Self>,
            identifier: Option<&NSString>,
            display_string: &NSString,
            pronunciation_hint: Option<&NSString>,
        ) -> Retained<Self>;

        #[unsafe(method(initWithIdentifier:displayString:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithIdentifier_displayString(
            this: Allocated<Self>,
            identifier: Option<&NSString>,
            display_string: &NSString,
        ) -> Retained<Self>;

        #[cfg(feature = "INImage")]
        #[unsafe(method(initWithIdentifier:displayString:subtitleString:displayImage:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithIdentifier_displayString_subtitleString_displayImage(
            this: Allocated<Self>,
            identifier: Option<&NSString>,
            display_string: &NSString,
            subtitle_string: Option<&NSString>,
            display_image: Option<&INImage>,
        ) -> Retained<Self>;

        #[cfg(feature = "INImage")]
        #[unsafe(method(initWithIdentifier:displayString:pronunciationHint:subtitleString:displayImage:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithIdentifier_displayString_pronunciationHint_subtitleString_displayImage(
            this: Allocated<Self>,
            identifier: Option<&NSString>,
            display_string: &NSString,
            pronunciation_hint: Option<&NSString>,
            subtitle_string: Option<&NSString>,
            display_image: Option<&INImage>,
        ) -> Retained<Self>;

        #[unsafe(method(identifier))]
        #[unsafe(method_family = none)]
        pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(displayString))]
        #[unsafe(method_family = none)]
        pub unsafe fn displayString(&self) -> Retained<NSString>;

        #[unsafe(method(pronunciationHint))]
        #[unsafe(method_family = none)]
        pub unsafe fn pronunciationHint(&self) -> Option<Retained<NSString>>;

        #[unsafe(method(subtitleString))]
        #[unsafe(method_family = none)]
        pub unsafe fn subtitleString(&self) -> Option<Retained<NSString>>;

        /// Setter for [`subtitleString`][Self::subtitleString].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[unsafe(method(setSubtitleString:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSubtitleString(&self, subtitle_string: Option<&NSString>);

        #[cfg(feature = "INImage")]
        #[unsafe(method(displayImage))]
        #[unsafe(method_family = none)]
        pub unsafe fn displayImage(&self) -> Option<Retained<INImage>>;

        #[cfg(feature = "INImage")]
        /// Setter for [`displayImage`][Self::displayImage].
        #[unsafe(method(setDisplayImage:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDisplayImage(&self, display_image: Option<&INImage>);

        #[cfg(feature = "INSpeakableString")]
        #[unsafe(method(alternativeSpeakableMatches))]
        #[unsafe(method_family = none)]
        pub unsafe fn alternativeSpeakableMatches(
            &self,
        ) -> Option<Retained<NSArray<INSpeakableString>>>;

        #[cfg(feature = "INSpeakableString")]
        /// Setter for [`alternativeSpeakableMatches`][Self::alternativeSpeakableMatches].
        #[unsafe(method(setAlternativeSpeakableMatches:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setAlternativeSpeakableMatches(
            &self,
            alternative_speakable_matches: Option<&NSArray<INSpeakableString>>,
        );
    );
}

/// Methods declared on superclass `NSObject`.
impl INObject {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}