Interface GCDevicePhysicalInputState

  • All Known Subinterfaces:
    GCDevicePhysicalInput
    All Known Implementing Classes:
    GCControllerInputState, GCControllerLiveInput

    public interface GCDevicePhysicalInputState
    An object conforming to \c GCDevicePhysicalInputState contains the state of a device's physical inputs. This may be either the "live" physical input state if the same object also conforms to \c GCDevicePhysicalInput, or a snapshot of the physical input state. API-Since: 16.0
    • Method Detail

      • device

        @Nullable
        @Nullable GCDevice device()
        The device that this profile is mapping input from.
      • elements

        @NotNull
        @NotNull GCPhysicalInputElementCollection<java.lang.String,​?> elements()
        The following properties allow for runtime lookup of any input element on a profile, when provided with a valid alias. [@example] input.elements[GCInputButtonA] [@example] input.dpads[GCInputLeftThumbstick] [@example] input.dpads[GCInputButtonB] // fails, "Button B" is not a DirectionPad
      • lastEventLatency

        double lastEventLatency()
        The interval (in seconds) between the timestamp of the last event and the current time. This value 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. [@note] If the system has gone to sleep between when the event occurred and when this property is read, the returned value may not reflect the true latency.
      • lastEventTimestamp

        double lastEventTimestamp()
        The internal time stamp of the last event. This time interval is not relative to any specific point in time. Your application can subtract a previous timestamp from the returned timestamp to determine the time (in seconds) between events. The \c lastEventTimestamp of the inputs from two different devices can be compared to determine which event occurred first.
      • objectForKeyedSubscript

        @Nullable
        @Nullable GCPhysicalInputElement objectForKeyedSubscript​(@NotNull
                                                                 @NotNull java.lang.String key)
        Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs. [@example] physicalInput[GCInputButtonA] [@example] physicalInput[GCInputButtonX] [@note] Equivalent to -elements