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
21extern_conformance!(
22 unsafe impl NSCopying for UIHoverStyle {}
23);
24
25unsafe impl CopyingHelper for UIHoverStyle {
26 type Result = Self;
27}
28
29extern_conformance!(
30 unsafe impl NSObjectProtocol for UIHoverStyle {}
31);
32
33impl UIHoverStyle {
34 extern_methods!(
35 #[cfg(feature = "UIHoverEffect")]
36 #[unsafe(method(effect))]
39 #[unsafe(method_family = none)]
40 pub unsafe fn effect(&self) -> Retained<ProtocolObject<dyn UIHoverEffect>>;
41
42 #[cfg(feature = "UIHoverEffect")]
43 #[unsafe(method(setEffect:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn setEffect(&self, effect: &ProtocolObject<dyn UIHoverEffect>);
47
48 #[cfg(feature = "UIShape")]
49 #[unsafe(method(shape))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn shape(&self) -> Option<Retained<UIShape>>;
54
55 #[cfg(feature = "UIShape")]
56 #[unsafe(method(setShape:))]
58 #[unsafe(method_family = none)]
59 pub unsafe fn setShape(&self, shape: Option<&UIShape>);
60
61 #[unsafe(method(isEnabled))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn isEnabled(&self) -> bool;
67
68 #[unsafe(method(setEnabled:))]
70 #[unsafe(method_family = none)]
71 pub unsafe fn setEnabled(&self, enabled: bool);
72
73 #[cfg(all(feature = "UIHoverEffect", feature = "UIShape"))]
74 #[unsafe(method(styleWithEffect:shape:))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn styleWithEffect_shape(
78 effect: &ProtocolObject<dyn UIHoverEffect>,
79 shape: Option<&UIShape>,
80 ) -> Retained<Self>;
81
82 #[cfg(feature = "UIShape")]
83 #[unsafe(method(styleWithShape:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn styleWithShape(
87 shape: Option<&UIShape>,
88 mtm: MainThreadMarker,
89 ) -> Retained<Self>;
90
91 #[unsafe(method(automaticStyle))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn automaticStyle(mtm: MainThreadMarker) -> Retained<Self>;
95
96 #[unsafe(method(init))]
97 #[unsafe(method_family = init)]
98 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100 #[unsafe(method(new))]
101 #[unsafe(method_family = new)]
102 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
103 );
104}
105
106#[cfg(all(feature = "UIResponder", feature = "UIView"))]
108impl UIView {
109 extern_methods!(
110 #[unsafe(method(hoverStyle))]
114 #[unsafe(method_family = none)]
115 pub unsafe fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>;
116
117 #[unsafe(method(setHoverStyle:))]
119 #[unsafe(method_family = none)]
120 pub unsafe fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>);
121 );
122}