objc2_ui_kit/generated/
UIHoverEffect.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_protocol!(
10    /// A hover effect that can be applied to a `UIView` via a `UIHoverStyle`.
11    /// You don't conform to this protocol directly. Instead, you use a built-in
12    /// `UIHoverEffect` like `UIHoverAutomaticEffect`.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uihovereffect?language=objc)
15    pub unsafe trait UIHoverEffect: NSObjectProtocol + NSCopying + MainThreadOnly {}
16);
17
18extern_class!(
19    /// An effect that applies a highlight to the view on hover.
20    ///
21    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uihoverhighlighteffect?language=objc)
22    #[unsafe(super(NSObject))]
23    #[thread_kind = MainThreadOnly]
24    #[derive(Debug, PartialEq, Eq, Hash)]
25    pub struct UIHoverHighlightEffect;
26);
27
28extern_conformance!(
29    unsafe impl NSCopying for UIHoverHighlightEffect {}
30);
31
32unsafe impl CopyingHelper for UIHoverHighlightEffect {
33    type Result = Self;
34}
35
36extern_conformance!(
37    unsafe impl NSObjectProtocol for UIHoverHighlightEffect {}
38);
39
40extern_conformance!(
41    unsafe impl UIHoverEffect for UIHoverHighlightEffect {}
42);
43
44impl UIHoverHighlightEffect {
45    extern_methods!(
46        #[unsafe(method(effect))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn effect(mtm: MainThreadMarker) -> Retained<Self>;
49
50        #[unsafe(method(init))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
57    );
58}
59
60extern_class!(
61    /// An effect that can visually lift the view on hover where appropriate.
62    ///
63    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uihoverlifteffect?language=objc)
64    #[unsafe(super(NSObject))]
65    #[thread_kind = MainThreadOnly]
66    #[derive(Debug, PartialEq, Eq, Hash)]
67    pub struct UIHoverLiftEffect;
68);
69
70extern_conformance!(
71    unsafe impl NSCopying for UIHoverLiftEffect {}
72);
73
74unsafe impl CopyingHelper for UIHoverLiftEffect {
75    type Result = Self;
76}
77
78extern_conformance!(
79    unsafe impl NSObjectProtocol for UIHoverLiftEffect {}
80);
81
82extern_conformance!(
83    unsafe impl UIHoverEffect for UIHoverLiftEffect {}
84);
85
86impl UIHoverLiftEffect {
87    extern_methods!(
88        #[unsafe(method(effect))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn effect(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
102extern_class!(
103    /// A system-default hover effect that automatically selects the appropriate
104    /// effect based on the view to which it is applied.
105    ///
106    /// See also [Apple's documentation](https://developer.apple.com/documentation/uikit/uihoverautomaticeffect?language=objc)
107    #[unsafe(super(NSObject))]
108    #[thread_kind = MainThreadOnly]
109    #[derive(Debug, PartialEq, Eq, Hash)]
110    pub struct UIHoverAutomaticEffect;
111);
112
113extern_conformance!(
114    unsafe impl NSCopying for UIHoverAutomaticEffect {}
115);
116
117unsafe impl CopyingHelper for UIHoverAutomaticEffect {
118    type Result = Self;
119}
120
121extern_conformance!(
122    unsafe impl NSObjectProtocol for UIHoverAutomaticEffect {}
123);
124
125extern_conformance!(
126    unsafe impl UIHoverEffect for UIHoverAutomaticEffect {}
127);
128
129impl UIHoverAutomaticEffect {
130    extern_methods!(
131        #[unsafe(method(effect))]
132        #[unsafe(method_family = none)]
133        pub unsafe fn effect(mtm: MainThreadMarker) -> Retained<Self>;
134
135        #[unsafe(method(init))]
136        #[unsafe(method_family = init)]
137        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
138
139        #[unsafe(method(new))]
140        #[unsafe(method_family = new)]
141        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
142    );
143}