objc2_ui_kit/generated/
UIInteraction.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_protocol!(
11 pub unsafe trait UIInteraction: NSObjectProtocol + MainThreadOnly {
13 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
14 #[unsafe(method(view))]
15 #[unsafe(method_family = none)]
16 fn view(&self) -> Option<Retained<UIView>>;
17
18 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
19 #[unsafe(method(willMoveToView:))]
20 #[unsafe(method_family = none)]
21 fn willMoveToView(&self, view: Option<&UIView>);
22
23 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
24 #[unsafe(method(didMoveToView:))]
25 #[unsafe(method_family = none)]
26 fn didMoveToView(&self, view: Option<&UIView>);
27 }
28);
29
30#[cfg(all(feature = "UIResponder", feature = "UIView"))]
32impl UIView {
33 extern_methods!(
34 #[unsafe(method(addInteraction:))]
35 #[unsafe(method_family = none)]
36 pub fn addInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>);
37
38 #[unsafe(method(removeInteraction:))]
39 #[unsafe(method_family = none)]
40 pub fn removeInteraction(&self, interaction: &ProtocolObject<dyn UIInteraction>);
41
42 #[unsafe(method(interactions))]
43 #[unsafe(method_family = none)]
44 pub fn interactions(&self) -> Retained<NSArray<ProtocolObject<dyn UIInteraction>>>;
45
46 #[unsafe(method(setInteractions:))]
50 #[unsafe(method_family = none)]
51 pub fn setInteractions(&self, interactions: &NSArray<ProtocolObject<dyn UIInteraction>>);
52 );
53}