Trait GCDevicePhysicalInputStateDiff

Source
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 { ... }
}
Available on crate feature 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§

Source

unsafe fn changeForElement( &self, element: &ProtocolObject<dyn GCPhysicalInputElement>, ) -> GCDevicePhysicalInputElementChange
where Self: Sized + Message,

Available on crate feature 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.

Source

unsafe fn changedElements( &self, ) -> Option<Retained<NSEnumerator<ProtocolObject<dyn GCPhysicalInputElement>>>>
where Self: Sized + Message,

Available on crate feature 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.

Trait Implementations§

Source§

impl ProtocolType for dyn GCDevicePhysicalInputStateDiff

Source§

const NAME: &'static str = "GCDevicePhysicalInputStateDiff"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn GCDevicePhysicalInputStateDiff

Implementations on Foreign Types§

Source§

impl<T> GCDevicePhysicalInputStateDiff for ProtocolObject<T>

Implementors§