objc2_ui_kit/generated/
UISelectionFeedbackGenerator.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(UIFeedbackGenerator, NSObject))]
14 #[thread_kind = MainThreadOnly]
15 #[derive(Debug, PartialEq, Eq, Hash)]
16 #[cfg(feature = "UIFeedbackGenerator")]
17 pub struct UISelectionFeedbackGenerator;
18);
19
20#[cfg(feature = "UIFeedbackGenerator")]
21extern_conformance!(
22 unsafe impl NSObjectProtocol for UISelectionFeedbackGenerator {}
23);
24
25#[cfg(feature = "UIFeedbackGenerator")]
26impl UISelectionFeedbackGenerator {
27 extern_methods!(
28 #[unsafe(method(selectionChanged))]
30 #[unsafe(method_family = none)]
31 pub fn selectionChanged(&self);
32
33 #[cfg(feature = "objc2-core-foundation")]
34 #[unsafe(method(selectionChangedAtLocation:))]
37 #[unsafe(method_family = none)]
38 pub fn selectionChangedAtLocation(&self, location: CGPoint);
39 );
40}
41
42#[cfg(feature = "UIFeedbackGenerator")]
44impl UISelectionFeedbackGenerator {
45 extern_methods!(
46 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
47 #[unsafe(method(feedbackGeneratorForView:))]
49 #[unsafe(method_family = none)]
50 pub fn feedbackGeneratorForView(view: &UIView) -> Retained<Self>;
51
52 #[deprecated]
53 #[unsafe(method(init))]
54 #[unsafe(method_family = init)]
55 pub fn init(this: Allocated<Self>) -> Retained<Self>;
56 );
57}
58
59#[cfg(feature = "UIFeedbackGenerator")]
61impl UISelectionFeedbackGenerator {
62 extern_methods!(
63 #[unsafe(method(new))]
64 #[unsafe(method_family = new)]
65 pub fn new(mtm: MainThreadMarker) -> Retained<Self>;
66 );
67}