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 AXBrailleTable;
);
extern_conformance!(
unsafe impl NSCoding for AXBrailleTable {}
);
extern_conformance!(
unsafe impl NSCopying for AXBrailleTable {}
);
unsafe impl CopyingHelper for AXBrailleTable {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for AXBrailleTable {}
);
impl AXBrailleTable {
extern_methods!(
#[unsafe(method(identifier))]
#[unsafe(method_family = none)]
pub unsafe fn identifier(&self) -> Retained<NSString>;
#[unsafe(method(localizedName))]
#[unsafe(method_family = none)]
pub unsafe fn localizedName(&self) -> Retained<NSString>;
#[unsafe(method(providerIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn providerIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(localizedProviderName))]
#[unsafe(method_family = none)]
pub unsafe fn localizedProviderName(&self) -> Retained<NSString>;
#[unsafe(method(language))]
#[unsafe(method_family = none)]
pub unsafe fn language(&self) -> Retained<NSString>;
#[unsafe(method(locales))]
#[unsafe(method_family = none)]
pub unsafe fn locales(&self) -> Retained<NSSet<NSLocale>>;
#[unsafe(method(isEightDot))]
#[unsafe(method_family = none)]
pub unsafe fn isEightDot(&self) -> bool;
#[unsafe(method(supportedLocales))]
#[unsafe(method_family = none)]
pub unsafe fn supportedLocales() -> Retained<NSSet<NSLocale>>;
#[unsafe(method(defaultTableForLocale:))]
#[unsafe(method_family = none)]
pub unsafe fn defaultTableForLocale(locale: &NSLocale) -> Option<Retained<AXBrailleTable>>;
#[unsafe(method(tablesForLocale:))]
#[unsafe(method_family = none)]
pub unsafe fn tablesForLocale(locale: &NSLocale) -> Retained<NSSet<AXBrailleTable>>;
#[unsafe(method(languageAgnosticTables))]
#[unsafe(method_family = none)]
pub unsafe fn languageAgnosticTables() -> Retained<NSSet<AXBrailleTable>>;
#[unsafe(method(initWithIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithIdentifier(
this: Allocated<Self>,
identifier: &NSString,
) -> Option<Retained<Self>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AXBrailleTranslationResult;
);
extern_conformance!(
unsafe impl NSCoding for AXBrailleTranslationResult {}
);
extern_conformance!(
unsafe impl NSCopying for AXBrailleTranslationResult {}
);
unsafe impl CopyingHelper for AXBrailleTranslationResult {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for AXBrailleTranslationResult {}
);
impl AXBrailleTranslationResult {
extern_methods!(
#[unsafe(method(resultString))]
#[unsafe(method_family = none)]
pub unsafe fn resultString(&self) -> Retained<NSString>;
#[unsafe(method(locationMap))]
#[unsafe(method_family = none)]
pub unsafe fn locationMap(&self) -> Retained<NSArray<NSNumber>>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct AXBrailleTranslator;
);
extern_conformance!(
unsafe impl NSObjectProtocol for AXBrailleTranslator {}
);
impl AXBrailleTranslator {
extern_methods!(
#[unsafe(method(initWithBrailleTable:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithBrailleTable(
this: Allocated<Self>,
braille_table: &AXBrailleTable,
) -> Retained<Self>;
#[unsafe(method(translatePrintText:))]
#[unsafe(method_family = none)]
pub unsafe fn translatePrintText(
&self,
print_text: &NSString,
) -> Retained<AXBrailleTranslationResult>;
#[unsafe(method(backTranslateBraille:))]
#[unsafe(method_family = none)]
pub unsafe fn backTranslateBraille(
&self,
braille: &NSString,
) -> Retained<AXBrailleTranslationResult>;
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}