use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSAccessibilityCustomAction;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSAccessibilityCustomAction {}
);
impl NSAccessibilityCustomAction {
extern_methods!(
#[cfg(feature = "block2")]
#[unsafe(method(initWithName:handler:))]
#[unsafe(method_family = init)]
pub fn initWithName_handler(
this: Allocated<Self>,
name: &NSString,
handler: Option<&block2::DynBlock<dyn Fn() -> Bool>>,
) -> Retained<Self>;
#[unsafe(method(initWithName:target:selector:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_target_selector(
this: Allocated<Self>,
name: &NSString,
target: &ProtocolObject<dyn NSObjectProtocol>,
selector: Sel,
) -> Retained<Self>;
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub fn name(&self) -> Retained<NSString>;
#[unsafe(method(setName:))]
#[unsafe(method_family = none)]
pub fn setName(&self, name: &NSString);
#[cfg(feature = "block2")]
#[unsafe(method(handler))]
#[unsafe(method_family = none)]
pub fn handler(&self) -> *mut block2::DynBlock<dyn Fn() -> Bool>;
#[cfg(feature = "block2")]
#[unsafe(method(setHandler:))]
#[unsafe(method_family = none)]
pub fn setHandler(&self, handler: Option<&block2::DynBlock<dyn Fn() -> Bool>>);
#[unsafe(method(target))]
#[unsafe(method_family = none)]
pub fn target(&self) -> Option<Retained<ProtocolObject<dyn NSObjectProtocol>>>;
#[unsafe(method(setTarget:))]
#[unsafe(method_family = none)]
pub unsafe fn setTarget(&self, target: Option<&ProtocolObject<dyn NSObjectProtocol>>);
#[unsafe(method(selector))]
#[unsafe(method_family = none)]
pub fn selector(&self) -> Option<Sel>;
#[unsafe(method(setSelector:))]
#[unsafe(method_family = none)]
pub unsafe fn setSelector(&self, selector: Option<Sel>);
);
}
impl NSAccessibilityCustomAction {
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 NSAccessibilityCustomAction {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}