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 fn effect(&self) -> Retained<ProtocolObject<dyn UIHoverEffect>>;
41
42 #[cfg(feature = "UIHoverEffect")]
43 #[unsafe(method(setEffect:))]
45 #[unsafe(method_family = none)]
46 pub fn setEffect(&self, effect: &ProtocolObject<dyn UIHoverEffect>);
47
48 #[cfg(feature = "UIShape")]
49 #[unsafe(method(shape))]
52 #[unsafe(method_family = none)]
53 pub fn shape(&self) -> Option<Retained<UIShape>>;
54
55 #[cfg(feature = "UIShape")]
56 #[unsafe(method(setShape:))]
58 #[unsafe(method_family = none)]
59 pub fn setShape(&self, shape: Option<&UIShape>);
60
61 #[unsafe(method(isEnabled))]
65 #[unsafe(method_family = none)]
66 pub fn isEnabled(&self) -> bool;
67
68 #[unsafe(method(setEnabled:))]
70 #[unsafe(method_family = none)]
71 pub 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 fn styleWithShape(shape: Option<&UIShape>, mtm: MainThreadMarker) -> Retained<Self>;
87
88 #[unsafe(method(automaticStyle))]
90 #[unsafe(method_family = none)]
91 pub fn automaticStyle(mtm: MainThreadMarker) -> Retained<Self>;
92
93 #[unsafe(method(init))]
94 #[unsafe(method_family = init)]
95 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
96
97 #[unsafe(method(new))]
98 #[unsafe(method_family = new)]
99 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
100 );
101}
102
103#[cfg(all(feature = "UIResponder", feature = "UIView"))]
105impl UIView {
106 extern_methods!(
107 #[unsafe(method(hoverStyle))]
111 #[unsafe(method_family = none)]
112 pub fn hoverStyle(&self) -> Option<Retained<UIHoverStyle>>;
113
114 #[unsafe(method(setHoverStyle:))]
118 #[unsafe(method_family = none)]
119 pub fn setHoverStyle(&self, hover_style: Option<&UIHoverStyle>);
120 );
121}