use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSAccessibilityCustomRotorSearchDirection(pub NSInteger);
impl NSAccessibilityCustomRotorSearchDirection {
#[doc(alias = "NSAccessibilityCustomRotorSearchDirectionPrevious")]
pub const Previous: Self = Self(0);
#[doc(alias = "NSAccessibilityCustomRotorSearchDirectionNext")]
pub const Next: Self = Self(1);
}
unsafe impl Encode for NSAccessibilityCustomRotorSearchDirection {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSAccessibilityCustomRotorSearchDirection {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct NSAccessibilityCustomRotorType(pub NSInteger);
impl NSAccessibilityCustomRotorType {
#[doc(alias = "NSAccessibilityCustomRotorTypeCustom")]
pub const Custom: Self = Self(0);
#[doc(alias = "NSAccessibilityCustomRotorTypeAny")]
pub const Any: Self = Self(1);
#[doc(alias = "NSAccessibilityCustomRotorTypeAnnotation")]
pub const Annotation: Self = Self(2);
#[doc(alias = "NSAccessibilityCustomRotorTypeBoldText")]
pub const BoldText: Self = Self(3);
#[doc(alias = "NSAccessibilityCustomRotorTypeHeading")]
pub const Heading: Self = Self(4);
#[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel1")]
pub const HeadingLevel1: Self = Self(5);
#[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel2")]
pub const HeadingLevel2: Self = Self(6);
#[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel3")]
pub const HeadingLevel3: Self = Self(7);
#[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel4")]
pub const HeadingLevel4: Self = Self(8);
#[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel5")]
pub const HeadingLevel5: Self = Self(9);
#[doc(alias = "NSAccessibilityCustomRotorTypeHeadingLevel6")]
pub const HeadingLevel6: Self = Self(10);
#[doc(alias = "NSAccessibilityCustomRotorTypeImage")]
pub const Image: Self = Self(11);
#[doc(alias = "NSAccessibilityCustomRotorTypeItalicText")]
pub const ItalicText: Self = Self(12);
#[doc(alias = "NSAccessibilityCustomRotorTypeLandmark")]
pub const Landmark: Self = Self(13);
#[doc(alias = "NSAccessibilityCustomRotorTypeLink")]
pub const Link: Self = Self(14);
#[doc(alias = "NSAccessibilityCustomRotorTypeList")]
pub const List: Self = Self(15);
#[doc(alias = "NSAccessibilityCustomRotorTypeMisspelledWord")]
pub const MisspelledWord: Self = Self(16);
#[doc(alias = "NSAccessibilityCustomRotorTypeTable")]
pub const Table: Self = Self(17);
#[doc(alias = "NSAccessibilityCustomRotorTypeTextField")]
pub const TextField: Self = Self(18);
#[doc(alias = "NSAccessibilityCustomRotorTypeUnderlinedText")]
pub const UnderlinedText: Self = Self(19);
#[doc(alias = "NSAccessibilityCustomRotorTypeVisitedLink")]
pub const VisitedLink: Self = Self(20);
#[doc(alias = "NSAccessibilityCustomRotorTypeAudiograph")]
pub const Audiograph: Self = Self(21);
}
unsafe impl Encode for NSAccessibilityCustomRotorType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for NSAccessibilityCustomRotorType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSAccessibilityCustomRotor;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSAccessibilityCustomRotor {}
);
impl NSAccessibilityCustomRotor {
extern_methods!(
#[unsafe(method(initWithLabel:itemSearchDelegate:))]
#[unsafe(method_family = init)]
pub fn initWithLabel_itemSearchDelegate(
this: Allocated<Self>,
label: &NSString,
item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
) -> Retained<Self>;
#[unsafe(method(initWithRotorType:itemSearchDelegate:))]
#[unsafe(method_family = init)]
pub fn initWithRotorType_itemSearchDelegate(
this: Allocated<Self>,
rotor_type: NSAccessibilityCustomRotorType,
item_search_delegate: &ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
) -> Retained<Self>;
#[unsafe(method(type))]
#[unsafe(method_family = none)]
pub fn r#type(&self) -> NSAccessibilityCustomRotorType;
#[unsafe(method(setType:))]
#[unsafe(method_family = none)]
pub fn setType(&self, r#type: NSAccessibilityCustomRotorType);
#[unsafe(method(label))]
#[unsafe(method_family = none)]
pub fn label(&self) -> Retained<NSString>;
#[unsafe(method(setLabel:))]
#[unsafe(method_family = none)]
pub fn setLabel(&self, label: &NSString);
#[unsafe(method(itemSearchDelegate))]
#[unsafe(method_family = none)]
pub fn itemSearchDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>>>;
#[unsafe(method(setItemSearchDelegate:))]
#[unsafe(method_family = none)]
pub fn setItemSearchDelegate(
&self,
item_search_delegate: Option<
&ProtocolObject<dyn NSAccessibilityCustomRotorItemSearchDelegate>,
>,
);
#[cfg(feature = "NSAccessibilityProtocols")]
#[unsafe(method(itemLoadingDelegate))]
#[unsafe(method_family = none)]
pub fn itemLoadingDelegate(
&self,
) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementLoading>>>;
#[cfg(feature = "NSAccessibilityProtocols")]
#[unsafe(method(setItemLoadingDelegate:))]
#[unsafe(method_family = none)]
pub fn setItemLoadingDelegate(
&self,
item_loading_delegate: Option<&ProtocolObject<dyn NSAccessibilityElementLoading>>,
);
);
}
impl NSAccessibilityCustomRotor {
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 NSAccessibilityCustomRotor {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSAccessibilityCustomRotorSearchParameters;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorSearchParameters {}
);
impl NSAccessibilityCustomRotorSearchParameters {
extern_methods!(
#[unsafe(method(currentItem))]
#[unsafe(method_family = none)]
pub fn currentItem(&self) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
#[unsafe(method(setCurrentItem:))]
#[unsafe(method_family = none)]
pub fn setCurrentItem(&self, current_item: Option<&NSAccessibilityCustomRotorItemResult>);
#[unsafe(method(searchDirection))]
#[unsafe(method_family = none)]
pub fn searchDirection(&self) -> NSAccessibilityCustomRotorSearchDirection;
#[unsafe(method(setSearchDirection:))]
#[unsafe(method_family = none)]
pub fn setSearchDirection(
&self,
search_direction: NSAccessibilityCustomRotorSearchDirection,
);
#[unsafe(method(filterString))]
#[unsafe(method_family = none)]
pub fn filterString(&self) -> Retained<NSString>;
#[unsafe(method(setFilterString:))]
#[unsafe(method_family = none)]
pub fn setFilterString(&self, filter_string: &NSString);
);
}
impl NSAccessibilityCustomRotorSearchParameters {
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 NSAccessibilityCustomRotorSearchParameters {
#[inline]
fn default_retained() -> Retained<Self> {
Self::new()
}
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSAccessibilityCustomRotorItemResult;
);
extern_conformance!(
unsafe impl NSObjectProtocol for NSAccessibilityCustomRotorItemResult {}
);
impl NSAccessibilityCustomRotorItemResult {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[cfg(feature = "NSAccessibilityProtocols")]
#[unsafe(method(initWithTargetElement:))]
#[unsafe(method_family = init)]
pub fn initWithTargetElement(
this: Allocated<Self>,
target_element: &ProtocolObject<dyn NSAccessibilityElementProtocol>,
) -> Retained<Self>;
#[cfg(feature = "NSAccessibilityConstants")]
#[unsafe(method(initWithItemLoadingToken:customLabel:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithItemLoadingToken_customLabel(
this: Allocated<Self>,
item_loading_token: &NSAccessibilityLoadingToken,
custom_label: &NSString,
) -> Retained<Self>;
#[cfg(feature = "NSAccessibilityProtocols")]
#[unsafe(method(targetElement))]
#[unsafe(method_family = none)]
pub fn targetElement(
&self,
) -> Option<Retained<ProtocolObject<dyn NSAccessibilityElementProtocol>>>;
#[cfg(feature = "NSAccessibilityConstants")]
#[unsafe(method(itemLoadingToken))]
#[unsafe(method_family = none)]
pub fn itemLoadingToken(&self) -> Option<Retained<NSAccessibilityLoadingToken>>;
#[unsafe(method(targetRange))]
#[unsafe(method_family = none)]
pub fn targetRange(&self) -> NSRange;
#[unsafe(method(setTargetRange:))]
#[unsafe(method_family = none)]
pub fn setTargetRange(&self, target_range: NSRange);
#[unsafe(method(customLabel))]
#[unsafe(method_family = none)]
pub fn customLabel(&self) -> Option<Retained<NSString>>;
#[unsafe(method(setCustomLabel:))]
#[unsafe(method_family = none)]
pub fn setCustomLabel(&self, custom_label: Option<&NSString>);
);
}
extern_protocol!(
pub unsafe trait NSAccessibilityCustomRotorItemSearchDelegate: NSObjectProtocol {
#[unsafe(method(rotor:resultForSearchParameters:))]
#[unsafe(method_family = none)]
fn rotor_resultForSearchParameters(
&self,
rotor: &NSAccessibilityCustomRotor,
search_parameters: &NSAccessibilityCustomRotorSearchParameters,
) -> Option<Retained<NSAccessibilityCustomRotorItemResult>>;
}
);