1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
//! 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::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;
use crate::*;
extern_class!(
/// The MSMessageTemplateLayout encapsulates properties used in the construction of UI
/// representing a message using the default message layout template.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/messages/msmessagetemplatelayout?language=objc)
#[unsafe(super(MSMessageLayout, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "MSMessageLayout")]
pub struct MSMessageTemplateLayout;
);
#[cfg(feature = "MSMessageLayout")]
extern_conformance!(
unsafe impl NSCopying for MSMessageTemplateLayout {}
);
#[cfg(feature = "MSMessageLayout")]
unsafe impl CopyingHelper for MSMessageTemplateLayout {
type Result = Self;
}
#[cfg(feature = "MSMessageLayout")]
extern_conformance!(
unsafe impl NSObjectProtocol for MSMessageTemplateLayout {}
);
#[cfg(feature = "MSMessageLayout")]
impl MSMessageTemplateLayout {
extern_methods!(
/// Text to be used as a caption related to the message content.
#[unsafe(method(caption))]
#[unsafe(method_family = none)]
pub unsafe fn caption(&self) -> Option<Retained<NSString>>;
/// Setter for [`caption`][Self::caption].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setCaption:))]
#[unsafe(method_family = none)]
pub unsafe fn setCaption(&self, caption: Option<&NSString>);
/// Text to be used as a subcaption related to the message content.
#[unsafe(method(subcaption))]
#[unsafe(method_family = none)]
pub unsafe fn subcaption(&self) -> Option<Retained<NSString>>;
/// Setter for [`subcaption`][Self::subcaption].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setSubcaption:))]
#[unsafe(method_family = none)]
pub unsafe fn setSubcaption(&self, subcaption: Option<&NSString>);
/// Text to be drawn right aligned on the same line as the caption text.
#[unsafe(method(trailingCaption))]
#[unsafe(method_family = none)]
pub unsafe fn trailingCaption(&self) -> Option<Retained<NSString>>;
/// Setter for [`trailingCaption`][Self::trailingCaption].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setTrailingCaption:))]
#[unsafe(method_family = none)]
pub unsafe fn setTrailingCaption(&self, trailing_caption: Option<&NSString>);
/// Text to be drawn right aligned on the same line as the subcaption text.
#[unsafe(method(trailingSubcaption))]
#[unsafe(method_family = none)]
pub unsafe fn trailingSubcaption(&self) -> Option<Retained<NSString>>;
/// Setter for [`trailingSubcaption`][Self::trailingSubcaption].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setTrailingSubcaption:))]
#[unsafe(method_family = none)]
pub unsafe fn setTrailingSubcaption(&self, trailing_subcaption: Option<&NSString>);
#[cfg(feature = "objc2-ui-kit")]
/// A UIImage object used to construct the message representation in the conversation transcript.
///
/// When this property and the mediaURL property are both set, the mediaURL
/// property will be ignored.
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub unsafe fn image(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "objc2-ui-kit")]
/// Setter for [`image`][Self::image].
#[unsafe(method(setImage:))]
#[unsafe(method_family = none)]
pub unsafe fn setImage(&self, image: Option<&UIImage>);
/// The URL to a media file used to construct the message representation in the conversation transcript.
///
/// This must be a file URL, the data contained in the file must conform to
/// kUTTypeImage or kUTTypeMovie. When image property and
/// this property are both set, then this property will be ignored.
#[unsafe(method(mediaFileURL))]
#[unsafe(method_family = none)]
pub unsafe fn mediaFileURL(&self) -> Option<Retained<NSURL>>;
/// Setter for [`mediaFileURL`][Self::mediaFileURL].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setMediaFileURL:))]
#[unsafe(method_family = none)]
pub unsafe fn setMediaFileURL(&self, media_file_url: Option<&NSURL>);
/// Title text associated with the image or media .
#[unsafe(method(imageTitle))]
#[unsafe(method_family = none)]
pub unsafe fn imageTitle(&self) -> Option<Retained<NSString>>;
/// Setter for [`imageTitle`][Self::imageTitle].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setImageTitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setImageTitle(&self, image_title: Option<&NSString>);
/// Subtitle text associated with the image or media .
#[unsafe(method(imageSubtitle))]
#[unsafe(method_family = none)]
pub unsafe fn imageSubtitle(&self) -> Option<Retained<NSString>>;
/// Setter for [`imageSubtitle`][Self::imageSubtitle].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setImageSubtitle:))]
#[unsafe(method_family = none)]
pub unsafe fn setImageSubtitle(&self, image_subtitle: Option<&NSString>);
);
}
/// Methods declared on superclass `NSObject`.
#[cfg(feature = "MSMessageLayout")]
impl MSMessageTemplateLayout {
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>;
);
}