Interface GCSwitchPositionInput


  • public interface GCSwitchPositionInput
    API-Since: 16.0
    • Method Detail

      • canWrap

        boolean canWrap()
        Check if the position input value can "roll over" when reaching either of its bounds. This will always be \c YES for non-sequential switch inputs.
      • isSequential

        boolean isSequential()
        \c YES if the switch input can only transition to positions that are adjacent to the current position.
      • lastPositionLatency

        double lastPositionLatency()
        The interval (in seconds) between the timestamp of the last event 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.
      • lastPositionTimestamp

        double lastPositionTimestamp()
        The timestamp of the last value. 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.
      • position

        long position()
        The switch's position.
        See Also:
        valueDidChangeHandler
      • positionDidChangeHandler

        @Nullable
        @Nullable GCSwitchPositionInput.Block_positionDidChangeHandler_ret positionDidChangeHandler()
        Set this block if you want to be notified when the value on the switch changes.
        Parameters:
        input - the element that has been modified.
        See Also:
        value
      • positionRange

        NSRange positionRange()
        The (inclusive) bounds of possible position values for the switch.
      • setPositionDidChangeHandler

        void setPositionDidChangeHandler​(@Nullable
                                         @Nullable GCSwitchPositionInput.Block_setPositionDidChangeHandler value)
        Set this block if you want to be notified when the value on the switch changes.
        Parameters:
        input - the element that has been modified.
        See Also:
        value
      • sources

        @NotNull
        @NotNull NSSet<?> sources()
        An object describing the physical action(s) the user performs to manipulate this input. API-Since: 17.0