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")]
21unsafe impl NSObjectProtocol for UICanvasFeedbackGenerator {}
22
23#[cfg(feature = "UIFeedbackGenerator")]
24impl UICanvasFeedbackGenerator {
25    extern_methods!(
26        #[cfg(feature = "objc2-core-foundation")]
27        /// Provide user feedback that an alignment occured, such as snapping to a guide or ruler.
28        /// - Parameter location: The location in the feedback's view where the alignment occured.
29        #[unsafe(method(alignmentOccurredAtLocation:))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn alignmentOccurredAtLocation(&self, location: CGPoint);
32
33        #[cfg(feature = "objc2-core-foundation")]
34        /// Provide user feedback that a path has been completed and/or recognized.
35        /// Can be used for things like path drawing and shape recognition.
36        /// - Parameter location: The location in the feedback's view where the completion occured.
37        #[unsafe(method(pathCompletedAtLocation:))]
38        #[unsafe(method_family = none)]
39        pub unsafe fn pathCompletedAtLocation(&self, location: CGPoint);
40    );
41}
42
43/// Methods declared on superclass `UIFeedbackGenerator`.
44#[cfg(feature = "UIFeedbackGenerator")]
45impl UICanvasFeedbackGenerator {
46    extern_methods!(
47        #[cfg(all(feature = "UIResponder", feature = "UIView"))]
48        /// initalize the generator with a view to attach it to the provided view as an interaction.
49        #[unsafe(method(feedbackGeneratorForView:))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn feedbackGeneratorForView(view: &UIView) -> Retained<Self>;
52
53        #[deprecated]
54        #[unsafe(method(init))]
55        #[unsafe(method_family = init)]
56        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61#[cfg(feature = "UIFeedbackGenerator")]
62impl UICanvasFeedbackGenerator {
63    extern_methods!(
64        #[unsafe(method(new))]
65        #[unsafe(method_family = new)]
66        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
67    );
68}