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:))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn setDataSource(
160 &self,
161 data_source: Option<&ProtocolObject<dyn MSStickerBrowserViewDataSource>>,
162 );
163
164 #[cfg(feature = "objc2-core-foundation")]
165 #[unsafe(method(contentOffset))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn contentOffset(&self) -> CGPoint;
169
170 #[cfg(feature = "objc2-core-foundation")]
171 #[unsafe(method(setContentOffset:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn setContentOffset(&self, content_offset: CGPoint);
175
176 #[unsafe(method(contentInset))]
178 #[unsafe(method_family = none)]
179 pub unsafe fn contentInset(&self) -> UIEdgeInsets;
180
181 #[unsafe(method(setContentInset:))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn setContentInset(&self, content_inset: UIEdgeInsets);
185
186 #[cfg(feature = "objc2-core-foundation")]
187 #[unsafe(method(setContentOffset:animated:))]
189 #[unsafe(method_family = none)]
190 pub unsafe fn setContentOffset_animated(&self, content_offset: CGPoint, animated: bool);
191
192 #[unsafe(method(reloadData))]
194 #[unsafe(method_family = none)]
195 pub unsafe fn reloadData(&self);
196 );
197}
198
199#[cfg(feature = "objc2-ui-kit")]
201impl MSStickerBrowserView {
202 extern_methods!(
203 #[unsafe(method(initWithCoder:))]
204 #[unsafe(method_family = init)]
205 pub unsafe fn initWithCoder(
206 this: Allocated<Self>,
207 coder: &NSCoder,
208 ) -> Option<Retained<Self>>;
209 );
210}
211
212#[cfg(feature = "objc2-ui-kit")]
214impl MSStickerBrowserView {
215 extern_methods!(
216 #[unsafe(method(init))]
217 #[unsafe(method_family = init)]
218 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
219
220 #[unsafe(method(new))]
221 #[unsafe(method_family = new)]
222 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
223 );
224}