public class GCPhysicalInputProfile extends NSObject
All controller profiles provide a base level of information about the controller they belong to.
A profile maps the hardware notion of a controller into a logical controller. One that a developer can design for and depend on, no matter the underlying hardware.
NSObject.Function_instanceMethodForSelector_ret, NSObject.Function_methodForSelector_ret| Modifier | Constructor and Description |
|---|---|
protected |
GCPhysicalInputProfile(org.moe.natj.general.Pointer peer) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
accessInstanceVariablesDirectly() |
NSSet<? extends GCControllerAxisInput> |
allAxes() |
NSSet<? extends GCControllerButtonInput> |
allButtons() |
NSSet<? extends GCControllerDirectionPad> |
allDpads() |
NSSet<? extends GCControllerElement> |
allElements()
The following properties allow for dynamic querying of the input elements available on a profile.
|
static GCPhysicalInputProfile |
alloc() |
static GCPhysicalInputProfile |
allocWithZone(org.moe.natj.general.ptr.VoidPtr zone) |
NSSet<? extends GCControllerTouchpad> |
allTouchpads() |
static boolean |
automaticallyNotifiesObserversForKey(java.lang.String key) |
NSDictionary<java.lang.String,? extends GCControllerAxisInput> |
axes() |
NSDictionary<java.lang.String,? extends GCControllerButtonInput> |
buttons() |
static void |
cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget) |
static void |
cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument) |
GCPhysicalInputProfile |
capture()
Polls the state vector of the physical input input and saves it to a new and writable instance of GCPhysicalInputProfile.
|
static NSArray<java.lang.String> |
classFallbacksForKeyedArchiver() |
static org.moe.natj.objc.Class |
classForKeyedUnarchiver() |
static java.lang.String |
debugDescription_static() |
static java.lang.String |
description_static() |
GCDevice |
device()
A profile keeps a reference to the device that this profile is mapping input from
|
NSDictionary<java.lang.String,? extends GCControllerDirectionPad> |
dpads() |
NSDictionary<java.lang.String,? extends GCControllerElement> |
elements()
The following properties allow for runtime lookup of any input element on a profile, when provided with a valid alias.
|
static long |
hash_static() |
boolean |
hasRemappedElements()
Whether the user has remapped their physical input controls for this profile at the system level.
|
GCPhysicalInputProfile |
init() |
static NSObject.Function_instanceMethodForSelector_ret |
instanceMethodForSelector(org.moe.natj.objc.SEL aSelector) |
static NSMethodSignature |
instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
instancesRespondToSelector(org.moe.natj.objc.SEL aSelector) |
static boolean |
isSubclassOfClass(org.moe.natj.objc.Class aClass) |
static NSSet<java.lang.String> |
keyPathsForValuesAffectingValueForKey(java.lang.String key) |
double |
lastEventTimestamp()
The last time elements of this profile were updated.
|
java.lang.String |
mappedElementAliasForPhysicalInputName(java.lang.String inputName)
Returns the primary alias of the GCControllerElement that a given physical input maps to.
|
NSSet<java.lang.String> |
mappedPhysicalInputNamesForElementAlias(java.lang.String elementAlias)
Returns a set of GCInput strings corresponding to physical inputs that are mapped to a given GCControllerElement.
|
static GCPhysicalInputProfile |
new_objc() |
GCControllerElement |
objectForKeyedSubscript(java.lang.String key)
Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs.
|
static boolean |
resolveClassMethod(org.moe.natj.objc.SEL sel) |
static boolean |
resolveInstanceMethod(org.moe.natj.objc.SEL sel) |
void |
setStateFromPhysicalInput(GCPhysicalInputProfile physicalInput)
Sets the state vector of the physical input profile to a copy of the passed in physical input profile's state vector.
|
static void |
setVersion_static(long aVersion) |
static org.moe.natj.objc.Class |
superclass_static() |
NSDictionary<java.lang.String,? extends GCControllerTouchpad> |
touchpads() |
static long |
version_static() |
accessibilityActivate, accessibilityActivationPoint, accessibilityAssistiveTechnologyFocusedIdentifiers, accessibilityAttributedHint, accessibilityAttributedLabel, accessibilityAttributedUserInputLabels, accessibilityAttributedValue, accessibilityContainerType, accessibilityCustomActions, accessibilityCustomRotors, accessibilityDecrement, accessibilityDragSourceDescriptors, accessibilityDropPointDescriptors, accessibilityElementAtIndex, accessibilityElementCount, accessibilityElementDidBecomeFocused, accessibilityElementDidLoseFocus, accessibilityElementIsFocused, accessibilityElements, accessibilityElementsHidden, accessibilityFrame, accessibilityHint, accessibilityIncrement, accessibilityLabel, accessibilityLanguage, accessibilityNavigationStyle, accessibilityPath, accessibilityPerformEscape, accessibilityPerformMagicTap, accessibilityRespondsToUserInteraction, accessibilityScroll, accessibilityTextualContext, accessibilityTraits, accessibilityUserInputLabels, accessibilityValue, accessibilityViewIsModal, addObserverForKeyPathOptionsContext, attemptRecoveryFromErrorOptionIndex, attemptRecoveryFromErrorOptionIndexDelegateDidRecoverSelectorContextInfo, autoContentAccessingProxy, awakeAfterUsingCoder, awakeFromNib, class_objc, classForCoder, classForKeyedArchiver, copy, dealloc, debugDescription, description, dictionaryWithValuesForKeys, didChangeValueForKey, didChangeValueForKeyWithSetMutationUsingObjects, didChangeValuesAtIndexesForKey, doesNotRecognizeSelector, fileManagerShouldProceedAfterError, fileManagerWillProcessPath, finalize_objc, forwardingTargetForSelector, forwardInvocation, hash, indexOfAccessibilityElement, isAccessibilityElement, 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, setAccessibilityActivationPoint, setAccessibilityAttributedHint, setAccessibilityAttributedLabel, setAccessibilityAttributedUserInputLabels, setAccessibilityAttributedValue, setAccessibilityContainerType, setAccessibilityCustomActions, setAccessibilityCustomRotors, setAccessibilityDragSourceDescriptors, setAccessibilityDropPointDescriptors, setAccessibilityElements, setAccessibilityElementsHidden, setAccessibilityFrame, setAccessibilityHint, setAccessibilityLabel, setAccessibilityLanguage, setAccessibilityNavigationStyle, setAccessibilityPath, setAccessibilityRespondsToUserInteraction, setAccessibilityTextualContext, setAccessibilityTraits, setAccessibilityUserInputLabels, setAccessibilityValue, setAccessibilityViewIsModal, setIsAccessibilityElement, setNilValueForKey, setObservationInfo, setShouldGroupAccessibilityChildren, setValueForKey, setValueForKeyPath, setValueForUndefinedKey, setValuesForKeysWithDictionary, shouldGroupAccessibilityChildren, superclass, validateValueForKeyError, validateValueForKeyPathError, valueForKey, valueForKeyPath, valueForUndefinedKey, willChangeValueForKey, willChangeValueForKeyWithSetMutationUsingObjects, willChangeValuesAtIndexesForKeyprotected GCPhysicalInputProfile(org.moe.natj.general.Pointer peer)
public static boolean accessInstanceVariablesDirectly()
public NSSet<? extends GCControllerAxisInput> allAxes()
public NSSet<? extends GCControllerButtonInput> allButtons()
public NSSet<? extends GCControllerDirectionPad> allDpads()
public NSSet<? extends GCControllerElement> allElements()
public static GCPhysicalInputProfile alloc()
public static GCPhysicalInputProfile allocWithZone(org.moe.natj.general.ptr.VoidPtr zone)
public static boolean automaticallyNotifiesObserversForKey(java.lang.String key)
public NSDictionary<java.lang.String,? extends GCControllerAxisInput> axes()
public NSDictionary<java.lang.String,? extends GCControllerButtonInput> buttons()
public static void cancelPreviousPerformRequestsWithTarget(java.lang.Object aTarget)
public static void cancelPreviousPerformRequestsWithTargetSelectorObject(java.lang.Object aTarget,
org.moe.natj.objc.SEL aSelector,
java.lang.Object anArgument)
public GCPhysicalInputProfile capture()
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 user input once it is taken.
snapshotpublic static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
public static org.moe.natj.objc.Class classForKeyedUnarchiver()
public static java.lang.String debugDescription_static()
public static java.lang.String description_static()
public GCDevice device()
public NSDictionary<java.lang.String,? extends GCControllerDirectionPad> dpads()
public NSDictionary<java.lang.String,? extends GCControllerElement> elements()
[@example] extendedGamepad.elements["Button A"] == extendedGamepad.buttonA // YES [@example] extendedGamepad.dpads["Left Thumbstick"] == extendedGamepad.leftThumbstick // YES [@example] extendedGamepad.dpads["Button B"] // returns nil, "Button B" is not a GCControllerDirectionPad
public static long hash_static()
public GCPhysicalInputProfile init()
public static NSObject.Function_instanceMethodForSelector_ret instanceMethodForSelector(org.moe.natj.objc.SEL aSelector)
public static NSMethodSignature instanceMethodSignatureForSelector(org.moe.natj.objc.SEL aSelector)
public static boolean instancesRespondToSelector(org.moe.natj.objc.SEL aSelector)
public static boolean isSubclassOfClass(org.moe.natj.objc.Class aClass)
public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey(java.lang.String key)
public double lastEventTimestamp()
public static GCPhysicalInputProfile new_objc()
public GCControllerElement objectForKeyedSubscript(java.lang.String key)
[@example] extendedGamepad["Button A"] == extendedGamepad.buttonA // YES [@example] microGamepad["Button X"] == microGamepad.buttonX // YES [@note] Equivalent to -elements
public static boolean resolveClassMethod(org.moe.natj.objc.SEL sel)
public static boolean resolveInstanceMethod(org.moe.natj.objc.SEL sel)
public void setStateFromPhysicalInput(GCPhysicalInputProfile physicalInput)
[@note] If the controller's snapshot flag is set to NO, this method has no effect.
GCController.snapshotpublic static void setVersion_static(long aVersion)
public static org.moe.natj.objc.Class superclass_static()
public static long version_static()
public NSSet<? extends GCControllerTouchpad> allTouchpads()
public boolean hasRemappedElements()
On iOS and tvOS, users can remap their game controller inputs in Settings.
public java.lang.String mappedElementAliasForPhysicalInputName(java.lang.String inputName)
If the user were to map a physical press of the A button of their game controller to the B button, then -[GCPhysicalInputProfile mappedElementAliasForPhysicalInputName: GCInputButtonA] would return GCInputButtonB. Note that mappings can change anytime your app is backgrounded, so make sure you update any relevant visuals when returning to foreground.
[@returns] A GCInput string corresponding to the primary alias of the GCControllerElement that a given physical button maps to, or nil if there is no mapping.
inputName - A GCInput string corresponding to the physical button you want the mapped element alias for.public NSSet<java.lang.String> mappedPhysicalInputNamesForElementAlias(java.lang.String elementAlias)
If the user mapped the physical press of the A button, the B button, and the X button to the B button, then -[GCPhysicalInputProfile mappedPhysicalInputNamesForElementAlias: GCInputButtonB] would return [GCInputButtonA, GCInputButtonB, GCInputButtonX]. Note that mappings can change anytime your app is backgrounded, so make sure you update any relevant visuals when returning to foreground.
[@returns] A set of GCInput strings corresponding to physical inputs that are mapped to a given GCControllerElement, or an empty set if there are no mappings.
elementAlias - A GCInput string corresponding to an alias of the GCControllerElement you want the physical buttons for.public NSDictionary<java.lang.String,? extends GCControllerTouchpad> touchpads()