pub unsafe trait GCDevicePhysicalInputStateDiff: NSObjectProtocol {
// Provided methods
unsafe fn changeForElement(
&self,
element: &ProtocolObject<dyn GCPhysicalInputElement>,
) -> GCDevicePhysicalInputElementChange
where Self: Sized + Message { ... }
unsafe fn changedElements(
&self,
) -> Option<Retained<NSEnumerator<ProtocolObject<dyn GCPhysicalInputElement>>>>
where Self: Sized + Message { ... }
}GCDevicePhysicalInputStateDiff only.Expand description
An object conforming to the
GCDevicePhysicalInputStateDiffprotocol
contains the input state differences between the current and previous
GCDevicePhysicalInputStateobjects returned from the
-nextInputStatemethod of
GCDevicePhysicalInput.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn changeForElement(
&self,
element: &ProtocolObject<dyn GCPhysicalInputElement>,
) -> GCDevicePhysicalInputElementChange
Available on crate feature GCPhysicalInputElement only.
unsafe fn changeForElement( &self, element: &ProtocolObject<dyn GCPhysicalInputElement>, ) -> GCDevicePhysicalInputElementChange
GCPhysicalInputElement only.Check if a value of _element_changed, compared the previous input state.
Parameter element: The element to check. This may be a pointer to either the “live” element
from the device’s physical input, or a pointer to an element from any input
state “snapshot” of the device’s physical input.
Sourceunsafe fn changedElements(
&self,
) -> Option<Retained<NSEnumerator<ProtocolObject<dyn GCPhysicalInputElement>>>>
Available on crate feature GCPhysicalInputElement only.
unsafe fn changedElements( &self, ) -> Option<Retained<NSEnumerator<ProtocolObject<dyn GCPhysicalInputElement>>>>
GCPhysicalInputElement only.Gets an enumerator that iterates over the elements that have changed, compared the previous input state.
This method returns
nilif the changed elements could not be determined -
typically because the input state queue filled up and older input state
snapshots were dropped.
§Safety
The returned enumerator’s underlying collection should not be mutated while in use.
Trait Implementations§
Source§impl ProtocolType for dyn GCDevicePhysicalInputStateDiff
impl ProtocolType for dyn GCDevicePhysicalInputStateDiff
impl<T> ImplementedBy<T> for dyn GCDevicePhysicalInputStateDiff
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".