pub unsafe trait GCDevicePhysicalInputState: NSObjectProtocol {
// Provided methods
unsafe fn device(&self) -> Option<Retained<ProtocolObject<dyn GCDevice>>>
where Self: Sized + Message { ... }
unsafe fn lastEventTimestamp(&self) -> NSTimeInterval
where Self: Sized + Message { ... }
unsafe fn lastEventLatency(&self) -> NSTimeInterval
where Self: Sized + Message { ... }
unsafe fn elements(
&self,
) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCPhysicalInputElement>>>
where Self: Sized + Message { ... }
unsafe fn buttons(
&self,
) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCButtonElement>>>
where Self: Sized + Message { ... }
unsafe fn axes(
&self,
) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCAxisElement>>>
where Self: Sized + Message { ... }
unsafe fn switches(
&self,
) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCSwitchElement>>>
where Self: Sized + Message { ... }
unsafe fn dpads(
&self,
) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCDirectionPadElement>>>
where Self: Sized + Message { ... }
unsafe fn objectForKeyedSubscript(
&self,
key: &NSString,
) -> Option<Retained<ProtocolObject<dyn GCPhysicalInputElement>>>
where Self: Sized + Message { ... }
}GCDevicePhysicalInputState only.Expand description
An object conforming to
GCDevicePhysicalInputStatecontains the state of
a device’s physical inputs. This may be either the “live” physical input
state if the same object also conforms to
GCDevicePhysicalInput,or a
snapshot of the physical input state.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn device(&self) -> Option<Retained<ProtocolObject<dyn GCDevice>>>
Available on crate feature GCDevice only.
unsafe fn device(&self) -> Option<Retained<ProtocolObject<dyn GCDevice>>>
GCDevice only.The device that this profile is mapping input from.
Sourceunsafe fn lastEventTimestamp(&self) -> NSTimeInterval
unsafe fn lastEventTimestamp(&self) -> NSTimeInterval
The internal time stamp of the last event.
This time interval is not relative to any specific point in time. Your
application can subtract a previous timestamp from the returned timestamp to
determine the time (in seconds) between events. The
lastEventTimestampof
the inputs from two different devices can be compared to determine which event
occurred first.
Sourceunsafe fn lastEventLatency(&self) -> NSTimeInterval
unsafe fn lastEventLatency(&self) -> NSTimeInterval
The interval (in seconds) between the timestamp of the last event and the current time.
This value should be treated as a lower bound of the event latency. It may not include (wired or wireless) transmission latency, or latency accrued on the device before the event was transmitted to the host.
Note: If the system has gone to sleep between when the event occurred and when this property is read, the returned value may not reflect the true latency.
Sourceunsafe fn elements(
&self,
) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCPhysicalInputElement>>>
Available on crate features GCInputNames and GCPhysicalInputElement only.
unsafe fn elements( &self, ) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCPhysicalInputElement>>>
GCInputNames and GCPhysicalInputElement only.The following properties allow for runtime lookup of any input element on a profile, when provided with a valid alias.
GCButtonElement and GCInputNames and GCPhysicalInputElement only.unsafe fn axes( &self, ) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCAxisElement>>>
GCAxisElement and GCInputNames and GCPhysicalInputElement only.unsafe fn switches( &self, ) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCSwitchElement>>>
GCInputNames and GCPhysicalInputElement and GCSwitchElement only.unsafe fn dpads( &self, ) -> Retained<GCPhysicalInputElementCollection<NSString, ProtocolObject<dyn GCDirectionPadElement>>>
GCDirectionPadElement and GCInputNames and GCPhysicalInputElement only.Sourceunsafe fn objectForKeyedSubscript(
&self,
key: &NSString,
) -> Option<Retained<ProtocolObject<dyn GCPhysicalInputElement>>>
Available on crate feature GCPhysicalInputElement only.
unsafe fn objectForKeyedSubscript( &self, key: &NSString, ) -> Option<Retained<ProtocolObject<dyn GCPhysicalInputElement>>>
GCPhysicalInputElement only.Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs.
Note: Equivalent to -elements
Trait Implementations§
Source§impl ProtocolType for dyn GCDevicePhysicalInputState
impl ProtocolType for dyn GCDevicePhysicalInputState
impl<T> ImplementedBy<T> for dyn GCDevicePhysicalInputState
Implementations on Foreign Types§
impl<T> GCDevicePhysicalInputState for ProtocolObject<T>where
T: ?Sized + GCDevicePhysicalInputState,
Implementors§
impl GCDevicePhysicalInputState for GCControllerInputState
GCControllerInput only.impl GCDevicePhysicalInputState for GCControllerLiveInput
GCControllerInput only.impl GCDevicePhysicalInputState for GCRacingWheelInput
GCRacingWheelInput only.impl GCDevicePhysicalInputState for GCRacingWheelInputState
GCRacingWheelInput only.