objc2_intents/generated/
INObject.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct INObject;
15);
16
17#[cfg(feature = "INSpeakable")]
18extern_conformance!(
19 unsafe impl INSpeakable for INObject {}
20);
21
22extern_conformance!(
23 unsafe impl NSCoding for INObject {}
24);
25
26extern_conformance!(
27 unsafe impl NSCopying for INObject {}
28);
29
30unsafe impl CopyingHelper for INObject {
31 type Result = Self;
32}
33
34extern_conformance!(
35 unsafe impl NSObjectProtocol for INObject {}
36);
37
38extern_conformance!(
39 unsafe impl NSSecureCoding for INObject {}
40);
41
42impl INObject {
43 extern_methods!(
44 #[unsafe(method(init))]
45 #[unsafe(method_family = init)]
46 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
47
48 #[unsafe(method(initWithIdentifier:displayString:pronunciationHint:))]
49 #[unsafe(method_family = init)]
50 pub unsafe fn initWithIdentifier_displayString_pronunciationHint(
51 this: Allocated<Self>,
52 identifier: Option<&NSString>,
53 display_string: &NSString,
54 pronunciation_hint: Option<&NSString>,
55 ) -> Retained<Self>;
56
57 #[unsafe(method(initWithIdentifier:displayString:))]
58 #[unsafe(method_family = init)]
59 pub unsafe fn initWithIdentifier_displayString(
60 this: Allocated<Self>,
61 identifier: Option<&NSString>,
62 display_string: &NSString,
63 ) -> Retained<Self>;
64
65 #[cfg(feature = "INImage")]
66 #[unsafe(method(initWithIdentifier:displayString:subtitleString:displayImage:))]
67 #[unsafe(method_family = init)]
68 pub unsafe fn initWithIdentifier_displayString_subtitleString_displayImage(
69 this: Allocated<Self>,
70 identifier: Option<&NSString>,
71 display_string: &NSString,
72 subtitle_string: Option<&NSString>,
73 display_image: Option<&INImage>,
74 ) -> Retained<Self>;
75
76 #[cfg(feature = "INImage")]
77 #[unsafe(method(initWithIdentifier:displayString:pronunciationHint:subtitleString:displayImage:))]
78 #[unsafe(method_family = init)]
79 pub unsafe fn initWithIdentifier_displayString_pronunciationHint_subtitleString_displayImage(
80 this: Allocated<Self>,
81 identifier: Option<&NSString>,
82 display_string: &NSString,
83 pronunciation_hint: Option<&NSString>,
84 subtitle_string: Option<&NSString>,
85 display_image: Option<&INImage>,
86 ) -> Retained<Self>;
87
88 #[unsafe(method(identifier))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn identifier(&self) -> Option<Retained<NSString>>;
91
92 #[unsafe(method(displayString))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn displayString(&self) -> Retained<NSString>;
95
96 #[unsafe(method(pronunciationHint))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn pronunciationHint(&self) -> Option<Retained<NSString>>;
99
100 #[unsafe(method(subtitleString))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn subtitleString(&self) -> Option<Retained<NSString>>;
103
104 #[unsafe(method(setSubtitleString:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn setSubtitleString(&self, subtitle_string: Option<&NSString>);
110
111 #[cfg(feature = "INImage")]
112 #[unsafe(method(displayImage))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn displayImage(&self) -> Option<Retained<INImage>>;
115
116 #[cfg(feature = "INImage")]
117 #[unsafe(method(setDisplayImage:))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn setDisplayImage(&self, display_image: Option<&INImage>);
121
122 #[cfg(feature = "INSpeakableString")]
123 #[unsafe(method(alternativeSpeakableMatches))]
124 #[unsafe(method_family = none)]
125 pub unsafe fn alternativeSpeakableMatches(
126 &self,
127 ) -> Option<Retained<NSArray<INSpeakableString>>>;
128
129 #[cfg(feature = "INSpeakableString")]
130 #[unsafe(method(setAlternativeSpeakableMatches:))]
132 #[unsafe(method_family = none)]
133 pub unsafe fn setAlternativeSpeakableMatches(
134 &self,
135 alternative_speakable_matches: Option<&NSArray<INSpeakableString>>,
136 );
137 );
138}
139
140impl INObject {
142 extern_methods!(
143 #[unsafe(method(new))]
144 #[unsafe(method_family = new)]
145 pub unsafe fn new() -> Retained<Self>;
146 );
147}