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 crate::*;

extern_protocol!(
    /// The MSStickerBrowserViewDataSource protocol declares the methods that the Sticker Browser View uses to access the contents of its data source object.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/messages/msstickerbrowserviewdatasource?language=objc)
    pub unsafe trait MSStickerBrowserViewDataSource: NSObjectProtocol {
        #[cfg(all(feature = "MSStickerBrowserView", feature = "objc2-ui-kit"))]
        /// Returns the number of Stickers that the sticker browser should show.
        ///
        /// Parameter `stickerBrowserView`: The sticker browser view .
        ///
        /// Returns: The number of stickers.
        #[unsafe(method(numberOfStickersInStickerBrowserView:))]
        #[unsafe(method_family = none)]
        unsafe fn numberOfStickersInStickerBrowserView(
            &self,
            sticker_browser_view: &MSStickerBrowserView,
        ) -> NSInteger;

        #[cfg(all(
            feature = "MSSticker",
            feature = "MSStickerBrowserView",
            feature = "objc2-ui-kit"
        ))]
        /// Returns the sticker that the sticker browser should show in the browser.
        ///
        /// Parameter `stickerBrowserView`: The sticker browser view.
        ///
        /// Parameter `index`: The index of the sticker to show.
        ///
        /// Returns: A MSSticker object.
        #[unsafe(method(stickerBrowserView:stickerAtIndex:))]
        #[unsafe(method_family = none)]
        unsafe fn stickerBrowserView_stickerAtIndex(
            &self,
            sticker_browser_view: &MSStickerBrowserView,
            index: NSInteger,
        ) -> Retained<MSSticker>;
    }
);