use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[cfg(feature = "block2")]
pub type UIAccessibilityCustomActionHandler =
*mut block2::DynBlock<dyn Fn(NonNull<UIAccessibilityCustomAction>) -> Bool>;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UIAccessibilityCustomAction;
);
extern_conformance!(
unsafe impl NSObjectProtocol for UIAccessibilityCustomAction {}
);
impl UIAccessibilityCustomAction {
extern_methods!(
#[unsafe(method(initWithName:target:selector:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_target_selector(
this: Allocated<Self>,
name: &NSString,
target: Option<&AnyObject>,
selector: Sel,
) -> Retained<Self>;
#[unsafe(method(initWithAttributedName:target:selector:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAttributedName_target_selector(
this: Allocated<Self>,
attributed_name: &NSAttributedString,
target: Option<&AnyObject>,
selector: Sel,
) -> Retained<Self>;
#[cfg(feature = "UIImage")]
#[unsafe(method(initWithName:image:target:selector:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_image_target_selector(
this: Allocated<Self>,
name: &NSString,
image: Option<&UIImage>,
target: Option<&AnyObject>,
selector: Sel,
) -> Retained<Self>;
#[cfg(feature = "UIImage")]
#[unsafe(method(initWithAttributedName:image:target:selector:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAttributedName_image_target_selector(
this: Allocated<Self>,
attributed_name: &NSAttributedString,
image: Option<&UIImage>,
target: Option<&AnyObject>,
selector: Sel,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[unsafe(method(initWithName:actionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_actionHandler(
this: Allocated<Self>,
name: &NSString,
action_handler: UIAccessibilityCustomActionHandler,
) -> Retained<Self>;
#[cfg(feature = "block2")]
#[unsafe(method(initWithAttributedName:actionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAttributedName_actionHandler(
this: Allocated<Self>,
attributed_name: &NSAttributedString,
action_handler: UIAccessibilityCustomActionHandler,
) -> Retained<Self>;
#[cfg(all(feature = "UIImage", feature = "block2"))]
#[unsafe(method(initWithName:image:actionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithName_image_actionHandler(
this: Allocated<Self>,
name: &NSString,
image: Option<&UIImage>,
action_handler: UIAccessibilityCustomActionHandler,
) -> Retained<Self>;
#[cfg(all(feature = "UIImage", feature = "block2"))]
#[unsafe(method(initWithAttributedName:image:actionHandler:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithAttributedName_image_actionHandler(
this: Allocated<Self>,
attributed_name: &NSAttributedString,
image: Option<&UIImage>,
action_handler: UIAccessibilityCustomActionHandler,
) -> 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 = "UIImage")]
#[unsafe(method(image))]
#[unsafe(method_family = none)]
pub fn image(&self) -> Option<Retained<UIImage>>;
#[cfg(feature = "UIImage")]
#[unsafe(method(setImage:))]
#[unsafe(method_family = none)]
pub fn setImage(&self, image: Option<&UIImage>);
#[unsafe(method(attributedName))]
#[unsafe(method_family = none)]
pub fn attributedName(&self) -> Retained<NSAttributedString>;
#[unsafe(method(setAttributedName:))]
#[unsafe(method_family = none)]
pub fn setAttributedName(&self, attributed_name: &NSAttributedString);
#[unsafe(method(target))]
#[unsafe(method_family = none)]
pub fn target(&self) -> Option<Retained<AnyObject>>;
#[unsafe(method(setTarget:))]
#[unsafe(method_family = none)]
pub unsafe fn setTarget(&self, target: Option<&AnyObject>);
#[unsafe(method(selector))]
#[unsafe(method_family = none)]
pub unsafe fn selector(&self) -> Sel;
#[unsafe(method(setSelector:))]
#[unsafe(method_family = none)]
pub unsafe fn setSelector(&self, selector: Sel);
#[cfg(feature = "block2")]
#[unsafe(method(actionHandler))]
#[unsafe(method_family = none)]
pub unsafe fn actionHandler(&self) -> UIAccessibilityCustomActionHandler;
#[cfg(feature = "block2")]
#[unsafe(method(setActionHandler:))]
#[unsafe(method_family = none)]
pub unsafe fn setActionHandler(&self, action_handler: UIAccessibilityCustomActionHandler);
#[unsafe(method(category))]
#[unsafe(method_family = none)]
pub fn category(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setCategory:))]
#[unsafe(method_family = none)]
pub fn setCategory(&self, category: Option<&NSString>);
);
}
impl UIAccessibilityCustomAction {
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(mtm: MainThreadMarker) -> Retained<Self>;
);
}
extern "C" {
pub static UIAccessibilityCustomActionCategoryEdit: &'static NSString;
}