use crate::common::*;
use crate::AppKit::*;
use crate::CoreData::*;
use crate::Foundation::*;
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct NSSpeechRecognizer;
unsafe impl ClassType for NSSpeechRecognizer {
type Super = NSObject;
}
);
extern_methods!(
unsafe impl NSSpeechRecognizer {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Option<Allocated<Self>>) -> Option<Id<Self, Shared>>;
#[method(startListening)]
pub unsafe fn startListening(&self);
#[method(stopListening)]
pub unsafe fn stopListening(&self);
#[method_id(@__retain_semantics Other delegate)]
pub unsafe fn delegate(&self) -> Option<Id<NSSpeechRecognizerDelegate, Shared>>;
#[method(setDelegate:)]
pub unsafe fn setDelegate(&self, delegate: Option<&NSSpeechRecognizerDelegate>);
#[method_id(@__retain_semantics Other commands)]
pub unsafe fn commands(&self) -> Option<Id<NSArray<NSString>, Shared>>;
#[method(setCommands:)]
pub unsafe fn setCommands(&self, commands: Option<&NSArray<NSString>>);
#[method_id(@__retain_semantics Other displayedCommandsTitle)]
pub unsafe fn displayedCommandsTitle(&self) -> Option<Id<NSString, Shared>>;
#[method(setDisplayedCommandsTitle:)]
pub unsafe fn setDisplayedCommandsTitle(&self, displayedCommandsTitle: Option<&NSString>);
#[method(listensInForegroundOnly)]
pub unsafe fn listensInForegroundOnly(&self) -> bool;
#[method(setListensInForegroundOnly:)]
pub unsafe fn setListensInForegroundOnly(&self, listensInForegroundOnly: bool);
#[method(blocksOtherRecognizers)]
pub unsafe fn blocksOtherRecognizers(&self) -> bool;
#[method(setBlocksOtherRecognizers:)]
pub unsafe fn setBlocksOtherRecognizers(&self, blocksOtherRecognizers: bool);
}
);
extern_protocol!(
pub struct NSSpeechRecognizerDelegate;
unsafe impl ProtocolType for NSSpeechRecognizerDelegate {
#[optional]
#[method(speechRecognizer:didRecognizeCommand:)]
pub unsafe fn speechRecognizer_didRecognizeCommand(
&self,
sender: &NSSpeechRecognizer,
command: &NSString,
);
}
);