Trait GCTouchedStateInput

Source
pub unsafe trait GCTouchedStateInput: NSObjectProtocol {
    // Provided methods
    unsafe fn touchedDidChangeHandler(
        &self,
    ) -> *mut DynBlock<dyn Fn(NonNull<ProtocolObject<dyn GCPhysicalInputElement>>, NonNull<ProtocolObject<dyn GCTouchedStateInput>>, Bool)>
       where Self: Sized + Message { ... }
    unsafe fn setTouchedDidChangeHandler(
        &self,
        touched_did_change_handler: Option<&DynBlock<dyn Fn(NonNull<ProtocolObject<dyn GCPhysicalInputElement>>, NonNull<ProtocolObject<dyn GCTouchedStateInput>>, Bool)>>,
    )
       where Self: Sized + Message { ... }
    unsafe fn isTouched(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn lastTouchedStateTimestamp(&self) -> NSTimeInterval
       where Self: Sized + Message { ... }
    unsafe fn lastTouchedStateLatency(&self) -> NSTimeInterval
       where Self: Sized + Message { ... }
    unsafe fn sources(
        &self,
    ) -> Retained<NSSet<ProtocolObject<dyn GCPhysicalInputSource>>>
       where Self: Sized + Message { ... }
}
Available on crate feature GCTouchedStateInput only.
Expand description

An object conforming to GCTouchedStateInputrepresents the touched state of an element.

Some buttons feature capacitive touch capabilities, where the user can touch the button without pressing it. In such cases, a button can be touched without being pressed.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn touchedDidChangeHandler( &self, ) -> *mut DynBlock<dyn Fn(NonNull<ProtocolObject<dyn GCPhysicalInputElement>>, NonNull<ProtocolObject<dyn GCTouchedStateInput>>, Bool)>
where Self: Sized + Message,

Available on crate features GCPhysicalInputElement and block2 only.

Set this block if you want to be notified when the touched state changes.

Source

unsafe fn setTouchedDidChangeHandler( &self, touched_did_change_handler: Option<&DynBlock<dyn Fn(NonNull<ProtocolObject<dyn GCPhysicalInputElement>>, NonNull<ProtocolObject<dyn GCTouchedStateInput>>, Bool)>>, )
where Self: Sized + Message,

Available on crate features GCPhysicalInputElement and block2 only.
Source

unsafe fn isTouched(&self) -> bool
where Self: Sized + Message,

Some buttons feature capacitive touch capabilities, where the user can touch the button without pressing it. In such cases, a button will be touched before it is pressed.

See: touchedDidChangeHandler

See: GCPressedStateInput

Source

unsafe fn lastTouchedStateTimestamp(&self) -> NSTimeInterval
where Self: Sized + Message,

The timestamp of the last touched state change.

This time interval is not relative to any specific point in time. You can subtract a previous timestamp from the returned timestamp to determine the time (in seconds) between changes to the value.

Source

unsafe fn lastTouchedStateLatency(&self) -> NSTimeInterval
where Self: Sized + Message,

The interval (in seconds) between the timestamp of the last touched state change and the current time.

This 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.

Source

unsafe fn sources( &self, ) -> Retained<NSSet<ProtocolObject<dyn GCPhysicalInputSource>>>
where Self: Sized + Message,

Available on crate feature GCPhysicalInputSource only.

An object describing the physical action(s) the user performs to manipulate this input.

Trait Implementations§

Source§

impl ProtocolType for dyn GCTouchedStateInput

Source§

const NAME: &'static str = "GCTouchedStateInput"

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 GCTouchedStateInput

Implementations on Foreign Types§

Source§

impl<T> GCTouchedStateInput for ProtocolObject<T>

Implementors§