objc2_ui_kit/generated/
UICanvasFeedbackGenerator.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uicanvasfeedbackgenerator?language=objc)
13    #[unsafe(super(UIFeedbackGenerator, NSObject))]
14    #[thread_kind = MainThreadOnly]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "UIFeedbackGenerator")]
17    pub struct UICanvasFeedbackGenerator;
18);
19
20#[cfg(feature = "UIFeedbackGenerator")]
21extern_conformance!(
22    unsafe impl NSObjectProtocol for UICanvasFeedbackGenerator {}
23);
24
25#[cfg(feature = "UIFeedbackGenerator")]
26impl UICanvasFeedbackGenerator {
27    extern_methods!(
28        #[cfg(feature = "objc2-core-foundation")]
29        /// Provide user feedback that an alignment occured, such as snapping to a guide or ruler.
30        /// - Parameter location: The location in the feedback's view where the alignment occured.
31        #[unsafe(method(alignmentOccurredAtLocation:))]
32        #[unsafe(method_family = none)]
33        pub unsafe fn alignmentOccurredAtLocation(&self, location: CGPoint);
34
35        #[cfg(feature = "objc2-core-foundation")]
36        /// Provide user feedback that a path has been completed and/or recognized.
37        /// Can be used for things like path drawing and shape recognition.
38        /// - Parameter location: The location in the feedback's view where the completion occured.
39        #[unsafe(method(pathCompletedAtLocation:))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn pathCompletedAtLocation(&self, location: CGPoint);
42    );
43}
44
45/// Methods declared on superclass `UIFeedbackGenerator`.
46#[cfg(feature = "UIFeedbackGenerator")]
47impl UICanvasFeedbackGenerator {
48    extern_methods!(
49        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
50        /// initalize the generator with a view to attach it to the provided view as an interaction.
51        #[unsafe(method(feedbackGeneratorForView:))]
52        #[unsafe(method_family = none)]
53        pub unsafe fn feedbackGeneratorForView(view: &UIView) -> Retained<Self>;
54
55        #[deprecated]
56        #[unsafe(method(init))]
57        #[unsafe(method_family = init)]
58        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
59    );
60}
61
62/// Methods declared on superclass `NSObject`.
63#[cfg(feature = "UIFeedbackGenerator")]
64impl UICanvasFeedbackGenerator {
65    extern_methods!(
66        #[unsafe(method(new))]
67        #[unsafe(method_family = new)]
68        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
69    );
70}