//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsalignmentfeedbacktoken?language=objc)
    pub unsafe trait NSAlignmentFeedbackToken: NSObjectProtocol {}
);

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/appkit/nsalignmentfeedbackfilter?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct NSAlignmentFeedbackFilter;
);

extern_conformance!(
    unsafe impl NSObjectProtocol for NSAlignmentFeedbackFilter {}
);

impl NSAlignmentFeedbackFilter {
    extern_methods!(
        #[cfg(feature = "NSEvent")]
        #[unsafe(method(inputEventMask))]
        #[unsafe(method_family = none)]
        pub fn inputEventMask() -> NSEventMask;

        #[cfg(feature = "NSEvent")]
        #[unsafe(method(updateWithEvent:))]
        #[unsafe(method_family = none)]
        pub fn updateWithEvent(&self, event: &NSEvent);

        #[cfg(all(feature = "NSGestureRecognizer", feature = "NSPanGestureRecognizer"))]
        #[unsafe(method(updateWithPanRecognizer:))]
        #[unsafe(method_family = none)]
        pub fn updateWithPanRecognizer(&self, pan_recognizer: &NSPanGestureRecognizer);

        #[cfg(all(feature = "NSResponder", feature = "NSView"))]
        #[unsafe(method(alignmentFeedbackTokenForMovementInView:previousPoint:alignedPoint:defaultPoint:))]
        #[unsafe(method_family = none)]
        pub fn alignmentFeedbackTokenForMovementInView_previousPoint_alignedPoint_defaultPoint(
            &self,
            view: Option<&NSView>,
            previous_point: NSPoint,
            aligned_point: NSPoint,
            default_point: NSPoint,
        ) -> Option<Retained<ProtocolObject<dyn NSAlignmentFeedbackToken>>>;

        #[cfg(all(
            feature = "NSResponder",
            feature = "NSView",
            feature = "objc2-core-foundation"
        ))]
        #[unsafe(method(alignmentFeedbackTokenForHorizontalMovementInView:previousX:alignedX:defaultX:))]
        #[unsafe(method_family = none)]
        pub fn alignmentFeedbackTokenForHorizontalMovementInView_previousX_alignedX_defaultX(
            &self,
            view: Option<&NSView>,
            previous_x: CGFloat,
            aligned_x: CGFloat,
            default_x: CGFloat,
        ) -> Option<Retained<ProtocolObject<dyn NSAlignmentFeedbackToken>>>;

        #[cfg(all(
            feature = "NSResponder",
            feature = "NSView",
            feature = "objc2-core-foundation"
        ))]
        #[unsafe(method(alignmentFeedbackTokenForVerticalMovementInView:previousY:alignedY:defaultY:))]
        #[unsafe(method_family = none)]
        pub fn alignmentFeedbackTokenForVerticalMovementInView_previousY_alignedY_defaultY(
            &self,
            view: Option<&NSView>,
            previous_y: CGFloat,
            aligned_y: CGFloat,
            default_y: CGFloat,
        ) -> Option<Retained<ProtocolObject<dyn NSAlignmentFeedbackToken>>>;

        #[cfg(feature = "NSHapticFeedback")]
        #[unsafe(method(performFeedback:performanceTime:))]
        #[unsafe(method_family = none)]
        pub fn performFeedback_performanceTime(
            &self,
            alignment_feedback_tokens: &NSArray<ProtocolObject<dyn NSAlignmentFeedbackToken>>,
            performance_time: NSHapticFeedbackPerformanceTime,
        );
    );
}

/// Methods declared on superclass `NSObject`.
impl NSAlignmentFeedbackFilter {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub fn new() -> Retained<Self>;
    );
}

impl DefaultRetained for NSAlignmentFeedbackFilter {
    #[inline]
    fn default_retained() -> Retained<Self> {
        Self::new()
    }
}
