objc2_messages/generated/
MSMessageLiveLayout.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// The MSMessageLiveLayout is used to indicate a message should be rendered in Messages using an instance of `MSMessagesAppViewController` with a `presentationStyle` of `MSMessagesAppPresentationStyleTranscript`.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/messages/msmessagelivelayout?language=objc)
13    #[unsafe(super(MSMessageLayout, NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    #[cfg(feature = "MSMessageLayout")]
16    pub struct MSMessageLiveLayout;
17);
18
19#[cfg(feature = "MSMessageLayout")]
20extern_conformance!(
21    unsafe impl NSCopying for MSMessageLiveLayout {}
22);
23
24#[cfg(feature = "MSMessageLayout")]
25unsafe impl CopyingHelper for MSMessageLiveLayout {
26    type Result = Self;
27}
28
29#[cfg(feature = "MSMessageLayout")]
30extern_conformance!(
31    unsafe impl NSObjectProtocol for MSMessageLiveLayout {}
32);
33
34#[cfg(feature = "MSMessageLayout")]
35impl MSMessageLiveLayout {
36    extern_methods!(
37        #[cfg(feature = "MSMessageTemplateLayout")]
38        /// Parameter `alternateLayout`: The alternate layout of the message. This layout will be used on devices that don't support live layout or don't have the iMessage app installed.
39        #[unsafe(method(initWithAlternateLayout:))]
40        #[unsafe(method_family = init)]
41        pub unsafe fn initWithAlternateLayout(
42            this: Allocated<Self>,
43            alternate_layout: &MSMessageTemplateLayout,
44        ) -> Retained<Self>;
45
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[cfg(feature = "MSMessageTemplateLayout")]
51        /// The alternate layout of the message. This layout will be used on devices that don't support live layout or don't have the iMessage app installed.
52        #[unsafe(method(alternateLayout))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn alternateLayout(&self) -> Retained<MSMessageTemplateLayout>;
55    );
56}
57
58/// Methods declared on superclass `NSObject`.
59#[cfg(feature = "MSMessageLayout")]
60impl MSMessageLiveLayout {
61    extern_methods!(
62        #[unsafe(method(new))]
63        #[unsafe(method_family = new)]
64        pub unsafe fn new() -> Retained<Self>;
65    );
66}