use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static GCKeyboardDidConnectNotification: &'static NSString;
}
extern "C" {
pub static GCKeyboardDidDisconnectNotification: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GCKeyboard;
unsafe impl ClassType for GCKeyboard {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "GCDevice")]
unsafe impl GCDevice for GCKeyboard {}
unsafe impl NSObjectProtocol for GCKeyboard {}
extern_methods!(
unsafe impl GCKeyboard {
#[cfg(all(feature = "GCKeyboardInput", feature = "GCPhysicalInputProfile"))]
#[method_id(@__retain_semantics Other keyboardInput)]
pub unsafe fn keyboardInput(&self) -> Option<Id<GCKeyboardInput>>;
#[method_id(@__retain_semantics Other coalescedKeyboard)]
pub unsafe fn coalescedKeyboard() -> Option<Id<GCKeyboard>>;
}
);
extern_methods!(
unsafe impl GCKeyboard {
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Id<Self>;
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Id<Self>;
}
);