use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UILexiconEntry;
);
extern_conformance!(
unsafe impl NSCopying for UILexiconEntry {}
);
unsafe impl CopyingHelper for UILexiconEntry {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UILexiconEntry {}
);
impl UILexiconEntry {
extern_methods!(
#[unsafe(method(documentText))]
#[unsafe(method_family = none)]
pub fn documentText(&self) -> Retained<NSString>;
#[unsafe(method(userInput))]
#[unsafe(method_family = none)]
pub fn userInput(&self) -> Retained<NSString>;
);
}
impl UILexiconEntry {
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_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct UILexicon;
);
extern_conformance!(
unsafe impl NSCopying for UILexicon {}
);
unsafe impl CopyingHelper for UILexicon {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for UILexicon {}
);
impl UILexicon {
extern_methods!(
#[unsafe(method(entries))]
#[unsafe(method_family = none)]
pub fn entries(&self) -> Retained<NSArray<UILexiconEntry>>;
);
}
impl UILexicon {
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>;
);
}