Interface GCLinearInput


  • public interface GCLinearInput
    An object conforming to \c GCLinearInput represents an input that produces normalized values in the unit interval - between [0, 1]. API-Since: 16.0
    • Method Detail

      • canWrap

        boolean canWrap()
        Check if the input value "rolls over" when reaching either the extreme high or low value. For example, some dials can be rotated past the position that represents their maximum value, causing the next reported value to roll over. Defaults to NO for most inputs.
      • isAnalog

        boolean isAnalog()
        Check if the input can support more than just digital values. If \c YES, the input can produce any value between [0, 1]. Otherwise, the input only produces the values 0 or 1.
      • lastValueLatency

        double lastValueLatency()
        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.
      • lastValueTimestamp

        double lastValueTimestamp()
        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 current timestamp to determine the time (in seconds) between changes to the value.
      • setValueDidChangeHandler

        void setValueDidChangeHandler​(@Nullable
                                      @Nullable GCLinearInput.Block_setValueDidChangeHandler value)
        Set this block to be notified when the value of the input changes.
        Parameters:
        element - the element that has been modified.
        input - the input that has been modified.
        value - the value the axis was set to at the time the valueDidChangeHandler fired.
      • value

        float value()
        A normalized value for the axis input, between 0 and 1 (inclusive). The values are deadzoned and saturated before they are returned so there is no value outside the range. Deadzoning does not remove values from the range, the full 0 to 1 magnitude of values are possible from the input. You can rely on a value of 0 meaning the value is inside the deadzone. Any value greater than zero is not in the deadzone.
      • valueDidChangeHandler

        @Nullable
        @Nullable GCLinearInput.Block_valueDidChangeHandler_ret valueDidChangeHandler()
        Set this block to be notified when the value of the input changes.
        Parameters:
        element - the element that has been modified.
        input - the input that has been modified.
        value - the value the axis was set to at the time the valueDidChangeHandler fired.
      • sources

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