//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIToolTipInteraction;

    unsafe impl ClassType for UIToolTipInteraction {
        type Super = NSObject;
        type Mutability = MainThreadOnly;
    }
);

unsafe impl NSObjectProtocol for UIToolTipInteraction {}

#[cfg(feature = "UIInteraction")]
unsafe impl UIInteraction for UIToolTipInteraction {}

extern_methods!(
    unsafe impl UIToolTipInteraction {
        #[method_id(@__retain_semantics Other delegate)]
        pub unsafe fn delegate(
            &self,
        ) -> Option<Retained<ProtocolObject<dyn UIToolTipInteractionDelegate>>>;

        #[method(setDelegate:)]
        pub unsafe fn setDelegate(
            &self,
            delegate: Option<&ProtocolObject<dyn UIToolTipInteractionDelegate>>,
        );

        #[method(isEnabled)]
        pub unsafe fn isEnabled(&self) -> bool;

        #[method(setEnabled:)]
        pub unsafe fn setEnabled(&self, enabled: bool);

        #[method_id(@__retain_semantics Other defaultToolTip)]
        pub unsafe fn defaultToolTip(&self) -> Option<Retained<NSString>>;

        #[method(setDefaultToolTip:)]
        pub unsafe fn setDefaultToolTip(&self, default_tool_tip: Option<&NSString>);

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[method_id(@__retain_semantics Init initWithDefaultToolTip:)]
        pub unsafe fn initWithDefaultToolTip(
            this: Allocated<Self>,
            default_tool_tip: &NSString,
        ) -> Retained<Self>;
    }
);

extern_methods!(
    /// Methods declared on superclass `NSObject`
    unsafe impl UIToolTipInteraction {
        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
    }
);

extern_class!(
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct UIToolTipConfiguration;

    unsafe impl ClassType for UIToolTipConfiguration {
        type Super = NSObject;
        type Mutability = InteriorMutable;
    }
);

unsafe impl NSObjectProtocol for UIToolTipConfiguration {}

extern_methods!(
    unsafe impl UIToolTipConfiguration {
        #[method_id(@__retain_semantics Other toolTip)]
        pub unsafe fn toolTip(&self) -> Retained<NSString>;

        #[method(sourceRect)]
        pub unsafe fn sourceRect(&self) -> CGRect;

        #[method_id(@__retain_semantics Other configurationWithToolTip:)]
        pub unsafe fn configurationWithToolTip(tool_tip: &NSString) -> Retained<Self>;

        #[method_id(@__retain_semantics Other configurationWithToolTip:inRect:)]
        pub unsafe fn configurationWithToolTip_inRect(
            tool_tip: &NSString,
            source_rect: CGRect,
        ) -> Retained<Self>;

        #[method_id(@__retain_semantics New new)]
        pub unsafe fn new() -> Retained<Self>;

        #[method_id(@__retain_semantics Init init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    }
);

extern_protocol!(
    pub unsafe trait UIToolTipInteractionDelegate: NSObjectProtocol {
        #[optional]
        #[method_id(@__retain_semantics Other toolTipInteraction:configurationAtPoint:)]
        unsafe fn toolTipInteraction_configurationAtPoint(
            &self,
            interaction: &UIToolTipInteraction,
            point: CGPoint,
        ) -> Option<Retained<UIToolTipConfiguration>>;
    }

    unsafe impl ProtocolType for dyn UIToolTipInteractionDelegate {}
);
