use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;
#[cfg(feature = "objc2-quartz-core")]
use objc2_quartz_core::*;
#[cfg(feature = "objc2-ui-kit")]
use objc2_ui_kit::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MSStickerSize(pub NSInteger);
impl MSStickerSize {
#[doc(alias = "MSStickerSizeSmall")]
pub const Small: Self = Self(0);
#[doc(alias = "MSStickerSizeRegular")]
pub const Regular: Self = Self(1);
#[doc(alias = "MSStickerSizeLarge")]
pub const Large: Self = Self(2);
}
unsafe impl Encode for MSStickerSize {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for MSStickerSize {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(UIView, UIResponder, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2-ui-kit")]
pub struct MSStickerBrowserView;
);
#[cfg(all(feature = "objc2-quartz-core", feature = "objc2-ui-kit"))]
extern_conformance!(
unsafe impl CALayerDelegate for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl NSCoding for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl NSObjectProtocol for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIAppearance for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIAppearanceContainer for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UICoordinateSpace for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIDynamicItem for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIFocusEnvironment for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIFocusItem for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIFocusItemContainer for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UIResponderStandardEditActions for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
extern_conformance!(
unsafe impl UITraitEnvironment for MSStickerBrowserView {}
);
#[cfg(feature = "objc2-ui-kit")]
impl MSStickerBrowserView {
extern_methods!(
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithFrame:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(initWithFrame:stickerSize:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithFrame_stickerSize(
this: Allocated<Self>,
frame: CGRect,
sticker_size: MSStickerSize,
) -> Retained<Self>;
#[unsafe(method(stickerSize))]
#[unsafe(method_family = none)]
pub unsafe fn stickerSize(&self) -> MSStickerSize;
#[cfg(feature = "MSStickerBrowserViewDataSource")]
#[unsafe(method(dataSource))]
#[unsafe(method_family = none)]
pub unsafe fn dataSource(
&self,
) -> Option<Retained<ProtocolObject<dyn MSStickerBrowserViewDataSource>>>;
#[cfg(feature = "MSStickerBrowserViewDataSource")]
#[unsafe(method(setDataSource:))]
#[unsafe(method_family = none)]
pub unsafe fn setDataSource(
&self,
data_source: Option<&ProtocolObject<dyn MSStickerBrowserViewDataSource>>,
);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(contentOffset))]
#[unsafe(method_family = none)]
pub unsafe fn contentOffset(&self) -> CGPoint;
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setContentOffset:))]
#[unsafe(method_family = none)]
pub unsafe fn setContentOffset(&self, content_offset: CGPoint);
#[unsafe(method(contentInset))]
#[unsafe(method_family = none)]
pub unsafe fn contentInset(&self) -> UIEdgeInsets;
#[unsafe(method(setContentInset:))]
#[unsafe(method_family = none)]
pub unsafe fn setContentInset(&self, content_inset: UIEdgeInsets);
#[cfg(feature = "objc2-core-foundation")]
#[unsafe(method(setContentOffset:animated:))]
#[unsafe(method_family = none)]
pub unsafe fn setContentOffset_animated(&self, content_offset: CGPoint, animated: bool);
#[unsafe(method(reloadData))]
#[unsafe(method_family = none)]
pub unsafe fn reloadData(&self);
);
}
#[cfg(feature = "objc2-ui-kit")]
impl MSStickerBrowserView {
extern_methods!(
#[unsafe(method(initWithCoder:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithCoder(
this: Allocated<Self>,
coder: &NSCoder,
) -> Option<Retained<Self>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(feature = "objc2-ui-kit")]
impl MSStickerBrowserView {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}