Documentation
¶
Overview ¶
Package gamecontroller provides purego-based Go bindings for the macOS GameController framework.
Apple documentation: https://developer.apple.com/documentation/gamecontroller
Index ¶
- Constants
- func GCControllerControllers() *foundation.NSArray[*GCController]
- func GCControllerDidBecomeCurrentNotification() *foundation.NSString
- func GCControllerDidConnectNotification() *foundation.NSString
- func GCControllerDidDisconnectNotification() *foundation.NSString
- func GCControllerDidStopBeingCurrentNotification() *foundation.NSString
- func GCControllerSetShouldMonitorBackgroundEvents(shouldMonitorBackgroundEvents bool)
- func GCControllerShouldMonitorBackgroundEvents() bool
- func GCControllerStartWirelessControllerDiscoveryWithCompletionHandler(completionHandler func())
- func GCControllerStopWirelessControllerDiscovery()
- func GCControllerSupportsHIDDevice(device unsafe.Pointer) bool
- func GCControllerUserCustomizationsDidChangeNotification() *foundation.NSString
- func GCExtendedGamepadSnapShotDataV100FromNSData(snapshotData *GCExtendedGamepadSnapShotDataV100, data *foundation.NSData) bool
- func GCExtendedGamepadSnapshotDataFromNSData(snapshotData *GCExtendedGamepadSnapshotData, data *foundation.NSData) bool
- func GCGamepadSnapShotDataV100FromNSData(snapshotData *GCGamepadSnapShotDataV100, data *foundation.NSData) bool
- func GCHapticDurationInfinite() uintptr
- func GCHapticsLocalityAll() *foundation.NSString
- func GCHapticsLocalityDefault() *foundation.NSString
- func GCHapticsLocalityHandles() *foundation.NSString
- func GCHapticsLocalityLeftHandle() *foundation.NSString
- func GCHapticsLocalityLeftTrigger() *foundation.NSString
- func GCHapticsLocalityRightHandle() *foundation.NSString
- func GCHapticsLocalityRightTrigger() *foundation.NSString
- func GCHapticsLocalityTriggers() *foundation.NSString
- func GCInputArcadeButtonName(row int, column int) *foundation.NSString
- func GCInputBackLeftButton(position int) *foundation.NSString
- func GCInputBackRightButton(position int) *foundation.NSString
- func GCInputButtonA() *foundation.NSString
- func GCInputButtonB() *foundation.NSString
- func GCInputButtonHome() *foundation.NSString
- func GCInputButtonMenu() *foundation.NSString
- func GCInputButtonOptions() *foundation.NSString
- func GCInputButtonShare() *foundation.NSString
- func GCInputButtonX() *foundation.NSString
- func GCInputButtonY() *foundation.NSString
- func GCInputDirectionPad() *foundation.NSString
- func GCInputDirectionalCardinalDpad() *foundation.NSString
- func GCInputDirectionalCenterButton() *foundation.NSString
- func GCInputDirectionalDpad() *foundation.NSString
- func GCInputDirectionalTouchSurfaceButton() *foundation.NSString
- func GCInputDualShockTouchpadButton() *foundation.NSString
- func GCInputDualShockTouchpadOne() *foundation.NSString
- func GCInputDualShockTouchpadTwo() *foundation.NSString
- func GCInputGripButton() *foundation.NSString
- func GCInputLeftBumper() *foundation.NSString
- func GCInputLeftPaddle() *foundation.NSString
- func GCInputLeftShoulder() *foundation.NSString
- func GCInputLeftSideButton() *foundation.NSString
- func GCInputLeftThumbstick() *foundation.NSString
- func GCInputLeftThumbstickButton() *foundation.NSString
- func GCInputLeftTrigger() *foundation.NSString
- func GCInputMicroGamepadButtonA() *foundation.NSString
- func GCInputMicroGamepadButtonMenu() *foundation.NSString
- func GCInputMicroGamepadButtonX() *foundation.NSString
- func GCInputMicroGamepadDpad() *foundation.NSString
- func GCInputPedalAccelerator() *foundation.NSString
- func GCInputPedalBrake() *foundation.NSString
- func GCInputPedalClutch() *foundation.NSString
- func GCInputRightBumper() *foundation.NSString
- func GCInputRightPaddle() *foundation.NSString
- func GCInputRightShoulder() *foundation.NSString
- func GCInputRightSideButton() *foundation.NSString
- func GCInputRightThumbstick() *foundation.NSString
- func GCInputRightThumbstickButton() *foundation.NSString
- func GCInputRightTrigger() *foundation.NSString
- func GCInputShifter() *foundation.NSString
- func GCInputSteeringWheel() *foundation.NSString
- func GCInputThumbstick() *foundation.NSString
- func GCInputThumbstickButton() *foundation.NSString
- func GCInputTrigger() *foundation.NSString
- func GCInputXboxPaddleFour() *foundation.NSString
- func GCInputXboxPaddleOne() *foundation.NSString
- func GCInputXboxPaddleThree() *foundation.NSString
- func GCInputXboxPaddleTwo() *foundation.NSString
- func GCKeyA() *foundation.NSString
- func GCKeyApplication() *foundation.NSString
- func GCKeyB() *foundation.NSString
- func GCKeyBackslash() *foundation.NSString
- func GCKeyC() *foundation.NSString
- func GCKeyCapsLock() *foundation.NSString
- func GCKeyCloseBracket() *foundation.NSString
- func GCKeyCodeApplication() int
- func GCKeyCodeBackslash() int
- func GCKeyCodeCapsLock() int
- func GCKeyCodeCloseBracket() int
- func GCKeyCodeComma() int
- func GCKeyCodeDeleteForward() int
- func GCKeyCodeDeleteOrBackspace() int
- func GCKeyCodeDownArrow() int
- func GCKeyCodeEight() int
- func GCKeyCodeEnd() int
- func GCKeyCodeEqualSign() int
- func GCKeyCodeEscape() int
- func GCKeyCodeF1() int
- func GCKeyCodeF2() int
- func GCKeyCodeF3() int
- func GCKeyCodeF4() int
- func GCKeyCodeF5() int
- func GCKeyCodeF6() int
- func GCKeyCodeF7() int
- func GCKeyCodeF8() int
- func GCKeyCodeF9() int
- func GCKeyCodeF10() int
- func GCKeyCodeF11() int
- func GCKeyCodeF12() int
- func GCKeyCodeF13() int
- func GCKeyCodeF14() int
- func GCKeyCodeF15() int
- func GCKeyCodeF16() int
- func GCKeyCodeF17() int
- func GCKeyCodeF18() int
- func GCKeyCodeF19() int
- func GCKeyCodeF20() int
- func GCKeyCodeFive() int
- func GCKeyCodeFour() int
- func GCKeyCodeGraveAccentAndTilde() int
- func GCKeyCodeHome() int
- func GCKeyCodeHyphen() int
- func GCKeyCodeInsert() int
- func GCKeyCodeInternational1() int
- func GCKeyCodeInternational2() int
- func GCKeyCodeInternational3() int
- func GCKeyCodeInternational4() int
- func GCKeyCodeInternational5() int
- func GCKeyCodeInternational6() int
- func GCKeyCodeInternational7() int
- func GCKeyCodeInternational8() int
- func GCKeyCodeInternational9() int
- func GCKeyCodeKeyA() int
- func GCKeyCodeKeyB() int
- func GCKeyCodeKeyC() int
- func GCKeyCodeKeyD() int
- func GCKeyCodeKeyE() int
- func GCKeyCodeKeyF() int
- func GCKeyCodeKeyG() int
- func GCKeyCodeKeyH() int
- func GCKeyCodeKeyI() int
- func GCKeyCodeKeyJ() int
- func GCKeyCodeKeyK() int
- func GCKeyCodeKeyL() int
- func GCKeyCodeKeyM() int
- func GCKeyCodeKeyN() int
- func GCKeyCodeKeyO() int
- func GCKeyCodeKeyP() int
- func GCKeyCodeKeyQ() int
- func GCKeyCodeKeyR() int
- func GCKeyCodeKeyS() int
- func GCKeyCodeKeyT() int
- func GCKeyCodeKeyU() int
- func GCKeyCodeKeyV() int
- func GCKeyCodeKeyW() int
- func GCKeyCodeKeyX() int
- func GCKeyCodeKeyY() int
- func GCKeyCodeKeyZ() int
- func GCKeyCodeKeypad0() int
- func GCKeyCodeKeypad1() int
- func GCKeyCodeKeypad2() int
- func GCKeyCodeKeypad3() int
- func GCKeyCodeKeypad4() int
- func GCKeyCodeKeypad5() int
- func GCKeyCodeKeypad6() int
- func GCKeyCodeKeypad7() int
- func GCKeyCodeKeypad8() int
- func GCKeyCodeKeypad9() int
- func GCKeyCodeKeypadAsterisk() int
- func GCKeyCodeKeypadEnter() int
- func GCKeyCodeKeypadEqualSign() int
- func GCKeyCodeKeypadHyphen() int
- func GCKeyCodeKeypadNumLock() int
- func GCKeyCodeKeypadPeriod() int
- func GCKeyCodeKeypadPlus() int
- func GCKeyCodeKeypadSlash() int
- func GCKeyCodeLANG1() int
- func GCKeyCodeLANG2() int
- func GCKeyCodeLANG3() int
- func GCKeyCodeLANG4() int
- func GCKeyCodeLANG5() int
- func GCKeyCodeLANG6() int
- func GCKeyCodeLANG7() int
- func GCKeyCodeLANG8() int
- func GCKeyCodeLANG9() int
- func GCKeyCodeLeftAlt() int
- func GCKeyCodeLeftArrow() int
- func GCKeyCodeLeftControl() int
- func GCKeyCodeLeftGUI() int
- func GCKeyCodeLeftShift() int
- func GCKeyCodeNine() int
- func GCKeyCodeNonUSBackslash() int
- func GCKeyCodeNonUSPound() int
- func GCKeyCodeOne() int
- func GCKeyCodeOpenBracket() int
- func GCKeyCodePageDown() int
- func GCKeyCodePageUp() int
- func GCKeyCodePause() int
- func GCKeyCodePeriod() int
- func GCKeyCodePower() int
- func GCKeyCodePrintScreen() int
- func GCKeyCodeQuote() int
- func GCKeyCodeReturnOrEnter() int
- func GCKeyCodeRightAlt() int
- func GCKeyCodeRightArrow() int
- func GCKeyCodeRightControl() int
- func GCKeyCodeRightGUI() int
- func GCKeyCodeRightShift() int
- func GCKeyCodeScrollLock() int
- func GCKeyCodeSemicolon() int
- func GCKeyCodeSeven() int
- func GCKeyCodeSix() int
- func GCKeyCodeSlash() int
- func GCKeyCodeSpacebar() int
- func GCKeyCodeTab() int
- func GCKeyCodeThree() int
- func GCKeyCodeTwo() int
- func GCKeyCodeUpArrow() int
- func GCKeyCodeZero() int
- func GCKeyComma() *foundation.NSString
- func GCKeyD() *foundation.NSString
- func GCKeyDeleteForward() *foundation.NSString
- func GCKeyDeleteOrBackspace() *foundation.NSString
- func GCKeyDownArrow() *foundation.NSString
- func GCKeyE() *foundation.NSString
- func GCKeyEight() *foundation.NSString
- func GCKeyEnd() *foundation.NSString
- func GCKeyEqualSign() *foundation.NSString
- func GCKeyEscape() *foundation.NSString
- func GCKeyF() *foundation.NSString
- func GCKeyF1() *foundation.NSString
- func GCKeyF2() *foundation.NSString
- func GCKeyF3() *foundation.NSString
- func GCKeyF4() *foundation.NSString
- func GCKeyF5() *foundation.NSString
- func GCKeyF6() *foundation.NSString
- func GCKeyF7() *foundation.NSString
- func GCKeyF8() *foundation.NSString
- func GCKeyF9() *foundation.NSString
- func GCKeyF10() *foundation.NSString
- func GCKeyF11() *foundation.NSString
- func GCKeyF12() *foundation.NSString
- func GCKeyF13() *foundation.NSString
- func GCKeyF14() *foundation.NSString
- func GCKeyF15() *foundation.NSString
- func GCKeyF16() *foundation.NSString
- func GCKeyF17() *foundation.NSString
- func GCKeyF18() *foundation.NSString
- func GCKeyF19() *foundation.NSString
- func GCKeyF20() *foundation.NSString
- func GCKeyFive() *foundation.NSString
- func GCKeyFour() *foundation.NSString
- func GCKeyG() *foundation.NSString
- func GCKeyGraveAccentAndTilde() *foundation.NSString
- func GCKeyH() *foundation.NSString
- func GCKeyHome() *foundation.NSString
- func GCKeyHyphen() *foundation.NSString
- func GCKeyI() *foundation.NSString
- func GCKeyInsert() *foundation.NSString
- func GCKeyInternational1() *foundation.NSString
- func GCKeyInternational2() *foundation.NSString
- func GCKeyInternational3() *foundation.NSString
- func GCKeyInternational4() *foundation.NSString
- func GCKeyInternational5() *foundation.NSString
- func GCKeyInternational6() *foundation.NSString
- func GCKeyInternational7() *foundation.NSString
- func GCKeyInternational8() *foundation.NSString
- func GCKeyInternational9() *foundation.NSString
- func GCKeyJ() *foundation.NSString
- func GCKeyK() *foundation.NSString
- func GCKeyKeypad0() *foundation.NSString
- func GCKeyKeypad1() *foundation.NSString
- func GCKeyKeypad2() *foundation.NSString
- func GCKeyKeypad3() *foundation.NSString
- func GCKeyKeypad4() *foundation.NSString
- func GCKeyKeypad5() *foundation.NSString
- func GCKeyKeypad6() *foundation.NSString
- func GCKeyKeypad7() *foundation.NSString
- func GCKeyKeypad8() *foundation.NSString
- func GCKeyKeypad9() *foundation.NSString
- func GCKeyKeypadAsterisk() *foundation.NSString
- func GCKeyKeypadEnter() *foundation.NSString
- func GCKeyKeypadEqualSign() *foundation.NSString
- func GCKeyKeypadHyphen() *foundation.NSString
- func GCKeyKeypadNumLock() *foundation.NSString
- func GCKeyKeypadPeriod() *foundation.NSString
- func GCKeyKeypadPlus() *foundation.NSString
- func GCKeyKeypadSlash() *foundation.NSString
- func GCKeyL() *foundation.NSString
- func GCKeyLANG1() *foundation.NSString
- func GCKeyLANG2() *foundation.NSString
- func GCKeyLANG3() *foundation.NSString
- func GCKeyLANG4() *foundation.NSString
- func GCKeyLANG5() *foundation.NSString
- func GCKeyLANG6() *foundation.NSString
- func GCKeyLANG7() *foundation.NSString
- func GCKeyLANG8() *foundation.NSString
- func GCKeyLANG9() *foundation.NSString
- func GCKeyLeftAlt() *foundation.NSString
- func GCKeyLeftArrow() *foundation.NSString
- func GCKeyLeftControl() *foundation.NSString
- func GCKeyLeftGUI() *foundation.NSString
- func GCKeyLeftShift() *foundation.NSString
- func GCKeyM() *foundation.NSString
- func GCKeyN() *foundation.NSString
- func GCKeyNine() *foundation.NSString
- func GCKeyNonUSBackslash() *foundation.NSString
- func GCKeyNonUSPound() *foundation.NSString
- func GCKeyO() *foundation.NSString
- func GCKeyOne() *foundation.NSString
- func GCKeyOpenBracket() *foundation.NSString
- func GCKeyP() *foundation.NSString
- func GCKeyPageDown() *foundation.NSString
- func GCKeyPageUp() *foundation.NSString
- func GCKeyPause() *foundation.NSString
- func GCKeyPeriod() *foundation.NSString
- func GCKeyPower() *foundation.NSString
- func GCKeyPrintScreen() *foundation.NSString
- func GCKeyQ() *foundation.NSString
- func GCKeyQuote() *foundation.NSString
- func GCKeyR() *foundation.NSString
- func GCKeyReturnOrEnter() *foundation.NSString
- func GCKeyRightAlt() *foundation.NSString
- func GCKeyRightArrow() *foundation.NSString
- func GCKeyRightControl() *foundation.NSString
- func GCKeyRightGUI() *foundation.NSString
- func GCKeyRightShift() *foundation.NSString
- func GCKeyS() *foundation.NSString
- func GCKeyScrollLock() *foundation.NSString
- func GCKeySemicolon() *foundation.NSString
- func GCKeySeven() *foundation.NSString
- func GCKeySix() *foundation.NSString
- func GCKeySlash() *foundation.NSString
- func GCKeySpacebar() *foundation.NSString
- func GCKeyT() *foundation.NSString
- func GCKeyTab() *foundation.NSString
- func GCKeyThree() *foundation.NSString
- func GCKeyTwo() *foundation.NSString
- func GCKeyU() *foundation.NSString
- func GCKeyUpArrow() *foundation.NSString
- func GCKeyV() *foundation.NSString
- func GCKeyW() *foundation.NSString
- func GCKeyX() *foundation.NSString
- func GCKeyY() *foundation.NSString
- func GCKeyZ() *foundation.NSString
- func GCKeyZero() *foundation.NSString
- func GCKeyboardDidConnectNotification() *foundation.NSString
- func GCKeyboardDidDisconnectNotification() *foundation.NSString
- func GCMicroGamepadSnapShotDataV100FromNSData(snapshotData *GCMicroGamepadSnapShotDataV100, data *foundation.NSData) bool
- func GCMicroGamepadSnapshotDataFromNSData(snapshotData *GCMicroGamepadSnapshotData, data *foundation.NSData) bool
- func GCMouseDidBecomeCurrentNotification() *foundation.NSString
- func GCMouseDidConnectNotification() *foundation.NSString
- func GCMouseDidDisconnectNotification() *foundation.NSString
- func GCMouseDidStopBeingCurrentNotification() *foundation.NSString
- func GCMouseMice() *foundation.NSArray[*GCMouse]
- func GCPoint2Equal(point1 GCPoint2, point2 GCPoint2) bool
- func GCProductCategoryArcadeStick() *foundation.NSString
- func GCProductCategoryCoalescedRemote() *foundation.NSString
- func GCProductCategoryControlCenterRemote() *foundation.NSString
- func GCProductCategoryDualSense() *foundation.NSString
- func GCProductCategoryDualShock4() *foundation.NSString
- func GCProductCategoryHID() *foundation.NSString
- func GCProductCategoryKeyboard() *foundation.NSString
- func GCProductCategoryMFi() *foundation.NSString
- func GCProductCategoryMouse() *foundation.NSString
- func GCProductCategorySiriRemote1stGen() *foundation.NSString
- func GCProductCategorySiriRemote2ndGen() *foundation.NSString
- func GCProductCategorySpatialController() *foundation.NSString
- func GCProductCategoryUniversalElectronicsRemote() *foundation.NSString
- func GCProductCategoryXboxOne() *foundation.NSString
- func GCRacingWheelConnectedRacingWheels() *foundation.NSSet[*GCRacingWheel]
- func GCRacingWheelDidConnectNotification() *foundation.NSString
- func GCRacingWheelDidDisconnectNotification() *foundation.NSString
- func NSDataFromGCExtendedGamepadSnapShotDataV100(snapshotData *GCExtendedGamepadSnapShotDataV100) *foundation.NSData
- func NSDataFromGCExtendedGamepadSnapshotData(snapshotData *GCExtendedGamepadSnapshotData) *foundation.NSData
- func NSDataFromGCGamepadSnapShotDataV100(snapshotData *GCGamepadSnapShotDataV100) *foundation.NSData
- func NSDataFromGCMicroGamepadSnapShotDataV100(snapshotData *GCMicroGamepadSnapShotDataV100) *foundation.NSData
- func NSDataFromGCMicroGamepadSnapshotData(snapshotData *GCMicroGamepadSnapshotData) *foundation.NSData
- func NSStringFromGCPoint2(point GCPoint2) *foundation.NSString
- func SymbolAvailable(symbol string) bool
- type Acl_entry_id_t
- type Acl_flag_t
- type Acl_perm_t
- type Acl_tag_t
- type Acl_type_t
- type Clockid_t
- type Dispatch_autorelease_frequency_t
- type Dispatch_block_flags_t
- type EvCmd
- type EvsioEVSIOCCSIndices
- type EvsioEVSIOSCSIndices
- type Filesec_property_t
- type GCAcceleration
- type GCAxis2DInput
- type GCAxisElement
- type GCAxisElementName
- type GCAxisInput
- type GCButtonElement
- type GCButtonElementName
- type GCButtonInput
- type GCColor
- type GCController
- func (o *GCController) Battery() *GCDeviceBattery
- func (o *GCController) Capture() *GCController
- func (o *GCController) ControllerPausedHandler() objc.Block
- func (o *GCController) ExtendedGamepad() *GCExtendedGamepad
- func (o *GCController) Gamepad() *GCGamepad
- func (o *GCController) Haptics() *GCDeviceHaptics
- func (o *GCController) Input() *GCControllerLiveInput
- func (o *GCController) IsAttachedToDevice() bool
- func (o *GCController) IsSnapshot() bool
- func (o *GCController) Light() *GCDeviceLight
- func (o *GCController) MicroGamepad() *GCMicroGamepad
- func (o *GCController) Motion() *GCMotion
- func (o *GCController) PhysicalInputProfile() *GCPhysicalInputProfile
- func (o *GCController) PlayerIndex() GCControllerPlayerIndex
- func (o *GCController) SetControllerPausedHandler(controllerPausedHandler func(*GCController))deprecated
- func (o *GCController) SetPlayerIndex(playerIndex GCControllerPlayerIndex)
- type GCControllerAxisInput
- type GCControllerButtonInput
- func (o *GCControllerButtonInput) IsPressed() bool
- func (o *GCControllerButtonInput) IsTouched() bool
- func (o *GCControllerButtonInput) PressedChangedHandler() objc.Block
- func (o *GCControllerButtonInput) SetPressedChangedHandler(pressedChangedHandler func(*GCControllerButtonInput, float32, bool))
- func (o *GCControllerButtonInput) SetTouchedChangedHandler(touchedChangedHandler func(*GCControllerButtonInput, float32, bool, bool))
- func (o *GCControllerButtonInput) SetValue(value float32)
- func (o *GCControllerButtonInput) SetValueChangedHandler(valueChangedHandler func(*GCControllerButtonInput, float32, bool))
- func (o *GCControllerButtonInput) TouchedChangedHandler() objc.Block
- func (o *GCControllerButtonInput) Value() float32
- func (o *GCControllerButtonInput) ValueChangedHandler() objc.Block
- type GCControllerDirectionPad
- func (o *GCControllerDirectionPad) Down() *GCControllerButtonInput
- func (o *GCControllerDirectionPad) Left() *GCControllerButtonInput
- func (o *GCControllerDirectionPad) Right() *GCControllerButtonInput
- func (o *GCControllerDirectionPad) SetValueChangedHandler(valueChangedHandler func(*GCControllerDirectionPad, float32, float32))
- func (o *GCControllerDirectionPad) SetValueForXAxisYAxis(xAxis float32, yAxis float32)
- func (o *GCControllerDirectionPad) Up() *GCControllerButtonInput
- func (o *GCControllerDirectionPad) ValueChangedHandler() objc.Block
- func (o *GCControllerDirectionPad) XAxis() *GCControllerAxisInput
- func (o *GCControllerDirectionPad) YAxis() *GCControllerAxisInput
- type GCControllerElement
- func (o *GCControllerElement) Aliases() *foundation.NSSet[*foundation.NSString]
- func (o *GCControllerElement) Collection() *GCControllerElement
- func (o *GCControllerElement) IsAnalog() bool
- func (o *GCControllerElement) IsBoundToSystemGesture() bool
- func (o *GCControllerElement) LocalizedName() *foundation.NSString
- func (o *GCControllerElement) PreferredSystemGestureState() GCSystemGestureState
- func (o *GCControllerElement) SetLocalizedName(localizedName *foundation.NSString)
- func (o *GCControllerElement) SetPreferredSystemGestureState(preferredSystemGestureState GCSystemGestureState)
- func (o *GCControllerElement) SetSfSymbolsName(sfSymbolsName *foundation.NSString)
- func (o *GCControllerElement) SetUnmappedLocalizedName(unmappedLocalizedName *foundation.NSString)
- func (o *GCControllerElement) SetUnmappedSfSymbolsName(unmappedSfSymbolsName *foundation.NSString)
- func (o *GCControllerElement) SfSymbolsName() *foundation.NSString
- func (o *GCControllerElement) UnmappedLocalizedName() *foundation.NSString
- func (o *GCControllerElement) UnmappedSfSymbolsName() *foundation.NSString
- type GCControllerInputState
- type GCControllerLiveInput
- type GCControllerPlayerIndex
- type GCControllerTouchpad
- func (o *GCControllerTouchpad) Button() *GCControllerButtonInput
- func (o *GCControllerTouchpad) ReportsAbsoluteTouchSurfaceValues() bool
- func (o *GCControllerTouchpad) SetReportsAbsoluteTouchSurfaceValues(reportsAbsoluteTouchSurfaceValues bool)
- func (o *GCControllerTouchpad) SetTouchDown(touchDown func(*GCControllerTouchpad, float32, float32, float32, bool))
- func (o *GCControllerTouchpad) SetTouchMoved(touchMoved func(*GCControllerTouchpad, float32, float32, float32, bool))
- func (o *GCControllerTouchpad) SetTouchUp(touchUp func(*GCControllerTouchpad, float32, float32, float32, bool))
- func (o *GCControllerTouchpad) SetValueForXAxisYAxisTouchDownButtonValue(xAxis float32, yAxis float32, touchDown bool, buttonValue float32)
- func (o *GCControllerTouchpad) TouchDown() objc.Block
- func (o *GCControllerTouchpad) TouchMoved() objc.Block
- func (o *GCControllerTouchpad) TouchState() GCTouchState
- func (o *GCControllerTouchpad) TouchSurface() *GCControllerDirectionPad
- func (o *GCControllerTouchpad) TouchUp() objc.Block
- type GCDevice
- type GCDeviceBattery
- type GCDeviceBatteryState
- type GCDeviceCursor
- type GCDeviceHaptics
- type GCDeviceLight
- type GCDevicePhysicalInput
- type GCDevicePhysicalInputElementChange
- type GCDevicePhysicalInputState
- type GCDevicePhysicalInputStateDiff
- type GCDirectionPadElement
- type GCDirectionPadElementName
- type GCDirectionalGamepad
- type GCDualSenseAdaptiveTrigger
- func (o *GCDualSenseAdaptiveTrigger) ArmPosition() float32
- func (o *GCDualSenseAdaptiveTrigger) Mode() GCDualSenseAdaptiveTriggerMode
- func (o *GCDualSenseAdaptiveTrigger) SetModeFeedbackWithResistiveStrengths(...)
- func (o *GCDualSenseAdaptiveTrigger) SetModeFeedbackWithStartPositionResistiveStrength(startPosition float32, resistiveStrength float32)
- func (o *GCDualSenseAdaptiveTrigger) SetModeOff()
- func (o *GCDualSenseAdaptiveTrigger) SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength(startPosition float32, endPosition float32, startStrength float32, ...)
- func (o *GCDualSenseAdaptiveTrigger) SetModeVibrationWithAmplitudesFrequency(positionalAmplitudes GCDualSenseAdaptiveTriggerPositionalAmplitudes, ...)
- func (o *GCDualSenseAdaptiveTrigger) SetModeVibrationWithStartPositionAmplitudeFrequency(startPosition float32, amplitude float32, frequency float32)
- func (o *GCDualSenseAdaptiveTrigger) SetModeWeaponWithStartPositionEndPositionResistiveStrength(startPosition float32, endPosition float32, resistiveStrength float32)
- func (o *GCDualSenseAdaptiveTrigger) Status() GCDualSenseAdaptiveTriggerStatus
- type GCDualSenseAdaptiveTriggerMode
- type GCDualSenseAdaptiveTriggerPositionalAmplitudes
- type GCDualSenseAdaptiveTriggerPositionalResistiveStrengths
- type GCDualSenseAdaptiveTriggerStatus
- type GCDualSenseGamepad
- type GCDualShockGamepad
- type GCEulerAngles
- type GCEventViewController
- type GCExtendedGamepad
- func (o *GCExtendedGamepad) ButtonA() *GCControllerButtonInput
- func (o *GCExtendedGamepad) ButtonB() *GCControllerButtonInput
- func (o *GCExtendedGamepad) ButtonHome() *GCControllerButtonInput
- func (o *GCExtendedGamepad) ButtonMenu() *GCControllerButtonInput
- func (o *GCExtendedGamepad) ButtonOptions() *GCControllerButtonInput
- func (o *GCExtendedGamepad) ButtonX() *GCControllerButtonInput
- func (o *GCExtendedGamepad) ButtonY() *GCControllerButtonInput
- func (o *GCExtendedGamepad) Controller() *GCController
- func (o *GCExtendedGamepad) Dpad() *GCControllerDirectionPad
- func (o *GCExtendedGamepad) LeftShoulder() *GCControllerButtonInput
- func (o *GCExtendedGamepad) LeftThumbstick() *GCControllerDirectionPad
- func (o *GCExtendedGamepad) LeftThumbstickButton() *GCControllerButtonInput
- func (o *GCExtendedGamepad) LeftTrigger() *GCControllerButtonInput
- func (o *GCExtendedGamepad) RightShoulder() *GCControllerButtonInput
- func (o *GCExtendedGamepad) RightThumbstick() *GCControllerDirectionPad
- func (o *GCExtendedGamepad) RightThumbstickButton() *GCControllerButtonInput
- func (o *GCExtendedGamepad) RightTrigger() *GCControllerButtonInput
- func (o *GCExtendedGamepad) SaveSnapshot() *GCExtendedGamepadSnapshot
- func (o *GCExtendedGamepad) SetStateFromExtendedGamepad(extendedGamepad *GCExtendedGamepad)
- func (o *GCExtendedGamepad) SetValueChangedHandler(valueChangedHandler func(*GCExtendedGamepad, *GCControllerElement))
- func (o *GCExtendedGamepad) ValueChangedHandler() objc.Block
- type GCExtendedGamepadSnapShotDataV100
- type GCExtendedGamepadSnapshot
- func (o *GCExtendedGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCExtendedGamepadSnapshot
- func (o *GCExtendedGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCExtendedGamepadSnapshot
- func (o *GCExtendedGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)
- func (o *GCExtendedGamepadSnapshot) SnapshotData() *foundation.NSDatadeprecated
- type GCExtendedGamepadSnapshotDatadeprecated
- type GCExtendedGamepadSnapshotDataVersiondeprecated
- type GCGamepad
- func (o *GCGamepad) ButtonA() *GCControllerButtonInput
- func (o *GCGamepad) ButtonB() *GCControllerButtonInput
- func (o *GCGamepad) ButtonX() *GCControllerButtonInput
- func (o *GCGamepad) ButtonY() *GCControllerButtonInput
- func (o *GCGamepad) Controller() *GCController
- func (o *GCGamepad) Dpad() *GCControllerDirectionPad
- func (o *GCGamepad) LeftShoulder() *GCControllerButtonInput
- func (o *GCGamepad) RightShoulder() *GCControllerButtonInput
- func (o *GCGamepad) SaveSnapshot() *GCGamepadSnapshot
- func (o *GCGamepad) SetValueChangedHandler(valueChangedHandler func(*GCGamepad, *GCControllerElement))
- func (o *GCGamepad) ValueChangedHandler() objc.Block
- type GCGamepadSnapShotDataV100
- type GCGamepadSnapshot
- func (o *GCGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCGamepadSnapshot
- func (o *GCGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCGamepadSnapshot
- func (o *GCGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)
- func (o *GCGamepadSnapshot) SnapshotData() *foundation.NSDatadeprecated
- type GCGearShifterElement
- type GCKeyboard
- type GCKeyboardInput
- func (o *GCKeyboardInput) ButtonForKeyCode(code int) *GCControllerButtonInput
- func (o *GCKeyboardInput) IsAnyKeyPressed() bool
- func (o *GCKeyboardInput) KeyChangedHandler() objc.Block
- func (o *GCKeyboardInput) SetKeyChangedHandler(keyChangedHandler func(*GCKeyboardInput, *GCControllerButtonInput, int, bool))
- type GCLinearInput
- type GCMicroGamepad
- func (o *GCMicroGamepad) AllowsRotation() bool
- func (o *GCMicroGamepad) ButtonA() *GCControllerButtonInput
- func (o *GCMicroGamepad) ButtonMenu() *GCControllerButtonInput
- func (o *GCMicroGamepad) ButtonX() *GCControllerButtonInput
- func (o *GCMicroGamepad) Controller() *GCController
- func (o *GCMicroGamepad) Dpad() *GCControllerDirectionPad
- func (o *GCMicroGamepad) ReportsAbsoluteDpadValues() bool
- func (o *GCMicroGamepad) SaveSnapshot() *GCMicroGamepadSnapshot
- func (o *GCMicroGamepad) SetAllowsRotation(allowsRotation bool)
- func (o *GCMicroGamepad) SetReportsAbsoluteDpadValues(reportsAbsoluteDpadValues bool)
- func (o *GCMicroGamepad) SetStateFromMicroGamepad(microGamepad *GCMicroGamepad)
- func (o *GCMicroGamepad) SetValueChangedHandler(valueChangedHandler func(*GCMicroGamepad, *GCControllerElement))
- func (o *GCMicroGamepad) ValueChangedHandler() objc.Block
- type GCMicroGamepadSnapShotDataV100
- type GCMicroGamepadSnapshot
- func (o *GCMicroGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCMicroGamepadSnapshot
- func (o *GCMicroGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCMicroGamepadSnapshot
- func (o *GCMicroGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)
- func (o *GCMicroGamepadSnapshot) SnapshotData() *foundation.NSDatadeprecated
- type GCMicroGamepadSnapshotDatadeprecated
- type GCMicroGamepadSnapshotDataVersiondeprecated
- type GCMotion
- func (o *GCMotion) Acceleration() GCAcceleration
- func (o *GCMotion) Attitude() GCQuaternion
- func (o *GCMotion) Controller() *GCController
- func (o *GCMotion) Gravity() GCAcceleration
- func (o *GCMotion) HasAttitude() bool
- func (o *GCMotion) HasAttitudeAndRotationRate() bool
- func (o *GCMotion) HasGravityAndUserAcceleration() bool
- func (o *GCMotion) HasRotationRate() bool
- func (o *GCMotion) RotationRate() GCRotationRate
- func (o *GCMotion) SensorsActive() bool
- func (o *GCMotion) SensorsRequireManualActivation() bool
- func (o *GCMotion) SetAcceleration(acceleration GCAcceleration)
- func (o *GCMotion) SetAttitude(attitude GCQuaternion)
- func (o *GCMotion) SetGravity(gravity GCAcceleration)
- func (o *GCMotion) SetRotationRate(rotationRate GCRotationRate)
- func (o *GCMotion) SetSensorsActive(sensorsActive bool)
- func (o *GCMotion) SetStateFromMotion(motion *GCMotion)
- func (o *GCMotion) SetUserAcceleration(userAcceleration GCAcceleration)
- func (o *GCMotion) SetValueChangedHandler(valueChangedHandler func(*GCMotion))
- func (o *GCMotion) UserAcceleration() GCAcceleration
- func (o *GCMotion) ValueChangedHandler() objc.Block
- type GCMouse
- type GCMouseInput
- func (o *GCMouseInput) AuxiliaryButtons() *foundation.NSArray[*GCControllerButtonInput]
- func (o *GCMouseInput) LeftButton() *GCControllerButtonInput
- func (o *GCMouseInput) MiddleButton() *GCControllerButtonInput
- func (o *GCMouseInput) MouseMovedHandler() objc.Block
- func (o *GCMouseInput) RightButton() *GCControllerButtonInput
- func (o *GCMouseInput) Scroll() *GCDeviceCursor
- func (o *GCMouseInput) SetMouseMovedHandler(mouseMovedHandler func(*GCMouseInput, float32, float32))
- type GCPhysicalInputElement
- type GCPhysicalInputElementCollection
- func (o *GCPhysicalInputElementCollection[Key, Element]) Count() uint
- func (o *GCPhysicalInputElementCollection[Key, Element]) ElementEnumerator() *foundation.NSEnumerator[Element]
- func (o *GCPhysicalInputElementCollection[Key, Element]) ElementForAlias(alias Key) Element
- func (o *GCPhysicalInputElementCollection[Key, Element]) ObjectForKeyedSubscript(key Key) Element
- type GCPhysicalInputElementName
- type GCPhysicalInputExtents
- type GCPhysicalInputProfile
- func (o *GCPhysicalInputProfile) AllAxes() *foundation.NSSet[*GCControllerAxisInput]
- func (o *GCPhysicalInputProfile) AllButtons() *foundation.NSSet[*GCControllerButtonInput]
- func (o *GCPhysicalInputProfile) AllDpads() *foundation.NSSet[*GCControllerDirectionPad]
- func (o *GCPhysicalInputProfile) AllElements() *foundation.NSSet[*GCControllerElement]
- func (o *GCPhysicalInputProfile) AllTouchpads() *foundation.NSSet[*GCControllerTouchpad]
- func (o *GCPhysicalInputProfile) Axes() *foundation.NSDictionary[*foundation.NSString, *GCControllerAxisInput]
- func (o *GCPhysicalInputProfile) Buttons() *foundation.NSDictionary[*foundation.NSString, *GCControllerButtonInput]
- func (o *GCPhysicalInputProfile) Capture() *GCPhysicalInputProfile
- func (o *GCPhysicalInputProfile) Device() GCDevice
- func (o *GCPhysicalInputProfile) Dpads() *foundation.NSDictionary[*foundation.NSString, *GCControllerDirectionPad]
- func (o *GCPhysicalInputProfile) Elements() *foundation.NSDictionary[*foundation.NSString, *GCControllerElement]
- func (o *GCPhysicalInputProfile) HasRemappedElements() bool
- func (o *GCPhysicalInputProfile) LastEventTimestamp() float64
- func (o *GCPhysicalInputProfile) MappedElementAliasForPhysicalInputName(inputName *foundation.NSString) *foundation.NSString
- func (o *GCPhysicalInputProfile) MappedPhysicalInputNamesForElementAlias(elementAlias *foundation.NSString) *foundation.NSSet[*foundation.NSString]
- func (o *GCPhysicalInputProfile) ObjectForKeyedSubscript(key *foundation.NSString) *GCControllerElement
- func (o *GCPhysicalInputProfile) SetStateFromPhysicalInput(physicalInput *GCPhysicalInputProfile)
- func (o *GCPhysicalInputProfile) SetValueDidChangeHandler(valueDidChangeHandler func(*GCPhysicalInputProfile, *GCControllerElement))
- func (o *GCPhysicalInputProfile) Touchpads() *foundation.NSDictionary[*foundation.NSString, *GCControllerTouchpad]
- func (o *GCPhysicalInputProfile) ValueDidChangeHandler() objc.Block
- type GCPhysicalInputSource
- type GCPhysicalInputSourceDirection
- type GCPoint2
- type GCPressedStateInput
- type GCQuaternion
- type GCRacingWheel
- type GCRacingWheelInput
- type GCRacingWheelInputState
- func (o *GCRacingWheelInputState) AcceleratorPedal() GCButtonElement
- func (o *GCRacingWheelInputState) BrakePedal() GCButtonElement
- func (o *GCRacingWheelInputState) ClutchPedal() GCButtonElement
- func (o *GCRacingWheelInputState) Shifter() *GCGearShifterElement
- func (o *GCRacingWheelInputState) Wheel() *GCSteeringWheelElement
- type GCRelativeInput
- type GCRotationRate
- type GCSteeringWheelElement
- type GCSwitchElement
- type GCSwitchElementName
- type GCSwitchInput
- type GCSwitchPositionInput
- type GCSystemGestureState
- type GCTouchState
- type GCTouchedStateInput
- type GCXboxGamepad
- func (o *GCXboxGamepad) ButtonShare() *GCControllerButtonInput
- func (o *GCXboxGamepad) PaddleButton1() *GCControllerButtonInput
- func (o *GCXboxGamepad) PaddleButton2() *GCControllerButtonInput
- func (o *GCXboxGamepad) PaddleButton3() *GCControllerButtonInput
- func (o *GCXboxGamepad) PaddleButton4() *GCControllerButtonInput
- type HIDReportCommandType
- type IOHIDButtonModes
- type IOHIDElementCommitDirection
- type Idtype_t
- type Ipc_info_object_type_t
- type Launch_data_type_t
- type MDLabelDomain
- type MDQueryOptionFlags
- type MDQuerySortOptionFlags
- type Mach_vm_range_flags_t
- type Mach_vm_range_flavor_t
- type Mach_vm_range_tag_t
- type Mpo_flags_t
- type NXMouseButton
- type Os_clockid_t
- type PMPageToPaperMappingType
- type Ptrauth_key
- type Qos_class_t
- type Virtual_memory_guard_exception_code_t
- type Xpc_listener_create_flags_t
- type Xpc_session_create_flags_t
Constants ¶
const (
GCDualSenseAdaptiveTriggerDiscretePositionCount = 10
)
Variables ¶
This section is empty.
Functions ¶
func GCControllerControllers ¶
func GCControllerControllers() *foundation.NSArray[*GCController]
Returns the connected controllers for the device.
func GCControllerDidBecomeCurrentNotification ¶
func GCControllerDidBecomeCurrentNotification() *foundation.NSString
Use these constants with NSNotificationCenter to listen to a controller becoming the most recently used controller. This is a good time to swap out UI to match the new current controller, and unregister any handlers with the old current controller. The 'object' property of the notification will contain the GCController that became the current controller. For example: - (void)controllerDidBecomeCurrent:(NSNotification *)note { GCController *controller = note.object; ... } @see NSNotificationCenter @see GCController.controllers
func GCControllerDidConnectNotification ¶
func GCControllerDidConnectNotification() *foundation.NSString
Use these constants with NSNotificationCenter to listen to connection and disconnection events. Use GCControllerDidConnectNotification for observing connections of controllers. Use GCControllerDidDisconnectNotification for observing disconnections of controllers. Connections and disconnections of controllers will also be reflected in the controllers array of the GCController class. The 'object' property of the notification will contain the GCController that was connected or disconnected. For example: - (void)controllerDidConnect:(NSNotification *)note { GCController *controller = note.object; .... } @see NSNotificationCenter @see GCController.controllers
func GCControllerDidDisconnectNotification ¶
func GCControllerDidDisconnectNotification() *foundation.NSString
func GCControllerDidStopBeingCurrentNotification ¶
func GCControllerDidStopBeingCurrentNotification() *foundation.NSString
func GCControllerSetShouldMonitorBackgroundEvents ¶
func GCControllerSetShouldMonitorBackgroundEvents(shouldMonitorBackgroundEvents bool)
func GCControllerShouldMonitorBackgroundEvents ¶
func GCControllerShouldMonitorBackgroundEvents() bool
Whether the current application should monitor and respond to game controller events when it is not the frontmost application. @example If shouldMonitorBackgroundEvents is NO, and the application is not the frontmost application, any inputs from a game controller will not be forwarded to the application. Once the application becomes the frontmost application, game controller events will be forwarded. @note Starting with macOS Big Sur 11.3, shouldMonitorBackgroundEvents will be NO by default. For applications built prior to macOS Big Sur 11.3, (or running on devices with an earlier version of macOS), shouldMonitorBackgroundEvents will be YES by default. On iOS and tvOS, this property is ignored.
func GCControllerStartWirelessControllerDiscoveryWithCompletionHandler ¶
func GCControllerStartWirelessControllerDiscoveryWithCompletionHandler(completionHandler func())
Starts searching for nearby wireless controllers.
func GCControllerStopWirelessControllerDiscovery ¶
func GCControllerStopWirelessControllerDiscovery()
Stops searching for nearby wireless controllers.
func GCControllerSupportsHIDDevice ¶
Returns a Boolean value that indicates whether the framework supports the specified human interface device.
func GCControllerUserCustomizationsDidChangeNotification ¶
func GCControllerUserCustomizationsDidChangeNotification() *foundation.NSString
Use this constant with NSNotificationCenter to listen to controller user customization events. When a user customizes the button mappings or other settings of a controller this notification will be posted. This is a good time to swap out UI to match the new user settings. Users can modify game controller settings through the Settings app on iOS, tvOS, and macOS. The 'object' property of the notification will contain the GCController that was customized. For example: - (void)controllerDidConnect:(NSNotification *)note { GCController *controller = note.object; .... } @see NSNotificationCenter @see GCController.controllers
func GCExtendedGamepadSnapShotDataV100FromNSData ¶
func GCExtendedGamepadSnapShotDataV100FromNSData(snapshotData *GCExtendedGamepadSnapShotDataV100, data *foundation.NSData) bool
Fills out a v100 snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
func GCExtendedGamepadSnapshotDataFromNSData ¶
func GCExtendedGamepadSnapshotDataFromNSData(snapshotData *GCExtendedGamepadSnapshotData, data *foundation.NSData) bool
Fills out a snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
func GCGamepadSnapShotDataV100FromNSData ¶
func GCGamepadSnapShotDataV100FromNSData(snapshotData *GCGamepadSnapShotDataV100, data *foundation.NSData) bool
Fills out a v100 snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use GCExtendedGamepad instead
func GCHapticDurationInfinite ¶
func GCHapticDurationInfinite() uintptr
func GCHapticsLocalityAll ¶
func GCHapticsLocalityAll() *foundation.NSString
func GCHapticsLocalityDefault ¶
func GCHapticsLocalityDefault() *foundation.NSString
func GCHapticsLocalityHandles ¶
func GCHapticsLocalityHandles() *foundation.NSString
func GCHapticsLocalityLeftHandle ¶
func GCHapticsLocalityLeftHandle() *foundation.NSString
func GCHapticsLocalityLeftTrigger ¶
func GCHapticsLocalityLeftTrigger() *foundation.NSString
func GCHapticsLocalityRightHandle ¶
func GCHapticsLocalityRightHandle() *foundation.NSString
func GCHapticsLocalityRightTrigger ¶
func GCHapticsLocalityRightTrigger() *foundation.NSString
func GCHapticsLocalityTriggers ¶
func GCHapticsLocalityTriggers() *foundation.NSString
func GCInputArcadeButtonName ¶
func GCInputArcadeButtonName(row int, column int) *foundation.NSString
Gets the name of an arcade button at a certain position.
func GCInputBackLeftButton ¶
func GCInputBackLeftButton(position int) *foundation.NSString
func GCInputBackRightButton ¶
func GCInputBackRightButton(position int) *foundation.NSString
func GCInputButtonA ¶
func GCInputButtonA() *foundation.NSString
func GCInputButtonB ¶
func GCInputButtonB() *foundation.NSString
func GCInputButtonHome ¶
func GCInputButtonHome() *foundation.NSString
func GCInputButtonMenu ¶
func GCInputButtonMenu() *foundation.NSString
func GCInputButtonOptions ¶
func GCInputButtonOptions() *foundation.NSString
func GCInputButtonShare ¶
func GCInputButtonShare() *foundation.NSString
func GCInputButtonX ¶
func GCInputButtonX() *foundation.NSString
func GCInputButtonY ¶
func GCInputButtonY() *foundation.NSString
func GCInputDirectionPad ¶
func GCInputDirectionPad() *foundation.NSString
func GCInputDirectionalCardinalDpad ¶
func GCInputDirectionalCardinalDpad() *foundation.NSString
An optional secondary directional input surface for the directional gamepad. This input is guaranteed to be an 8-way digital dpad with physical Up, Down, Left, Right butttons. @note For the 2021 2nd generation Siri Remote, this represents pressing on the outer ring of the touch surface.
func GCInputDirectionalCenterButton ¶
func GCInputDirectionalCenterButton() *foundation.NSString
An optional button for the directional gamepad. This input represents the center button of the cardinal dpad. @note For the 2021 2nd generation Siri Remote, this represents pressing anywhere on the inner ring of the touch surface.
func GCInputDirectionalDpad ¶
func GCInputDirectionalDpad() *foundation.NSString
The primary directional input surface for the directional gamepad @note Equivalent to microgamepad.dpad @note For the 2021 2nd generation Siri Remote, this represents touching anywhere on the entire touch surface - including the inner and outer rings.
func GCInputDirectionalTouchSurfaceButton ¶
func GCInputDirectionalTouchSurfaceButton() *foundation.NSString
The button corresponding to pressing anywhere on the primary directional input surface for the directional gamepad @note Equivalent to microgamepad.buttonA @note For the 2021 2nd generation Siri Remote, this represents pressing anywhere the entire touch surface - including the inner and outer rings.
func GCInputDualShockTouchpadButton ¶
func GCInputDualShockTouchpadButton() *foundation.NSString
func GCInputDualShockTouchpadOne ¶
func GCInputDualShockTouchpadOne() *foundation.NSString
A set of strings commonly used to access DualShock buttons @example controller.physicalInputProfile.dpads[GCInputDualShockTouchpadOne] @see GCController.h @see GCPhysicalInputProfile.h
func GCInputDualShockTouchpadTwo ¶
func GCInputDualShockTouchpadTwo() *foundation.NSString
func GCInputGripButton ¶
func GCInputGripButton() *foundation.NSString
func GCInputLeftBumper ¶
func GCInputLeftBumper() *foundation.NSString
Identifies the button element located at the top-left/right of a gamepad, between the left/right shoulder button and the gamepad's horizontal center.
func GCInputLeftPaddle ¶
func GCInputLeftPaddle() *foundation.NSString
func GCInputLeftShoulder ¶
func GCInputLeftShoulder() *foundation.NSString
func GCInputLeftSideButton ¶
func GCInputLeftSideButton() *foundation.NSString
func GCInputLeftThumbstick ¶
func GCInputLeftThumbstick() *foundation.NSString
func GCInputLeftThumbstickButton ¶
func GCInputLeftThumbstickButton() *foundation.NSString
func GCInputLeftTrigger ¶
func GCInputLeftTrigger() *foundation.NSString
func GCInputMicroGamepadButtonA ¶
func GCInputMicroGamepadButtonA() *foundation.NSString
The primary button for the microgamepad @note For the 1st generation and 2nd generation Siri Remotes, this represents pressing anywhere on the touch surface.
func GCInputMicroGamepadButtonMenu ¶
func GCInputMicroGamepadButtonMenu() *foundation.NSString
The primary menu button for the microgamepad @note Equivalent to microgamepad.buttonMenu @note For the 1st generation Siri Remote, this represents pressing the play/pause button. For the 2nd generation Siri Remote, this represents pressing the back button. @note You should avoid polling this button every frame. tvOS will run a gesture recognizer on events before forwarding them to your application that can reduce the window to poll button changes. Instead, register a pressedChangedHandler or a valueChangedHandler.
func GCInputMicroGamepadButtonX ¶
func GCInputMicroGamepadButtonX() *foundation.NSString
The secondary button for the microgamepad @note Equivalent to microgamepad.buttonX @note For the 1st and 2nd generation Siri Remotes, this represents pressing the play/pause button.
func GCInputMicroGamepadDpad ¶
func GCInputMicroGamepadDpad() *foundation.NSString
The primary directional input surface for the directional gamepad @note Equivalent to microgamepad.dpad @note For the 1st generation and 2nd generation Siri Remotes, this represents touching anywhere on the entire touch surface.
func GCInputPedalAccelerator ¶
func GCInputPedalAccelerator() *foundation.NSString
func GCInputPedalBrake ¶
func GCInputPedalBrake() *foundation.NSString
func GCInputPedalClutch ¶
func GCInputPedalClutch() *foundation.NSString
func GCInputRightBumper ¶
func GCInputRightBumper() *foundation.NSString
func GCInputRightPaddle ¶
func GCInputRightPaddle() *foundation.NSString
func GCInputRightShoulder ¶
func GCInputRightShoulder() *foundation.NSString
func GCInputRightSideButton ¶
func GCInputRightSideButton() *foundation.NSString
func GCInputRightThumbstick ¶
func GCInputRightThumbstick() *foundation.NSString
func GCInputRightThumbstickButton ¶
func GCInputRightThumbstickButton() *foundation.NSString
func GCInputRightTrigger ¶
func GCInputRightTrigger() *foundation.NSString
func GCInputShifter ¶
func GCInputShifter() *foundation.NSString
func GCInputSteeringWheel ¶
func GCInputSteeringWheel() *foundation.NSString
A set of strings commonly used by racing wheels.
func GCInputThumbstick ¶
func GCInputThumbstick() *foundation.NSString
func GCInputThumbstickButton ¶
func GCInputThumbstickButton() *foundation.NSString
func GCInputTrigger ¶
func GCInputTrigger() *foundation.NSString
func GCInputXboxPaddleFour ¶
func GCInputXboxPaddleFour() *foundation.NSString
func GCInputXboxPaddleOne ¶
func GCInputXboxPaddleOne() *foundation.NSString
A set of strings commonly used to access Xbox buttons @example controller.physicalInputProfile.buttons[GCInputButtonPaddleOne] @see GCController.h @see GCPhysicalInputProfile.h
func GCInputXboxPaddleThree ¶
func GCInputXboxPaddleThree() *foundation.NSString
func GCInputXboxPaddleTwo ¶
func GCInputXboxPaddleTwo() *foundation.NSString
func GCKeyA ¶
func GCKeyA() *foundation.NSString
func GCKeyApplication ¶
func GCKeyApplication() *foundation.NSString
func GCKeyB ¶
func GCKeyB() *foundation.NSString
func GCKeyBackslash ¶
func GCKeyBackslash() *foundation.NSString
func GCKeyC ¶
func GCKeyC() *foundation.NSString
func GCKeyCapsLock ¶
func GCKeyCapsLock() *foundation.NSString
func GCKeyCloseBracket ¶
func GCKeyCloseBracket() *foundation.NSString
func GCKeyCodeApplication ¶
func GCKeyCodeApplication() int
func GCKeyCodeBackslash ¶
func GCKeyCodeBackslash() int
func GCKeyCodeCapsLock ¶
func GCKeyCodeCapsLock() int
func GCKeyCodeCloseBracket ¶
func GCKeyCodeCloseBracket() int
func GCKeyCodeComma ¶
func GCKeyCodeComma() int
func GCKeyCodeDeleteForward ¶
func GCKeyCodeDeleteForward() int
func GCKeyCodeDeleteOrBackspace ¶
func GCKeyCodeDeleteOrBackspace() int
func GCKeyCodeDownArrow ¶
func GCKeyCodeDownArrow() int
func GCKeyCodeEight ¶
func GCKeyCodeEight() int
func GCKeyCodeEnd ¶
func GCKeyCodeEnd() int
func GCKeyCodeEqualSign ¶
func GCKeyCodeEqualSign() int
func GCKeyCodeEscape ¶
func GCKeyCodeEscape() int
func GCKeyCodeF1 ¶
func GCKeyCodeF1() int
func GCKeyCodeF2 ¶
func GCKeyCodeF2() int
func GCKeyCodeF3 ¶
func GCKeyCodeF3() int
func GCKeyCodeF4 ¶
func GCKeyCodeF4() int
func GCKeyCodeF5 ¶
func GCKeyCodeF5() int
func GCKeyCodeF6 ¶
func GCKeyCodeF6() int
func GCKeyCodeF7 ¶
func GCKeyCodeF7() int
func GCKeyCodeF8 ¶
func GCKeyCodeF8() int
func GCKeyCodeF9 ¶
func GCKeyCodeF9() int
func GCKeyCodeF10 ¶
func GCKeyCodeF10() int
func GCKeyCodeF11 ¶
func GCKeyCodeF11() int
func GCKeyCodeF12 ¶
func GCKeyCodeF12() int
func GCKeyCodeF13 ¶
func GCKeyCodeF13() int
func GCKeyCodeF14 ¶
func GCKeyCodeF14() int
func GCKeyCodeF15 ¶
func GCKeyCodeF15() int
func GCKeyCodeF16 ¶
func GCKeyCodeF16() int
func GCKeyCodeF17 ¶
func GCKeyCodeF17() int
func GCKeyCodeF18 ¶
func GCKeyCodeF18() int
func GCKeyCodeF19 ¶
func GCKeyCodeF19() int
func GCKeyCodeF20 ¶
func GCKeyCodeF20() int
func GCKeyCodeFive ¶
func GCKeyCodeFive() int
func GCKeyCodeFour ¶
func GCKeyCodeFour() int
func GCKeyCodeGraveAccentAndTilde ¶
func GCKeyCodeGraveAccentAndTilde() int
func GCKeyCodeHome ¶
func GCKeyCodeHome() int
func GCKeyCodeHyphen ¶
func GCKeyCodeHyphen() int
func GCKeyCodeInsert ¶
func GCKeyCodeInsert() int
func GCKeyCodeInternational1 ¶
func GCKeyCodeInternational1() int
func GCKeyCodeInternational2 ¶
func GCKeyCodeInternational2() int
func GCKeyCodeInternational3 ¶
func GCKeyCodeInternational3() int
func GCKeyCodeInternational4 ¶
func GCKeyCodeInternational4() int
func GCKeyCodeInternational5 ¶
func GCKeyCodeInternational5() int
func GCKeyCodeInternational6 ¶
func GCKeyCodeInternational6() int
func GCKeyCodeInternational7 ¶
func GCKeyCodeInternational7() int
func GCKeyCodeInternational8 ¶
func GCKeyCodeInternational8() int
func GCKeyCodeInternational9 ¶
func GCKeyCodeInternational9() int
func GCKeyCodeKeyA ¶
func GCKeyCodeKeyA() int
func GCKeyCodeKeyB ¶
func GCKeyCodeKeyB() int
func GCKeyCodeKeyC ¶
func GCKeyCodeKeyC() int
func GCKeyCodeKeyD ¶
func GCKeyCodeKeyD() int
func GCKeyCodeKeyE ¶
func GCKeyCodeKeyE() int
func GCKeyCodeKeyF ¶
func GCKeyCodeKeyF() int
func GCKeyCodeKeyG ¶
func GCKeyCodeKeyG() int
func GCKeyCodeKeyH ¶
func GCKeyCodeKeyH() int
func GCKeyCodeKeyI ¶
func GCKeyCodeKeyI() int
func GCKeyCodeKeyJ ¶
func GCKeyCodeKeyJ() int
func GCKeyCodeKeyK ¶
func GCKeyCodeKeyK() int
func GCKeyCodeKeyL ¶
func GCKeyCodeKeyL() int
func GCKeyCodeKeyM ¶
func GCKeyCodeKeyM() int
func GCKeyCodeKeyN ¶
func GCKeyCodeKeyN() int
func GCKeyCodeKeyO ¶
func GCKeyCodeKeyO() int
func GCKeyCodeKeyP ¶
func GCKeyCodeKeyP() int
func GCKeyCodeKeyQ ¶
func GCKeyCodeKeyQ() int
func GCKeyCodeKeyR ¶
func GCKeyCodeKeyR() int
func GCKeyCodeKeyS ¶
func GCKeyCodeKeyS() int
func GCKeyCodeKeyT ¶
func GCKeyCodeKeyT() int
func GCKeyCodeKeyU ¶
func GCKeyCodeKeyU() int
func GCKeyCodeKeyV ¶
func GCKeyCodeKeyV() int
func GCKeyCodeKeyW ¶
func GCKeyCodeKeyW() int
func GCKeyCodeKeyX ¶
func GCKeyCodeKeyX() int
func GCKeyCodeKeyY ¶
func GCKeyCodeKeyY() int
func GCKeyCodeKeyZ ¶
func GCKeyCodeKeyZ() int
func GCKeyCodeKeypad0 ¶
func GCKeyCodeKeypad0() int
func GCKeyCodeKeypad1 ¶
func GCKeyCodeKeypad1() int
func GCKeyCodeKeypad2 ¶
func GCKeyCodeKeypad2() int
func GCKeyCodeKeypad3 ¶
func GCKeyCodeKeypad3() int
func GCKeyCodeKeypad4 ¶
func GCKeyCodeKeypad4() int
func GCKeyCodeKeypad5 ¶
func GCKeyCodeKeypad5() int
func GCKeyCodeKeypad6 ¶
func GCKeyCodeKeypad6() int
func GCKeyCodeKeypad7 ¶
func GCKeyCodeKeypad7() int
func GCKeyCodeKeypad8 ¶
func GCKeyCodeKeypad8() int
func GCKeyCodeKeypad9 ¶
func GCKeyCodeKeypad9() int
func GCKeyCodeKeypadAsterisk ¶
func GCKeyCodeKeypadAsterisk() int
func GCKeyCodeKeypadEnter ¶
func GCKeyCodeKeypadEnter() int
func GCKeyCodeKeypadEqualSign ¶
func GCKeyCodeKeypadEqualSign() int
func GCKeyCodeKeypadHyphen ¶
func GCKeyCodeKeypadHyphen() int
func GCKeyCodeKeypadNumLock ¶
func GCKeyCodeKeypadNumLock() int
func GCKeyCodeKeypadPeriod ¶
func GCKeyCodeKeypadPeriod() int
func GCKeyCodeKeypadPlus ¶
func GCKeyCodeKeypadPlus() int
func GCKeyCodeKeypadSlash ¶
func GCKeyCodeKeypadSlash() int
func GCKeyCodeLANG1 ¶
func GCKeyCodeLANG1() int
func GCKeyCodeLANG2 ¶
func GCKeyCodeLANG2() int
func GCKeyCodeLANG3 ¶
func GCKeyCodeLANG3() int
func GCKeyCodeLANG4 ¶
func GCKeyCodeLANG4() int
func GCKeyCodeLANG5 ¶
func GCKeyCodeLANG5() int
func GCKeyCodeLANG6 ¶
func GCKeyCodeLANG6() int
func GCKeyCodeLANG7 ¶
func GCKeyCodeLANG7() int
func GCKeyCodeLANG8 ¶
func GCKeyCodeLANG8() int
func GCKeyCodeLANG9 ¶
func GCKeyCodeLANG9() int
func GCKeyCodeLeftAlt ¶
func GCKeyCodeLeftAlt() int
func GCKeyCodeLeftArrow ¶
func GCKeyCodeLeftArrow() int
func GCKeyCodeLeftControl ¶
func GCKeyCodeLeftControl() int
func GCKeyCodeLeftGUI ¶
func GCKeyCodeLeftGUI() int
func GCKeyCodeLeftShift ¶
func GCKeyCodeLeftShift() int
func GCKeyCodeNine ¶
func GCKeyCodeNine() int
func GCKeyCodeNonUSBackslash ¶
func GCKeyCodeNonUSBackslash() int
func GCKeyCodeNonUSPound ¶
func GCKeyCodeNonUSPound() int
func GCKeyCodeOne ¶
func GCKeyCodeOne() int
func GCKeyCodeOpenBracket ¶
func GCKeyCodeOpenBracket() int
func GCKeyCodePageDown ¶
func GCKeyCodePageDown() int
func GCKeyCodePageUp ¶
func GCKeyCodePageUp() int
func GCKeyCodePause ¶
func GCKeyCodePause() int
func GCKeyCodePeriod ¶
func GCKeyCodePeriod() int
func GCKeyCodePower ¶
func GCKeyCodePower() int
func GCKeyCodePrintScreen ¶
func GCKeyCodePrintScreen() int
func GCKeyCodeQuote ¶
func GCKeyCodeQuote() int
func GCKeyCodeReturnOrEnter ¶
func GCKeyCodeReturnOrEnter() int
func GCKeyCodeRightAlt ¶
func GCKeyCodeRightAlt() int
func GCKeyCodeRightArrow ¶
func GCKeyCodeRightArrow() int
func GCKeyCodeRightControl ¶
func GCKeyCodeRightControl() int
func GCKeyCodeRightGUI ¶
func GCKeyCodeRightGUI() int
func GCKeyCodeRightShift ¶
func GCKeyCodeRightShift() int
func GCKeyCodeScrollLock ¶
func GCKeyCodeScrollLock() int
func GCKeyCodeSemicolon ¶
func GCKeyCodeSemicolon() int
func GCKeyCodeSeven ¶
func GCKeyCodeSeven() int
func GCKeyCodeSix ¶
func GCKeyCodeSix() int
func GCKeyCodeSlash ¶
func GCKeyCodeSlash() int
func GCKeyCodeSpacebar ¶
func GCKeyCodeSpacebar() int
func GCKeyCodeTab ¶
func GCKeyCodeTab() int
func GCKeyCodeThree ¶
func GCKeyCodeThree() int
func GCKeyCodeTwo ¶
func GCKeyCodeTwo() int
func GCKeyCodeUpArrow ¶
func GCKeyCodeUpArrow() int
func GCKeyCodeZero ¶
func GCKeyCodeZero() int
func GCKeyComma ¶
func GCKeyComma() *foundation.NSString
func GCKeyD ¶
func GCKeyD() *foundation.NSString
func GCKeyDeleteForward ¶
func GCKeyDeleteForward() *foundation.NSString
func GCKeyDeleteOrBackspace ¶
func GCKeyDeleteOrBackspace() *foundation.NSString
func GCKeyDownArrow ¶
func GCKeyDownArrow() *foundation.NSString
func GCKeyE ¶
func GCKeyE() *foundation.NSString
func GCKeyEight ¶
func GCKeyEight() *foundation.NSString
func GCKeyEnd ¶
func GCKeyEnd() *foundation.NSString
func GCKeyEqualSign ¶
func GCKeyEqualSign() *foundation.NSString
func GCKeyEscape ¶
func GCKeyEscape() *foundation.NSString
func GCKeyF ¶
func GCKeyF() *foundation.NSString
func GCKeyF1 ¶
func GCKeyF1() *foundation.NSString
func GCKeyF2 ¶
func GCKeyF2() *foundation.NSString
func GCKeyF3 ¶
func GCKeyF3() *foundation.NSString
func GCKeyF4 ¶
func GCKeyF4() *foundation.NSString
func GCKeyF5 ¶
func GCKeyF5() *foundation.NSString
func GCKeyF6 ¶
func GCKeyF6() *foundation.NSString
func GCKeyF7 ¶
func GCKeyF7() *foundation.NSString
func GCKeyF8 ¶
func GCKeyF8() *foundation.NSString
func GCKeyF9 ¶
func GCKeyF9() *foundation.NSString
func GCKeyF10 ¶
func GCKeyF10() *foundation.NSString
func GCKeyF11 ¶
func GCKeyF11() *foundation.NSString
func GCKeyF12 ¶
func GCKeyF12() *foundation.NSString
func GCKeyF13 ¶
func GCKeyF13() *foundation.NSString
func GCKeyF14 ¶
func GCKeyF14() *foundation.NSString
func GCKeyF15 ¶
func GCKeyF15() *foundation.NSString
func GCKeyF16 ¶
func GCKeyF16() *foundation.NSString
func GCKeyF17 ¶
func GCKeyF17() *foundation.NSString
func GCKeyF18 ¶
func GCKeyF18() *foundation.NSString
func GCKeyF19 ¶
func GCKeyF19() *foundation.NSString
func GCKeyF20 ¶
func GCKeyF20() *foundation.NSString
func GCKeyFive ¶
func GCKeyFive() *foundation.NSString
func GCKeyFour ¶
func GCKeyFour() *foundation.NSString
func GCKeyG ¶
func GCKeyG() *foundation.NSString
func GCKeyGraveAccentAndTilde ¶
func GCKeyGraveAccentAndTilde() *foundation.NSString
func GCKeyH ¶
func GCKeyH() *foundation.NSString
func GCKeyHome ¶
func GCKeyHome() *foundation.NSString
func GCKeyHyphen ¶
func GCKeyHyphen() *foundation.NSString
func GCKeyI ¶
func GCKeyI() *foundation.NSString
func GCKeyInsert ¶
func GCKeyInsert() *foundation.NSString
func GCKeyInternational1 ¶
func GCKeyInternational1() *foundation.NSString
func GCKeyInternational2 ¶
func GCKeyInternational2() *foundation.NSString
func GCKeyInternational3 ¶
func GCKeyInternational3() *foundation.NSString
func GCKeyInternational4 ¶
func GCKeyInternational4() *foundation.NSString
func GCKeyInternational5 ¶
func GCKeyInternational5() *foundation.NSString
func GCKeyInternational6 ¶
func GCKeyInternational6() *foundation.NSString
func GCKeyInternational7 ¶
func GCKeyInternational7() *foundation.NSString
func GCKeyInternational8 ¶
func GCKeyInternational8() *foundation.NSString
func GCKeyInternational9 ¶
func GCKeyInternational9() *foundation.NSString
func GCKeyJ ¶
func GCKeyJ() *foundation.NSString
func GCKeyK ¶
func GCKeyK() *foundation.NSString
func GCKeyKeypad0 ¶
func GCKeyKeypad0() *foundation.NSString
func GCKeyKeypad1 ¶
func GCKeyKeypad1() *foundation.NSString
func GCKeyKeypad2 ¶
func GCKeyKeypad2() *foundation.NSString
func GCKeyKeypad3 ¶
func GCKeyKeypad3() *foundation.NSString
func GCKeyKeypad4 ¶
func GCKeyKeypad4() *foundation.NSString
func GCKeyKeypad5 ¶
func GCKeyKeypad5() *foundation.NSString
func GCKeyKeypad6 ¶
func GCKeyKeypad6() *foundation.NSString
func GCKeyKeypad7 ¶
func GCKeyKeypad7() *foundation.NSString
func GCKeyKeypad8 ¶
func GCKeyKeypad8() *foundation.NSString
func GCKeyKeypad9 ¶
func GCKeyKeypad9() *foundation.NSString
func GCKeyKeypadAsterisk ¶
func GCKeyKeypadAsterisk() *foundation.NSString
func GCKeyKeypadEnter ¶
func GCKeyKeypadEnter() *foundation.NSString
func GCKeyKeypadEqualSign ¶
func GCKeyKeypadEqualSign() *foundation.NSString
func GCKeyKeypadHyphen ¶
func GCKeyKeypadHyphen() *foundation.NSString
func GCKeyKeypadNumLock ¶
func GCKeyKeypadNumLock() *foundation.NSString
func GCKeyKeypadPeriod ¶
func GCKeyKeypadPeriod() *foundation.NSString
func GCKeyKeypadPlus ¶
func GCKeyKeypadPlus() *foundation.NSString
func GCKeyKeypadSlash ¶
func GCKeyKeypadSlash() *foundation.NSString
func GCKeyL ¶
func GCKeyL() *foundation.NSString
func GCKeyLANG1 ¶
func GCKeyLANG1() *foundation.NSString
func GCKeyLANG2 ¶
func GCKeyLANG2() *foundation.NSString
func GCKeyLANG3 ¶
func GCKeyLANG3() *foundation.NSString
func GCKeyLANG4 ¶
func GCKeyLANG4() *foundation.NSString
func GCKeyLANG5 ¶
func GCKeyLANG5() *foundation.NSString
func GCKeyLANG6 ¶
func GCKeyLANG6() *foundation.NSString
func GCKeyLANG7 ¶
func GCKeyLANG7() *foundation.NSString
func GCKeyLANG8 ¶
func GCKeyLANG8() *foundation.NSString
func GCKeyLANG9 ¶
func GCKeyLANG9() *foundation.NSString
func GCKeyLeftAlt ¶
func GCKeyLeftAlt() *foundation.NSString
func GCKeyLeftArrow ¶
func GCKeyLeftArrow() *foundation.NSString
func GCKeyLeftControl ¶
func GCKeyLeftControl() *foundation.NSString
func GCKeyLeftGUI ¶
func GCKeyLeftGUI() *foundation.NSString
func GCKeyLeftShift ¶
func GCKeyLeftShift() *foundation.NSString
func GCKeyM ¶
func GCKeyM() *foundation.NSString
func GCKeyN ¶
func GCKeyN() *foundation.NSString
func GCKeyNine ¶
func GCKeyNine() *foundation.NSString
func GCKeyNonUSBackslash ¶
func GCKeyNonUSBackslash() *foundation.NSString
func GCKeyNonUSPound ¶
func GCKeyNonUSPound() *foundation.NSString
func GCKeyO ¶
func GCKeyO() *foundation.NSString
func GCKeyOne ¶
func GCKeyOne() *foundation.NSString
func GCKeyOpenBracket ¶
func GCKeyOpenBracket() *foundation.NSString
func GCKeyP ¶
func GCKeyP() *foundation.NSString
func GCKeyPageDown ¶
func GCKeyPageDown() *foundation.NSString
func GCKeyPageUp ¶
func GCKeyPageUp() *foundation.NSString
func GCKeyPause ¶
func GCKeyPause() *foundation.NSString
func GCKeyPeriod ¶
func GCKeyPeriod() *foundation.NSString
func GCKeyPower ¶
func GCKeyPower() *foundation.NSString
func GCKeyPrintScreen ¶
func GCKeyPrintScreen() *foundation.NSString
func GCKeyQ ¶
func GCKeyQ() *foundation.NSString
func GCKeyQuote ¶
func GCKeyQuote() *foundation.NSString
func GCKeyR ¶
func GCKeyR() *foundation.NSString
func GCKeyReturnOrEnter ¶
func GCKeyReturnOrEnter() *foundation.NSString
func GCKeyRightAlt ¶
func GCKeyRightAlt() *foundation.NSString
func GCKeyRightArrow ¶
func GCKeyRightArrow() *foundation.NSString
func GCKeyRightControl ¶
func GCKeyRightControl() *foundation.NSString
func GCKeyRightGUI ¶
func GCKeyRightGUI() *foundation.NSString
func GCKeyRightShift ¶
func GCKeyRightShift() *foundation.NSString
func GCKeyS ¶
func GCKeyS() *foundation.NSString
func GCKeyScrollLock ¶
func GCKeyScrollLock() *foundation.NSString
func GCKeySemicolon ¶
func GCKeySemicolon() *foundation.NSString
func GCKeySeven ¶
func GCKeySeven() *foundation.NSString
func GCKeySix ¶
func GCKeySix() *foundation.NSString
func GCKeySlash ¶
func GCKeySlash() *foundation.NSString
func GCKeySpacebar ¶
func GCKeySpacebar() *foundation.NSString
func GCKeyT ¶
func GCKeyT() *foundation.NSString
func GCKeyTab ¶
func GCKeyTab() *foundation.NSString
func GCKeyThree ¶
func GCKeyThree() *foundation.NSString
func GCKeyTwo ¶
func GCKeyTwo() *foundation.NSString
func GCKeyU ¶
func GCKeyU() *foundation.NSString
func GCKeyUpArrow ¶
func GCKeyUpArrow() *foundation.NSString
func GCKeyV ¶
func GCKeyV() *foundation.NSString
func GCKeyW ¶
func GCKeyW() *foundation.NSString
func GCKeyX ¶
func GCKeyX() *foundation.NSString
func GCKeyY ¶
func GCKeyY() *foundation.NSString
func GCKeyZ ¶
func GCKeyZ() *foundation.NSString
func GCKeyZero ¶
func GCKeyZero() *foundation.NSString
func GCKeyboardDidConnectNotification ¶
func GCKeyboardDidConnectNotification() *foundation.NSString
Use these constants with NSNotificationCenter to listen to connection and disconnection events Use GCKeyboardDidConnectNotification for observing keyboard connection Use GCKeyboardDidDisconnectNotification for observing keyboard disconnection The 'object' property of the notification will contain the GCKeyboard that was connected or disconnected. @see NSNotificationCetner @note All connected keyboards are coalesced into one keyboard object, so notification about connection/disconnection will only be delivered once until last keyboard disconnects.
func GCKeyboardDidDisconnectNotification ¶
func GCKeyboardDidDisconnectNotification() *foundation.NSString
func GCMicroGamepadSnapShotDataV100FromNSData ¶
func GCMicroGamepadSnapShotDataV100FromNSData(snapshotData *GCMicroGamepadSnapShotDataV100, data *foundation.NSData) bool
Fills out a v100 snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
func GCMicroGamepadSnapshotDataFromNSData ¶
func GCMicroGamepadSnapshotDataFromNSData(snapshotData *GCMicroGamepadSnapshotData, data *foundation.NSData) bool
Fills out a snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
func GCMouseDidBecomeCurrentNotification ¶
func GCMouseDidBecomeCurrentNotification() *foundation.NSString
Use these constants with NSNotificationCenter to listen to a controller becoming the most recently used mouse. This is a good time to swap out UI to match the new current mouse, and unregister any handlers with the old current controller. The 'object' property of the notification will contain the GCMouse that became the current one. For example: - (void)mouseDidBecomeCurrent:(NSNotification *)note { GCMouse *mouse = note.object; ... } @see NSNotificationCenter @see GCMouse.mice @see GCMouse.current
func GCMouseDidConnectNotification ¶
func GCMouseDidConnectNotification() *foundation.NSString
Use these constants with NSNotificationCenter to listen to connection and disconnection events. Use GCMouseDidConnectNotification for observing connections of mice. Use GCMouserDidDisconnectNotification for observing disconnections of mice. Connections and disconnections of mice will also be reflected in the mice array of the GCMouse class. The 'object' property of the notification will contain the GCMouse that was connected or disconnected. For example: - (void)controllerDidConnect:(NSNotification *)note { GCMouse *mouse = note.object; .... } @see NSNotificationCenter @see GCMouse.mice
func GCMouseDidDisconnectNotification ¶
func GCMouseDidDisconnectNotification() *foundation.NSString
func GCMouseDidStopBeingCurrentNotification ¶
func GCMouseDidStopBeingCurrentNotification() *foundation.NSString
func GCMouseMice ¶
func GCMouseMice() *foundation.NSArray[*GCMouse]
Returns any mice that the user connects to the device.
func GCPoint2Equal ¶
func GCProductCategoryArcadeStick ¶
func GCProductCategoryArcadeStick() *foundation.NSString
func GCProductCategoryCoalescedRemote ¶
func GCProductCategoryCoalescedRemote() *foundation.NSString
If multiple remotes have been combined into one, the device will have the GCProductCategoryCoalescedRemote product category. @discussion By default, the Game Controller framework will try to coalesce, or combine, the physical Apple TV Remote and the virtual Control Center remote and treat them as a single GCDevice instance. By setting GCSupportsMultipleMicroGamepads in your app's plist to true, you can disable this behavior.
func GCProductCategoryControlCenterRemote ¶
func GCProductCategoryControlCenterRemote() *foundation.NSString
Users can use Apple TV Remote controls in Control Center on an iOS or iPadOS device.
func GCProductCategoryDualSense ¶
func GCProductCategoryDualSense() *foundation.NSString
func GCProductCategoryDualShock4 ¶
func GCProductCategoryDualShock4() *foundation.NSString
func GCProductCategoryHID ¶
func GCProductCategoryHID() *foundation.NSString
func GCProductCategoryKeyboard ¶
func GCProductCategoryKeyboard() *foundation.NSString
func GCProductCategoryMFi ¶
func GCProductCategoryMFi() *foundation.NSString
func GCProductCategoryMouse ¶
func GCProductCategoryMouse() *foundation.NSString
func GCProductCategorySiriRemote1stGen ¶
func GCProductCategorySiriRemote1stGen() *foundation.NSString
The Siri Remote (1st generation), or Apple TV Remote (1st generation), was first introduced in 2015. It features a Touch surface for touch navigation, and supports device motion.
func GCProductCategorySiriRemote2ndGen ¶
func GCProductCategorySiriRemote2ndGen() *foundation.NSString
The Siri Remote (2nd generation), or Apple TV Remote (2nd generation), was first introduced in 2021. It features a touch-enabled clickpad for navigation.
func GCProductCategorySpatialController ¶
func GCProductCategorySpatialController() *foundation.NSString
The category for game controller products that support 6DoF tracking on visionOS.
func GCProductCategoryUniversalElectronicsRemote ¶
func GCProductCategoryUniversalElectronicsRemote() *foundation.NSString
The Universal Electronics remote is an infrared and Bluetooth Low Energy remote designed to work with the Apple TV.
func GCProductCategoryXboxOne ¶
func GCProductCategoryXboxOne() *foundation.NSString
func GCRacingWheelConnectedRacingWheels ¶
func GCRacingWheelConnectedRacingWheels() *foundation.NSSet[*GCRacingWheel]
Get the collection of racing wheels currently attached to the system. @see GCRacingWheelDidConnectNotification @see GCRacingWheelDidDisconnectNotification
func GCRacingWheelDidConnectNotification ¶
func GCRacingWheelDidConnectNotification() *foundation.NSString
Use these constants with NSNotificationCenter to listen to connection and disconnection events. Use GCRacingWheelDidConnectNotification for observing connections of racing wheels. Use GCRacingWheelDidDisconnectNotification for observing disconnections of racing wheels. Connections and disconnections of racing wheels will also be reflected in the connectedRacingWheels array of the GCRacingWheel class. The 'object' property of the notification will contain the GCRacingWheel that was connected or disconnected. For example: - (void)wheelDidConnect:(NSNotification *)note { GCRacingWheel *controller = note.object; .... } @see NSNotificationCenter @see GCRacingWheel.connectedRacingWheels
func GCRacingWheelDidDisconnectNotification ¶
func GCRacingWheelDidDisconnectNotification() *foundation.NSString
func NSDataFromGCExtendedGamepadSnapShotDataV100 ¶
func NSDataFromGCExtendedGamepadSnapShotDataV100(snapshotData *GCExtendedGamepadSnapShotDataV100) *foundation.NSData
Creates an NSData object from a v100 snapshot. If the version and size is not set in the snapshot the data will automatically have version 0x100 and sizeof(GCExtendedGamepadSnapShotDataV100) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCExtendedGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
func NSDataFromGCExtendedGamepadSnapshotData ¶
func NSDataFromGCExtendedGamepadSnapshotData(snapshotData *GCExtendedGamepadSnapshotData) *foundation.NSData
Creates an NSData object from a snapshot. If the version and size is not set in the snapshot the data will automatically have the version GCCurrentExtendedGamepadSnapshotDataVersion and sizeof(GCExtendedGamepadSnapshotData) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCExtendedGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
func NSDataFromGCGamepadSnapShotDataV100 ¶
func NSDataFromGCGamepadSnapShotDataV100(snapshotData *GCGamepadSnapShotDataV100) *foundation.NSData
Creates an NSData object from a v100 snapshot. If the version and size is not set in the snapshot the data will automatically have version 0x100 and sizeof(GCGamepadSnapShotDataV100) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCGamepadSnapshot.snapshotData Deprecated: Use GCExtendedGamepad instead
func NSDataFromGCMicroGamepadSnapShotDataV100 ¶
func NSDataFromGCMicroGamepadSnapShotDataV100(snapshotData *GCMicroGamepadSnapShotDataV100) *foundation.NSData
Creates an NSData object from a v100 snapshot. If the version and size is not set in the snapshot the data will automatically have version 0x100 and sizeof(GCMicroGamepadSnapShotDataV100) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
func NSDataFromGCMicroGamepadSnapshotData ¶
func NSDataFromGCMicroGamepadSnapshotData(snapshotData *GCMicroGamepadSnapshotData) *foundation.NSData
Creates an NSData object from a snapshot. If the version and size is not set in the snapshot the data will automatically have version GCCurrentMicroGamepadSnapshotDataVersion and sizeof(GCMicroGamepadSnapshotData) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
func NSStringFromGCPoint2 ¶
func NSStringFromGCPoint2(point GCPoint2) *foundation.NSString
func SymbolAvailable ¶
SymbolAvailable reports whether the named C symbol was bound when the library loaded. Calling a generated wrapper whose symbol is unavailable dereferences a nil function variable and panics.
Types ¶
type Acl_entry_id_t ¶
type Acl_entry_id_t int32
const ( ACL_FIRST_ENTRY Acl_entry_id_t = 0 ACL_NEXT_ENTRY Acl_entry_id_t = -1 ACL_LAST_ENTRY Acl_entry_id_t = -2 )
func (Acl_entry_id_t) String ¶
func (e Acl_entry_id_t) String() string
type Acl_flag_t ¶
type Acl_flag_t int32
const ( ACL_FLAG_DEFER_INHERIT Acl_flag_t = 1 ACL_FLAG_NO_INHERIT Acl_flag_t = 131072 ACL_ENTRY_INHERITED Acl_flag_t = 16 ACL_ENTRY_FILE_INHERIT Acl_flag_t = 32 ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64 ACL_ENTRY_LIMIT_INHERIT Acl_flag_t = 128 ACL_ENTRY_ONLY_INHERIT Acl_flag_t = 256 )
func (Acl_flag_t) String ¶
func (e Acl_flag_t) String() string
type Acl_perm_t ¶
type Acl_perm_t int32
const ( ACL_READ_DATA Acl_perm_t = 2 ACL_LIST_DIRECTORY Acl_perm_t = 2 ACL_WRITE_DATA Acl_perm_t = 4 ACL_ADD_FILE Acl_perm_t = 4 ACL_EXECUTE Acl_perm_t = 8 ACL_SEARCH Acl_perm_t = 8 ACL_DELETE Acl_perm_t = 16 ACL_APPEND_DATA Acl_perm_t = 32 ACL_ADD_SUBDIRECTORY Acl_perm_t = 32 ACL_DELETE_CHILD Acl_perm_t = 64 ACL_READ_ATTRIBUTES Acl_perm_t = 128 ACL_WRITE_ATTRIBUTES Acl_perm_t = 256 ACL_READ_EXTATTRIBUTES Acl_perm_t = 512 ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024 ACL_READ_SECURITY Acl_perm_t = 2048 ACL_WRITE_SECURITY Acl_perm_t = 4096 ACL_CHANGE_OWNER Acl_perm_t = 8192 ACL_SYNCHRONIZE Acl_perm_t = 1048576 )
func (Acl_perm_t) String ¶
func (e Acl_perm_t) String() string
type Acl_type_t ¶
type Acl_type_t int32
const ( ACL_TYPE_EXTENDED Acl_type_t = 256 ACL_TYPE_ACCESS Acl_type_t = 0 ACL_TYPE_DEFAULT Acl_type_t = 1 ACL_TYPE_AFS Acl_type_t = 2 ACL_TYPE_CODA Acl_type_t = 3 ACL_TYPE_NTFS Acl_type_t = 4 ACL_TYPE_NWFS Acl_type_t = 5 )
func (Acl_type_t) String ¶
func (e Acl_type_t) String() string
type Dispatch_autorelease_frequency_t ¶
type Dispatch_autorelease_frequency_t uint64
const ( DISPATCH_AUTORELEASE_FREQUENCY_INHERIT Dispatch_autorelease_frequency_t = 0 DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1 DISPATCH_AUTORELEASE_FREQUENCY_NEVER Dispatch_autorelease_frequency_t = 2 )
func (Dispatch_autorelease_frequency_t) String ¶
func (e Dispatch_autorelease_frequency_t) String() string
type Dispatch_block_flags_t ¶
type Dispatch_block_flags_t uint64
const ( DISPATCH_BLOCK_BARRIER Dispatch_block_flags_t = 1 DISPATCH_BLOCK_DETACHED Dispatch_block_flags_t = 2 DISPATCH_BLOCK_ASSIGN_CURRENT Dispatch_block_flags_t = 4 DISPATCH_BLOCK_NO_QOS_CLASS Dispatch_block_flags_t = 8 DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16 DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32 )
func (Dispatch_block_flags_t) String ¶
func (e Dispatch_block_flags_t) String() string
type EvsioEVSIOCCSIndices ¶
type EvsioEVSIOCCSIndices int32
const ( EVSIOCCS_X EvsioEVSIOCCSIndices = 0 EVSIOCCS_Y EvsioEVSIOCCSIndices = 1 )
func (EvsioEVSIOCCSIndices) String ¶
func (e EvsioEVSIOCCSIndices) String() string
type EvsioEVSIOSCSIndices ¶
type EvsioEVSIOSCSIndices int32
const ( EVSIOSCS_X EvsioEVSIOSCSIndices = 0 EVSIOSCS_Y EvsioEVSIOSCSIndices = 1 )
func (EvsioEVSIOSCSIndices) String ¶
func (e EvsioEVSIOSCSIndices) String() string
type Filesec_property_t ¶
type Filesec_property_t int32
const ( FILESEC_OWNER Filesec_property_t = 1 FILESEC_GROUP Filesec_property_t = 2 FILESEC_UUID Filesec_property_t = 3 FILESEC_MODE Filesec_property_t = 4 FILESEC_ACL Filesec_property_t = 5 FILESEC_GRPUUID Filesec_property_t = 6 FILESEC_ACL_RAW Filesec_property_t = 100 FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101 )
func (Filesec_property_t) String ¶
func (e Filesec_property_t) String() string
type GCAcceleration ¶
A three-dimensional acceleration vector.
type GCAxis2DInput ¶
type GCAxis2DInput interface {
ValueDidChangeHandler() objc.Block
SetValueDidChangeHandler(valueDidChangeHandler objc.Block)
Value() GCPoint2
IsAnalog() bool
CanWrap() bool
LastValueTimestamp() float64
LastValueLatency() float64
Sources() *foundation.NSSet[GCPhysicalInputSource]
}
GCAxis2DInput wraps the ObjC protocol GCAxis2DInput.
type GCAxisElement ¶
type GCAxisElement interface {
GCPhysicalInputElement
AbsoluteInput() GCAxisInput
RelativeInput() GCRelativeInput
}
GCAxisElement wraps the ObjC protocol GCAxisElement.
type GCAxisElementName ¶
type GCAxisElementName interface {
GCPhysicalInputElementName
}
GCAxisElementName wraps the ObjC protocol GCAxisElementName.
type GCAxisInput ¶
type GCAxisInput interface {
ValueDidChangeHandler() objc.Block
SetValueDidChangeHandler(valueDidChangeHandler func(objc.ID, objc.ID, float32))
Value() float32
IsAnalog() bool
CanWrap() bool
LastValueTimestamp() float64
LastValueLatency() float64
Sources() *foundation.NSSet[GCPhysicalInputSource]
}
GCAxisInput wraps the ObjC protocol GCAxisInput.
type GCButtonElement ¶
type GCButtonElement interface {
GCPhysicalInputElement
PressedInput() objc.ID
TouchedInput() GCTouchedStateInput
ForceInput() GCLinearInput
}
GCButtonElement wraps the ObjC protocol GCButtonElement.
type GCButtonElementName ¶
type GCButtonElementName interface {
GCPhysicalInputElementName
}
GCButtonElementName wraps the ObjC protocol GCButtonElementName.
type GCButtonInput ¶
type GCButtonInput interface {
}
GCButtonInput wraps the ObjC protocol GCButtonInput.
type GCColor ¶
type GCColor struct {
foundation.NSObject
}
The color of a device light.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccolor
func GCColorFromID ¶
func (*GCColor) InitWithRedGreenBlue ¶
Creates a color with the specified red, green, and blue values.
type GCController ¶
type GCController struct {
foundation.NSObject
}
A representation of a real game controller, a virtual controller, or a snapshot of a controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontroller
func GCControllerControllerWithExtendedGamepad ¶
func GCControllerControllerWithExtendedGamepad() *GCController
Returns a snapshot of a newly created controller with an extended gamepad profile.
func GCControllerControllerWithMicroGamepad ¶
func GCControllerControllerWithMicroGamepad() *GCController
Returns a snapshot of a newly created controller with a micro gamepad profile.
func GCControllerCurrent ¶
func GCControllerCurrent() *GCController
The most recently used game controller. If a user actuates a game controller input, that controller will become the current one. @note This is useful for single player games where you only care about whether an input is pressed, and not where it came from. You will still need to register for changes to GCController.current so that your UI can remain up-to-date with the current controller.
func GCControllerFromID ¶
func GCControllerFromID(id objc.ID) *GCController
func (*GCController) Battery ¶
func (o *GCController) Battery() *GCDeviceBattery
Gets the battery information if controller supports one This property is useful when you try to notify your user to change or charge controller before it runs out of battery life or simply display the current battery level and status.
func (*GCController) Capture ¶
func (o *GCController) Capture() *GCController
Returns a snapshot of the controller with its current element values.
func (*GCController) ControllerPausedHandler ¶
func (o *GCController) ControllerPausedHandler() objc.Block
Set this block to be notified when a user intends to suspend or resume the current game state. A controller will have a button dedicated to suspending and resuming play and invoking context sensitive actions. During event handling the system will notify the application using this block such that the application can handle the suspension and resumption from the given controller. Use this to implement your canonical transition to a pause menu for example if that is your application's desired handling of suspension in play. You may pause and resume based on game state as well so the event is only called each time the pause/resume button is pressed. @note This handler has been deprecated in favor of the Menu button found on GCMicroGamepad and GCExtendedGamepad. @see microGamepad @see extendedGamepad Deprecated: Use the Menu button found on the controller's input profile, if it exists.
func (*GCController) ExtendedGamepad ¶
func (o *GCController) ExtendedGamepad() *GCExtendedGamepad
func (*GCController) Gamepad ¶
func (o *GCController) Gamepad() *GCGamepad
Gets the profile for the controller that suits current application. There are several supported profiles, with an additional optional profile for motion as well. Each controller may be able to map its inputs into all profiles or just one kind of profile. Query for the controller profile that suits your game, the simplest kind will be supported by the broadest variety of controllers. A controller supporting the Extended Gamepad profile for example supports the Gamepad profile and more. As such it can always be used just in the Gamepad profile if that suits the game. A physical controller that supports a profile must support it completely. That means that all buttons and axis inputs must be valid inputs that a developer can utilize. If a controller does not support the given profile the returned value will be nil. Use this to filter controllers if the application requires a specific kind of profile. @see motion Deprecated: since macOS 10.12.
func (*GCController) Haptics ¶
func (o *GCController) Haptics() *GCDeviceHaptics
Gets the haptics for the controller, if one exists. Use this property to create CHHapticEngine instances according to your needs. @note Haptics are a drain on the controller's battery, and can be distracting when used excessively.
func (*GCController) Input ¶
func (o *GCController) Input() *GCControllerLiveInput
Gets the input profile for the controller.
func (*GCController) IsAttachedToDevice ¶
func (o *GCController) IsAttachedToDevice() bool
A controller may be form fitting or otherwise closely attached to the device. This closeness to other inputs on the device may suggest that interaction with the device may use other inputs easily. This is presented to developers to allow them to make informed decisions about UI and interactions to choose for their game in this situation.
func (*GCController) IsSnapshot ¶
func (o *GCController) IsSnapshot() bool
A controller may represent a real device managed by the operating system, or a virtual snapshot created by the developer. If a controller is created by the developer, it is considered to be a snapshot, allowing direct writes to any GCControllerElement of its profiles. If the controller is not snapshot, the system will reject any write requests to GCControllerElement. @see controllerWithMicroGamepad @see controllerWithExtendedGamepad @see capture
func (*GCController) Light ¶
func (o *GCController) Light() *GCDeviceLight
Gets the light for the controller, if one exists. A controller's light can be used to signal information to the player, such as using different light colors based on the player index. It can also be used to react to in-game events and enhance user immersion.
func (*GCController) MicroGamepad ¶
func (o *GCController) MicroGamepad() *GCMicroGamepad
func (*GCController) Motion ¶
func (o *GCController) Motion() *GCMotion
Gets the motion input profile. This profile is optional and may be available if the controller is attached to a device that supports motion. If this is nil the controller does not support motion input and only the gamepad & extendedGamepad profiles are available. @see gamepad @see extendedGamepad
func (*GCController) PhysicalInputProfile ¶
func (o *GCController) PhysicalInputProfile() *GCPhysicalInputProfile
Gets the physical input profile for the controller. @note This is equivalent to the controller's microGamepad, or extendedGamepad instance. @see microGamepad @see extendedGamepad
func (*GCController) PlayerIndex ¶
func (o *GCController) PlayerIndex() GCControllerPlayerIndex
A player index for the controller, defaults to GCControllerPlayerIndexUnset. This can be set both for the application to keep track of controllers and as a signal to make a controller display a player index on a set of LEDs or some other mechanism. A controller is not guaranteed to have a visual display of the playerIndex, playerIndex does not persist for a controller with regards to a system. Negative values less than GCControllerPlayerIndexUnset will just map back to GCControllerPlayerIndexUnset when read back.
func (*GCController) SetControllerPausedHandler
deprecated
func (o *GCController) SetControllerPausedHandler(controllerPausedHandler func(*GCController))
Deprecated: Use the Menu button found on the controller's input profile, if it exists.
func (*GCController) SetPlayerIndex ¶
func (o *GCController) SetPlayerIndex(playerIndex GCControllerPlayerIndex)
type GCControllerAxisInput ¶
type GCControllerAxisInput struct {
GCControllerElement
}
A control element that tracks movement along an axis.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrolleraxisinput
func GCControllerAxisInputFromID ¶
func GCControllerAxisInputFromID(id objc.ID) *GCControllerAxisInput
func (*GCControllerAxisInput) SetValue ¶
func (o *GCControllerAxisInput) SetValue(value float32)
Sets the normalized value of the axis.
func (*GCControllerAxisInput) SetValueChangedHandler ¶
func (o *GCControllerAxisInput) SetValueChangedHandler(valueChangedHandler func(*GCControllerAxisInput, float32))
func (*GCControllerAxisInput) Value ¶
func (o *GCControllerAxisInput) Value() float32
A normalized value for the input, between -1 and 1 for axis inputs. The values are deadzoned and saturated before they are returned so there is no value ouside the range. Deadzoning does not remove values from the range, the full 0 to 1 magnitude of values are possible from the input. As an axis is often used in a digital sense, you can rely on a value of 0 meaning the axis is inside the deadzone. Any value greater than or less than zero is not in the deadzone.
func (*GCControllerAxisInput) ValueChangedHandler ¶
func (o *GCControllerAxisInput) ValueChangedHandler() objc.Block
type GCControllerButtonInput ¶
type GCControllerButtonInput struct {
GCControllerElement
}
A control element that represents a button touch or press.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerbuttoninput
func GCControllerButtonInputFromID ¶
func GCControllerButtonInputFromID(id objc.ID) *GCControllerButtonInput
func (*GCControllerButtonInput) IsPressed ¶
func (o *GCControllerButtonInput) IsPressed() bool
Buttons are mostly used in a digital sense, thus we have a recommended method for checking for pressed state instead of interpreting the value. As a general guideline a button is pressed if the value exceeds 0. However there may be hysterisis applied to counter noisy input values, thus incidental values around the threshold value may not trigger a change in pressed state. Others buttons may support two-stage actuation, where the button reports a value between 0 and 1 but is only considered pressed when its value is greater than some threshold other than 0. @see pressedChangedHandler @see value
func (*GCControllerButtonInput) IsTouched ¶
func (o *GCControllerButtonInput) IsTouched() bool
Some buttons feature capacitive touch capabilities where the user can touch the button without pressing it. In such cases, a button will be touched before it is pressed. For buttons without capacitive sensing, the touched state is true if the value exceeds 0. @see touchChangedHandler @see pressed
func (*GCControllerButtonInput) PressedChangedHandler ¶
func (o *GCControllerButtonInput) PressedChangedHandler() objc.Block
Set this block if you want to be notified when only the pressed state on this button changes. This will get called less often than the valueChangedHandler with the additional feature of the pressed state being different to the last time it was called.
func (*GCControllerButtonInput) SetPressedChangedHandler ¶
func (o *GCControllerButtonInput) SetPressedChangedHandler(pressedChangedHandler func(*GCControllerButtonInput, float32, bool))
func (*GCControllerButtonInput) SetTouchedChangedHandler ¶
func (o *GCControllerButtonInput) SetTouchedChangedHandler(touchedChangedHandler func(*GCControllerButtonInput, float32, bool, bool))
func (*GCControllerButtonInput) SetValue ¶
func (o *GCControllerButtonInput) SetValue(value float32)
Sets the pressure value of a snapshot of a button.
func (*GCControllerButtonInput) SetValueChangedHandler ¶
func (o *GCControllerButtonInput) SetValueChangedHandler(valueChangedHandler func(*GCControllerButtonInput, float32, bool))
func (*GCControllerButtonInput) TouchedChangedHandler ¶
func (o *GCControllerButtonInput) TouchedChangedHandler() objc.Block
func (*GCControllerButtonInput) Value ¶
func (o *GCControllerButtonInput) Value() float32
A normalized value for the input. Between 0 and 1 for button inputs. Values are saturated and thus never exceed the range of [0, 1]. @see valueChangedHandler @see pressed
func (*GCControllerButtonInput) ValueChangedHandler ¶
func (o *GCControllerButtonInput) ValueChangedHandler() objc.Block
type GCControllerDirectionPad ¶
type GCControllerDirectionPad struct {
GCControllerElement
}
A control element associated with a directional pad or a thumbstick.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerdirectionpad
func GCControllerDirectionPadFromID ¶
func GCControllerDirectionPadFromID(id objc.ID) *GCControllerDirectionPad
func (*GCControllerDirectionPad) Down ¶
func (o *GCControllerDirectionPad) Down() *GCControllerButtonInput
func (*GCControllerDirectionPad) Left ¶
func (o *GCControllerDirectionPad) Left() *GCControllerButtonInput
func (*GCControllerDirectionPad) Right ¶
func (o *GCControllerDirectionPad) Right() *GCControllerButtonInput
func (*GCControllerDirectionPad) SetValueChangedHandler ¶
func (o *GCControllerDirectionPad) SetValueChangedHandler(valueChangedHandler func(*GCControllerDirectionPad, float32, float32))
func (*GCControllerDirectionPad) SetValueForXAxisYAxis ¶
func (o *GCControllerDirectionPad) SetValueForXAxisYAxis(xAxis float32, yAxis float32)
Sets the input values of a snapshot of a directional pad.
func (*GCControllerDirectionPad) Up ¶
func (o *GCControllerDirectionPad) Up() *GCControllerButtonInput
func (*GCControllerDirectionPad) ValueChangedHandler ¶
func (o *GCControllerDirectionPad) ValueChangedHandler() objc.Block
func (*GCControllerDirectionPad) XAxis ¶
func (o *GCControllerDirectionPad) XAxis() *GCControllerAxisInput
func (*GCControllerDirectionPad) YAxis ¶
func (o *GCControllerDirectionPad) YAxis() *GCControllerAxisInput
type GCControllerElement ¶
type GCControllerElement struct {
foundation.NSObject
}
An input for a physical control, such as a button or thumbstick.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerelement
func GCControllerElementFromID ¶
func GCControllerElementFromID(id objc.ID) *GCControllerElement
func (*GCControllerElement) Aliases ¶
func (o *GCControllerElement) Aliases() *foundation.NSSet[*foundation.NSString]
A set of aliases that can be used to access this element with keyed subscript notation.
func (*GCControllerElement) Collection ¶
func (o *GCControllerElement) Collection() *GCControllerElement
Each element can be part of a wider collection of inputs that map to a single logical element. A directional pad (dpad) is a logical collection of two axis inputs and thus each axis belongs to the same collection element - the dpad.
func (*GCControllerElement) IsAnalog ¶
func (o *GCControllerElement) IsAnalog() bool
Check if the element can support more than just digital values, such as decimal ranges between 0 and 1. Defaults to YES for most elements.
func (*GCControllerElement) IsBoundToSystemGesture ¶
func (o *GCControllerElement) IsBoundToSystemGesture() bool
Check if the element is bound to a system gesture. Defaults to NO for most elements. @see preferredSystemGestureState @see GCSystemGestureState
func (*GCControllerElement) LocalizedName ¶
func (o *GCControllerElement) LocalizedName() *foundation.NSString
The element's localized name, taking input remapping into account. @note In almost all instances, you should use this over unmappedLocalizedName in your UI.
func (*GCControllerElement) PreferredSystemGestureState ¶
func (o *GCControllerElement) PreferredSystemGestureState() GCSystemGestureState
The preferred system gesture state for this element. Defaults to GCSystemGestureStateEnabled for most elements @note This is merely the preferred system gesture state - it is not guaranteed to be respected by the system. @note It is highly recommended to leave this set to the default value, however there may be situations (for example, game streaming apps) where it is preferrable to disable system gestures. @see boundToSystemGesture
func (*GCControllerElement) SetLocalizedName ¶
func (o *GCControllerElement) SetLocalizedName(localizedName *foundation.NSString)
func (*GCControllerElement) SetPreferredSystemGestureState ¶
func (o *GCControllerElement) SetPreferredSystemGestureState(preferredSystemGestureState GCSystemGestureState)
func (*GCControllerElement) SetSfSymbolsName ¶
func (o *GCControllerElement) SetSfSymbolsName(sfSymbolsName *foundation.NSString)
func (*GCControllerElement) SetUnmappedLocalizedName ¶
func (o *GCControllerElement) SetUnmappedLocalizedName(unmappedLocalizedName *foundation.NSString)
func (*GCControllerElement) SetUnmappedSfSymbolsName ¶
func (o *GCControllerElement) SetUnmappedSfSymbolsName(unmappedSfSymbolsName *foundation.NSString)
func (*GCControllerElement) SfSymbolsName ¶
func (o *GCControllerElement) SfSymbolsName() *foundation.NSString
The element's SF Symbols name, taking input remapping into account. @note In almost all instances, you should use this over unmappedSfSymbolsName in your UI.
func (*GCControllerElement) UnmappedLocalizedName ¶
func (o *GCControllerElement) UnmappedLocalizedName() *foundation.NSString
The element's localized name, not taking any input remapping into account. @note Use this in your games own remapping UI, or when you need to prompt a user that a given button has no mapping (localizedName is nil).
func (*GCControllerElement) UnmappedSfSymbolsName ¶
func (o *GCControllerElement) UnmappedSfSymbolsName() *foundation.NSString
The element's SF Symbols name, not taking any input remapping into account. @note Use this in your games own remapping UI, or when you need to prompt a user that a given button has no mapping (sfSymbolsName is nil).
type GCControllerInputState ¶
type GCControllerInputState struct {
foundation.NSObject
}
A class that represents an input state for gamepads and arcade sticks.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerinputstate
func GCControllerInputStateFromID ¶
func GCControllerInputStateFromID(id objc.ID) *GCControllerInputState
type GCControllerLiveInput ¶
type GCControllerLiveInput struct {
GCControllerInputState
}
The input profile for a controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerliveinput
func GCControllerLiveInputFromID ¶
func GCControllerLiveInputFromID(id objc.ID) *GCControllerLiveInput
func (*GCControllerLiveInput) Capture ¶
func (o *GCControllerLiveInput) Capture() *GCControllerInputState
Returns a snapshot of the physical device inputs.
func (*GCControllerLiveInput) NextInputState ¶
func (o *GCControllerLiveInput) NextInputState() *GCControllerInputState
Returns the next device input state from the queue.
func (*GCControllerLiveInput) UnmappedInput ¶
func (o *GCControllerLiveInput) UnmappedInput() *GCControllerLiveInput
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.
type GCControllerPlayerIndex ¶
type GCControllerPlayerIndex int64
The possible values for controller player indices.
const ( // The default index for a player on a controller. GCControllerPlayerIndexUnset GCControllerPlayerIndex = -1 // Player one is using the controller. GCControllerPlayerIndex1 GCControllerPlayerIndex = 0 // Player two is using the controller. GCControllerPlayerIndex2 GCControllerPlayerIndex = 1 // Player three is using the controller. GCControllerPlayerIndex3 GCControllerPlayerIndex = 2 // Player four is using the controller. GCControllerPlayerIndex4 GCControllerPlayerIndex = 3 )
func (GCControllerPlayerIndex) String ¶
func (e GCControllerPlayerIndex) String() string
type GCControllerTouchpad ¶
type GCControllerTouchpad struct {
GCControllerElement
}
A control element that represents a touch event on a touchpad.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollertouchpad
func GCControllerTouchpadFromID ¶
func GCControllerTouchpadFromID(id objc.ID) *GCControllerTouchpad
func (*GCControllerTouchpad) Button ¶
func (o *GCControllerTouchpad) Button() *GCControllerButtonInput
Button is the button built into the touch surface.
func (*GCControllerTouchpad) ReportsAbsoluteTouchSurfaceValues ¶
func (o *GCControllerTouchpad) ReportsAbsoluteTouchSurfaceValues() bool
The touchpad can use the raw position values of its surface as D-pad values, or it can create a virtual dpad centered around the first contact point with the surface. If NO; a smaller sliding window is created around the initial touch point and subsequent movement is relative to that center. Movement outside the window will slide the window with it to re-center it. This is great for surfaces where there is no clear sense of a middle and drift over time is an issue. If YES; the absolute values are used and any drift will have to managed manually either through user traning or by a developer using the dpad. The default value for this property is YES, meaning the touch surface's raw positional values are reported.
func (*GCControllerTouchpad) SetReportsAbsoluteTouchSurfaceValues ¶
func (o *GCControllerTouchpad) SetReportsAbsoluteTouchSurfaceValues(reportsAbsoluteTouchSurfaceValues bool)
func (*GCControllerTouchpad) SetTouchDown ¶
func (o *GCControllerTouchpad) SetTouchDown(touchDown func(*GCControllerTouchpad, float32, float32, float32, bool))
func (*GCControllerTouchpad) SetTouchMoved ¶
func (o *GCControllerTouchpad) SetTouchMoved(touchMoved func(*GCControllerTouchpad, float32, float32, float32, bool))
func (*GCControllerTouchpad) SetTouchUp ¶
func (o *GCControllerTouchpad) SetTouchUp(touchUp func(*GCControllerTouchpad, float32, float32, float32, bool))
func (*GCControllerTouchpad) SetValueForXAxisYAxisTouchDownButtonValue ¶
func (o *GCControllerTouchpad) SetValueForXAxisYAxisTouchDownButtonValue(xAxis float32, yAxis float32, touchDown bool, buttonValue float32)
Sets the input values of a snapshot of a touchpad.
func (*GCControllerTouchpad) TouchDown ¶
func (o *GCControllerTouchpad) TouchDown() objc.Block
Called when a touch event begins on the touchpad.
func (*GCControllerTouchpad) TouchMoved ¶
func (o *GCControllerTouchpad) TouchMoved() objc.Block
Called when a touch event continues on the touchpad, but not when it begins or ends.
func (*GCControllerTouchpad) TouchState ¶
func (o *GCControllerTouchpad) TouchState() GCTouchState
Indicates the current state of the touch event on the touchpad.
func (*GCControllerTouchpad) TouchSurface ¶
func (o *GCControllerTouchpad) TouchSurface() *GCControllerDirectionPad
The touch surface is a 2-axis control that represents the position of a touch event on the touchpad. The axes will indicate the most recent touch position - a non-zero value does not indicate that the surface is being touched, and a value of (0, 0) does not indicate the surface is not being touched. @see touchState - Should be polled in conjunction with touchSurface to determine if values are valid
func (*GCControllerTouchpad) TouchUp ¶
func (o *GCControllerTouchpad) TouchUp() objc.Block
Called when a touch event ends on the touchpad.
type GCDeviceBattery ¶
type GCDeviceBattery struct {
foundation.NSObject
}
The charge level and state of a device’s battery.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicebattery
func GCDeviceBatteryFromID ¶
func GCDeviceBatteryFromID(id objc.ID) *GCDeviceBattery
func (*GCDeviceBattery) BatteryLevel ¶
func (o *GCDeviceBattery) BatteryLevel() float32
This is the battery level for controller. Battery level ranges from 0.0 (fully discharged) to 1.0 (100% charged) and defaults to 0
func (*GCDeviceBattery) BatteryState ¶
func (o *GCDeviceBattery) BatteryState() GCDeviceBatteryState
A battery state for controller, defaults to GCControllerBatteryStateUnknown @note This property might be useful if you display the information about currently connected controller for player's convenience
type GCDeviceBatteryState ¶
type GCDeviceBatteryState int64
A state that indicates whether a device’s battery has power and is charging.
const ( GCDeviceBatteryStateUnknown GCDeviceBatteryState = -1 GCDeviceBatteryStateDischarging GCDeviceBatteryState = 0 GCDeviceBatteryStateCharging GCDeviceBatteryState = 1 GCDeviceBatteryStateFull GCDeviceBatteryState = 2 )
func (GCDeviceBatteryState) String ¶
func (e GCDeviceBatteryState) String() string
type GCDeviceCursor ¶
type GCDeviceCursor struct {
GCControllerDirectionPad
}
A control element for the cursor used as a directional pad.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicecursor
func GCDeviceCursorFromID ¶
func GCDeviceCursorFromID(id objc.ID) *GCDeviceCursor
type GCDeviceHaptics ¶
type GCDeviceHaptics struct {
foundation.NSObject
}
The locations of haptic actuators on a game controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicehaptics
func GCDeviceHapticsFromID ¶
func GCDeviceHapticsFromID(id objc.ID) *GCDeviceHaptics
func (*GCDeviceHaptics) CreateEngineWithLocality ¶
func (o *GCDeviceHaptics) CreateEngineWithLocality(locality *foundation.NSString) *corehaptics.CHHapticEngine
Creates a haptics engine with the specified locality.
func (*GCDeviceHaptics) SupportedLocalities ¶
func (o *GCDeviceHaptics) SupportedLocalities() *foundation.NSSet[*foundation.NSString]
The set of supported haptic localities for this device - representing the locations of its haptic actuators. @note GCHapticsLocalityDefault and GCHapticsLocalityAll are guaranteed to be supported - and they may be equivalent. @see GCHapticsLocality
type GCDeviceLight ¶
type GCDeviceLight struct {
foundation.NSObject
}
The colored light on a device.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicelight
func GCDeviceLightFromID ¶
func GCDeviceLightFromID(id objc.ID) *GCDeviceLight
func (*GCDeviceLight) Color ¶
func (o *GCDeviceLight) Color() *GCColor
func (*GCDeviceLight) SetColor ¶
func (o *GCDeviceLight) SetColor(color *GCColor)
type GCDevicePhysicalInput ¶
type GCDevicePhysicalInput interface {
GCDevicePhysicalInputState
}
GCDevicePhysicalInput wraps the ObjC protocol GCDevicePhysicalInput.
type GCDevicePhysicalInputElementChange ¶
type GCDevicePhysicalInputElementChange int64
Possible values that describe whether the input value of an element changes.
const ( // It’s unknown whether there’s a change to the input value. GCDevicePhysicalInputElementUnknownChange GCDevicePhysicalInputElementChange = -1 // There’s no change to the input value. GCDevicePhysicalInputElementNoChange GCDevicePhysicalInputElementChange = 0 // There’s a change to the input value. GCDevicePhysicalInputElementChanged GCDevicePhysicalInputElementChange = 1 )
func (GCDevicePhysicalInputElementChange) String ¶
func (e GCDevicePhysicalInputElementChange) String() string
type GCDevicePhysicalInputState ¶
type GCDevicePhysicalInputState interface {
ObjectForKeyedSubscript(key *foundation.NSString) GCPhysicalInputElement
Device() GCDevice
LastEventTimestamp() float64
LastEventLatency() float64
Elements() *GCPhysicalInputElementCollection[*foundation.NSString, GCPhysicalInputElement]
Buttons() *GCPhysicalInputElementCollection[*foundation.NSString, GCButtonElement]
Axes() *GCPhysicalInputElementCollection[*foundation.NSString, GCAxisElement]
Switches() *GCPhysicalInputElementCollection[*foundation.NSString, GCSwitchElement]
Dpads() *GCPhysicalInputElementCollection[*foundation.NSString, GCDirectionPadElement]
}
GCDevicePhysicalInputState wraps the ObjC protocol GCDevicePhysicalInputState.
type GCDevicePhysicalInputStateDiff ¶
type GCDevicePhysicalInputStateDiff interface {
ChangeForElement(element GCPhysicalInputElement) GCDevicePhysicalInputElementChange
ChangedElements() *foundation.NSEnumerator[GCPhysicalInputElement]
}
GCDevicePhysicalInputStateDiff wraps the ObjC protocol GCDevicePhysicalInputStateDiff.
type GCDirectionPadElement ¶
type GCDirectionPadElement interface {
GCPhysicalInputElement
XyAxes() GCAxis2DInput
XAxis() GCAxisInput
YAxis() GCAxisInput
Up() objc.ID
Down() objc.ID
Left() objc.ID
Right() objc.ID
}
GCDirectionPadElement wraps the ObjC protocol GCDirectionPadElement.
type GCDirectionPadElementName ¶
type GCDirectionPadElementName interface {
GCPhysicalInputElementName
}
GCDirectionPadElementName wraps the ObjC protocol GCDirectionPadElementName.
type GCDirectionalGamepad ¶
type GCDirectionalGamepad struct {
GCMicroGamepad
}
A profile that supports only the directional pad, without motion or rotation.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdirectionalgamepad
func GCDirectionalGamepadFromID ¶
func GCDirectionalGamepadFromID(id objc.ID) *GCDirectionalGamepad
type GCDualSenseAdaptiveTrigger ¶
type GCDualSenseAdaptiveTrigger struct {
GCControllerButtonInput
}
A class that encapsulates the features of a DualSense adaptive trigger.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdualsenseadaptivetrigger
func GCDualSenseAdaptiveTriggerFromID ¶
func GCDualSenseAdaptiveTriggerFromID(id objc.ID) *GCDualSenseAdaptiveTrigger
func (*GCDualSenseAdaptiveTrigger) ArmPosition ¶
func (o *GCDualSenseAdaptiveTrigger) ArmPosition() float32
A normalized float from [0-1], with 0 representing the lowest possible trigger arm position and 1 representing the maximum trigger arm position. @see GCDualSenseAdaptiveTriggerStatus
func (*GCDualSenseAdaptiveTrigger) Mode ¶
func (o *GCDualSenseAdaptiveTrigger) Mode() GCDualSenseAdaptiveTriggerMode
The mode that the adaptive trigger is currently in. This property reflects the physical state of the triggers - and requires a response from the controller. It does not update immediately after calling -[GCDualSenseAdaptiveTrigger setMode...]. @see GCDualSenseAdaptiveTriggerMode
func (*GCDualSenseAdaptiveTrigger) SetModeFeedbackWithResistiveStrengths ¶
func (o *GCDualSenseAdaptiveTrigger) SetModeFeedbackWithResistiveStrengths(positionalResistiveStrengths GCDualSenseAdaptiveTriggerPositionalResistiveStrengths)
Sets the mode to provide feedback with the specified strengths for each possible trigger position.
func (*GCDualSenseAdaptiveTrigger) SetModeFeedbackWithStartPositionResistiveStrength ¶
func (o *GCDualSenseAdaptiveTrigger) SetModeFeedbackWithStartPositionResistiveStrength(startPosition float32, resistiveStrength float32)
Sets the mode to provide feedback when the user depresses the trigger at the start position or at a greater value.
func (*GCDualSenseAdaptiveTrigger) SetModeOff ¶
func (o *GCDualSenseAdaptiveTrigger) SetModeOff()
Sets the mode to off and stops any trigger effect.
func (*GCDualSenseAdaptiveTrigger) SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength ¶
func (o *GCDualSenseAdaptiveTrigger) SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength(startPosition float32, endPosition float32, startStrength float32, endStrength float32)
Sets the mode to provide feedback when the user tilts the trigger between the start and the end positions.
func (*GCDualSenseAdaptiveTrigger) SetModeVibrationWithAmplitudesFrequency ¶
func (o *GCDualSenseAdaptiveTrigger) SetModeVibrationWithAmplitudesFrequency(positionalAmplitudes GCDualSenseAdaptiveTriggerPositionalAmplitudes, frequency float32)
Sets the mode to vibrate with the specified amplitudes for each possible trigger position.
func (*GCDualSenseAdaptiveTrigger) SetModeVibrationWithStartPositionAmplitudeFrequency ¶
func (o *GCDualSenseAdaptiveTrigger) SetModeVibrationWithStartPositionAmplitudeFrequency(startPosition float32, amplitude float32, frequency float32)
Sets the mode to vibrate when the user depresses the trigger at the start position or at a greater value.
func (*GCDualSenseAdaptiveTrigger) SetModeWeaponWithStartPositionEndPositionResistiveStrength ¶
func (o *GCDualSenseAdaptiveTrigger) SetModeWeaponWithStartPositionEndPositionResistiveStrength(startPosition float32, endPosition float32, resistiveStrength float32)
Sets the mode to provide feedback when the user depresses the trigger between the start and the end positions.
func (*GCDualSenseAdaptiveTrigger) Status ¶
func (o *GCDualSenseAdaptiveTrigger) Status() GCDualSenseAdaptiveTriggerStatus
The current status of the adaptive trigger - whether it is ready to apply a load, is currently applying a load, or has finished applying a load. @see GCDualSenseAdaptiveTriggerStatus
type GCDualSenseAdaptiveTriggerMode ¶
type GCDualSenseAdaptiveTriggerMode int64
The possible modes of an adaptive trigger.
const ( // The adaptive trigger effect is disabled. GCDualSenseAdaptiveTriggerModeOff GCDualSenseAdaptiveTriggerMode = 0 // The adaptive trigger effect provides constant feedback from the start position onwards. GCDualSenseAdaptiveTriggerModeFeedback GCDualSenseAdaptiveTriggerMode = 1 // The adaptive trigger effect provides feedback from the start position to the end position, emulating the feeling of pulling the trigger on a weapon. GCDualSenseAdaptiveTriggerModeWeapon GCDualSenseAdaptiveTriggerMode = 2 // The adaptive trigger effect provides a constant vibration effect from the start position onwards. GCDualSenseAdaptiveTriggerModeVibration GCDualSenseAdaptiveTriggerMode = 3 // The adaptive trigger effect provides feedback from the start position to the end position, linearly interpolated between the start and end strengths. GCDualSenseAdaptiveTriggerModeSlopeFeedback GCDualSenseAdaptiveTriggerMode = 4 )
func (GCDualSenseAdaptiveTriggerMode) String ¶
func (e GCDualSenseAdaptiveTriggerMode) String() string
type GCDualSenseAdaptiveTriggerPositionalAmplitudes ¶
type GCDualSenseAdaptiveTriggerPositionalAmplitudes struct {
Values [10]float32
}
The amplitudes for multiple positions on a trigger.
type GCDualSenseAdaptiveTriggerPositionalResistiveStrengths ¶
type GCDualSenseAdaptiveTriggerPositionalResistiveStrengths struct {
Values [10]float32
}
The resistive strengths for multiple positions on a trigger.
type GCDualSenseAdaptiveTriggerStatus ¶
type GCDualSenseAdaptiveTriggerStatus int64
The possible states of an adaptive trigger.
const ( // The adaptive trigger status cannot be determined. GCDualSenseAdaptiveTriggerStatusUnknown GCDualSenseAdaptiveTriggerStatus = -1 // The adaptive trigger is in feedback mode, and a resistive load has not been applied yet. GCDualSenseAdaptiveTriggerStatusFeedbackNoLoad GCDualSenseAdaptiveTriggerStatus = 0 // The adaptive trigger is in feedback mode, and a resistive load is applied. GCDualSenseAdaptiveTriggerStatusFeedbackLoadApplied GCDualSenseAdaptiveTriggerStatus = 1 // The adaptive trigger is in weapon mode, the trigger is ready to fire, and a resistive load has not been applied yet. GCDualSenseAdaptiveTriggerStatusWeaponReady GCDualSenseAdaptiveTriggerStatus = 2 // The adaptive trigger is in weapon mode, the trigger is firing, and a resistive load is currently being applied. GCDualSenseAdaptiveTriggerStatusWeaponFiring GCDualSenseAdaptiveTriggerStatus = 3 // The adaptive trigger is in weapon mode, the trigger has fired, and a resistive load is no longer being applied. GCDualSenseAdaptiveTriggerStatusWeaponFired GCDualSenseAdaptiveTriggerStatus = 4 // The adaptive trigger is in vibration mode, and the trigger is not vibrating. GCDualSenseAdaptiveTriggerStatusVibrationNotVibrating GCDualSenseAdaptiveTriggerStatus = 5 // The adaptive trigger is in vibration mode, and the trigger is currently vibrating. GCDualSenseAdaptiveTriggerStatusVibrationIsVibrating GCDualSenseAdaptiveTriggerStatus = 6 // The adaptive trigger is in slope feedback mode, the trigger is ready to apply a resistive load, but a resistive load has not been applied yet. GCDualSenseAdaptiveTriggerStatusSlopeFeedbackReady GCDualSenseAdaptiveTriggerStatus = 7 // The adaptive trigger is in slope feedback mode, and a resistive load is currently being applied to the trigger. GCDualSenseAdaptiveTriggerStatusSlopeFeedbackApplyingLoad GCDualSenseAdaptiveTriggerStatus = 8 // The adaptive trigger is in slope feedback mode, a resistive load has previously been applied, but is no longer being applied. GCDualSenseAdaptiveTriggerStatusSlopeFeedbackFinished GCDualSenseAdaptiveTriggerStatus = 9 )
func (GCDualSenseAdaptiveTriggerStatus) String ¶
func (e GCDualSenseAdaptiveTriggerStatus) String() string
type GCDualSenseGamepad ¶
type GCDualSenseGamepad struct {
GCExtendedGamepad
}
A controller profile that supported the DualSense controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdualsensegamepad
func GCDualSenseGamepadFromID ¶
func GCDualSenseGamepadFromID(id objc.ID) *GCDualSenseGamepad
func (*GCDualSenseGamepad) TouchpadButton ¶
func (o *GCDualSenseGamepad) TouchpadButton() *GCControllerButtonInput
DualSense controllers have a touchpad with a button and two-finger tracking.
func (*GCDualSenseGamepad) TouchpadPrimary ¶
func (o *GCDualSenseGamepad) TouchpadPrimary() *GCControllerDirectionPad
func (*GCDualSenseGamepad) TouchpadSecondary ¶
func (o *GCDualSenseGamepad) TouchpadSecondary() *GCControllerDirectionPad
type GCDualShockGamepad ¶
type GCDualShockGamepad struct {
GCExtendedGamepad
}
A controller profile that supports the DualShock 4 controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdualshockgamepad
func GCDualShockGamepadFromID ¶
func GCDualShockGamepadFromID(id objc.ID) *GCDualShockGamepad
func (*GCDualShockGamepad) TouchpadButton ¶
func (o *GCDualShockGamepad) TouchpadButton() *GCControllerButtonInput
DualShock controllers have a touchpad with a button and two-finger tracking.
func (*GCDualShockGamepad) TouchpadPrimary ¶
func (o *GCDualShockGamepad) TouchpadPrimary() *GCControllerDirectionPad
func (*GCDualShockGamepad) TouchpadSecondary ¶
func (o *GCDualShockGamepad) TouchpadSecondary() *GCControllerDirectionPad
type GCEulerAngles ¶
A structure that specifies the controller’s attitude as a series of rotations around the x, y, and z axes.
type GCEventViewController ¶
type GCEventViewController struct {
appkit.NSViewController
}
A view controller that delivers input either from the responder chain to views, or from game controllers to profiles.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gceventviewcontroller
func GCEventViewControllerFromID ¶
func GCEventViewControllerFromID(id objc.ID) *GCEventViewController
func (*GCEventViewController) ControllerUserInteractionEnabled ¶
func (o *GCEventViewController) ControllerUserInteractionEnabled() bool
func (*GCEventViewController) SetControllerUserInteractionEnabled ¶
func (o *GCEventViewController) SetControllerUserInteractionEnabled(controllerUserInteractionEnabled bool)
type GCExtendedGamepad ¶
type GCExtendedGamepad struct {
GCPhysicalInputProfile
}
A controller profile that supports the extended set of gamepad controls.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcextendedgamepad
func GCExtendedGamepadFromID ¶
func GCExtendedGamepadFromID(id objc.ID) *GCExtendedGamepad
func (*GCExtendedGamepad) ButtonA ¶
func (o *GCExtendedGamepad) ButtonA() *GCControllerButtonInput
All face buttons are required to be analog in the Extended profile. These must be arranged in the diamond pattern given below: Y / \ X B \ / A
func (*GCExtendedGamepad) ButtonB ¶
func (o *GCExtendedGamepad) ButtonB() *GCControllerButtonInput
func (*GCExtendedGamepad) ButtonHome ¶
func (o *GCExtendedGamepad) ButtonHome() *GCControllerButtonInput
Button home is a special menu button. If the system does not consume button home events, they will be passed to your application and should be used to enter a secondary menu, and pause the game.
func (*GCExtendedGamepad) ButtonMenu ¶
func (o *GCExtendedGamepad) ButtonMenu() *GCControllerButtonInput
Button menu is the primary menu button, and should be used to enter the main menu and pause the game.
func (*GCExtendedGamepad) ButtonOptions ¶
func (o *GCExtendedGamepad) ButtonOptions() *GCControllerButtonInput
Button options is the secondary menu button. It should be used to enter a secondary menu, such as graphics and sound configuration, and pause the game.
func (*GCExtendedGamepad) ButtonX ¶
func (o *GCExtendedGamepad) ButtonX() *GCControllerButtonInput
func (*GCExtendedGamepad) ButtonY ¶
func (o *GCExtendedGamepad) ButtonY() *GCControllerButtonInput
func (*GCExtendedGamepad) Controller ¶
func (o *GCExtendedGamepad) Controller() *GCController
A profile keeps a reference to the controller that this profile is mapping input from.
func (*GCExtendedGamepad) Dpad ¶
func (o *GCExtendedGamepad) Dpad() *GCControllerDirectionPad
Required to be analog in the Extended profile. All the elements of this directional input are thus analog.
func (*GCExtendedGamepad) LeftShoulder ¶
func (o *GCExtendedGamepad) LeftShoulder() *GCControllerButtonInput
Shoulder buttons are required to be analog inputs.
func (*GCExtendedGamepad) LeftThumbstick ¶
func (o *GCExtendedGamepad) LeftThumbstick() *GCControllerDirectionPad
A thumbstick is a 2-axis control that is physically required to be analog. All the elements of this directional input are thus analog.
func (*GCExtendedGamepad) LeftThumbstickButton ¶
func (o *GCExtendedGamepad) LeftThumbstickButton() *GCControllerButtonInput
A thumbstick may also have a clickable component, which is treated as a non-analog button.
func (*GCExtendedGamepad) LeftTrigger ¶
func (o *GCExtendedGamepad) LeftTrigger() *GCControllerButtonInput
Triggers are required to be analog inputs. Common uses would be acceleration and decelleration in a driving game for example.
func (*GCExtendedGamepad) RightShoulder ¶
func (o *GCExtendedGamepad) RightShoulder() *GCControllerButtonInput
Shoulder buttons are required to be analog inputs.
func (*GCExtendedGamepad) RightThumbstick ¶
func (o *GCExtendedGamepad) RightThumbstick() *GCControllerDirectionPad
A thumbstick is a 2-axis control that is physically required to be analog. All the elements of this directional input are thus analog.
func (*GCExtendedGamepad) RightThumbstickButton ¶
func (o *GCExtendedGamepad) RightThumbstickButton() *GCControllerButtonInput
func (*GCExtendedGamepad) RightTrigger ¶
func (o *GCExtendedGamepad) RightTrigger() *GCControllerButtonInput
func (*GCExtendedGamepad) SaveSnapshot ¶
func (o *GCExtendedGamepad) SaveSnapshot() *GCExtendedGamepadSnapshot
Saves a snapshot of all of the profile’s elements. Deprecated: Use the -[GCController capture] method instead
func (*GCExtendedGamepad) SetStateFromExtendedGamepad ¶
func (o *GCExtendedGamepad) SetStateFromExtendedGamepad(extendedGamepad *GCExtendedGamepad)
Copies the input values from a specified extended gamepad to a snapshot of an extended gamepad.
func (*GCExtendedGamepad) SetValueChangedHandler ¶
func (o *GCExtendedGamepad) SetValueChangedHandler(valueChangedHandler func(*GCExtendedGamepad, *GCControllerElement))
func (*GCExtendedGamepad) ValueChangedHandler ¶
func (o *GCExtendedGamepad) ValueChangedHandler() objc.Block
type GCExtendedGamepadSnapShotDataV100 ¶
type GCExtendedGamepadSnapShotDataV100 struct {
Version uint16
Size uint16
DpadX float32
DpadY float32
ButtonA float32
ButtonB float32
ButtonX float32
ButtonY float32
LeftShoulder float32
RightShoulder float32
LeftThumbstickX float32
LeftThumbstickY float32
RightThumbstickX float32
RightThumbstickY float32
LeftTrigger float32
RightTrigger float32
}
A structure that holds a snapshot of an extended gamepad controller’s input data.
type GCExtendedGamepadSnapshot ¶
type GCExtendedGamepadSnapshot struct {
GCExtendedGamepad
}
A recording of all of the values provided by a GCExtendedGamepad object.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcextendedgamepadsnapshot Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
func GCExtendedGamepadSnapshotFromID ¶
func GCExtendedGamepadSnapshotFromID(id objc.ID) *GCExtendedGamepadSnapshot
func (*GCExtendedGamepadSnapshot) InitWithControllerSnapshotData ¶
func (o *GCExtendedGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCExtendedGamepadSnapshot
Initializes a snapshot object associated with a specific controller using a flattened data representation obtained from another snapshot.
func (*GCExtendedGamepadSnapshot) InitWithSnapshotData ¶
func (o *GCExtendedGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCExtendedGamepadSnapshot
Initializes a snapshot object with the flattened data representation obtained from another snapshot.
func (*GCExtendedGamepadSnapshot) SetSnapshotData ¶
func (o *GCExtendedGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)
func (*GCExtendedGamepadSnapshot) SnapshotData
deprecated
func (o *GCExtendedGamepadSnapshot) SnapshotData() *foundation.NSData
Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
type GCExtendedGamepadSnapshotData
deprecated
type GCExtendedGamepadSnapshotData struct {
Version uint16
Size uint16
DpadX float32
DpadY float32
ButtonA float32
ButtonB float32
ButtonX float32
ButtonY float32
LeftShoulder float32
RightShoulder float32
LeftThumbstickX float32
LeftThumbstickY float32
RightThumbstickX float32
RightThumbstickY float32
LeftTrigger float32
RightTrigger float32
SupportsClickableThumbsticks bool
LeftThumbstickButton bool
RightThumbstickButton bool
}
Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
type GCExtendedGamepadSnapshotDataVersion
deprecated
type GCExtendedGamepadSnapshotDataVersion int64
Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
const ( GCExtendedGamepadSnapshotDataVersion1 GCExtendedGamepadSnapshotDataVersion = 256 GCExtendedGamepadSnapshotDataVersion2 GCExtendedGamepadSnapshotDataVersion = 257 )
func GCCurrentExtendedGamepadSnapshotDataVersion
deprecated
func GCCurrentExtendedGamepadSnapshotDataVersion() GCExtendedGamepadSnapshotDataVersion
Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead
func (GCExtendedGamepadSnapshotDataVersion) String ¶
func (e GCExtendedGamepadSnapshotDataVersion) String() string
type GCGamepad ¶
type GCGamepad struct {
GCPhysicalInputProfile
}
The standard set of gamepad controls.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcgamepad Deprecated: since macOS 10.12.
func GCGamepadFromID ¶
func (*GCGamepad) ButtonA ¶
func (o *GCGamepad) ButtonA() *GCControllerButtonInput
All face buttons are required to be analog in the Standard profile. These must be arranged in the diamond pattern given below: Y / \ X B \ / A
func (*GCGamepad) ButtonB ¶
func (o *GCGamepad) ButtonB() *GCControllerButtonInput
func (*GCGamepad) ButtonX ¶
func (o *GCGamepad) ButtonX() *GCControllerButtonInput
func (*GCGamepad) ButtonY ¶
func (o *GCGamepad) ButtonY() *GCControllerButtonInput
func (*GCGamepad) Controller ¶
func (o *GCGamepad) Controller() *GCController
A profile keeps a reference to the controller that this profile is mapping input from.
func (*GCGamepad) Dpad ¶
func (o *GCGamepad) Dpad() *GCControllerDirectionPad
Required to be analog in the Standard profile. All the elements of this directional input are thus analog.
func (*GCGamepad) LeftShoulder ¶
func (o *GCGamepad) LeftShoulder() *GCControllerButtonInput
Shoulder buttons are required to be analog inputs.
func (*GCGamepad) RightShoulder ¶
func (o *GCGamepad) RightShoulder() *GCControllerButtonInput
Shoulder buttons are required to be analog inputs.
func (*GCGamepad) SaveSnapshot ¶
func (o *GCGamepad) SaveSnapshot() *GCGamepadSnapshot
Saves a snapshot of all of the profile’s elements.
func (*GCGamepad) SetValueChangedHandler ¶
func (o *GCGamepad) SetValueChangedHandler(valueChangedHandler func(*GCGamepad, *GCControllerElement))
func (*GCGamepad) ValueChangedHandler ¶
type GCGamepadSnapShotDataV100 ¶
type GCGamepadSnapShotDataV100 struct {
Version uint16
Size uint16
DpadX float32
DpadY float32
ButtonA float32
ButtonB float32
ButtonX float32
ButtonY float32
LeftShoulder float32
RightShoulder float32
}
A structure that holds a snapshot of a gamepad controller’s input data.
type GCGamepadSnapshot ¶
type GCGamepadSnapshot struct {
GCGamepad
}
A recording of all of the values provided by a GCGamepad object.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcgamepadsnapshot Deprecated: Use GCExtendedGamepad instead
func GCGamepadSnapshotFromID ¶
func GCGamepadSnapshotFromID(id objc.ID) *GCGamepadSnapshot
func (*GCGamepadSnapshot) InitWithControllerSnapshotData ¶
func (o *GCGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCGamepadSnapshot
Initializes a snapshot object associated with a specific controller using a flattened data representation obtained from another snapshot.
func (*GCGamepadSnapshot) InitWithSnapshotData ¶
func (o *GCGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCGamepadSnapshot
Initializes a snapshot object with the flattened data representation obtained from another snapshot. Deprecated: Use GCExtendedGamepad instead
func (*GCGamepadSnapshot) SetSnapshotData ¶
func (o *GCGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)
func (*GCGamepadSnapshot) SnapshotData
deprecated
func (o *GCGamepadSnapshot) SnapshotData() *foundation.NSData
Deprecated: Use GCExtendedGamepad instead
type GCGearShifterElement ¶
type GCGearShifterElement struct {
foundation.NSObject
}
An element that represents either a pattern or a sequential gear shift.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcgearshifterelement
func GCGearShifterElementFromID ¶
func GCGearShifterElementFromID(id objc.ID) *GCGearShifterElement
func (*GCGearShifterElement) PatternInput ¶
func (o *GCGearShifterElement) PatternInput() GCSwitchPositionInput
Get the input reporting the position of the pattern gear shifter. If this property is \c nil, the gear shifter is not a pattern gear shifter. In the returned input, a position of \c -1 corresponds to the "reverse gear". A position of \c 0 corresponds to the neutral gear.
func (*GCGearShifterElement) SequentialInput ¶
func (o *GCGearShifterElement) SequentialInput() GCRelativeInput
Get the input reporting changes to the sequential gear shifter. If this property is \c nil, the gear shifter is not a sequential gear shifter.
type GCKeyboard ¶
type GCKeyboard struct {
foundation.NSObject
}
An object that represents a physical keyboard connected to a device.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gckeyboard
func GCKeyboardCoalescedKeyboard ¶
func GCKeyboardCoalescedKeyboard() *GCKeyboard
Keyboard object that represents all keyboards connected to the device Should be used to query key states every time input needs to be handled
func GCKeyboardFromID ¶
func GCKeyboardFromID(id objc.ID) *GCKeyboard
func (*GCKeyboard) KeyboardInput ¶
func (o *GCKeyboard) KeyboardInput() *GCKeyboardInput
Unlike GCController GCKeyboard only has one input profile. This profile allows you to query buttons and button state
type GCKeyboardInput ¶
type GCKeyboardInput struct {
GCPhysicalInputProfile
}
A controller profile that uses the keyboard as the input device.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gckeyboardinput
func GCKeyboardInputFromID ¶
func GCKeyboardInputFromID(id objc.ID) *GCKeyboardInput
func (*GCKeyboardInput) ButtonForKeyCode ¶
func (o *GCKeyboardInput) ButtonForKeyCode(code int) *GCControllerButtonInput
Returns the button element for the specified key code.
func (*GCKeyboardInput) IsAnyKeyPressed ¶
func (o *GCKeyboardInput) IsAnyKeyPressed() bool
Before querying any key for a value it might be useful to check if any key is actually pressed
func (*GCKeyboardInput) KeyChangedHandler ¶
func (o *GCKeyboardInput) KeyChangedHandler() objc.Block
func (*GCKeyboardInput) SetKeyChangedHandler ¶
func (o *GCKeyboardInput) SetKeyChangedHandler(keyChangedHandler func(*GCKeyboardInput, *GCControllerButtonInput, int, bool))
type GCLinearInput ¶
type GCLinearInput interface {
ValueDidChangeHandler() objc.Block
SetValueDidChangeHandler(valueDidChangeHandler func(objc.ID, objc.ID, float32))
Value() float32
IsAnalog() bool
CanWrap() bool
LastValueTimestamp() float64
LastValueLatency() float64
PhysicalExtents() GCPhysicalInputExtents
Sources() *foundation.NSSet[GCPhysicalInputSource]
}
GCLinearInput wraps the ObjC protocol GCLinearInput.
type GCMicroGamepad ¶
type GCMicroGamepad struct {
GCPhysicalInputProfile
}
A controller profile that supports the Siri Remote.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmicrogamepad
func GCMicroGamepadFromID ¶
func GCMicroGamepadFromID(id objc.ID) *GCMicroGamepad
func (*GCMicroGamepad) AllowsRotation ¶
func (o *GCMicroGamepad) AllowsRotation() bool
Allows the Micro profile to monitor the orientation of the controller, if the controller is positioned in landscape orientation, D-pad input values will be transposed 90 degrees to match the new orientation. The default value for this property is NO.
func (*GCMicroGamepad) ButtonA ¶
func (o *GCMicroGamepad) ButtonA() *GCControllerButtonInput
The Micro profile has two buttons that are optionally analog in the Micro profile. Button A is the primary action button, it indicates affirmative action and should be used to advance in menus or perform the primary action in gameplay.
func (*GCMicroGamepad) ButtonMenu ¶
func (o *GCMicroGamepad) ButtonMenu() *GCControllerButtonInput
Button menu is the primary menu button, and should be used to enter the main menu and pause the game.
func (*GCMicroGamepad) ButtonX ¶
func (o *GCMicroGamepad) ButtonX() *GCControllerButtonInput
Button X is the secondary action button, it indicates an alternate affirmative action and should be used to perform a secondary action. If there is no secondary action it should be used as equivalent to buttonA. Unlike on other profiles there is no negative button on this profile. Instead the menu button should be used to present menu content or to retreat in a menu flow. @see buttonA
func (*GCMicroGamepad) Controller ¶
func (o *GCMicroGamepad) Controller() *GCController
A profile keeps a reference to the controller that this profile is mapping input from.
func (*GCMicroGamepad) Dpad ¶
func (o *GCMicroGamepad) Dpad() *GCControllerDirectionPad
Optionally analog in the Micro profile. All the elements of this directional input are either analog or digital.
func (*GCMicroGamepad) ReportsAbsoluteDpadValues ¶
func (o *GCMicroGamepad) ReportsAbsoluteDpadValues() bool
The Micro profile can use the raw position values of the touchpad on the remote as D-pad values, or it can create a virtual dpad centered around the first contact point with the surface. If NO; a smaller sliding window is created around the initial touch point and subsequent movement is relative to that center. Movement outside the window will slide the window with it to re-center it. This is great for surfaces where there is no clear sense of a middle and drift over time is an issue. If YES; the absolute values are used and any drift will have to managed manually either through user traning or by a developer using the dpad. The default value for this property is NO, meaning a sliding window is used for the dpad.
func (*GCMicroGamepad) SaveSnapshot ¶
func (o *GCMicroGamepad) SaveSnapshot() *GCMicroGamepadSnapshot
Saves a snapshot of all of the profile’s elements. Deprecated: Use the -[GCController capture] method instead
func (*GCMicroGamepad) SetAllowsRotation ¶
func (o *GCMicroGamepad) SetAllowsRotation(allowsRotation bool)
func (*GCMicroGamepad) SetReportsAbsoluteDpadValues ¶
func (o *GCMicroGamepad) SetReportsAbsoluteDpadValues(reportsAbsoluteDpadValues bool)
func (*GCMicroGamepad) SetStateFromMicroGamepad ¶
func (o *GCMicroGamepad) SetStateFromMicroGamepad(microGamepad *GCMicroGamepad)
Copies the input values from a specified micro gamepad to a snapshot of a micro gamepad.
func (*GCMicroGamepad) SetValueChangedHandler ¶
func (o *GCMicroGamepad) SetValueChangedHandler(valueChangedHandler func(*GCMicroGamepad, *GCControllerElement))
func (*GCMicroGamepad) ValueChangedHandler ¶
func (o *GCMicroGamepad) ValueChangedHandler() objc.Block
type GCMicroGamepadSnapShotDataV100 ¶
type GCMicroGamepadSnapShotDataV100 struct {
Version uint16
Size uint16
DpadX float32
DpadY float32
ButtonA float32
ButtonX float32
}
A structure that holds a snapshot of a micro gamepad controller’s input data.
type GCMicroGamepadSnapshot ¶
type GCMicroGamepadSnapshot struct {
GCMicroGamepad
}
A recording of all of the values provided by a GCMicroGamepad object.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmicrogamepadsnapshot Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
func GCMicroGamepadSnapshotFromID ¶
func GCMicroGamepadSnapshotFromID(id objc.ID) *GCMicroGamepadSnapshot
func (*GCMicroGamepadSnapshot) InitWithControllerSnapshotData ¶
func (o *GCMicroGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCMicroGamepadSnapshot
func (*GCMicroGamepadSnapshot) InitWithSnapshotData ¶
func (o *GCMicroGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCMicroGamepadSnapshot
Initializes a snapshot object with the flattened data representation obtained from another snapshot.
func (*GCMicroGamepadSnapshot) SetSnapshotData ¶
func (o *GCMicroGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)
func (*GCMicroGamepadSnapshot) SnapshotData
deprecated
func (o *GCMicroGamepadSnapshot) SnapshotData() *foundation.NSData
Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
type GCMicroGamepadSnapshotDataVersion
deprecated
type GCMicroGamepadSnapshotDataVersion int64
Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
const (
GCMicroGamepadSnapshotDataVersion1 GCMicroGamepadSnapshotDataVersion = 256
)
func GCCurrentMicroGamepadSnapshotDataVersion
deprecated
func GCCurrentMicroGamepadSnapshotDataVersion() GCMicroGamepadSnapshotDataVersion
Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead
func (GCMicroGamepadSnapshotDataVersion) String ¶
func (e GCMicroGamepadSnapshotDataVersion) String() string
type GCMotion ¶
type GCMotion struct {
foundation.NSObject
}
A controller profile that supports orientation and motion.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmotion
func GCMotionFromID ¶
func (*GCMotion) Acceleration ¶
func (o *GCMotion) Acceleration() GCAcceleration
The total acceleration of the controller. @see gravity @see userAcceleration
func (*GCMotion) Attitude ¶
func (o *GCMotion) Attitude() GCQuaternion
The current attitude of the controller. @note Remotes without accurate attitude and rotation rate can not determine a stable attitude so the values will be (0,0,0,1) at all times. @see hasAttitude @see GCMicroGamepad
func (*GCMotion) Controller ¶
func (o *GCMotion) Controller() *GCController
A profile keeps a reference to the controller that it is mapping input from. @see GCController
func (*GCMotion) Gravity ¶
func (o *GCMotion) Gravity() GCAcceleration
The gravity vector expressed in the controller's reference frame. Note that the total acceleration of the controller is equal to gravity plus userAcceleration. @see userAcceleration @see acceleration
func (*GCMotion) HasAttitude ¶
The controller generating the motion data has sensors that can accurately determine the current attitude. If this is enabled the motion data for attitude is usable for inputs.
func (*GCMotion) HasAttitudeAndRotationRate ¶
The controller generating the motion data has sensors that can accurately determine the current attitude and rotation rate. If this is enabled the motion data for attitude and rotation rate are usable for inputs. Deprecated: Use -hasAttitude and -hasRotationRate methods instead
func (*GCMotion) HasGravityAndUserAcceleration ¶
Returns YES if the controller is capable of reporting gravity and user acceleration separately. @note Some controllers do not separate gravity from user acceleration, and only report the total acceleration of the controller. Query whether the connected controller has the ability to separate gravity and user acceleration, and it doesn’t, use acceleration instead. @see acceleration
func (*GCMotion) HasRotationRate ¶
The controller generating the motion data has sensors that can accurately determine the current rotation rate. If this is enabled the motion data for rotation rate is usable for inputs.
func (*GCMotion) RotationRate ¶
func (o *GCMotion) RotationRate() GCRotationRate
The current rotation rate of the controller. @note Remotes without accurate attitude and rotation rate can not determine a stable rotation rate so the values will be (0,0,0) at all times. @see hasRotationRate @see GCMicroGamepad
func (*GCMotion) SensorsActive ¶
Set this property to YES when you wish to receive motion data from the controller. When you set this property to NO, the motion sensors will be disabled and the GCMotion profile will not be updated. @note It is highly recommended that you only enable sensor during the period of time you directly need motion data. Motion sensors can drain controller battery, device battery, and needlessly consume Bluetooth bandwidth. @see sensorsRequireManualActivation
func (*GCMotion) SensorsRequireManualActivation ¶
If this property is returns YES, you are responsible for setting sensorsActive to YES when you need motion data from the controller. Some controllers, such as the Siri Remote, automatically activate and deactivate motion sensors. In such a case, this property will return NO. @see sensorsActive
func (*GCMotion) SetAcceleration ¶
func (o *GCMotion) SetAcceleration(acceleration GCAcceleration)
Sets the total acceleration of the controller that includes gravity and the user’s acceleration.
func (*GCMotion) SetAttitude ¶
func (o *GCMotion) SetAttitude(attitude GCQuaternion)
Sets the controller’s attitude.
func (*GCMotion) SetGravity ¶
func (o *GCMotion) SetGravity(gravity GCAcceleration)
Sets the controller’s gravity data.
func (*GCMotion) SetRotationRate ¶
func (o *GCMotion) SetRotationRate(rotationRate GCRotationRate)
Sets the controller’s rotation rate.
func (*GCMotion) SetSensorsActive ¶
func (*GCMotion) SetStateFromMotion ¶
Copies the input values from a specified motion profile to a snapshot of a motion profile.
func (*GCMotion) SetUserAcceleration ¶
func (o *GCMotion) SetUserAcceleration(userAcceleration GCAcceleration)
Sets the acceleration the user applies to the controller.
func (*GCMotion) SetValueChangedHandler ¶
func (*GCMotion) UserAcceleration ¶
func (o *GCMotion) UserAcceleration() GCAcceleration
The acceleration that the user is giving to the controller. Note that the total acceleration of the controller is equal to gravity plus userAcceleration. @see gravity @see acceleration
func (*GCMotion) ValueChangedHandler ¶
type GCMouse ¶
type GCMouse struct {
foundation.NSObject
}
An object that represents a physical mouse connected to a device.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmouse
func GCMouseCurrent ¶
func GCMouseCurrent() *GCMouse
The most recently used mouse device. If a user actuates a mouse input, that mouse will become the current one. @see GCMouseDidBecomeCurrentNotification @see GCMouseDidStopBeingCurrentNotification
func GCMouseFromID ¶
func (*GCMouse) MouseInput ¶
func (o *GCMouse) MouseInput() *GCMouseInput
Unlike GCController GCMouse supports only one input profile Profile contains mouse buttons, scroll wheel and pointer delta.
type GCMouseInput ¶
type GCMouseInput struct {
GCPhysicalInputProfile
}
A controller profile that tracks input from a mouse.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmouseinput
func GCMouseInputFromID ¶
func GCMouseInputFromID(id objc.ID) *GCMouseInput
func (*GCMouseInput) AuxiliaryButtons ¶
func (o *GCMouseInput) AuxiliaryButtons() *foundation.NSArray[*GCControllerButtonInput]
func (*GCMouseInput) LeftButton ¶
func (o *GCMouseInput) LeftButton() *GCControllerButtonInput
Mouse buttons that can be used only as digital inputs
func (*GCMouseInput) MiddleButton ¶
func (o *GCMouseInput) MiddleButton() *GCControllerButtonInput
func (*GCMouseInput) MouseMovedHandler ¶
func (o *GCMouseInput) MouseMovedHandler() objc.Block
func (*GCMouseInput) RightButton ¶
func (o *GCMouseInput) RightButton() *GCControllerButtonInput
func (*GCMouseInput) Scroll ¶
func (o *GCMouseInput) Scroll() *GCDeviceCursor
Scroll is a dpad with undefined range.
func (*GCMouseInput) SetMouseMovedHandler ¶
func (o *GCMouseInput) SetMouseMovedHandler(mouseMovedHandler func(*GCMouseInput, float32, float32))
type GCPhysicalInputElement ¶
type GCPhysicalInputElement interface {
}
GCPhysicalInputElement wraps the ObjC protocol GCPhysicalInputElement.
type GCPhysicalInputElementCollection ¶
type GCPhysicalInputElementCollection[Key purego.AnyObject, Element purego.AnyObject] struct { foundation.NSObject }
A collection of physical input elements.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcphysicalinputelementcollection
func (*GCPhysicalInputElementCollection[Key, Element]) Count ¶
func (o *GCPhysicalInputElementCollection[Key, Element]) Count() uint
The number of elements in the collection.
func (*GCPhysicalInputElementCollection[Key, Element]) ElementEnumerator ¶
func (o *GCPhysicalInputElementCollection[Key, Element]) ElementEnumerator() *foundation.NSEnumerator[Element]
func (*GCPhysicalInputElementCollection[Key, Element]) ElementForAlias ¶
func (o *GCPhysicalInputElementCollection[Key, Element]) ElementForAlias(alias Key) Element
Returns the element associated with a given alias. @param alias The alias for which to return the corresponding element. Typically, you pass one of the constants defined in \c GCInputNames.h. @return The element associated with \a alias, or nil if no element is associated with \a alias.
func (*GCPhysicalInputElementCollection[Key, Element]) ObjectForKeyedSubscript ¶
func (o *GCPhysicalInputElementCollection[Key, Element]) ObjectForKeyedSubscript(key Key) Element
type GCPhysicalInputElementName ¶
type GCPhysicalInputElementName interface {
}
GCPhysicalInputElementName wraps the ObjC protocol GCPhysicalInputElementName.
type GCPhysicalInputExtents ¶
type GCPhysicalInputExtents interface {
ScaledValue() float64
MinimumValue() float64
MaximumValue() float64
}
GCPhysicalInputExtents wraps the ObjC protocol GCPhysicalInputExtents.
type GCPhysicalInputProfile ¶
type GCPhysicalInputProfile struct {
foundation.NSObject
}
The base class for controller profiles that support physical buttons, thumbsticks, and directional pads.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcphysicalinputprofile
func GCPhysicalInputProfileFromID ¶
func GCPhysicalInputProfileFromID(id objc.ID) *GCPhysicalInputProfile
func (*GCPhysicalInputProfile) AllAxes ¶
func (o *GCPhysicalInputProfile) AllAxes() *foundation.NSSet[*GCControllerAxisInput]
func (*GCPhysicalInputProfile) AllButtons ¶
func (o *GCPhysicalInputProfile) AllButtons() *foundation.NSSet[*GCControllerButtonInput]
func (*GCPhysicalInputProfile) AllDpads ¶
func (o *GCPhysicalInputProfile) AllDpads() *foundation.NSSet[*GCControllerDirectionPad]
func (*GCPhysicalInputProfile) AllElements ¶
func (o *GCPhysicalInputProfile) AllElements() *foundation.NSSet[*GCControllerElement]
The following properties allow for dynamic querying of the input elements available on a profile.
func (*GCPhysicalInputProfile) AllTouchpads ¶
func (o *GCPhysicalInputProfile) AllTouchpads() *foundation.NSSet[*GCControllerTouchpad]
func (*GCPhysicalInputProfile) Axes ¶
func (o *GCPhysicalInputProfile) Axes() *foundation.NSDictionary[*foundation.NSString, *GCControllerAxisInput]
func (*GCPhysicalInputProfile) Buttons ¶
func (o *GCPhysicalInputProfile) Buttons() *foundation.NSDictionary[*foundation.NSString, *GCControllerButtonInput]
func (*GCPhysicalInputProfile) Capture ¶
func (o *GCPhysicalInputProfile) Capture() *GCPhysicalInputProfile
Returns a snapshot of the profile with its current element values.
func (*GCPhysicalInputProfile) Device ¶
func (o *GCPhysicalInputProfile) Device() GCDevice
A profile keeps a reference to the device that this profile is mapping input from
func (*GCPhysicalInputProfile) Dpads ¶
func (o *GCPhysicalInputProfile) Dpads() *foundation.NSDictionary[*foundation.NSString, *GCControllerDirectionPad]
func (*GCPhysicalInputProfile) Elements ¶
func (o *GCPhysicalInputProfile) Elements() *foundation.NSDictionary[*foundation.NSString, *GCControllerElement]
The following properties allow for runtime lookup of any input element on a profile, when provided with a valid alias. @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
func (*GCPhysicalInputProfile) HasRemappedElements ¶
func (o *GCPhysicalInputProfile) HasRemappedElements() bool
Whether the user has remapped their physical input controls for this profile at the system level. @discussion On iOS and tvOS, users can remap their game controller inputs in Settings.
func (*GCPhysicalInputProfile) LastEventTimestamp ¶
func (o *GCPhysicalInputProfile) LastEventTimestamp() float64
The last time elements of this profile were updated.
func (*GCPhysicalInputProfile) MappedElementAliasForPhysicalInputName ¶
func (o *GCPhysicalInputProfile) MappedElementAliasForPhysicalInputName(inputName *foundation.NSString) *foundation.NSString
Returns the name of the input element to which the user remaps the given physical element.
func (*GCPhysicalInputProfile) MappedPhysicalInputNamesForElementAlias ¶
func (o *GCPhysicalInputProfile) MappedPhysicalInputNamesForElementAlias(elementAlias *foundation.NSString) *foundation.NSSet[*foundation.NSString]
Returns the physical input elements to which the user remaps the given input element.
func (*GCPhysicalInputProfile) ObjectForKeyedSubscript ¶
func (o *GCPhysicalInputProfile) ObjectForKeyedSubscript(key *foundation.NSString) *GCControllerElement
Returns the element that the key specifies.
func (*GCPhysicalInputProfile) SetStateFromPhysicalInput ¶
func (o *GCPhysicalInputProfile) SetStateFromPhysicalInput(physicalInput *GCPhysicalInputProfile)
Copies the input values from a specified physical input profile to a snapshot of the profile.
func (*GCPhysicalInputProfile) SetValueDidChangeHandler ¶
func (o *GCPhysicalInputProfile) SetValueDidChangeHandler(valueDidChangeHandler func(*GCPhysicalInputProfile, *GCControllerElement))
func (*GCPhysicalInputProfile) Touchpads ¶
func (o *GCPhysicalInputProfile) Touchpads() *foundation.NSDictionary[*foundation.NSString, *GCControllerTouchpad]
func (*GCPhysicalInputProfile) ValueDidChangeHandler ¶
func (o *GCPhysicalInputProfile) ValueDidChangeHandler() objc.Block
Set this block if you want to be notified when a value on a element changed. If multiple elements have changed this block will be called for each element that changed. @param profile this profile that is being used to map the raw input data into logical values on controller elements such as the dpad or the buttons. @param element the element that has been modified.
type GCPhysicalInputSource ¶
type GCPhysicalInputSource interface {
ElementAliases() *foundation.NSSet[*foundation.NSString]
ElementLocalizedName() *foundation.NSString
SfSymbolsName() *foundation.NSString
Direction() GCPhysicalInputSourceDirection
}
GCPhysicalInputSource wraps the ObjC protocol GCPhysicalInputSource.
type GCPhysicalInputSourceDirection ¶
type GCPhysicalInputSourceDirection uint64
The directions that a physical input source involves.
const ( // The physical input source doesn’t support directions. GCPhysicalInputSourceDirectionNotApplicable GCPhysicalInputSourceDirection = 0 // The physical input source contains a value for the up direction. GCPhysicalInputSourceDirectionUp GCPhysicalInputSourceDirection = 1 // The physical input source supports the right direction. GCPhysicalInputSourceDirectionRight GCPhysicalInputSourceDirection = 2 // The physical input source supports the down direction. GCPhysicalInputSourceDirectionDown GCPhysicalInputSourceDirection = 4 // The physical input source supports the left direction. GCPhysicalInputSourceDirectionLeft GCPhysicalInputSourceDirection = 8 )
func (GCPhysicalInputSourceDirection) String ¶
func (e GCPhysicalInputSourceDirection) String() string
type GCPoint2 ¶
A structure that represents a normalized point in a two-dimensional coordinate system.
func GCPoint2Make ¶
func GCPoint2Zero ¶
func GCPoint2Zero() GCPoint2
type GCPressedStateInput ¶
type GCPressedStateInput interface {
PressedDidChangeHandler() objc.Block
SetPressedDidChangeHandler(pressedDidChangeHandler func(objc.ID, objc.ID, bool))
IsPressed() bool
LastPressedStateTimestamp() float64
LastPressedStateLatency() float64
Sources() *foundation.NSSet[GCPhysicalInputSource]
}
GCPressedStateInput wraps the ObjC protocol GCPressedStateInput.
type GCQuaternion ¶
A quaternion that represents a controller’s measurement of attitude.
type GCRacingWheel ¶
type GCRacingWheel struct {
foundation.NSObject
}
An object that represents a physical racing wheel controller connected to a device.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcracingwheel
func GCRacingWheelFromID ¶
func GCRacingWheelFromID(id objc.ID) *GCRacingWheel
func (*GCRacingWheel) AcquireDeviceWithError ¶
func (o *GCRacingWheel) AcquireDeviceWithError() (bool, error)
Starts receiving events from the racing wheel.
func (*GCRacingWheel) Capture ¶
func (o *GCRacingWheel) Capture() *GCRacingWheel
Returns a snapshot of the racing wheel with its current element values.
func (*GCRacingWheel) IsAcquired ¶
func (o *GCRacingWheel) IsAcquired() bool
Checks if the racing wheel has been acquired by the application. This property is observable.
func (*GCRacingWheel) IsSnapshot ¶
func (o *GCRacingWheel) IsSnapshot() bool
A GCRacingWheel may represent a real device managed by the operating system, or a snapshot created by the developer. @see capture
func (*GCRacingWheel) RelinquishDevice ¶
func (o *GCRacingWheel) RelinquishDevice()
Stops receiving events from the racing wheel.
func (*GCRacingWheel) WheelInput ¶
func (o *GCRacingWheel) WheelInput() *GCRacingWheelInput
Get the physical input profile for the racing wheel.
type GCRacingWheelInput ¶
type GCRacingWheelInput struct {
GCRacingWheelInputState
}
A controller profile that supports a racing wheel.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcracingwheelinput
func GCRacingWheelInputFromID ¶
func GCRacingWheelInputFromID(id objc.ID) *GCRacingWheelInput
func (*GCRacingWheelInput) Capture ¶
func (o *GCRacingWheelInput) Capture() *GCRacingWheelInputState
Returns a snapshot of the racing wheel inputs.
func (*GCRacingWheelInput) NextInputState ¶
func (o *GCRacingWheelInput) NextInputState() *GCRacingWheelInputState
Returns the next input state of the racing wheel from the queue.
type GCRacingWheelInputState ¶
type GCRacingWheelInputState struct {
foundation.NSObject
}
The input for the wheel of a racing wheel controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcracingwheelinputstate
func GCRacingWheelInputStateFromID ¶
func GCRacingWheelInputStateFromID(id objc.ID) *GCRacingWheelInputState
func (*GCRacingWheelInputState) AcceleratorPedal ¶
func (o *GCRacingWheelInputState) AcceleratorPedal() GCButtonElement
func (*GCRacingWheelInputState) BrakePedal ¶
func (o *GCRacingWheelInputState) BrakePedal() GCButtonElement
func (*GCRacingWheelInputState) ClutchPedal ¶
func (o *GCRacingWheelInputState) ClutchPedal() GCButtonElement
func (*GCRacingWheelInputState) Shifter ¶
func (o *GCRacingWheelInputState) Shifter() *GCGearShifterElement
The element representing an attached gear shifter accessory. Note that this element only represents an external gear shifter accessory. Many racing wheels have a pair of built in paddle buttons that can be used for sequential gear shifting. Those buttons are can be looked up with the \c GCInputLeftPaddle and \c GCInputRightPaddle input names.
func (*GCRacingWheelInputState) Wheel ¶
func (o *GCRacingWheelInputState) Wheel() *GCSteeringWheelElement
The steering wheel element.
type GCRelativeInput ¶
type GCRelativeInput interface {
DeltaDidChangeHandler() objc.Block
SetDeltaDidChangeHandler(deltaDidChangeHandler func(objc.ID, objc.ID, float32))
Delta() float32
IsAnalog() bool
LastDeltaTimestamp() float64
LastDeltaLatency() float64
Sources() *foundation.NSSet[GCPhysicalInputSource]
}
GCRelativeInput wraps the ObjC protocol GCRelativeInput.
type GCRotationRate ¶
A structure that represents rotation rates around the x, y, and z axes.
type GCSteeringWheelElement ¶
type GCSteeringWheelElement struct {
foundation.NSObject
}
The element that represents the wheel of a racing wheel controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcsteeringwheelelement
func GCSteeringWheelElementFromID ¶
func GCSteeringWheelElementFromID(id objc.ID) *GCSteeringWheelElement
func (*GCSteeringWheelElement) MaximumDegreesOfRotation ¶
func (o *GCSteeringWheelElement) MaximumDegreesOfRotation() float32
type GCSwitchElement ¶
type GCSwitchElement interface {
GCPhysicalInputElement
PositionInput() GCSwitchPositionInput
}
GCSwitchElement wraps the ObjC protocol GCSwitchElement.
type GCSwitchElementName ¶
type GCSwitchElementName interface {
GCPhysicalInputElementName
}
GCSwitchElementName wraps the ObjC protocol GCSwitchElementName.
type GCSwitchInput ¶
type GCSwitchInput interface {
}
GCSwitchInput wraps the ObjC protocol GCSwitchInput.
type GCSwitchPositionInput ¶
type GCSwitchPositionInput interface {
PositionDidChangeHandler() objc.Block
SetPositionDidChangeHandler(positionDidChangeHandler func(objc.ID, objc.ID, int))
Position() int
PositionRange() foundation.NSRange
IsSequential() bool
CanWrap() bool
LastPositionTimestamp() float64
LastPositionLatency() float64
Sources() *foundation.NSSet[GCPhysicalInputSource]
}
GCSwitchPositionInput wraps the ObjC protocol GCSwitchPositionInput.
type GCSystemGestureState ¶
type GCSystemGestureState int64
A state for handling input when an element is part of a system gesture.
const ( // System gesture recognizers will run before input is sent to app, this is the default state GCSystemGestureStateEnabled GCSystemGestureState = 0 // Input is sent to app and processed by system gesture recognizers simultaneously GCSystemGestureStateAlwaysReceive GCSystemGestureState = 1 // System gesture recognizers will not run at all. Input is passed directly to app GCSystemGestureStateDisabled GCSystemGestureState = 2 )
func (GCSystemGestureState) String ¶
func (e GCSystemGestureState) String() string
type GCTouchState ¶
type GCTouchState int64
The possible states of the user’s touch.
const ( GCTouchStateUp GCTouchState = 0 GCTouchStateDown GCTouchState = 1 GCTouchStateMoving GCTouchState = 2 )
func (GCTouchState) String ¶
func (e GCTouchState) String() string
type GCTouchedStateInput ¶
type GCTouchedStateInput interface {
TouchedDidChangeHandler() objc.Block
SetTouchedDidChangeHandler(touchedDidChangeHandler func(objc.ID, objc.ID, bool))
IsTouched() bool
LastTouchedStateTimestamp() float64
LastTouchedStateLatency() float64
Sources() *foundation.NSSet[GCPhysicalInputSource]
}
GCTouchedStateInput wraps the ObjC protocol GCTouchedStateInput.
type GCXboxGamepad ¶
type GCXboxGamepad struct {
GCExtendedGamepad
}
A controller profile that supports the Xbox controller.
Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcxboxgamepad
func GCXboxGamepadFromID ¶
func GCXboxGamepadFromID(id objc.ID) *GCXboxGamepad
func (*GCXboxGamepad) ButtonShare ¶
func (o *GCXboxGamepad) ButtonShare() *GCControllerButtonInput
Some Xbox controller variants feature a Share button. @example The Bluetooth-enabled Xbox Wireless Controller introduced with the Xbox Series X and Xbox Series S in 2020 has a Share button. @note The Share button is reserved by the system for screenshot and video recording gestures. If you wish to disable these gestures in your app and take control of the Share button, set buttonShare.preferredSystemGestureState to GCSystemGestureStateDisabled.
func (*GCXboxGamepad) PaddleButton1 ¶
func (o *GCXboxGamepad) PaddleButton1() *GCControllerButtonInput
Some Xbox controller variants can support up to four additional buttons. @example The standard Bluetooth-enabled Xbox Wireless Controller does not have paddle buttons @example The Xbox Elite Wireless Controller has four extra digital buttons. @note The four extra digital buttons on the Xbox Elite Wireless Controller are only directly addressable when the controller is on its default mapping profile. Otherwise, the paddle buttons are directly bound to other inputs on the controller.
func (*GCXboxGamepad) PaddleButton2 ¶
func (o *GCXboxGamepad) PaddleButton2() *GCControllerButtonInput
func (*GCXboxGamepad) PaddleButton3 ¶
func (o *GCXboxGamepad) PaddleButton3() *GCControllerButtonInput
func (*GCXboxGamepad) PaddleButton4 ¶
func (o *GCXboxGamepad) PaddleButton4() *GCControllerButtonInput
type HIDReportCommandType ¶
type HIDReportCommandType int32
@typedef HIDReportCommandType @abstract Type of the report command for DriverKit driver
const ( KIOHIDReportCommandSetReport HIDReportCommandType = 0 KIOHIDReportCommandGetReport HIDReportCommandType = 1 )
func (HIDReportCommandType) String ¶
func (e HIDReportCommandType) String() string
type IOHIDButtonModes ¶
type IOHIDButtonModes int32
const ( KIOHIDButtonMode_BothLeftClicks IOHIDButtonModes = 0 KIOHIDButtonMode_ReverseLeftRightClicks IOHIDButtonModes = 1 KIOHIDButtonMode_EnableRightClick IOHIDButtonModes = 2 )
func (IOHIDButtonModes) String ¶
func (e IOHIDButtonModes) String() string
type IOHIDElementCommitDirection ¶
type IOHIDElementCommitDirection int32
@typedef IOHIDElementCommitDirection @abstract Commit direction passed in to the commit() function of an IOHIDElement. @field kIOHIDElementCommitDirectionIn Passing in kIOHIDElementCommitDirectionIn will issue a getReport call to the device, and the element will be updated with the value retrieved by the device. The value can be accessed via the getValue() or getDataValue() functions. @field kIOHIDElementCommitDirectionOut Passing in kIOHIDElementCommitDirectionOut will issue a setReport call to the device. Before issuing this call, the desired value should be set on the element with the setValue() or setDataValue() functions.
const ( KIOHIDElementCommitDirectionIn IOHIDElementCommitDirection = 0 KIOHIDElementCommitDirectionOut IOHIDElementCommitDirection = 1 )
func (IOHIDElementCommitDirection) String ¶
func (e IOHIDElementCommitDirection) String() string
type Ipc_info_object_type_t ¶
type Ipc_info_object_type_t uint32
const ( IPC_OTYPE_NONE Ipc_info_object_type_t = 0 IPC_OTYPE_THREAD_CONTROL Ipc_info_object_type_t = 1 IPC_OTYPE_TASK_CONTROL Ipc_info_object_type_t = 2 IPC_OTYPE_HOST Ipc_info_object_type_t = 3 IPC_OTYPE_HOST_PRIV Ipc_info_object_type_t = 4 IPC_OTYPE_PROCESSOR Ipc_info_object_type_t = 5 IPC_OTYPE_PROCESSOR_SET Ipc_info_object_type_t = 6 IPC_OTYPE_PROCESSOR_SET_NAME Ipc_info_object_type_t = 7 IPC_OTYPE_TIMER Ipc_info_object_type_t = 8 IPC_OTYPE_PORT_SUBST_ONCE Ipc_info_object_type_t = 9 IPC_OTYPE_MIG Ipc_info_object_type_t = 10 IPC_OTYPE_MEMORY_OBJECT Ipc_info_object_type_t = 11 IPC_OTYPE_XMM_PAGER Ipc_info_object_type_t = 12 IPC_OTYPE_XMM_KERNEL Ipc_info_object_type_t = 13 IPC_OTYPE_XMM_REPLY Ipc_info_object_type_t = 14 IPC_OTYPE_UND_REPLY Ipc_info_object_type_t = 15 IPC_OTYPE_HOST_NOTIFY Ipc_info_object_type_t = 16 IPC_OTYPE_HOST_SECURITY Ipc_info_object_type_t = 17 IPC_OTYPE_LEDGER Ipc_info_object_type_t = 18 IPC_OTYPE_MAIN_DEVICE Ipc_info_object_type_t = 19 IPC_OTYPE_TASK_NAME Ipc_info_object_type_t = 20 IPC_OTYPE_SUBSYSTEM Ipc_info_object_type_t = 21 IPC_OTYPE_IO_DONE_QUEUE Ipc_info_object_type_t = 22 IPC_OTYPE_SEMAPHORE Ipc_info_object_type_t = 23 IPC_OTYPE_LOCK_SET Ipc_info_object_type_t = 24 IPC_OTYPE_CLOCK Ipc_info_object_type_t = 25 IPC_OTYPE_CLOCK_CTRL Ipc_info_object_type_t = 26 IPC_OTYPE_IOKIT_IDENT Ipc_info_object_type_t = 27 IPC_OTYPE_NAMED_ENTRY Ipc_info_object_type_t = 28 IPC_OTYPE_IOKIT_CONNECT Ipc_info_object_type_t = 29 IPC_OTYPE_IOKIT_OBJECT Ipc_info_object_type_t = 30 IPC_OTYPE_UPL Ipc_info_object_type_t = 31 IPC_OTYPE_MEM_OBJ_CONTROL Ipc_info_object_type_t = 32 IPC_OTYPE_AU_SESSIONPORT Ipc_info_object_type_t = 33 IPC_OTYPE_FILEPORT Ipc_info_object_type_t = 34 IPC_OTYPE_LABELH Ipc_info_object_type_t = 35 IPC_OTYPE_TASK_RESUME Ipc_info_object_type_t = 36 IPC_OTYPE_VOUCHER Ipc_info_object_type_t = 37 IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38 IPC_OTYPE_WORK_INTERVAL Ipc_info_object_type_t = 39 IPC_OTYPE_UX_HANDLER Ipc_info_object_type_t = 40 IPC_OTYPE_UEXT_OBJECT Ipc_info_object_type_t = 41 IPC_OTYPE_ARCADE_REG Ipc_info_object_type_t = 42 IPC_OTYPE_EVENTLINK Ipc_info_object_type_t = 43 IPC_OTYPE_TASK_INSPECT Ipc_info_object_type_t = 44 IPC_OTYPE_TASK_READ Ipc_info_object_type_t = 45 IPC_OTYPE_THREAD_INSPECT Ipc_info_object_type_t = 46 IPC_OTYPE_THREAD_READ Ipc_info_object_type_t = 47 IPC_OTYPE_SUID_CRED Ipc_info_object_type_t = 48 IPC_OTYPE_HYPERVISOR Ipc_info_object_type_t = 49 IPC_OTYPE_TASK_ID_TOKEN Ipc_info_object_type_t = 50 IPC_OTYPE_TASK_FATAL Ipc_info_object_type_t = 51 IPC_OTYPE_KCDATA Ipc_info_object_type_t = 52 IPC_OTYPE_EXCLAVES_RESOURCE Ipc_info_object_type_t = 53 IPC_OTYPE_THREAD_RESUME Ipc_info_object_type_t = 54 IPC_OTYPE_UNKNOWN Ipc_info_object_type_t = 4294967295 )
func (Ipc_info_object_type_t) String ¶
func (e Ipc_info_object_type_t) String() string
type Launch_data_type_t ¶
type Launch_data_type_t int32
const ( LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1 LAUNCH_DATA_ARRAY Launch_data_type_t = 2 LAUNCH_DATA_FD Launch_data_type_t = 3 LAUNCH_DATA_INTEGER Launch_data_type_t = 4 LAUNCH_DATA_REAL Launch_data_type_t = 5 LAUNCH_DATA_BOOL Launch_data_type_t = 6 LAUNCH_DATA_STRING Launch_data_type_t = 7 LAUNCH_DATA_OPAQUE Launch_data_type_t = 8 LAUNCH_DATA_ERRNO Launch_data_type_t = 9 LAUNCH_DATA_MACHPORT Launch_data_type_t = 10 )
func (Launch_data_type_t) String ¶
func (e Launch_data_type_t) String() string
type MDLabelDomain ¶
type MDLabelDomain int32
@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().
const ( KMDLabelUserDomain MDLabelDomain = 0 KMDLabelLocalDomain MDLabelDomain = 1 )
func (MDLabelDomain) String ¶
func (e MDLabelDomain) String() string
type MDQueryOptionFlags ¶
type MDQueryOptionFlags int32
const ( KMDQuerySynchronous MDQueryOptionFlags = 1 KMDQueryWantsUpdates MDQueryOptionFlags = 4 KMDQueryAllowFSTranslation MDQueryOptionFlags = 8 )
func (MDQueryOptionFlags) String ¶
func (e MDQueryOptionFlags) String() string
type MDQuerySortOptionFlags ¶
type MDQuerySortOptionFlags int32
@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.
const (
KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)
func (MDQuerySortOptionFlags) String ¶
func (e MDQuerySortOptionFlags) String() string
type Mach_vm_range_flags_t ¶
type Mach_vm_range_flags_t uint64
const (
MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)
func (Mach_vm_range_flags_t) String ¶
func (e Mach_vm_range_flags_t) String() string
type Mach_vm_range_flavor_t ¶
type Mach_vm_range_flavor_t uint32
const ( MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0 MACH_VM_RANGE_FLAVOR_V1 Mach_vm_range_flavor_t = 1 )
func (Mach_vm_range_flavor_t) String ¶
func (e Mach_vm_range_flavor_t) String() string
type Mach_vm_range_tag_t ¶
type Mach_vm_range_tag_t uint16
const ( MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0 MACH_VM_RANGE_DATA Mach_vm_range_tag_t = 1 MACH_VM_RANGE_FIXED Mach_vm_range_tag_t = 2 )
func (Mach_vm_range_tag_t) String ¶
func (e Mach_vm_range_tag_t) String() string
type Mpo_flags_t ¶
type Mpo_flags_t uint32
const ( MPO_PORT Mpo_flags_t = 0 MPO_SERVICE_PORT Mpo_flags_t = 1024 MPO_CONNECTION_PORT Mpo_flags_t = 2048 MPO_REPLY_PORT Mpo_flags_t = 4096 MPO_WEAK_REPLY_PORT Mpo_flags_t = 16384 MPO_NOTIFICATION_PORT Mpo_flags_t = 17408 MPO_EXCEPTION_PORT Mpo_flags_t = 32768 MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536 )
func (Mpo_flags_t) String ¶
func (e Mpo_flags_t) String() string
type NXMouseButton ¶
type NXMouseButton int32
const ( NX_OneButton NXMouseButton = 0 NX_LeftButton NXMouseButton = 1 NX_RightButton NXMouseButton = 2 )
func (NXMouseButton) String ¶
func (e NXMouseButton) String() string
type Os_clockid_t ¶
type Os_clockid_t uint32
const (
OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)
func (Os_clockid_t) String ¶
func (e Os_clockid_t) String() string
type PMPageToPaperMappingType ¶
type PMPageToPaperMappingType int32
const ( KPMPageToPaperMappingNone PMPageToPaperMappingType = 1 KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2 )
func (PMPageToPaperMappingType) String ¶
func (e PMPageToPaperMappingType) String() string
type Ptrauth_key ¶
type Ptrauth_key int32
const ( Ptrauth_key_none Ptrauth_key = -1 Ptrauth_key_asia Ptrauth_key = 0 Ptrauth_key_asib Ptrauth_key = 1 Ptrauth_key_asda Ptrauth_key = 2 Ptrauth_key_asdb Ptrauth_key = 3 Ptrauth_key_process_independent_code Ptrauth_key = 0 Ptrauth_key_process_dependent_code Ptrauth_key = 1 Ptrauth_key_process_independent_data Ptrauth_key = 2 Ptrauth_key_process_dependent_data Ptrauth_key = 3 Ptrauth_key_return_address Ptrauth_key = 1 Ptrauth_key_frame_pointer Ptrauth_key = 3 Ptrauth_key_function_pointer Ptrauth_key = 0 Ptrauth_key_block_function Ptrauth_key = 0 Ptrauth_key_cxx_vtable_pointer Ptrauth_key = 2 Ptrauth_key_method_list_pointer Ptrauth_key = 2 Ptrauth_key_objc_isa_pointer Ptrauth_key = 2 Ptrauth_key_objc_super_pointer Ptrauth_key = 2 Ptrauth_key_objc_sel_pointer Ptrauth_key = 3 Ptrauth_key_objc_class_ro_pointer Ptrauth_key = 2 Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2 Ptrauth_key_init_fini_pointer Ptrauth_key = 0 )
func (Ptrauth_key) String ¶
func (e Ptrauth_key) String() string
type Qos_class_t ¶
type Qos_class_t uint32
const ( QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33 QOS_CLASS_USER_INITIATED Qos_class_t = 25 QOS_CLASS_DEFAULT Qos_class_t = 21 QOS_CLASS_UTILITY Qos_class_t = 17 QOS_CLASS_BACKGROUND Qos_class_t = 9 QOS_CLASS_UNSPECIFIED Qos_class_t = 0 )
func (Qos_class_t) String ¶
func (e Qos_class_t) String() string
type Virtual_memory_guard_exception_code_t ¶
type Virtual_memory_guard_exception_code_t uint32
const ( KGUARD_EXC_DEALLOC_GAP Virtual_memory_guard_exception_code_t = 1 KGUARD_EXC_RECLAIM_COPYIO_FAILURE Virtual_memory_guard_exception_code_t = 2 KGUARD_EXC_RECLAIM_INDEX_FAILURE Virtual_memory_guard_exception_code_t = 4 KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE Virtual_memory_guard_exception_code_t = 8 KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE Virtual_memory_guard_exception_code_t = 9 KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE Virtual_memory_guard_exception_code_t = 10 KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE Virtual_memory_guard_exception_code_t = 11 KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION Virtual_memory_guard_exception_code_t = 12 KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY Virtual_memory_guard_exception_code_t = 13 KGUARD_EXC_SEC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 98 KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT Virtual_memory_guard_exception_code_t = 99 KGUARD_EXC_SEC_COPY_DENIED Virtual_memory_guard_exception_code_t = 100 KGUARD_EXC_SEC_SHARING_DENIED Virtual_memory_guard_exception_code_t = 101 KGUARD_EXC_MTE_SYNC_FAULT Virtual_memory_guard_exception_code_t = 200 KGUARD_EXC_MTE_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 201 KGUARD_EXC_MTE_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 202 KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203 KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204 )
func (Virtual_memory_guard_exception_code_t) String ¶
func (e Virtual_memory_guard_exception_code_t) String() string
type Xpc_listener_create_flags_t ¶
type Xpc_listener_create_flags_t uint64
const ( XPC_LISTENER_CREATE_NONE Xpc_listener_create_flags_t = 0 XPC_LISTENER_CREATE_INACTIVE Xpc_listener_create_flags_t = 1 XPC_LISTENER_CREATE_FORCE_MACH Xpc_listener_create_flags_t = 2 XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4 )
func (Xpc_listener_create_flags_t) String ¶
func (e Xpc_listener_create_flags_t) String() string
type Xpc_session_create_flags_t ¶
type Xpc_session_create_flags_t uint64
const ( XPC_SESSION_CREATE_NONE Xpc_session_create_flags_t = 0 XPC_SESSION_CREATE_INACTIVE Xpc_session_create_flags_t = 1 XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2 )
func (Xpc_session_create_flags_t) String ¶
func (e Xpc_session_create_flags_t) String() string
Source Files
¶
- GCColor.go
- GCController.go
- GCControllerAxisInput.go
- GCControllerButtonInput.go
- GCControllerDirectionPad.go
- GCControllerElement.go
- GCControllerInputState.go
- GCControllerLiveInput.go
- GCControllerTouchpad.go
- GCDeviceBattery.go
- GCDeviceCursor.go
- GCDeviceHaptics.go
- GCDeviceLight.go
- GCDirectionalGamepad.go
- GCDualSenseAdaptiveTrigger.go
- GCDualSenseGamepad.go
- GCDualShockGamepad.go
- GCEventViewController.go
- GCExtendedGamepad.go
- GCExtendedGamepadSnapshot.go
- GCGamepad.go
- GCGamepadSnapshot.go
- GCGearShifterElement.go
- GCKeyboard.go
- GCKeyboardInput.go
- GCMicroGamepad.go
- GCMicroGamepadSnapshot.go
- GCMotion.go
- GCMouse.go
- GCMouseInput.go
- GCPhysicalInputElementCollection.go
- GCPhysicalInputProfile.go
- GCRacingWheel.go
- GCRacingWheelInput.go
- GCRacingWheelInputState.go
- GCSteeringWheelElement.go
- GCXboxGamepad.go
- doc.go
- gamecontroller_enums.go
- gamecontroller_externs.go
- gamecontroller_functions.go
- gamecontroller_protocols.go
- gamecontroller_runtime.go
- gamecontroller_structs.go