use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static GCMouseDidConnectNotification: &'static NSString;
}
extern "C" {
pub static GCMouseDidDisconnectNotification: &'static NSString;
}
extern "C" {
pub static GCMouseDidBecomeCurrentNotification: &'static NSString;
}
extern "C" {
pub static GCMouseDidStopBeingCurrentNotification: &'static NSString;
}
extern_class!(
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct GCMouse;
unsafe impl ClassType for GCMouse {
type Super = NSObject;
type Mutability = InteriorMutable;
}
);
#[cfg(feature = "GCDevice")]
unsafe impl GCDevice for GCMouse {}
unsafe impl NSObjectProtocol for GCMouse {}
extern_methods!(
unsafe impl GCMouse {
#[cfg(all(feature = "GCMouseInput", feature = "GCPhysicalInputProfile"))]
#[method_id(@__retain_semantics Other mouseInput)]
pub unsafe fn mouseInput(&self) -> Option<Id<GCMouseInput>>;
#[method_id(@__retain_semantics Other current)]
pub unsafe fn current() -> Option<Id<GCMouse>>;
#[method_id(@__retain_semantics Other mice)]
pub unsafe fn mice() -> Id<NSArray<GCMouse>>;
}
);
extern_methods!(
unsafe impl GCMouse {
#[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>;
}
);