objc2_ui_kit/generated/
UIHoverStyle.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
16 #[thread_kind = MainThreadOnly]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct UIHoverStyle;
19);
20
21unsafe impl NSCopying for UIHoverStyle {}
22
23unsafe impl CopyingHelper for UIHoverStyle {
24 type Result = Self;
25}
26
27unsafe impl NSObjectProtocol for UIHoverStyle {}
28
29impl UIHoverStyle {
30 extern_methods!(
31 #[cfg(feature = "UIHoverEffect")]
32 #[unsafe(method(effect))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn effect(&self) -> Retained<ProtocolObject<dyn UIHoverEffect>>;
37
38 #[cfg(feature = "UIHoverEffect")]
39 #[unsafe(method(setEffect:))]
41 #[unsafe(method_family = none)]
42 pub unsafe fn setEffect(&self, effect: &ProtocolObject<dyn UIHoverEffect>);
43
44 #[cfg(feature = "UIShape")]
45 #[unsafe(method(shape))]
48 #[unsafe(method_family = none)]
49 pub unsafe fn shape(&self) -> Option<Retained<UIShape>>;
50
51 #[cfg(feature = "UIShape")]
52 #[unsafe(method(setShape:))]
54 #[unsafe(method_family = none)]
55 pub unsafe fn setShape(&self, shape: Option<&UIShape>);
56
57 #[unsafe(method(isEnabled))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn isEnabled(&self) -> bool;
63
64 #[unsafe(method(setEnabled:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setEnabled(&self, enabled: bool);
68
69 #[cfg(all(feature = "UIHoverEffect", feature = "UIShape"))]
70 #[unsafe(method(styleWithEffect:shape:))]
72 #[unsafe(method_family = none)]
73 pub unsafe fn styleWithEffect_shape(
74 effect: &ProtocolObject<dyn UIHoverEffect>,
75 shape: Option<&UIShape>,
76 ) -> Retained<Self>;
77
78 #[cfg(feature = "UIShape")]
79 #[unsafe(method(styleWithShape:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn styleWithShape(
83 shape: Option<&UIShape>,
84 mtm: MainThreadMarker,
85 ) -> Retained<Self>;
86
87 #[unsafe(method(automaticStyle))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn automaticStyle(mtm: MainThreadMarker) -> Retained<Self>;
91
92 #[unsafe(method(init))]
93 #[unsafe(method_family = init)]
94 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
95
96 #[unsafe(method(new))]
97 #[unsafe(method_family = new)]
98 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
99 );
100}
101
102#[cfg(all(feature = "UIResponder", feature = "UIView"))]
104impl UIView {
105 extern_methods!(
106 #[unsafe(method(hoverStyle))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>;
112
113 #[unsafe(method(setHoverStyle:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>);
117 );
118}