Package apple.gamecontroller.protocol
Interface GCDevicePhysicalInputState
-
- All Known Subinterfaces:
GCDevicePhysicalInput
- All Known Implementing Classes:
GCControllerInputState,GCControllerLiveInput
public interface GCDevicePhysicalInputStateAn 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull GCPhysicalInputElementCollection<java.lang.String,?>axes()@NotNull GCPhysicalInputElementCollection<java.lang.String,?>buttons()@Nullable GCDevicedevice()The device that this profile is mapping input from.@NotNull GCPhysicalInputElementCollection<java.lang.String,?>dpads()@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.doublelastEventLatency()The interval (in seconds) between the timestamp of the last event and the current time.doublelastEventTimestamp()The internal time stamp of the last event.@Nullable GCPhysicalInputElementobjectForKeyedSubscript(@NotNull java.lang.String key)Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs.@NotNull GCPhysicalInputElementCollection<java.lang.String,?>switches()
-
-
-
Method Detail
-
axes
@NotNull @NotNull GCPhysicalInputElementCollection<java.lang.String,?> axes()
-
buttons
@NotNull @NotNull GCPhysicalInputElementCollection<java.lang.String,?> buttons()
-
device
@Nullable @Nullable GCDevice device()
The device that this profile is mapping input from.
-
dpads
@NotNull @NotNull GCPhysicalInputElementCollection<java.lang.String,?> dpads()
-
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
-
switches
@NotNull @NotNull GCPhysicalInputElementCollection<java.lang.String,?> switches()
-
-