Package apple.gamecontroller
Class GCControllerLiveInput
- java.lang.Object
-
- org.moe.natj.general.NativeObject
-
- org.moe.natj.objc.ObjCObject
-
- apple.NSObject
-
- apple.gamecontroller.GCControllerInputState
-
- apple.gamecontroller.GCControllerLiveInput
-
- All Implemented Interfaces:
GCDevicePhysicalInput,GCDevicePhysicalInputState,NSObject
public class GCControllerLiveInput extends GCControllerInputState implements GCDevicePhysicalInput
API-Since: 17.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class apple.NSObject
NSObject.Block_accessibilityActivateBlock_ret, NSObject.Block_accessibilityActivationPointBlock_ret, NSObject.Block_accessibilityAttributedHintBlock_ret, NSObject.Block_accessibilityAttributedLabelBlock_ret, NSObject.Block_accessibilityAttributedUserInputLabelsBlock_ret, NSObject.Block_accessibilityAttributedValueBlock_ret, NSObject.Block_accessibilityContainerTypeBlock_ret, NSObject.Block_accessibilityCustomActionsBlock_ret, NSObject.Block_accessibilityCustomRotorsBlock_ret, NSObject.Block_accessibilityDecrementBlock_ret, NSObject.Block_accessibilityElementsBlock_ret, NSObject.Block_accessibilityElementsHiddenBlock_ret, NSObject.Block_accessibilityFrameBlock_ret, NSObject.Block_accessibilityHeaderElementsBlock_ret, NSObject.Block_accessibilityHintBlock_ret, NSObject.Block_accessibilityIdentifierBlock_ret, NSObject.Block_accessibilityIncrementBlock_ret, NSObject.Block_accessibilityLabelBlock_ret, NSObject.Block_accessibilityLanguageBlock_ret, NSObject.Block_accessibilityMagicTapBlock_ret, NSObject.Block_accessibilityNavigationStyleBlock_ret, NSObject.Block_accessibilityPathBlock_ret, NSObject.Block_accessibilityPerformEscapeBlock_ret, NSObject.Block_accessibilityRespondsToUserInteractionBlock_ret, NSObject.Block_accessibilityShouldGroupAccessibilityChildrenBlock_ret, NSObject.Block_accessibilityTextualContextBlock_ret, NSObject.Block_accessibilityTraitsBlock_ret, NSObject.Block_accessibilityUserInputLabelsBlock_ret, NSObject.Block_accessibilityValueBlock_ret, NSObject.Block_accessibilityViewIsModalBlock_ret, NSObject.Block_automationElementsBlock_ret, NSObject.Block_isAccessibilityElementBlock_ret, NSObject.Block_setAccessibilityActivateBlock, NSObject.Block_setAccessibilityActivationPointBlock, NSObject.Block_setAccessibilityAttributedHintBlock, NSObject.Block_setAccessibilityAttributedLabelBlock, NSObject.Block_setAccessibilityAttributedUserInputLabelsBlock, NSObject.Block_setAccessibilityAttributedValueBlock, NSObject.Block_setAccessibilityContainerTypeBlock, NSObject.Block_setAccessibilityCustomActionsBlock, NSObject.Block_setAccessibilityCustomRotorsBlock, NSObject.Block_setAccessibilityDecrementBlock, NSObject.Block_setAccessibilityElementsBlock, NSObject.Block_setAccessibilityElementsHiddenBlock, NSObject.Block_setAccessibilityFrameBlock, NSObject.Block_setAccessibilityHeaderElementsBlock, NSObject.Block_setAccessibilityHintBlock, NSObject.Block_setAccessibilityIdentifierBlock, NSObject.Block_setAccessibilityIncrementBlock, NSObject.Block_setAccessibilityLabelBlock, NSObject.Block_setAccessibilityLanguageBlock, NSObject.Block_setAccessibilityMagicTapBlock, NSObject.Block_setAccessibilityNavigationStyleBlock, NSObject.Block_setAccessibilityPathBlock, NSObject.Block_setAccessibilityPerformEscapeBlock, NSObject.Block_setAccessibilityRespondsToUserInteractionBlock, NSObject.Block_setAccessibilityShouldGroupAccessibilityChildrenBlock, NSObject.Block_setAccessibilityTextualContextBlock, NSObject.Block_setAccessibilityTraitsBlock, NSObject.Block_setAccessibilityUserInputLabelsBlock, NSObject.Block_setAccessibilityValueBlock, NSObject.Block_setAccessibilityViewIsModalBlock, NSObject.Block_setAutomationElementsBlock, NSObject.Block_setIsAccessibilityElementBlock, NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret
-
Nested classes/interfaces inherited from interface apple.gamecontroller.protocol.GCDevicePhysicalInput
GCDevicePhysicalInput.Block_elementValueDidChangeHandler_ret, GCDevicePhysicalInput.Block_inputStateAvailableHandler_ret, GCDevicePhysicalInput.Block_setElementValueDidChangeHandler, GCDevicePhysicalInput.Block_setInputStateAvailableHandler
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedGCControllerLiveInput(org.moe.natj.general.Pointer peer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleanaccessInstanceVariablesDirectly()static GCControllerLiveInputalloc()static GCControllerLiveInputallocWithZone(org.moe.natj.general.ptr.VoidPtr zone)static booleanautomaticallyNotifiesObserversForKey(@NotNull java.lang.String key)@NotNull GCPhysicalInputElementCollection<java.lang.String,?>axes()@NotNull GCPhysicalInputElementCollection<java.lang.String,?>buttons()static voidcancelPreviousPerformRequestsWithTarget(@NotNull java.lang.Object aTarget)static voidcancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull java.lang.Object aTarget, @NotNull org.moe.natj.objc.SEL aSelector, @Nullable java.lang.Object anArgument)@NotNull GCControllerInputStatecapture()Polls the current state vector of the physical input and saves it to a new instance.static @NotNull NSArray<java.lang.String>classFallbacksForKeyedArchiver()static @NotNull org.moe.natj.objc.ClassclassForKeyedUnarchiver()static java.lang.StringdebugDescription_static()static java.lang.Stringdescription_static()@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.GCDevicePhysicalInput.Block_elementValueDidChangeHandler_retelementValueDidChangeHandler()Set this block to be notified when a value on a element changed.static longhash_static()GCControllerLiveInputinit()GCDevicePhysicalInput.Block_inputStateAvailableHandler_retinputStateAvailableHandler()Set this block to be notified when a new input state is available.longinputStateQueueDepth()The maximum number of input states to buffer.static NSObject.Function_instanceMethodForSelector_retinstanceMethodForSelector(org.moe.natj.objc.SEL aSelector)static NSMethodSignatureinstanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)static booleaninstancesRespondToSelector(org.moe.natj.objc.SEL aSelector)static booleanisSubclassOfClass(org.moe.natj.objc.Class aClass)static @NotNull NSSet<java.lang.String>keyPathsForValuesAffectingValueForKey(@NotNull java.lang.String key)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.static GCControllerLiveInputnew_objc()@Nullable GCControllerInputStatenextInputState()Pop the oldest pending input state from the queue.@Nullable GCPhysicalInputElementobjectForKeyedSubscript(@NotNull java.lang.String key)Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs.@Nullable dispatch_queue_tqueue()The dispatch queue that element value change handlers and other callbacks are submitted on.static booleanresolveClassMethod(org.moe.natj.objc.SEL sel)static booleanresolveInstanceMethod(org.moe.natj.objc.SEL sel)voidsetElementValueDidChangeHandler(GCDevicePhysicalInput.Block_setElementValueDidChangeHandler value)Set this block to be notified when a value on a element changed.voidsetInputStateAvailableHandler(GCDevicePhysicalInput.Block_setInputStateAvailableHandler value)Set this block to be notified when a new input state is available.voidsetInputStateQueueDepth(long value)The maximum number of input states to buffer.voidsetQueue(@Nullable dispatch_queue_t value)The dispatch queue that element value change handlers and other callbacks are submitted on.static voidsetVersion_static(long aVersion)static org.moe.natj.objc.Classsuperclass_static()@NotNull GCPhysicalInputElementCollection<java.lang.String,?>switches()@Nullable GCControllerLiveInputunmappedInput()Get a view of the controller's input without any system-level control remapping applied.static booleanuseStoredAccessor()Deprecated.static longversion_static()-
Methods inherited from class apple.NSObject
accessibilityActivate, accessibilityActivateBlock, accessibilityActivationPoint, accessibilityActivationPointBlock, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedHintBlock, accessibilityAttributedLabel, accessibilityAttributedLabelBlock, accessibilityAttributedUserInputLabels, accessibilityAttributedUserInputLabelsBlock, accessibilityAttributedValue, accessibilityAttributedValueBlock, accessibilityContainerType, accessibilityContainerTypeBlock, accessibilityCustomActions, accessibilityCustomActionsBlock, accessibilityCustomRotors, accessibilityCustomRotorsBlock, accessibilityDecrement, accessibilityDecrementBlock, accessibilityDirectTouchOptions, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsBlock, accessibilityElementsHidden, accessibilityElementsHiddenBlock, accessibilityFrame, accessibilityFrameBlock, accessibilityHeaderElementsBlock, accessibilityHint, accessibilityHintBlock, accessibilityIdentifierBlock, accessibilityIncrement, accessibilityIncrementBlock, accessibilityLabel, accessibilityLabelBlock, accessibilityLanguage, accessibilityLanguageBlock, accessibilityMagicTapBlock, accessibilityNavigationStyle, accessibilityNavigationStyleBlock, accessibilityPath, accessibilityPathBlock, accessibilityPerformEscape, accessibilityPerformEscapeBlock, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityRespondsToUserInteractionBlock, accessibilityScroll, accessibilityShouldGroupAccessibilityChildrenBlock, accessibilityTextualContext, accessibilityTextualContextBlock, accessibilityTraits, accessibilityTraitsBlock, accessibilityUserInputLabels, accessibilityUserInputLabelsBlock, accessibilityValue, accessibilityValueBlock, accessibilityViewIsModal, accessibilityViewIsModalBlock, accessibilityZoomInAtPoint, accessibilityZoomOutAtPoint, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, automationElements, automationElementsBlock, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hash, indexOfAccessibilityElement, isAccessibilityElement, isAccessibilityElementBlock, isEqual, isKindOfClass, isMemberOfClass, isProxy, methodForSelector, methodSignatureForSelector, mutableArrayValueForKey, mutableArrayValueForKeyPath, mutableCopy, mutableOrderedSetValueForKey, mutableOrderedSetValueForKeyPath, mutableSetValueForKey, mutableSetValueForKeyPath, observationInfo, observeValueForKeyPathOfObjectChangeContext, performSelector, performSelectorInBackgroundWithObject, performSelectorOnMainThreadWithObjectWaitUntilDone, performSelectorOnMainThreadWithObjectWaitUntilDoneModes, performSelectorOnThreadWithObjectWaitUntilDone, performSelectorOnThreadWithObjectWaitUntilDoneModes, performSelectorWithObject, performSelectorWithObjectAfterDelay, performSelectorWithObjectAfterDelayInModes, performSelectorWithObjectWithObject, prepareForInterfaceBuilder, provideImageDataBytesPerRowOrigin_Size_UserInfo, removeObserverForKeyPath, removeObserverForKeyPathContext, replacementObjectForCoder, replacementObjectForKeyedArchiver, respondsToSelector, self, setAccessibilityActivateBlock, setAccessibilityActivationPoint, setAccessibilityActivationPointBlock, setAccessibilityAttributedHint, setAccessibilityAttributedHintBlock, setAccessibilityAttributedLabel, setAccessibilityAttributedLabelBlock, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedUserInputLabelsBlock, setAccessibilityAttributedValue, setAccessibilityAttributedValueBlock, setAccessibilityContainerType, setAccessibilityContainerTypeBlock, setAccessibilityCustomActions, setAccessibilityCustomActionsBlock, setAccessibilityCustomRotors, setAccessibilityCustomRotorsBlock, setAccessibilityDecrementBlock, setAccessibilityDirectTouchOptions, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsBlock, setAccessibilityElementsHidden, setAccessibilityElementsHiddenBlock, setAccessibilityFrame, setAccessibilityFrameBlock, setAccessibilityHeaderElementsBlock, setAccessibilityHint, setAccessibilityHintBlock, setAccessibilityIdentifierBlock, setAccessibilityIncrementBlock, setAccessibilityLabel, setAccessibilityLabelBlock, setAccessibilityLanguage, setAccessibilityLanguageBlock, setAccessibilityMagicTapBlock, setAccessibilityNavigationStyle, setAccessibilityNavigationStyleBlock, setAccessibilityPath, setAccessibilityPathBlock, setAccessibilityPerformEscapeBlock, setAccessibilityRespondsToUserInteraction, setAccessibilityRespondsToUserInteractionBlock, setAccessibilityShouldGroupAccessibilityChildrenBlock, setAccessibilityTextualContext, setAccessibilityTextualContextBlock, setAccessibilityTraits, setAccessibilityTraitsBlock, setAccessibilityUserInputLabels, setAccessibilityUserInputLabelsBlock, setAccessibilityValue, setAccessibilityValueBlock, setAccessibilityViewIsModal, setAccessibilityViewIsModalBlock, setAutomationElements, setAutomationElementsBlock, setIsAccessibilityElement, setIsAccessibilityElementBlock, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, storedValueForKey, superclass, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, unableToSetNilForKey, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, valuesForKeys, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKey
-
-
-
-
Method Detail
-
accessInstanceVariablesDirectly
public static boolean accessInstanceVariablesDirectly()
-
alloc
public static GCControllerLiveInput alloc()
-
allocWithZone
public static GCControllerLiveInput allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
-
automaticallyNotifiesObserversForKey
public static boolean automaticallyNotifiesObserversForKey(@NotNull @NotNull java.lang.String key)
-
axes
@NotNull public @NotNull GCPhysicalInputElementCollection<java.lang.String,?> axes()
- Specified by:
axesin interfaceGCDevicePhysicalInputState- Overrides:
axesin classGCControllerInputState
-
buttons
@NotNull public @NotNull GCPhysicalInputElementCollection<java.lang.String,?> buttons()
- Specified by:
buttonsin interfaceGCDevicePhysicalInputState- Overrides:
buttonsin classGCControllerInputState
-
cancelPreviousPerformRequestsWithTarget
public static void cancelPreviousPerformRequestsWithTarget(@NotNull @NotNull java.lang.Object aTarget)
-
cancelPreviousPerformRequestsWithTargetSelectorObject
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(@NotNull @NotNull java.lang.Object aTarget, @NotNull @NotNull org.moe.natj.objc.SEL aSelector, @Nullable @Nullable java.lang.Object anArgument)
-
capture
@NotNull public @NotNull GCControllerInputState capture()
Description copied from interface:GCDevicePhysicalInputPolls the current state vector of the physical input and saves it to a new instance. If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on further device input once it is taken.- Specified by:
capturein interfaceGCDevicePhysicalInput- Returns:
- An input state with the duplicated state vector of the current input.
-
classFallbacksForKeyedArchiver
@NotNull public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
-
classForKeyedUnarchiver
@NotNull public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
-
debugDescription_static
public static java.lang.String debugDescription_static()
-
description_static
public static java.lang.String description_static()
-
device
@Nullable public @Nullable GCDevice device()
Description copied from interface:GCDevicePhysicalInputStateThe device that this profile is mapping input from.- Specified by:
devicein interfaceGCDevicePhysicalInput- Specified by:
devicein interfaceGCDevicePhysicalInputState- Overrides:
devicein classGCControllerInputState
-
dpads
@NotNull public @NotNull GCPhysicalInputElementCollection<java.lang.String,?> dpads()
- Specified by:
dpadsin interfaceGCDevicePhysicalInputState- Overrides:
dpadsin classGCControllerInputState
-
elementValueDidChangeHandler
@Nullable public GCDevicePhysicalInput.Block_elementValueDidChangeHandler_ret elementValueDidChangeHandler()
Description copied from interface:GCDevicePhysicalInputSet this block to be notified when a value on a element changed. If multiple elements change this block will be called for each element that changed. The block is called on the \c queue configured for the physical input.- Specified by:
elementValueDidChangeHandlerin interfaceGCDevicePhysicalInput
-
elements
@NotNull public @NotNull GCPhysicalInputElementCollection<java.lang.String,?> elements()
Description copied from interface:GCDevicePhysicalInputStateThe 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- Specified by:
elementsin interfaceGCDevicePhysicalInputState- Overrides:
elementsin classGCControllerInputState
-
hash_static
public static long hash_static()
-
init
public GCControllerLiveInput init()
- Overrides:
initin classGCControllerInputState
-
inputStateAvailableHandler
@Nullable public GCDevicePhysicalInput.Block_inputStateAvailableHandler_ret inputStateAvailableHandler()
Description copied from interface:GCDevicePhysicalInputSet this block to be notified when a new input state is available. Your handler should repeatedly call \c -nextInputState until it returns \c nil to drain the pending input states from the queue. physicalInput.inputStateQueueDepth = 20; physicalInput.inputStateAvailableHandler = ^(__kindof idphysicalInput) { id nextInputState; while ((nextInputState = [physicalInput nextInputState])) { // You can grab the individual states of all elements that your app // is interested in. id buttonA = nextInputState.buttons[GCInputButtonA]; BOOL buttonAPressed = buttonA.pressedInput.pressed; if (buttonAPressed) { // Handle button A pressed } // Your code can first query whether an element's input value changed // from the prior input state. GCDevicePhysicalInputElementChange buttonAChange = [nextInputState changeForElement:buttonA]; if (buttonAChange == GCDevicePhysicalInputElementChanged) { // Handle button A input changed } // Or, your code can request an enumerator of elements with input // values that changed from the prior input state for (id changedElement in nextInputState.changedElements) { } } }; - Specified by:
inputStateAvailableHandlerin interfaceGCDevicePhysicalInput
-
inputStateQueueDepth
public long inputStateQueueDepth()
Description copied from interface:GCDevicePhysicalInputThe maximum number of input states to buffer. If your application does not drain the pending input states in the queue before this limit is reached, older input states will be discarded - resulting in your application "missing" input state changes. The default value is \c one (no buffering). Smaller values are ignored. A value of \c 20 should be more than enough to ensure no input state changes are missed.- Specified by:
inputStateQueueDepthin interfaceGCDevicePhysicalInput
-
instanceMethodForSelector
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
-
instanceMethodSignatureForSelector
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
-
instancesRespondToSelector
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
-
isSubclassOfClass
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
-
keyPathsForValuesAffectingValueForKey
@NotNull public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(@NotNull @NotNull java.lang.String key)
-
lastEventLatency
public double lastEventLatency()
Description copied from interface:GCDevicePhysicalInputStateThe 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.- Specified by:
lastEventLatencyin interfaceGCDevicePhysicalInputState- Overrides:
lastEventLatencyin classGCControllerInputState
-
lastEventTimestamp
public double lastEventTimestamp()
Description copied from interface:GCDevicePhysicalInputStateThe 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.- Specified by:
lastEventTimestampin interfaceGCDevicePhysicalInputState- Overrides:
lastEventTimestampin classGCControllerInputState
-
new_objc
public static GCControllerLiveInput new_objc()
-
nextInputState
@Nullable public @Nullable GCControllerInputState nextInputState()
Description copied from interface:GCDevicePhysicalInputPop the oldest pending input state from the queue. This method returns \c nil when there are no more input states pending.- Specified by:
nextInputStatein interfaceGCDevicePhysicalInput
-
objectForKeyedSubscript
@Nullable public @Nullable GCPhysicalInputElement objectForKeyedSubscript(@NotNull @NotNull java.lang.String key)
Description copied from interface:GCDevicePhysicalInputStateProfile 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- Specified by:
objectForKeyedSubscriptin interfaceGCDevicePhysicalInputState- Overrides:
objectForKeyedSubscriptin classGCControllerInputState
-
queue
@Nullable public @Nullable dispatch_queue_t queue()
Description copied from interface:GCDevicePhysicalInputThe dispatch queue that element value change handlers and other callbacks are submitted on. The default queue is the \c handlerQueue of the associated \c device. Set this property if your application wants to receive input callbacks on a different queue. You should set this property before configuring other callbacks. API-Since: 17.0- Specified by:
queuein interfaceGCDevicePhysicalInput
-
resolveClassMethod
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
-
resolveInstanceMethod
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
-
setElementValueDidChangeHandler
public void setElementValueDidChangeHandler(@Nullable GCDevicePhysicalInput.Block_setElementValueDidChangeHandler value)Description copied from interface:GCDevicePhysicalInputSet this block to be notified when a value on a element changed. If multiple elements change this block will be called for each element that changed. The block is called on the \c queue configured for the physical input.- Specified by:
setElementValueDidChangeHandlerin interfaceGCDevicePhysicalInput
-
setInputStateAvailableHandler
public void setInputStateAvailableHandler(@Nullable GCDevicePhysicalInput.Block_setInputStateAvailableHandler value)Description copied from interface:GCDevicePhysicalInputSet this block to be notified when a new input state is available. Your handler should repeatedly call \c -nextInputState until it returns \c nil to drain the pending input states from the queue. physicalInput.inputStateQueueDepth = 20; physicalInput.inputStateAvailableHandler = ^(__kindof idphysicalInput) { id nextInputState; while ((nextInputState = [physicalInput nextInputState])) { // You can grab the individual states of all elements that your app // is interested in. id buttonA = nextInputState.buttons[GCInputButtonA]; BOOL buttonAPressed = buttonA.pressedInput.pressed; if (buttonAPressed) { // Handle button A pressed } // Your code can first query whether an element's input value changed // from the prior input state. GCDevicePhysicalInputElementChange buttonAChange = [nextInputState changeForElement:buttonA]; if (buttonAChange == GCDevicePhysicalInputElementChanged) { // Handle button A input changed } // Or, your code can request an enumerator of elements with input // values that changed from the prior input state for (id changedElement in nextInputState.changedElements) { } } }; - Specified by:
setInputStateAvailableHandlerin interfaceGCDevicePhysicalInput
-
setInputStateQueueDepth
public void setInputStateQueueDepth(long value)
Description copied from interface:GCDevicePhysicalInputThe maximum number of input states to buffer. If your application does not drain the pending input states in the queue before this limit is reached, older input states will be discarded - resulting in your application "missing" input state changes. The default value is \c one (no buffering). Smaller values are ignored. A value of \c 20 should be more than enough to ensure no input state changes are missed.- Specified by:
setInputStateQueueDepthin interfaceGCDevicePhysicalInput
-
setQueue
public void setQueue(@Nullable @Nullable dispatch_queue_t value)Description copied from interface:GCDevicePhysicalInputThe dispatch queue that element value change handlers and other callbacks are submitted on. The default queue is the \c handlerQueue of the associated \c device. Set this property if your application wants to receive input callbacks on a different queue. You should set this property before configuring other callbacks. API-Since: 17.0- Specified by:
setQueuein interfaceGCDevicePhysicalInput
-
setVersion_static
public static void setVersion_static(long aVersion)
-
superclass_static
public static org.moe.natj.objc.Class superclass_static()
-
switches
@NotNull public @NotNull GCPhysicalInputElementCollection<java.lang.String,?> switches()
- Specified by:
switchesin interfaceGCDevicePhysicalInputState- Overrides:
switchesin classGCControllerInputState
-
unmappedInput
@Nullable public @Nullable GCControllerLiveInput unmappedInput()
Get a view of the controller's input without any system-level control remapping applied. Developers should avoid implementing their own control remapping functionality and to instead direct users to the system game controller settings to remap controls. If you choose to implement your own control remapping functionality, or if your app streams controller input to a remote device that implements control remapping functionality, you should access controller physical input through this interface.
-
useStoredAccessor
@Deprecated public static boolean useStoredAccessor()
Deprecated.
-
version_static
public static long version_static()
-
-