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

use crate::*;

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

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

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

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

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

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

impl INNote {
    extern_methods!(
        #[cfg(all(feature = "INNoteContent", feature = "INSpeakableString"))]
        #[unsafe(method(initWithTitle:contents:groupName:createdDateComponents:modifiedDateComponents:identifier:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithTitle_contents_groupName_createdDateComponents_modifiedDateComponents_identifier(
            this: Allocated<Self>,
            title: &INSpeakableString,
            contents: &NSArray<INNoteContent>,
            group_name: Option<&INSpeakableString>,
            created_date_components: Option<&NSDateComponents>,
            modified_date_components: Option<&NSDateComponents>,
            identifier: Option<&NSString>,
        ) -> Retained<Self>;

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

        #[cfg(feature = "INNoteContent")]
        #[unsafe(method(contents))]
        #[unsafe(method_family = none)]
        pub unsafe fn contents(&self) -> Retained<NSArray<INNoteContent>>;

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

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

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

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

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

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