objc2_intents/generated/
INIntent.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/intents/inintent?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct INIntent;
15);
16
17extern_conformance!(
18    unsafe impl NSCoding for INIntent {}
19);
20
21extern_conformance!(
22    unsafe impl NSCopying for INIntent {}
23);
24
25unsafe impl CopyingHelper for INIntent {
26    type Result = Self;
27}
28
29extern_conformance!(
30    unsafe impl NSObjectProtocol for INIntent {}
31);
32
33extern_conformance!(
34    unsafe impl NSSecureCoding for INIntent {}
35);
36
37impl INIntent {
38    extern_methods!(
39        #[unsafe(method(identifier))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
42
43        #[unsafe(method(intentDescription))]
44        #[unsafe(method_family = none)]
45        pub unsafe fn intentDescription(&self) -> Option<Retained<NSString>>;
46
47        #[unsafe(method(suggestedInvocationPhrase))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn suggestedInvocationPhrase(&self) -> Option<Retained<NSString>>;
50
51        /// Setter for [`suggestedInvocationPhrase`][Self::suggestedInvocationPhrase].
52        ///
53        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
54        #[unsafe(method(setSuggestedInvocationPhrase:))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn setSuggestedInvocationPhrase(
57            &self,
58            suggested_invocation_phrase: Option<&NSString>,
59        );
60
61        #[cfg(feature = "INShortcutAvailabilityOptions")]
62        #[unsafe(method(shortcutAvailability))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn shortcutAvailability(&self) -> INShortcutAvailabilityOptions;
65
66        #[cfg(feature = "INShortcutAvailabilityOptions")]
67        /// Setter for [`shortcutAvailability`][Self::shortcutAvailability].
68        #[unsafe(method(setShortcutAvailability:))]
69        #[unsafe(method_family = none)]
70        pub unsafe fn setShortcutAvailability(
71            &self,
72            shortcut_availability: INShortcutAvailabilityOptions,
73        );
74
75        #[cfg(feature = "INIntentDonationMetadata")]
76        #[unsafe(method(donationMetadata))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn donationMetadata(&self) -> Option<Retained<INIntentDonationMetadata>>;
79
80        #[cfg(feature = "INIntentDonationMetadata")]
81        /// Setter for [`donationMetadata`][Self::donationMetadata].
82        ///
83        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
84        #[unsafe(method(setDonationMetadata:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn setDonationMetadata(
87            &self,
88            donation_metadata: Option<&INIntentDonationMetadata>,
89        );
90
91        #[cfg(feature = "INImage")]
92        #[unsafe(method(setImage:forParameterNamed:))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn setImage_forParameterNamed(
95            &self,
96            image: Option<&INImage>,
97            parameter_name: &NSString,
98        );
99
100        #[cfg(feature = "INImage")]
101        #[unsafe(method(imageForParameterNamed:))]
102        #[unsafe(method_family = none)]
103        pub unsafe fn imageForParameterNamed(
104            &self,
105            parameter_name: &NSString,
106        ) -> Option<Retained<INImage>>;
107
108        #[cfg(feature = "INImage")]
109        #[unsafe(method(keyImage))]
110        #[unsafe(method_family = none)]
111        pub unsafe fn keyImage(&self) -> Option<Retained<INImage>>;
112    );
113}
114
115/// Methods declared on superclass `NSObject`.
116impl INIntent {
117    extern_methods!(
118        #[unsafe(method(init))]
119        #[unsafe(method_family = init)]
120        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
121
122        #[unsafe(method(new))]
123        #[unsafe(method_family = new)]
124        pub unsafe fn new() -> Retained<Self>;
125    );
126}