objc2-messages 0.3.2

Bindings to the Messages 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::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;

use crate::*;

extern_class!(
    /// The MSStickerBrowserViewController class creates a controller object that manages a MSStickerBrowserView.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/messages/msstickerbrowserviewcontroller?language=objc)
    #[unsafe(super(UIViewController, UIResponder, NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "objc2-ui-kit")]
    pub struct MSStickerBrowserViewController;
);

#[cfg(all(feature = "MSStickerBrowserViewDataSource", feature = "objc2-ui-kit"))]
extern_conformance!(
    unsafe impl MSStickerBrowserViewDataSource for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
    unsafe impl NSCoding for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
    unsafe impl NSObjectProtocol for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
    unsafe impl UIAppearanceContainer for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
    unsafe impl UIContentContainer for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
    unsafe impl UIFocusEnvironment for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
    unsafe impl UIResponderStandardEditActions for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
    unsafe impl UITraitEnvironment for MSStickerBrowserViewController {}
);

#[cfg(feature = "objc2-ui-kit")]
impl MSStickerBrowserViewController {
    extern_methods!(
        #[cfg(feature = "MSStickerBrowserView")]
        /// Initializes a MSStickerBrowserViewController and configures it's MSStickerBrowserView with the provided sticker size class.
        #[unsafe(method(initWithStickerSize:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithStickerSize(
            this: Allocated<Self>,
            sticker_size: MSStickerSize,
        ) -> Retained<Self>;

        #[cfg(feature = "MSStickerBrowserView")]
        /// Returns the sticker browser view managed by the controller object.
        #[unsafe(method(stickerBrowserView))]
        #[unsafe(method_family = none)]
        pub unsafe fn stickerBrowserView(&self) -> Retained<MSStickerBrowserView>;

        #[cfg(feature = "MSStickerBrowserView")]
        /// Controls the size of the stickers are displayed at in the sticker browser view.
        #[unsafe(method(stickerSize))]
        #[unsafe(method_family = none)]
        pub unsafe fn stickerSize(&self) -> MSStickerSize;
    );
}

/// Methods declared on superclass `UIViewController`.
#[cfg(feature = "objc2-ui-kit")]
impl MSStickerBrowserViewController {
    extern_methods!(
        #[unsafe(method(initWithNibName:bundle:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithNibName_bundle(
            this: Allocated<Self>,
            nib_name_or_nil: Option<&NSString>,
            nib_bundle_or_nil: Option<&NSBundle>,
        ) -> Retained<Self>;

        /// # Safety
        ///
        /// `coder` possibly has further requirements.
        #[unsafe(method(initWithCoder:))]
        #[unsafe(method_family = init)]
        pub unsafe fn initWithCoder(
            this: Allocated<Self>,
            coder: &NSCoder,
        ) -> Option<Retained<Self>>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "objc2-ui-kit")]
impl MSStickerBrowserViewController {
    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(mtm: MainThreadMarker) -> Retained<Self>;
    );
}