objc2_messages/generated/
MSStickerBrowserView.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-quartz-core")]
10use objc2_quartz_core::*;
11#[cfg(feature = "objc2-ui-kit")]
12use objc2_ui_kit::*;
13
14use crate::*;
15
16#[repr(transparent)]
21#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
22pub struct MSStickerSize(pub NSInteger);
23impl MSStickerSize {
24 #[doc(alias = "MSStickerSizeSmall")]
25 pub const Small: Self = Self(0);
26 #[doc(alias = "MSStickerSizeRegular")]
27 pub const Regular: Self = Self(1);
28 #[doc(alias = "MSStickerSizeLarge")]
29 pub const Large: Self = Self(2);
30}
31
32unsafe impl Encode for MSStickerSize {
33 const ENCODING: Encoding = NSInteger::ENCODING;
34}
35
36unsafe impl RefEncode for MSStickerSize {
37 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
38}
39
40extern_class!(
41 #[unsafe(super(UIView, UIResponder, NSObject))]
50 #[derive(Debug, PartialEq, Eq, Hash)]
51 #[cfg(feature = "objc2-ui-kit")]
52 pub struct MSStickerBrowserView;
53);
54
55#[cfg(all(feature = "objc2-quartz-core", feature = "objc2-ui-kit"))]
56extern_conformance!(
57 unsafe impl CALayerDelegate for MSStickerBrowserView {}
58);
59
60#[cfg(feature = "objc2-ui-kit")]
61extern_conformance!(
62 unsafe impl NSCoding for MSStickerBrowserView {}
63);
64
65#[cfg(feature = "objc2-ui-kit")]
66extern_conformance!(
67 unsafe impl NSObjectProtocol for MSStickerBrowserView {}
68);
69
70#[cfg(feature = "objc2-ui-kit")]
71extern_conformance!(
72 unsafe impl UIAppearance for MSStickerBrowserView {}
73);
74
75#[cfg(feature = "objc2-ui-kit")]
76extern_conformance!(
77 unsafe impl UIAppearanceContainer for MSStickerBrowserView {}
78);
79
80#[cfg(feature = "objc2-ui-kit")]
81extern_conformance!(
82 unsafe impl UICoordinateSpace for MSStickerBrowserView {}
83);
84
85#[cfg(feature = "objc2-ui-kit")]
86extern_conformance!(
87 unsafe impl UIDynamicItem for MSStickerBrowserView {}
88);
89
90#[cfg(feature = "objc2-ui-kit")]
91extern_conformance!(
92 unsafe impl UIFocusEnvironment for MSStickerBrowserView {}
93);
94
95#[cfg(feature = "objc2-ui-kit")]
96extern_conformance!(
97 unsafe impl UIFocusItem for MSStickerBrowserView {}
98);
99
100#[cfg(feature = "objc2-ui-kit")]
101extern_conformance!(
102 unsafe impl UIFocusItemContainer for MSStickerBrowserView {}
103);
104
105#[cfg(feature = "objc2-ui-kit")]
106extern_conformance!(
107 unsafe impl UIResponderStandardEditActions for MSStickerBrowserView {}
108);
109
110#[cfg(feature = "objc2-ui-kit")]
111extern_conformance!(
112 unsafe impl UITraitEnvironment for MSStickerBrowserView {}
113);
114
115#[cfg(feature = "objc2-ui-kit")]
116impl MSStickerBrowserView {
117 extern_methods!(
118 #[cfg(feature = "objc2-core-foundation")]
119 #[unsafe(method(initWithFrame:))]
121 #[unsafe(method_family = init)]
122 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
123
124 #[cfg(feature = "objc2-core-foundation")]
125 #[unsafe(method(initWithFrame:stickerSize:))]
134 #[unsafe(method_family = init)]
135 pub unsafe fn initWithFrame_stickerSize(
136 this: Allocated<Self>,
137 frame: CGRect,
138 sticker_size: MSStickerSize,
139 ) -> Retained<Self>;
140
141 #[unsafe(method(stickerSize))]
143 #[unsafe(method_family = none)]
144 pub unsafe fn stickerSize(&self) -> MSStickerSize;
145
146 #[cfg(feature = "MSStickerBrowserViewDataSource")]
147 #[unsafe(method(dataSource))]
149 #[unsafe(method_family = none)]
150 pub unsafe fn dataSource(
151 &self,
152 ) -> Option<Retained<ProtocolObject<dyn MSStickerBrowserViewDataSource>>>;
153
154 #[cfg(feature = "MSStickerBrowserViewDataSource")]
155 #[unsafe(method(setDataSource:))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn setDataSource(
161 &self,
162 data_source: Option<&ProtocolObject<dyn MSStickerBrowserViewDataSource>>,
163 );
164
165 #[cfg(feature = "objc2-core-foundation")]
166 #[unsafe(method(contentOffset))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn contentOffset(&self) -> CGPoint;
170
171 #[cfg(feature = "objc2-core-foundation")]
172 #[unsafe(method(setContentOffset:))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn setContentOffset(&self, content_offset: CGPoint);
176
177 #[unsafe(method(contentInset))]
179 #[unsafe(method_family = none)]
180 pub unsafe fn contentInset(&self) -> UIEdgeInsets;
181
182 #[unsafe(method(setContentInset:))]
184 #[unsafe(method_family = none)]
185 pub unsafe fn setContentInset(&self, content_inset: UIEdgeInsets);
186
187 #[cfg(feature = "objc2-core-foundation")]
188 #[unsafe(method(setContentOffset:animated:))]
190 #[unsafe(method_family = none)]
191 pub unsafe fn setContentOffset_animated(&self, content_offset: CGPoint, animated: bool);
192
193 #[unsafe(method(reloadData))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn reloadData(&self);
197 );
198}
199
200#[cfg(feature = "objc2-ui-kit")]
202impl MSStickerBrowserView {
203 extern_methods!(
204 #[unsafe(method(initWithCoder:))]
208 #[unsafe(method_family = init)]
209 pub unsafe fn initWithCoder(
210 this: Allocated<Self>,
211 coder: &NSCoder,
212 ) -> Option<Retained<Self>>;
213
214 #[unsafe(method(init))]
215 #[unsafe(method_family = init)]
216 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
217 );
218}
219
220#[cfg(feature = "objc2-ui-kit")]
222impl MSStickerBrowserView {
223 extern_methods!(
224 #[unsafe(method(new))]
225 #[unsafe(method_family = new)]
226 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
227 );
228}