#[cfg(feature = "block2")]
use block2::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_protocol!(
pub unsafe trait GCSwitchPositionInput: NSObjectProtocol {
#[cfg(all(feature = "GCPhysicalInputElement", feature = "block2"))]
#[method(positionDidChangeHandler)]
unsafe fn positionDidChangeHandler(
&self,
) -> *mut Block<
dyn Fn(
NonNull<ProtocolObject<dyn GCPhysicalInputElement>>,
NonNull<ProtocolObject<dyn GCSwitchPositionInput>>,
NSInteger,
),
>;
#[cfg(all(feature = "GCPhysicalInputElement", feature = "block2"))]
#[method(setPositionDidChangeHandler:)]
unsafe fn setPositionDidChangeHandler(
&self,
position_did_change_handler: Option<
&Block<
dyn Fn(
NonNull<ProtocolObject<dyn GCPhysicalInputElement>>,
NonNull<ProtocolObject<dyn GCSwitchPositionInput>>,
NSInteger,
),
>,
>,
);
#[method(position)]
unsafe fn position(&self) -> NSInteger;
#[method(positionRange)]
unsafe fn positionRange(&self) -> NSRange;
#[method(isSequential)]
unsafe fn isSequential(&self) -> bool;
#[method(canWrap)]
unsafe fn canWrap(&self) -> bool;
#[method(lastPositionTimestamp)]
unsafe fn lastPositionTimestamp(&self) -> NSTimeInterval;
#[method(lastPositionLatency)]
unsafe fn lastPositionLatency(&self) -> NSTimeInterval;
#[cfg(feature = "GCPhysicalInputSource")]
#[method_id(@__retain_semantics Other sources)]
unsafe fn sources(&self) -> Id<NSSet<ProtocolObject<dyn GCPhysicalInputSource>>>;
}
unsafe impl ProtocolType for dyn GCSwitchPositionInput {}
);