gamecontroller

package
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package gamecontroller provides a fluent Go API over the macOS GameController framework.

Construction

New… functions create objects; each With… method sets one property and returns its receiver, so configuration calls chain. A <Type>FromID constructor adopts an Objective-C object obtained elsewhere.

Lifecycle

A wrapper releases its Objective-C object automatically once the garbage collector finds it unreachable. Call Release to relinquish the reference deterministically (for objects holding scarce resources); Release is idempotent, and afterwards the wrapper's methods are no-ops returning zero values.

Main-thread requirements

Methods, setters, and constructors of classes Apple isolates to the main thread run there automatically; callers never need to arrange main-thread dispatch for the generated API.

Types

Each base type below lists the concrete types you construct and pass where the base is accepted:

Index

Constants

View Source
const (
	DualSenseAdaptiveTriggerDiscretePositionCount = 10
)

Variables

This section is empty.

Functions

func GCControllerDidBecomeCurrentNotification

func GCControllerDidBecomeCurrentNotification() obj.Object

GCControllerDidBecomeCurrentNotification returns the string constant GCControllerDidBecomeCurrentNotification, for use as a dictionary key or argument.

func GCControllerDidConnectNotification

func GCControllerDidConnectNotification() obj.Object

GCControllerDidConnectNotification returns the string constant GCControllerDidConnectNotification, for use as a dictionary key or argument.

func GCControllerDidDisconnectNotification

func GCControllerDidDisconnectNotification() obj.Object

GCControllerDidDisconnectNotification returns the string constant GCControllerDidDisconnectNotification, for use as a dictionary key or argument.

func GCControllerDidStopBeingCurrentNotification

func GCControllerDidStopBeingCurrentNotification() obj.Object

GCControllerDidStopBeingCurrentNotification returns the string constant GCControllerDidStopBeingCurrentNotification, for use as a dictionary key or argument.

func GCControllerUserCustomizationsDidChangeNotification

func GCControllerUserCustomizationsDidChangeNotification() obj.Object

GCControllerUserCustomizationsDidChangeNotification returns the string constant GCControllerUserCustomizationsDidChangeNotification, for use as a dictionary key or argument.

func GCCurrentExtendedGamepadSnapshotDataVersion

func GCCurrentExtendedGamepadSnapshotDataVersion() uintptr

GCCurrentExtendedGamepadSnapshotDataVersion returns the address of the symbol GCCurrentExtendedGamepadSnapshotDataVersion.

func GCCurrentMicroGamepadSnapshotDataVersion

func GCCurrentMicroGamepadSnapshotDataVersion() uintptr

GCCurrentMicroGamepadSnapshotDataVersion returns the address of the symbol GCCurrentMicroGamepadSnapshotDataVersion.

func GCHapticDurationInfinite

func GCHapticDurationInfinite() uintptr

GCHapticDurationInfinite returns the address of the symbol GCHapticDurationInfinite.

func GCHapticsLocalityAll

func GCHapticsLocalityAll() obj.Object

GCHapticsLocalityAll returns the string constant GCHapticsLocalityAll, for use as a dictionary key or argument.

func GCHapticsLocalityDefault

func GCHapticsLocalityDefault() obj.Object

GCHapticsLocalityDefault returns the string constant GCHapticsLocalityDefault, for use as a dictionary key or argument.

func GCHapticsLocalityHandles

func GCHapticsLocalityHandles() obj.Object

GCHapticsLocalityHandles returns the string constant GCHapticsLocalityHandles, for use as a dictionary key or argument.

func GCHapticsLocalityLeftHandle

func GCHapticsLocalityLeftHandle() obj.Object

GCHapticsLocalityLeftHandle returns the string constant GCHapticsLocalityLeftHandle, for use as a dictionary key or argument.

func GCHapticsLocalityLeftTrigger

func GCHapticsLocalityLeftTrigger() obj.Object

GCHapticsLocalityLeftTrigger returns the string constant GCHapticsLocalityLeftTrigger, for use as a dictionary key or argument.

func GCHapticsLocalityRightHandle

func GCHapticsLocalityRightHandle() obj.Object

GCHapticsLocalityRightHandle returns the string constant GCHapticsLocalityRightHandle, for use as a dictionary key or argument.

func GCHapticsLocalityRightTrigger

func GCHapticsLocalityRightTrigger() obj.Object

GCHapticsLocalityRightTrigger returns the string constant GCHapticsLocalityRightTrigger, for use as a dictionary key or argument.

func GCHapticsLocalityTriggers

func GCHapticsLocalityTriggers() obj.Object

GCHapticsLocalityTriggers returns the string constant GCHapticsLocalityTriggers, for use as a dictionary key or argument.

func GCInputArcadeButtonName

func GCInputArcadeButtonName(row int, column int) *foundation.String

GCInputArcadeButtonName calls the GameController framework function GCInputArcadeButtonName.

func GCInputBackLeftButton

func GCInputBackLeftButton(position int) *foundation.String

GCInputBackLeftButton calls the GameController framework function GCInputBackLeftButton.

func GCInputBackRightButton

func GCInputBackRightButton(position int) *foundation.String

GCInputBackRightButton calls the GameController framework function GCInputBackRightButton.

func GCInputButtonA

func GCInputButtonA() obj.Object

GCInputButtonA returns the string constant GCInputButtonA, for use as a dictionary key or argument.

func GCInputButtonB

func GCInputButtonB() obj.Object

GCInputButtonB returns the string constant GCInputButtonB, for use as a dictionary key or argument.

func GCInputButtonHome

func GCInputButtonHome() obj.Object

GCInputButtonHome returns the string constant GCInputButtonHome, for use as a dictionary key or argument.

func GCInputButtonMenu

func GCInputButtonMenu() obj.Object

GCInputButtonMenu returns the string constant GCInputButtonMenu, for use as a dictionary key or argument.

func GCInputButtonOptions

func GCInputButtonOptions() obj.Object

GCInputButtonOptions returns the string constant GCInputButtonOptions, for use as a dictionary key or argument.

func GCInputButtonShare

func GCInputButtonShare() obj.Object

GCInputButtonShare returns the string constant GCInputButtonShare, for use as a dictionary key or argument.

func GCInputButtonX

func GCInputButtonX() obj.Object

GCInputButtonX returns the string constant GCInputButtonX, for use as a dictionary key or argument.

func GCInputButtonY

func GCInputButtonY() obj.Object

GCInputButtonY returns the string constant GCInputButtonY, for use as a dictionary key or argument.

func GCInputDirectionPad

func GCInputDirectionPad() obj.Object

GCInputDirectionPad returns the string constant GCInputDirectionPad, for use as a dictionary key or argument.

func GCInputDirectionalCardinalDpad

func GCInputDirectionalCardinalDpad() obj.Object

GCInputDirectionalCardinalDpad returns the string constant GCInputDirectionalCardinalDpad, for use as a dictionary key or argument.

func GCInputDirectionalCenterButton

func GCInputDirectionalCenterButton() obj.Object

GCInputDirectionalCenterButton returns the string constant GCInputDirectionalCenterButton, for use as a dictionary key or argument.

func GCInputDirectionalDpad

func GCInputDirectionalDpad() obj.Object

GCInputDirectionalDpad returns the string constant GCInputDirectionalDpad, for use as a dictionary key or argument.

func GCInputDirectionalTouchSurfaceButton

func GCInputDirectionalTouchSurfaceButton() obj.Object

GCInputDirectionalTouchSurfaceButton returns the string constant GCInputDirectionalTouchSurfaceButton, for use as a dictionary key or argument.

func GCInputDualShockTouchpadButton

func GCInputDualShockTouchpadButton() obj.Object

GCInputDualShockTouchpadButton returns the string constant GCInputDualShockTouchpadButton, for use as a dictionary key or argument.

func GCInputDualShockTouchpadOne

func GCInputDualShockTouchpadOne() obj.Object

GCInputDualShockTouchpadOne returns the string constant GCInputDualShockTouchpadOne, for use as a dictionary key or argument.

func GCInputDualShockTouchpadTwo

func GCInputDualShockTouchpadTwo() obj.Object

GCInputDualShockTouchpadTwo returns the string constant GCInputDualShockTouchpadTwo, for use as a dictionary key or argument.

func GCInputGripButton

func GCInputGripButton() obj.Object

GCInputGripButton returns the string constant GCInputGripButton, for use as a dictionary key or argument.

func GCInputLeftBumper

func GCInputLeftBumper() obj.Object

GCInputLeftBumper returns the string constant GCInputLeftBumper, for use as a dictionary key or argument.

func GCInputLeftPaddle

func GCInputLeftPaddle() obj.Object

GCInputLeftPaddle returns the string constant GCInputLeftPaddle, for use as a dictionary key or argument.

func GCInputLeftShoulder

func GCInputLeftShoulder() obj.Object

GCInputLeftShoulder returns the string constant GCInputLeftShoulder, for use as a dictionary key or argument.

func GCInputLeftSideButton

func GCInputLeftSideButton() obj.Object

GCInputLeftSideButton returns the string constant GCInputLeftSideButton, for use as a dictionary key or argument.

func GCInputLeftThumbstick

func GCInputLeftThumbstick() obj.Object

GCInputLeftThumbstick returns the string constant GCInputLeftThumbstick, for use as a dictionary key or argument.

func GCInputLeftThumbstickButton

func GCInputLeftThumbstickButton() obj.Object

GCInputLeftThumbstickButton returns the string constant GCInputLeftThumbstickButton, for use as a dictionary key or argument.

func GCInputLeftTrigger

func GCInputLeftTrigger() obj.Object

GCInputLeftTrigger returns the string constant GCInputLeftTrigger, for use as a dictionary key or argument.

func GCInputMicroGamepadButtonA

func GCInputMicroGamepadButtonA() obj.Object

GCInputMicroGamepadButtonA returns the string constant GCInputMicroGamepadButtonA, for use as a dictionary key or argument.

func GCInputMicroGamepadButtonMenu

func GCInputMicroGamepadButtonMenu() obj.Object

GCInputMicroGamepadButtonMenu returns the string constant GCInputMicroGamepadButtonMenu, for use as a dictionary key or argument.

func GCInputMicroGamepadButtonX

func GCInputMicroGamepadButtonX() obj.Object

GCInputMicroGamepadButtonX returns the string constant GCInputMicroGamepadButtonX, for use as a dictionary key or argument.

func GCInputMicroGamepadDpad

func GCInputMicroGamepadDpad() obj.Object

GCInputMicroGamepadDpad returns the string constant GCInputMicroGamepadDpad, for use as a dictionary key or argument.

func GCInputPedalAccelerator

func GCInputPedalAccelerator() obj.Object

GCInputPedalAccelerator returns the string constant GCInputPedalAccelerator, for use as a dictionary key or argument.

func GCInputPedalBrake

func GCInputPedalBrake() obj.Object

GCInputPedalBrake returns the string constant GCInputPedalBrake, for use as a dictionary key or argument.

func GCInputPedalClutch

func GCInputPedalClutch() obj.Object

GCInputPedalClutch returns the string constant GCInputPedalClutch, for use as a dictionary key or argument.

func GCInputRightBumper

func GCInputRightBumper() obj.Object

GCInputRightBumper returns the string constant GCInputRightBumper, for use as a dictionary key or argument.

func GCInputRightPaddle

func GCInputRightPaddle() obj.Object

GCInputRightPaddle returns the string constant GCInputRightPaddle, for use as a dictionary key or argument.

func GCInputRightShoulder

func GCInputRightShoulder() obj.Object

GCInputRightShoulder returns the string constant GCInputRightShoulder, for use as a dictionary key or argument.

func GCInputRightSideButton

func GCInputRightSideButton() obj.Object

GCInputRightSideButton returns the string constant GCInputRightSideButton, for use as a dictionary key or argument.

func GCInputRightThumbstick

func GCInputRightThumbstick() obj.Object

GCInputRightThumbstick returns the string constant GCInputRightThumbstick, for use as a dictionary key or argument.

func GCInputRightThumbstickButton

func GCInputRightThumbstickButton() obj.Object

GCInputRightThumbstickButton returns the string constant GCInputRightThumbstickButton, for use as a dictionary key or argument.

func GCInputRightTrigger

func GCInputRightTrigger() obj.Object

GCInputRightTrigger returns the string constant GCInputRightTrigger, for use as a dictionary key or argument.

func GCInputShifter

func GCInputShifter() obj.Object

GCInputShifter returns the string constant GCInputShifter, for use as a dictionary key or argument.

func GCInputSteeringWheel

func GCInputSteeringWheel() obj.Object

GCInputSteeringWheel returns the string constant GCInputSteeringWheel, for use as a dictionary key or argument.

func GCInputThumbstick

func GCInputThumbstick() obj.Object

GCInputThumbstick returns the string constant GCInputThumbstick, for use as a dictionary key or argument.

func GCInputThumbstickButton

func GCInputThumbstickButton() obj.Object

GCInputThumbstickButton returns the string constant GCInputThumbstickButton, for use as a dictionary key or argument.

func GCInputTrigger

func GCInputTrigger() obj.Object

GCInputTrigger returns the string constant GCInputTrigger, for use as a dictionary key or argument.

func GCInputXboxPaddleFour

func GCInputXboxPaddleFour() obj.Object

GCInputXboxPaddleFour returns the string constant GCInputXboxPaddleFour, for use as a dictionary key or argument.

func GCInputXboxPaddleOne

func GCInputXboxPaddleOne() obj.Object

GCInputXboxPaddleOne returns the string constant GCInputXboxPaddleOne, for use as a dictionary key or argument.

func GCInputXboxPaddleThree

func GCInputXboxPaddleThree() obj.Object

GCInputXboxPaddleThree returns the string constant GCInputXboxPaddleThree, for use as a dictionary key or argument.

func GCInputXboxPaddleTwo

func GCInputXboxPaddleTwo() obj.Object

GCInputXboxPaddleTwo returns the string constant GCInputXboxPaddleTwo, for use as a dictionary key or argument.

func GCKeyA

func GCKeyA() obj.Object

GCKeyA returns the string constant GCKeyA, for use as a dictionary key or argument.

func GCKeyApplication

func GCKeyApplication() obj.Object

GCKeyApplication returns the string constant GCKeyApplication, for use as a dictionary key or argument.

func GCKeyB

func GCKeyB() obj.Object

GCKeyB returns the string constant GCKeyB, for use as a dictionary key or argument.

func GCKeyBackslash

func GCKeyBackslash() obj.Object

GCKeyBackslash returns the string constant GCKeyBackslash, for use as a dictionary key or argument.

func GCKeyC

func GCKeyC() obj.Object

GCKeyC returns the string constant GCKeyC, for use as a dictionary key or argument.

func GCKeyCapsLock

func GCKeyCapsLock() obj.Object

GCKeyCapsLock returns the string constant GCKeyCapsLock, for use as a dictionary key or argument.

func GCKeyCloseBracket

func GCKeyCloseBracket() obj.Object

GCKeyCloseBracket returns the string constant GCKeyCloseBracket, for use as a dictionary key or argument.

func GCKeyCodeApplication

func GCKeyCodeApplication() int

GCKeyCodeApplication returns the value of the constant GCKeyCodeApplication.

func GCKeyCodeBackslash

func GCKeyCodeBackslash() int

GCKeyCodeBackslash returns the value of the constant GCKeyCodeBackslash.

func GCKeyCodeCapsLock

func GCKeyCodeCapsLock() int

GCKeyCodeCapsLock returns the value of the constant GCKeyCodeCapsLock.

func GCKeyCodeCloseBracket

func GCKeyCodeCloseBracket() int

GCKeyCodeCloseBracket returns the value of the constant GCKeyCodeCloseBracket.

func GCKeyCodeComma

func GCKeyCodeComma() int

GCKeyCodeComma returns the value of the constant GCKeyCodeComma.

func GCKeyCodeDeleteForward

func GCKeyCodeDeleteForward() int

GCKeyCodeDeleteForward returns the value of the constant GCKeyCodeDeleteForward.

func GCKeyCodeDeleteOrBackspace

func GCKeyCodeDeleteOrBackspace() int

GCKeyCodeDeleteOrBackspace returns the value of the constant GCKeyCodeDeleteOrBackspace.

func GCKeyCodeDownArrow

func GCKeyCodeDownArrow() int

GCKeyCodeDownArrow returns the value of the constant GCKeyCodeDownArrow.

func GCKeyCodeEight

func GCKeyCodeEight() int

GCKeyCodeEight returns the value of the constant GCKeyCodeEight.

func GCKeyCodeEnd

func GCKeyCodeEnd() int

GCKeyCodeEnd returns the value of the constant GCKeyCodeEnd.

func GCKeyCodeEqualSign

func GCKeyCodeEqualSign() int

GCKeyCodeEqualSign returns the value of the constant GCKeyCodeEqualSign.

func GCKeyCodeEscape

func GCKeyCodeEscape() int

GCKeyCodeEscape returns the value of the constant GCKeyCodeEscape.

func GCKeyCodeF1

func GCKeyCodeF1() int

GCKeyCodeF1 returns the value of the constant GCKeyCodeF1.

func GCKeyCodeF2

func GCKeyCodeF2() int

GCKeyCodeF2 returns the value of the constant GCKeyCodeF2.

func GCKeyCodeF3

func GCKeyCodeF3() int

GCKeyCodeF3 returns the value of the constant GCKeyCodeF3.

func GCKeyCodeF4

func GCKeyCodeF4() int

GCKeyCodeF4 returns the value of the constant GCKeyCodeF4.

func GCKeyCodeF5

func GCKeyCodeF5() int

GCKeyCodeF5 returns the value of the constant GCKeyCodeF5.

func GCKeyCodeF6

func GCKeyCodeF6() int

GCKeyCodeF6 returns the value of the constant GCKeyCodeF6.

func GCKeyCodeF7

func GCKeyCodeF7() int

GCKeyCodeF7 returns the value of the constant GCKeyCodeF7.

func GCKeyCodeF8

func GCKeyCodeF8() int

GCKeyCodeF8 returns the value of the constant GCKeyCodeF8.

func GCKeyCodeF9

func GCKeyCodeF9() int

GCKeyCodeF9 returns the value of the constant GCKeyCodeF9.

func GCKeyCodeF10

func GCKeyCodeF10() int

GCKeyCodeF10 returns the value of the constant GCKeyCodeF10.

func GCKeyCodeF11

func GCKeyCodeF11() int

GCKeyCodeF11 returns the value of the constant GCKeyCodeF11.

func GCKeyCodeF12

func GCKeyCodeF12() int

GCKeyCodeF12 returns the value of the constant GCKeyCodeF12.

func GCKeyCodeF13

func GCKeyCodeF13() int

GCKeyCodeF13 returns the value of the constant GCKeyCodeF13.

func GCKeyCodeF14

func GCKeyCodeF14() int

GCKeyCodeF14 returns the value of the constant GCKeyCodeF14.

func GCKeyCodeF15

func GCKeyCodeF15() int

GCKeyCodeF15 returns the value of the constant GCKeyCodeF15.

func GCKeyCodeF16

func GCKeyCodeF16() int

GCKeyCodeF16 returns the value of the constant GCKeyCodeF16.

func GCKeyCodeF17

func GCKeyCodeF17() int

GCKeyCodeF17 returns the value of the constant GCKeyCodeF17.

func GCKeyCodeF18

func GCKeyCodeF18() int

GCKeyCodeF18 returns the value of the constant GCKeyCodeF18.

func GCKeyCodeF19

func GCKeyCodeF19() int

GCKeyCodeF19 returns the value of the constant GCKeyCodeF19.

func GCKeyCodeF20

func GCKeyCodeF20() int

GCKeyCodeF20 returns the value of the constant GCKeyCodeF20.

func GCKeyCodeFive

func GCKeyCodeFive() int

GCKeyCodeFive returns the value of the constant GCKeyCodeFive.

func GCKeyCodeFour

func GCKeyCodeFour() int

GCKeyCodeFour returns the value of the constant GCKeyCodeFour.

func GCKeyCodeGraveAccentAndTilde

func GCKeyCodeGraveAccentAndTilde() int

GCKeyCodeGraveAccentAndTilde returns the value of the constant GCKeyCodeGraveAccentAndTilde.

func GCKeyCodeHome

func GCKeyCodeHome() int

GCKeyCodeHome returns the value of the constant GCKeyCodeHome.

func GCKeyCodeHyphen

func GCKeyCodeHyphen() int

GCKeyCodeHyphen returns the value of the constant GCKeyCodeHyphen.

func GCKeyCodeInsert

func GCKeyCodeInsert() int

GCKeyCodeInsert returns the value of the constant GCKeyCodeInsert.

func GCKeyCodeInternational1

func GCKeyCodeInternational1() int

GCKeyCodeInternational1 returns the value of the constant GCKeyCodeInternational1.

func GCKeyCodeInternational2

func GCKeyCodeInternational2() int

GCKeyCodeInternational2 returns the value of the constant GCKeyCodeInternational2.

func GCKeyCodeInternational3

func GCKeyCodeInternational3() int

GCKeyCodeInternational3 returns the value of the constant GCKeyCodeInternational3.

func GCKeyCodeInternational4

func GCKeyCodeInternational4() int

GCKeyCodeInternational4 returns the value of the constant GCKeyCodeInternational4.

func GCKeyCodeInternational5

func GCKeyCodeInternational5() int

GCKeyCodeInternational5 returns the value of the constant GCKeyCodeInternational5.

func GCKeyCodeInternational6

func GCKeyCodeInternational6() int

GCKeyCodeInternational6 returns the value of the constant GCKeyCodeInternational6.

func GCKeyCodeInternational7

func GCKeyCodeInternational7() int

GCKeyCodeInternational7 returns the value of the constant GCKeyCodeInternational7.

func GCKeyCodeInternational8

func GCKeyCodeInternational8() int

GCKeyCodeInternational8 returns the value of the constant GCKeyCodeInternational8.

func GCKeyCodeInternational9

func GCKeyCodeInternational9() int

GCKeyCodeInternational9 returns the value of the constant GCKeyCodeInternational9.

func GCKeyCodeKeyA

func GCKeyCodeKeyA() int

GCKeyCodeKeyA returns the value of the constant GCKeyCodeKeyA.

func GCKeyCodeKeyB

func GCKeyCodeKeyB() int

GCKeyCodeKeyB returns the value of the constant GCKeyCodeKeyB.

func GCKeyCodeKeyC

func GCKeyCodeKeyC() int

GCKeyCodeKeyC returns the value of the constant GCKeyCodeKeyC.

func GCKeyCodeKeyD

func GCKeyCodeKeyD() int

GCKeyCodeKeyD returns the value of the constant GCKeyCodeKeyD.

func GCKeyCodeKeyE

func GCKeyCodeKeyE() int

GCKeyCodeKeyE returns the value of the constant GCKeyCodeKeyE.

func GCKeyCodeKeyF

func GCKeyCodeKeyF() int

GCKeyCodeKeyF returns the value of the constant GCKeyCodeKeyF.

func GCKeyCodeKeyG

func GCKeyCodeKeyG() int

GCKeyCodeKeyG returns the value of the constant GCKeyCodeKeyG.

func GCKeyCodeKeyH

func GCKeyCodeKeyH() int

GCKeyCodeKeyH returns the value of the constant GCKeyCodeKeyH.

func GCKeyCodeKeyI

func GCKeyCodeKeyI() int

GCKeyCodeKeyI returns the value of the constant GCKeyCodeKeyI.

func GCKeyCodeKeyJ

func GCKeyCodeKeyJ() int

GCKeyCodeKeyJ returns the value of the constant GCKeyCodeKeyJ.

func GCKeyCodeKeyK

func GCKeyCodeKeyK() int

GCKeyCodeKeyK returns the value of the constant GCKeyCodeKeyK.

func GCKeyCodeKeyL

func GCKeyCodeKeyL() int

GCKeyCodeKeyL returns the value of the constant GCKeyCodeKeyL.

func GCKeyCodeKeyM

func GCKeyCodeKeyM() int

GCKeyCodeKeyM returns the value of the constant GCKeyCodeKeyM.

func GCKeyCodeKeyN

func GCKeyCodeKeyN() int

GCKeyCodeKeyN returns the value of the constant GCKeyCodeKeyN.

func GCKeyCodeKeyO

func GCKeyCodeKeyO() int

GCKeyCodeKeyO returns the value of the constant GCKeyCodeKeyO.

func GCKeyCodeKeyP

func GCKeyCodeKeyP() int

GCKeyCodeKeyP returns the value of the constant GCKeyCodeKeyP.

func GCKeyCodeKeyQ

func GCKeyCodeKeyQ() int

GCKeyCodeKeyQ returns the value of the constant GCKeyCodeKeyQ.

func GCKeyCodeKeyR

func GCKeyCodeKeyR() int

GCKeyCodeKeyR returns the value of the constant GCKeyCodeKeyR.

func GCKeyCodeKeyS

func GCKeyCodeKeyS() int

GCKeyCodeKeyS returns the value of the constant GCKeyCodeKeyS.

func GCKeyCodeKeyT

func GCKeyCodeKeyT() int

GCKeyCodeKeyT returns the value of the constant GCKeyCodeKeyT.

func GCKeyCodeKeyU

func GCKeyCodeKeyU() int

GCKeyCodeKeyU returns the value of the constant GCKeyCodeKeyU.

func GCKeyCodeKeyV

func GCKeyCodeKeyV() int

GCKeyCodeKeyV returns the value of the constant GCKeyCodeKeyV.

func GCKeyCodeKeyW

func GCKeyCodeKeyW() int

GCKeyCodeKeyW returns the value of the constant GCKeyCodeKeyW.

func GCKeyCodeKeyX

func GCKeyCodeKeyX() int

GCKeyCodeKeyX returns the value of the constant GCKeyCodeKeyX.

func GCKeyCodeKeyY

func GCKeyCodeKeyY() int

GCKeyCodeKeyY returns the value of the constant GCKeyCodeKeyY.

func GCKeyCodeKeyZ

func GCKeyCodeKeyZ() int

GCKeyCodeKeyZ returns the value of the constant GCKeyCodeKeyZ.

func GCKeyCodeKeypad0

func GCKeyCodeKeypad0() int

GCKeyCodeKeypad0 returns the value of the constant GCKeyCodeKeypad0.

func GCKeyCodeKeypad1

func GCKeyCodeKeypad1() int

GCKeyCodeKeypad1 returns the value of the constant GCKeyCodeKeypad1.

func GCKeyCodeKeypad2

func GCKeyCodeKeypad2() int

GCKeyCodeKeypad2 returns the value of the constant GCKeyCodeKeypad2.

func GCKeyCodeKeypad3

func GCKeyCodeKeypad3() int

GCKeyCodeKeypad3 returns the value of the constant GCKeyCodeKeypad3.

func GCKeyCodeKeypad4

func GCKeyCodeKeypad4() int

GCKeyCodeKeypad4 returns the value of the constant GCKeyCodeKeypad4.

func GCKeyCodeKeypad5

func GCKeyCodeKeypad5() int

GCKeyCodeKeypad5 returns the value of the constant GCKeyCodeKeypad5.

func GCKeyCodeKeypad6

func GCKeyCodeKeypad6() int

GCKeyCodeKeypad6 returns the value of the constant GCKeyCodeKeypad6.

func GCKeyCodeKeypad7

func GCKeyCodeKeypad7() int

GCKeyCodeKeypad7 returns the value of the constant GCKeyCodeKeypad7.

func GCKeyCodeKeypad8

func GCKeyCodeKeypad8() int

GCKeyCodeKeypad8 returns the value of the constant GCKeyCodeKeypad8.

func GCKeyCodeKeypad9

func GCKeyCodeKeypad9() int

GCKeyCodeKeypad9 returns the value of the constant GCKeyCodeKeypad9.

func GCKeyCodeKeypadAsterisk

func GCKeyCodeKeypadAsterisk() int

GCKeyCodeKeypadAsterisk returns the value of the constant GCKeyCodeKeypadAsterisk.

func GCKeyCodeKeypadEnter

func GCKeyCodeKeypadEnter() int

GCKeyCodeKeypadEnter returns the value of the constant GCKeyCodeKeypadEnter.

func GCKeyCodeKeypadEqualSign

func GCKeyCodeKeypadEqualSign() int

GCKeyCodeKeypadEqualSign returns the value of the constant GCKeyCodeKeypadEqualSign.

func GCKeyCodeKeypadHyphen

func GCKeyCodeKeypadHyphen() int

GCKeyCodeKeypadHyphen returns the value of the constant GCKeyCodeKeypadHyphen.

func GCKeyCodeKeypadNumLock

func GCKeyCodeKeypadNumLock() int

GCKeyCodeKeypadNumLock returns the value of the constant GCKeyCodeKeypadNumLock.

func GCKeyCodeKeypadPeriod

func GCKeyCodeKeypadPeriod() int

GCKeyCodeKeypadPeriod returns the value of the constant GCKeyCodeKeypadPeriod.

func GCKeyCodeKeypadPlus

func GCKeyCodeKeypadPlus() int

GCKeyCodeKeypadPlus returns the value of the constant GCKeyCodeKeypadPlus.

func GCKeyCodeKeypadSlash

func GCKeyCodeKeypadSlash() int

GCKeyCodeKeypadSlash returns the value of the constant GCKeyCodeKeypadSlash.

func GCKeyCodeLANG1

func GCKeyCodeLANG1() int

GCKeyCodeLANG1 returns the value of the constant GCKeyCodeLANG1.

func GCKeyCodeLANG2

func GCKeyCodeLANG2() int

GCKeyCodeLANG2 returns the value of the constant GCKeyCodeLANG2.

func GCKeyCodeLANG3

func GCKeyCodeLANG3() int

GCKeyCodeLANG3 returns the value of the constant GCKeyCodeLANG3.

func GCKeyCodeLANG4

func GCKeyCodeLANG4() int

GCKeyCodeLANG4 returns the value of the constant GCKeyCodeLANG4.

func GCKeyCodeLANG5

func GCKeyCodeLANG5() int

GCKeyCodeLANG5 returns the value of the constant GCKeyCodeLANG5.

func GCKeyCodeLANG6

func GCKeyCodeLANG6() int

GCKeyCodeLANG6 returns the value of the constant GCKeyCodeLANG6.

func GCKeyCodeLANG7

func GCKeyCodeLANG7() int

GCKeyCodeLANG7 returns the value of the constant GCKeyCodeLANG7.

func GCKeyCodeLANG8

func GCKeyCodeLANG8() int

GCKeyCodeLANG8 returns the value of the constant GCKeyCodeLANG8.

func GCKeyCodeLANG9

func GCKeyCodeLANG9() int

GCKeyCodeLANG9 returns the value of the constant GCKeyCodeLANG9.

func GCKeyCodeLeftAlt

func GCKeyCodeLeftAlt() int

GCKeyCodeLeftAlt returns the value of the constant GCKeyCodeLeftAlt.

func GCKeyCodeLeftArrow

func GCKeyCodeLeftArrow() int

GCKeyCodeLeftArrow returns the value of the constant GCKeyCodeLeftArrow.

func GCKeyCodeLeftControl

func GCKeyCodeLeftControl() int

GCKeyCodeLeftControl returns the value of the constant GCKeyCodeLeftControl.

func GCKeyCodeLeftGUI

func GCKeyCodeLeftGUI() int

GCKeyCodeLeftGUI returns the value of the constant GCKeyCodeLeftGUI.

func GCKeyCodeLeftShift

func GCKeyCodeLeftShift() int

GCKeyCodeLeftShift returns the value of the constant GCKeyCodeLeftShift.

func GCKeyCodeNine

func GCKeyCodeNine() int

GCKeyCodeNine returns the value of the constant GCKeyCodeNine.

func GCKeyCodeNonUSBackslash

func GCKeyCodeNonUSBackslash() int

GCKeyCodeNonUSBackslash returns the value of the constant GCKeyCodeNonUSBackslash.

func GCKeyCodeNonUSPound

func GCKeyCodeNonUSPound() int

GCKeyCodeNonUSPound returns the value of the constant GCKeyCodeNonUSPound.

func GCKeyCodeOne

func GCKeyCodeOne() int

GCKeyCodeOne returns the value of the constant GCKeyCodeOne.

func GCKeyCodeOpenBracket

func GCKeyCodeOpenBracket() int

GCKeyCodeOpenBracket returns the value of the constant GCKeyCodeOpenBracket.

func GCKeyCodePageDown

func GCKeyCodePageDown() int

GCKeyCodePageDown returns the value of the constant GCKeyCodePageDown.

func GCKeyCodePageUp

func GCKeyCodePageUp() int

GCKeyCodePageUp returns the value of the constant GCKeyCodePageUp.

func GCKeyCodePause

func GCKeyCodePause() int

GCKeyCodePause returns the value of the constant GCKeyCodePause.

func GCKeyCodePeriod

func GCKeyCodePeriod() int

GCKeyCodePeriod returns the value of the constant GCKeyCodePeriod.

func GCKeyCodePower

func GCKeyCodePower() int

GCKeyCodePower returns the value of the constant GCKeyCodePower.

func GCKeyCodePrintScreen

func GCKeyCodePrintScreen() int

GCKeyCodePrintScreen returns the value of the constant GCKeyCodePrintScreen.

func GCKeyCodeQuote

func GCKeyCodeQuote() int

GCKeyCodeQuote returns the value of the constant GCKeyCodeQuote.

func GCKeyCodeReturnOrEnter

func GCKeyCodeReturnOrEnter() int

GCKeyCodeReturnOrEnter returns the value of the constant GCKeyCodeReturnOrEnter.

func GCKeyCodeRightAlt

func GCKeyCodeRightAlt() int

GCKeyCodeRightAlt returns the value of the constant GCKeyCodeRightAlt.

func GCKeyCodeRightArrow

func GCKeyCodeRightArrow() int

GCKeyCodeRightArrow returns the value of the constant GCKeyCodeRightArrow.

func GCKeyCodeRightControl

func GCKeyCodeRightControl() int

GCKeyCodeRightControl returns the value of the constant GCKeyCodeRightControl.

func GCKeyCodeRightGUI

func GCKeyCodeRightGUI() int

GCKeyCodeRightGUI returns the value of the constant GCKeyCodeRightGUI.

func GCKeyCodeRightShift

func GCKeyCodeRightShift() int

GCKeyCodeRightShift returns the value of the constant GCKeyCodeRightShift.

func GCKeyCodeScrollLock

func GCKeyCodeScrollLock() int

GCKeyCodeScrollLock returns the value of the constant GCKeyCodeScrollLock.

func GCKeyCodeSemicolon

func GCKeyCodeSemicolon() int

GCKeyCodeSemicolon returns the value of the constant GCKeyCodeSemicolon.

func GCKeyCodeSeven

func GCKeyCodeSeven() int

GCKeyCodeSeven returns the value of the constant GCKeyCodeSeven.

func GCKeyCodeSix

func GCKeyCodeSix() int

GCKeyCodeSix returns the value of the constant GCKeyCodeSix.

func GCKeyCodeSlash

func GCKeyCodeSlash() int

GCKeyCodeSlash returns the value of the constant GCKeyCodeSlash.

func GCKeyCodeSpacebar

func GCKeyCodeSpacebar() int

GCKeyCodeSpacebar returns the value of the constant GCKeyCodeSpacebar.

func GCKeyCodeTab

func GCKeyCodeTab() int

GCKeyCodeTab returns the value of the constant GCKeyCodeTab.

func GCKeyCodeThree

func GCKeyCodeThree() int

GCKeyCodeThree returns the value of the constant GCKeyCodeThree.

func GCKeyCodeTwo

func GCKeyCodeTwo() int

GCKeyCodeTwo returns the value of the constant GCKeyCodeTwo.

func GCKeyCodeUpArrow

func GCKeyCodeUpArrow() int

GCKeyCodeUpArrow returns the value of the constant GCKeyCodeUpArrow.

func GCKeyCodeZero

func GCKeyCodeZero() int

GCKeyCodeZero returns the value of the constant GCKeyCodeZero.

func GCKeyComma

func GCKeyComma() obj.Object

GCKeyComma returns the string constant GCKeyComma, for use as a dictionary key or argument.

func GCKeyD

func GCKeyD() obj.Object

GCKeyD returns the string constant GCKeyD, for use as a dictionary key or argument.

func GCKeyDeleteForward

func GCKeyDeleteForward() obj.Object

GCKeyDeleteForward returns the string constant GCKeyDeleteForward, for use as a dictionary key or argument.

func GCKeyDeleteOrBackspace

func GCKeyDeleteOrBackspace() obj.Object

GCKeyDeleteOrBackspace returns the string constant GCKeyDeleteOrBackspace, for use as a dictionary key or argument.

func GCKeyDownArrow

func GCKeyDownArrow() obj.Object

GCKeyDownArrow returns the string constant GCKeyDownArrow, for use as a dictionary key or argument.

func GCKeyE

func GCKeyE() obj.Object

GCKeyE returns the string constant GCKeyE, for use as a dictionary key or argument.

func GCKeyEight

func GCKeyEight() obj.Object

GCKeyEight returns the string constant GCKeyEight, for use as a dictionary key or argument.

func GCKeyEnd

func GCKeyEnd() obj.Object

GCKeyEnd returns the string constant GCKeyEnd, for use as a dictionary key or argument.

func GCKeyEqualSign

func GCKeyEqualSign() obj.Object

GCKeyEqualSign returns the string constant GCKeyEqualSign, for use as a dictionary key or argument.

func GCKeyEscape

func GCKeyEscape() obj.Object

GCKeyEscape returns the string constant GCKeyEscape, for use as a dictionary key or argument.

func GCKeyF

func GCKeyF() obj.Object

GCKeyF returns the string constant GCKeyF, for use as a dictionary key or argument.

func GCKeyF1

func GCKeyF1() obj.Object

GCKeyF1 returns the string constant GCKeyF1, for use as a dictionary key or argument.

func GCKeyF2

func GCKeyF2() obj.Object

GCKeyF2 returns the string constant GCKeyF2, for use as a dictionary key or argument.

func GCKeyF3

func GCKeyF3() obj.Object

GCKeyF3 returns the string constant GCKeyF3, for use as a dictionary key or argument.

func GCKeyF4

func GCKeyF4() obj.Object

GCKeyF4 returns the string constant GCKeyF4, for use as a dictionary key or argument.

func GCKeyF5

func GCKeyF5() obj.Object

GCKeyF5 returns the string constant GCKeyF5, for use as a dictionary key or argument.

func GCKeyF6

func GCKeyF6() obj.Object

GCKeyF6 returns the string constant GCKeyF6, for use as a dictionary key or argument.

func GCKeyF7

func GCKeyF7() obj.Object

GCKeyF7 returns the string constant GCKeyF7, for use as a dictionary key or argument.

func GCKeyF8

func GCKeyF8() obj.Object

GCKeyF8 returns the string constant GCKeyF8, for use as a dictionary key or argument.

func GCKeyF9

func GCKeyF9() obj.Object

GCKeyF9 returns the string constant GCKeyF9, for use as a dictionary key or argument.

func GCKeyF10

func GCKeyF10() obj.Object

GCKeyF10 returns the string constant GCKeyF10, for use as a dictionary key or argument.

func GCKeyF11

func GCKeyF11() obj.Object

GCKeyF11 returns the string constant GCKeyF11, for use as a dictionary key or argument.

func GCKeyF12

func GCKeyF12() obj.Object

GCKeyF12 returns the string constant GCKeyF12, for use as a dictionary key or argument.

func GCKeyF13

func GCKeyF13() obj.Object

GCKeyF13 returns the string constant GCKeyF13, for use as a dictionary key or argument.

func GCKeyF14

func GCKeyF14() obj.Object

GCKeyF14 returns the string constant GCKeyF14, for use as a dictionary key or argument.

func GCKeyF15

func GCKeyF15() obj.Object

GCKeyF15 returns the string constant GCKeyF15, for use as a dictionary key or argument.

func GCKeyF16

func GCKeyF16() obj.Object

GCKeyF16 returns the string constant GCKeyF16, for use as a dictionary key or argument.

func GCKeyF17

func GCKeyF17() obj.Object

GCKeyF17 returns the string constant GCKeyF17, for use as a dictionary key or argument.

func GCKeyF18

func GCKeyF18() obj.Object

GCKeyF18 returns the string constant GCKeyF18, for use as a dictionary key or argument.

func GCKeyF19

func GCKeyF19() obj.Object

GCKeyF19 returns the string constant GCKeyF19, for use as a dictionary key or argument.

func GCKeyF20

func GCKeyF20() obj.Object

GCKeyF20 returns the string constant GCKeyF20, for use as a dictionary key or argument.

func GCKeyFive

func GCKeyFive() obj.Object

GCKeyFive returns the string constant GCKeyFive, for use as a dictionary key or argument.

func GCKeyFour

func GCKeyFour() obj.Object

GCKeyFour returns the string constant GCKeyFour, for use as a dictionary key or argument.

func GCKeyG

func GCKeyG() obj.Object

GCKeyG returns the string constant GCKeyG, for use as a dictionary key or argument.

func GCKeyGraveAccentAndTilde

func GCKeyGraveAccentAndTilde() obj.Object

GCKeyGraveAccentAndTilde returns the string constant GCKeyGraveAccentAndTilde, for use as a dictionary key or argument.

func GCKeyH

func GCKeyH() obj.Object

GCKeyH returns the string constant GCKeyH, for use as a dictionary key or argument.

func GCKeyHome

func GCKeyHome() obj.Object

GCKeyHome returns the string constant GCKeyHome, for use as a dictionary key or argument.

func GCKeyHyphen

func GCKeyHyphen() obj.Object

GCKeyHyphen returns the string constant GCKeyHyphen, for use as a dictionary key or argument.

func GCKeyI

func GCKeyI() obj.Object

GCKeyI returns the string constant GCKeyI, for use as a dictionary key or argument.

func GCKeyInsert

func GCKeyInsert() obj.Object

GCKeyInsert returns the string constant GCKeyInsert, for use as a dictionary key or argument.

func GCKeyInternational1

func GCKeyInternational1() obj.Object

GCKeyInternational1 returns the string constant GCKeyInternational1, for use as a dictionary key or argument.

func GCKeyInternational2

func GCKeyInternational2() obj.Object

GCKeyInternational2 returns the string constant GCKeyInternational2, for use as a dictionary key or argument.

func GCKeyInternational3

func GCKeyInternational3() obj.Object

GCKeyInternational3 returns the string constant GCKeyInternational3, for use as a dictionary key or argument.

func GCKeyInternational4

func GCKeyInternational4() obj.Object

GCKeyInternational4 returns the string constant GCKeyInternational4, for use as a dictionary key or argument.

func GCKeyInternational5

func GCKeyInternational5() obj.Object

GCKeyInternational5 returns the string constant GCKeyInternational5, for use as a dictionary key or argument.

func GCKeyInternational6

func GCKeyInternational6() obj.Object

GCKeyInternational6 returns the string constant GCKeyInternational6, for use as a dictionary key or argument.

func GCKeyInternational7

func GCKeyInternational7() obj.Object

GCKeyInternational7 returns the string constant GCKeyInternational7, for use as a dictionary key or argument.

func GCKeyInternational8

func GCKeyInternational8() obj.Object

GCKeyInternational8 returns the string constant GCKeyInternational8, for use as a dictionary key or argument.

func GCKeyInternational9

func GCKeyInternational9() obj.Object

GCKeyInternational9 returns the string constant GCKeyInternational9, for use as a dictionary key or argument.

func GCKeyJ

func GCKeyJ() obj.Object

GCKeyJ returns the string constant GCKeyJ, for use as a dictionary key or argument.

func GCKeyK

func GCKeyK() obj.Object

GCKeyK returns the string constant GCKeyK, for use as a dictionary key or argument.

func GCKeyKeypad0

func GCKeyKeypad0() obj.Object

GCKeyKeypad0 returns the string constant GCKeyKeypad0, for use as a dictionary key or argument.

func GCKeyKeypad1

func GCKeyKeypad1() obj.Object

GCKeyKeypad1 returns the string constant GCKeyKeypad1, for use as a dictionary key or argument.

func GCKeyKeypad2

func GCKeyKeypad2() obj.Object

GCKeyKeypad2 returns the string constant GCKeyKeypad2, for use as a dictionary key or argument.

func GCKeyKeypad3

func GCKeyKeypad3() obj.Object

GCKeyKeypad3 returns the string constant GCKeyKeypad3, for use as a dictionary key or argument.

func GCKeyKeypad4

func GCKeyKeypad4() obj.Object

GCKeyKeypad4 returns the string constant GCKeyKeypad4, for use as a dictionary key or argument.

func GCKeyKeypad5

func GCKeyKeypad5() obj.Object

GCKeyKeypad5 returns the string constant GCKeyKeypad5, for use as a dictionary key or argument.

func GCKeyKeypad6

func GCKeyKeypad6() obj.Object

GCKeyKeypad6 returns the string constant GCKeyKeypad6, for use as a dictionary key or argument.

func GCKeyKeypad7

func GCKeyKeypad7() obj.Object

GCKeyKeypad7 returns the string constant GCKeyKeypad7, for use as a dictionary key or argument.

func GCKeyKeypad8

func GCKeyKeypad8() obj.Object

GCKeyKeypad8 returns the string constant GCKeyKeypad8, for use as a dictionary key or argument.

func GCKeyKeypad9

func GCKeyKeypad9() obj.Object

GCKeyKeypad9 returns the string constant GCKeyKeypad9, for use as a dictionary key or argument.

func GCKeyKeypadAsterisk

func GCKeyKeypadAsterisk() obj.Object

GCKeyKeypadAsterisk returns the string constant GCKeyKeypadAsterisk, for use as a dictionary key or argument.

func GCKeyKeypadEnter

func GCKeyKeypadEnter() obj.Object

GCKeyKeypadEnter returns the string constant GCKeyKeypadEnter, for use as a dictionary key or argument.

func GCKeyKeypadEqualSign

func GCKeyKeypadEqualSign() obj.Object

GCKeyKeypadEqualSign returns the string constant GCKeyKeypadEqualSign, for use as a dictionary key or argument.

func GCKeyKeypadHyphen

func GCKeyKeypadHyphen() obj.Object

GCKeyKeypadHyphen returns the string constant GCKeyKeypadHyphen, for use as a dictionary key or argument.

func GCKeyKeypadNumLock

func GCKeyKeypadNumLock() obj.Object

GCKeyKeypadNumLock returns the string constant GCKeyKeypadNumLock, for use as a dictionary key or argument.

func GCKeyKeypadPeriod

func GCKeyKeypadPeriod() obj.Object

GCKeyKeypadPeriod returns the string constant GCKeyKeypadPeriod, for use as a dictionary key or argument.

func GCKeyKeypadPlus

func GCKeyKeypadPlus() obj.Object

GCKeyKeypadPlus returns the string constant GCKeyKeypadPlus, for use as a dictionary key or argument.

func GCKeyKeypadSlash

func GCKeyKeypadSlash() obj.Object

GCKeyKeypadSlash returns the string constant GCKeyKeypadSlash, for use as a dictionary key or argument.

func GCKeyL

func GCKeyL() obj.Object

GCKeyL returns the string constant GCKeyL, for use as a dictionary key or argument.

func GCKeyLANG1

func GCKeyLANG1() obj.Object

GCKeyLANG1 returns the string constant GCKeyLANG1, for use as a dictionary key or argument.

func GCKeyLANG2

func GCKeyLANG2() obj.Object

GCKeyLANG2 returns the string constant GCKeyLANG2, for use as a dictionary key or argument.

func GCKeyLANG3

func GCKeyLANG3() obj.Object

GCKeyLANG3 returns the string constant GCKeyLANG3, for use as a dictionary key or argument.

func GCKeyLANG4

func GCKeyLANG4() obj.Object

GCKeyLANG4 returns the string constant GCKeyLANG4, for use as a dictionary key or argument.

func GCKeyLANG5

func GCKeyLANG5() obj.Object

GCKeyLANG5 returns the string constant GCKeyLANG5, for use as a dictionary key or argument.

func GCKeyLANG6

func GCKeyLANG6() obj.Object

GCKeyLANG6 returns the string constant GCKeyLANG6, for use as a dictionary key or argument.

func GCKeyLANG7

func GCKeyLANG7() obj.Object

GCKeyLANG7 returns the string constant GCKeyLANG7, for use as a dictionary key or argument.

func GCKeyLANG8

func GCKeyLANG8() obj.Object

GCKeyLANG8 returns the string constant GCKeyLANG8, for use as a dictionary key or argument.

func GCKeyLANG9

func GCKeyLANG9() obj.Object

GCKeyLANG9 returns the string constant GCKeyLANG9, for use as a dictionary key or argument.

func GCKeyLeftAlt

func GCKeyLeftAlt() obj.Object

GCKeyLeftAlt returns the string constant GCKeyLeftAlt, for use as a dictionary key or argument.

func GCKeyLeftArrow

func GCKeyLeftArrow() obj.Object

GCKeyLeftArrow returns the string constant GCKeyLeftArrow, for use as a dictionary key or argument.

func GCKeyLeftControl

func GCKeyLeftControl() obj.Object

GCKeyLeftControl returns the string constant GCKeyLeftControl, for use as a dictionary key or argument.

func GCKeyLeftGUI

func GCKeyLeftGUI() obj.Object

GCKeyLeftGUI returns the string constant GCKeyLeftGUI, for use as a dictionary key or argument.

func GCKeyLeftShift

func GCKeyLeftShift() obj.Object

GCKeyLeftShift returns the string constant GCKeyLeftShift, for use as a dictionary key or argument.

func GCKeyM

func GCKeyM() obj.Object

GCKeyM returns the string constant GCKeyM, for use as a dictionary key or argument.

func GCKeyN

func GCKeyN() obj.Object

GCKeyN returns the string constant GCKeyN, for use as a dictionary key or argument.

func GCKeyNine

func GCKeyNine() obj.Object

GCKeyNine returns the string constant GCKeyNine, for use as a dictionary key or argument.

func GCKeyNonUSBackslash

func GCKeyNonUSBackslash() obj.Object

GCKeyNonUSBackslash returns the string constant GCKeyNonUSBackslash, for use as a dictionary key or argument.

func GCKeyNonUSPound

func GCKeyNonUSPound() obj.Object

GCKeyNonUSPound returns the string constant GCKeyNonUSPound, for use as a dictionary key or argument.

func GCKeyO

func GCKeyO() obj.Object

GCKeyO returns the string constant GCKeyO, for use as a dictionary key or argument.

func GCKeyOne

func GCKeyOne() obj.Object

GCKeyOne returns the string constant GCKeyOne, for use as a dictionary key or argument.

func GCKeyOpenBracket

func GCKeyOpenBracket() obj.Object

GCKeyOpenBracket returns the string constant GCKeyOpenBracket, for use as a dictionary key or argument.

func GCKeyP

func GCKeyP() obj.Object

GCKeyP returns the string constant GCKeyP, for use as a dictionary key or argument.

func GCKeyPageDown

func GCKeyPageDown() obj.Object

GCKeyPageDown returns the string constant GCKeyPageDown, for use as a dictionary key or argument.

func GCKeyPageUp

func GCKeyPageUp() obj.Object

GCKeyPageUp returns the string constant GCKeyPageUp, for use as a dictionary key or argument.

func GCKeyPause

func GCKeyPause() obj.Object

GCKeyPause returns the string constant GCKeyPause, for use as a dictionary key or argument.

func GCKeyPeriod

func GCKeyPeriod() obj.Object

GCKeyPeriod returns the string constant GCKeyPeriod, for use as a dictionary key or argument.

func GCKeyPower

func GCKeyPower() obj.Object

GCKeyPower returns the string constant GCKeyPower, for use as a dictionary key or argument.

func GCKeyPrintScreen

func GCKeyPrintScreen() obj.Object

GCKeyPrintScreen returns the string constant GCKeyPrintScreen, for use as a dictionary key or argument.

func GCKeyQ

func GCKeyQ() obj.Object

GCKeyQ returns the string constant GCKeyQ, for use as a dictionary key or argument.

func GCKeyQuote

func GCKeyQuote() obj.Object

GCKeyQuote returns the string constant GCKeyQuote, for use as a dictionary key or argument.

func GCKeyR

func GCKeyR() obj.Object

GCKeyR returns the string constant GCKeyR, for use as a dictionary key or argument.

func GCKeyReturnOrEnter

func GCKeyReturnOrEnter() obj.Object

GCKeyReturnOrEnter returns the string constant GCKeyReturnOrEnter, for use as a dictionary key or argument.

func GCKeyRightAlt

func GCKeyRightAlt() obj.Object

GCKeyRightAlt returns the string constant GCKeyRightAlt, for use as a dictionary key or argument.

func GCKeyRightArrow

func GCKeyRightArrow() obj.Object

GCKeyRightArrow returns the string constant GCKeyRightArrow, for use as a dictionary key or argument.

func GCKeyRightControl

func GCKeyRightControl() obj.Object

GCKeyRightControl returns the string constant GCKeyRightControl, for use as a dictionary key or argument.

func GCKeyRightGUI

func GCKeyRightGUI() obj.Object

GCKeyRightGUI returns the string constant GCKeyRightGUI, for use as a dictionary key or argument.

func GCKeyRightShift

func GCKeyRightShift() obj.Object

GCKeyRightShift returns the string constant GCKeyRightShift, for use as a dictionary key or argument.

func GCKeyS

func GCKeyS() obj.Object

GCKeyS returns the string constant GCKeyS, for use as a dictionary key or argument.

func GCKeyScrollLock

func GCKeyScrollLock() obj.Object

GCKeyScrollLock returns the string constant GCKeyScrollLock, for use as a dictionary key or argument.

func GCKeySemicolon

func GCKeySemicolon() obj.Object

GCKeySemicolon returns the string constant GCKeySemicolon, for use as a dictionary key or argument.

func GCKeySeven

func GCKeySeven() obj.Object

GCKeySeven returns the string constant GCKeySeven, for use as a dictionary key or argument.

func GCKeySix

func GCKeySix() obj.Object

GCKeySix returns the string constant GCKeySix, for use as a dictionary key or argument.

func GCKeySlash

func GCKeySlash() obj.Object

GCKeySlash returns the string constant GCKeySlash, for use as a dictionary key or argument.

func GCKeySpacebar

func GCKeySpacebar() obj.Object

GCKeySpacebar returns the string constant GCKeySpacebar, for use as a dictionary key or argument.

func GCKeyT

func GCKeyT() obj.Object

GCKeyT returns the string constant GCKeyT, for use as a dictionary key or argument.

func GCKeyTab

func GCKeyTab() obj.Object

GCKeyTab returns the string constant GCKeyTab, for use as a dictionary key or argument.

func GCKeyThree

func GCKeyThree() obj.Object

GCKeyThree returns the string constant GCKeyThree, for use as a dictionary key or argument.

func GCKeyTwo

func GCKeyTwo() obj.Object

GCKeyTwo returns the string constant GCKeyTwo, for use as a dictionary key or argument.

func GCKeyU

func GCKeyU() obj.Object

GCKeyU returns the string constant GCKeyU, for use as a dictionary key or argument.

func GCKeyUpArrow

func GCKeyUpArrow() obj.Object

GCKeyUpArrow returns the string constant GCKeyUpArrow, for use as a dictionary key or argument.

func GCKeyV

func GCKeyV() obj.Object

GCKeyV returns the string constant GCKeyV, for use as a dictionary key or argument.

func GCKeyW

func GCKeyW() obj.Object

GCKeyW returns the string constant GCKeyW, for use as a dictionary key or argument.

func GCKeyX

func GCKeyX() obj.Object

GCKeyX returns the string constant GCKeyX, for use as a dictionary key or argument.

func GCKeyY

func GCKeyY() obj.Object

GCKeyY returns the string constant GCKeyY, for use as a dictionary key or argument.

func GCKeyZ

func GCKeyZ() obj.Object

GCKeyZ returns the string constant GCKeyZ, for use as a dictionary key or argument.

func GCKeyZero

func GCKeyZero() obj.Object

GCKeyZero returns the string constant GCKeyZero, for use as a dictionary key or argument.

func GCKeyboardDidConnectNotification

func GCKeyboardDidConnectNotification() obj.Object

GCKeyboardDidConnectNotification returns the string constant GCKeyboardDidConnectNotification, for use as a dictionary key or argument.

func GCKeyboardDidDisconnectNotification

func GCKeyboardDidDisconnectNotification() obj.Object

GCKeyboardDidDisconnectNotification returns the string constant GCKeyboardDidDisconnectNotification, for use as a dictionary key or argument.

func GCMouseDidBecomeCurrentNotification

func GCMouseDidBecomeCurrentNotification() obj.Object

GCMouseDidBecomeCurrentNotification returns the string constant GCMouseDidBecomeCurrentNotification, for use as a dictionary key or argument.

func GCMouseDidConnectNotification

func GCMouseDidConnectNotification() obj.Object

GCMouseDidConnectNotification returns the string constant GCMouseDidConnectNotification, for use as a dictionary key or argument.

func GCMouseDidDisconnectNotification

func GCMouseDidDisconnectNotification() obj.Object

GCMouseDidDisconnectNotification returns the string constant GCMouseDidDisconnectNotification, for use as a dictionary key or argument.

func GCMouseDidStopBeingCurrentNotification

func GCMouseDidStopBeingCurrentNotification() obj.Object

GCMouseDidStopBeingCurrentNotification returns the string constant GCMouseDidStopBeingCurrentNotification, for use as a dictionary key or argument.

func GCPoint2Equal

func GCPoint2Equal(point1 GCPoint2, point2 GCPoint2) bool

GCPoint2Equal calls the GameController framework function GCPoint2Equal.

func GCPoint2Zero

func GCPoint2Zero() uintptr

GCPoint2Zero returns the address of the symbol GCPoint2Zero.

func GCProductCategoryArcadeStick

func GCProductCategoryArcadeStick() obj.Object

GCProductCategoryArcadeStick returns the string constant GCProductCategoryArcadeStick, for use as a dictionary key or argument.

func GCProductCategoryCoalescedRemote

func GCProductCategoryCoalescedRemote() obj.Object

GCProductCategoryCoalescedRemote returns the string constant GCProductCategoryCoalescedRemote, for use as a dictionary key or argument.

func GCProductCategoryControlCenterRemote

func GCProductCategoryControlCenterRemote() obj.Object

GCProductCategoryControlCenterRemote returns the string constant GCProductCategoryControlCenterRemote, for use as a dictionary key or argument.

func GCProductCategoryDualSense

func GCProductCategoryDualSense() obj.Object

GCProductCategoryDualSense returns the string constant GCProductCategoryDualSense, for use as a dictionary key or argument.

func GCProductCategoryDualShock4

func GCProductCategoryDualShock4() obj.Object

GCProductCategoryDualShock4 returns the string constant GCProductCategoryDualShock4, for use as a dictionary key or argument.

func GCProductCategoryHID

func GCProductCategoryHID() obj.Object

GCProductCategoryHID returns the string constant GCProductCategoryHID, for use as a dictionary key or argument.

func GCProductCategoryKeyboard

func GCProductCategoryKeyboard() obj.Object

GCProductCategoryKeyboard returns the string constant GCProductCategoryKeyboard, for use as a dictionary key or argument.

func GCProductCategoryMFi

func GCProductCategoryMFi() obj.Object

GCProductCategoryMFi returns the string constant GCProductCategoryMFi, for use as a dictionary key or argument.

func GCProductCategoryMouse

func GCProductCategoryMouse() obj.Object

GCProductCategoryMouse returns the string constant GCProductCategoryMouse, for use as a dictionary key or argument.

func GCProductCategorySiriRemote1stGen

func GCProductCategorySiriRemote1stGen() obj.Object

GCProductCategorySiriRemote1stGen returns the string constant GCProductCategorySiriRemote1stGen, for use as a dictionary key or argument.

func GCProductCategorySiriRemote2ndGen

func GCProductCategorySiriRemote2ndGen() obj.Object

GCProductCategorySiriRemote2ndGen returns the string constant GCProductCategorySiriRemote2ndGen, for use as a dictionary key or argument.

func GCProductCategorySpatialController

func GCProductCategorySpatialController() obj.Object

GCProductCategorySpatialController returns the string constant GCProductCategorySpatialController, for use as a dictionary key or argument.

func GCProductCategoryUniversalElectronicsRemote

func GCProductCategoryUniversalElectronicsRemote() obj.Object

GCProductCategoryUniversalElectronicsRemote returns the string constant GCProductCategoryUniversalElectronicsRemote, for use as a dictionary key or argument.

func GCProductCategoryXboxOne

func GCProductCategoryXboxOne() obj.Object

GCProductCategoryXboxOne returns the string constant GCProductCategoryXboxOne, for use as a dictionary key or argument.

func GCRacingWheelDidConnectNotification

func GCRacingWheelDidConnectNotification() obj.Object

GCRacingWheelDidConnectNotification returns the string constant GCRacingWheelDidConnectNotification, for use as a dictionary key or argument.

func GCRacingWheelDidDisconnectNotification

func GCRacingWheelDidDisconnectNotification() obj.Object

GCRacingWheelDidDisconnectNotification returns the string constant GCRacingWheelDidDisconnectNotification, for use as a dictionary key or argument.

func NSStringFromGCPoint2

func NSStringFromGCPoint2(point GCPoint2) string

NSStringFromGCPoint2 calls the GameController framework function NSStringFromGCPoint2.

func SetShouldMonitorBackgroundEvents added in v0.17.0

func SetShouldMonitorBackgroundEvents(shouldMonitorBackgroundEvents bool)

SetShouldMonitorBackgroundEvents wraps the corresponding Objective-C method.

func ShouldMonitorBackgroundEvents added in v0.17.0

func ShouldMonitorBackgroundEvents() bool

ShouldMonitorBackgroundEvents reports whether the current application should monitor and respond to game controller events when it is not the frontmost application.

func StartWirelessControllerDiscovery added in v0.17.0

func StartWirelessControllerDiscovery(ctx context.Context) error

StartWirelessControllerDiscovery starts searching for nearby wireless controllers.

StartWirelessControllerDiscovery blocks until the operation completes or ctx is cancelled.

func StopWirelessControllerDiscovery added in v0.17.0

func StopWirelessControllerDiscovery()

StopWirelessControllerDiscovery stops searching for nearby wireless controllers.

func SupportsHIDDevice added in v0.17.0

func SupportsHIDDevice(device unsafe.Pointer) bool

SupportsHIDDevice returns a Boolean value that indicates whether the framework supports the specified human interface device.

Types

type Axis2DInput added in v0.17.0

type Axis2DInput interface {
	ValueDidChangeHandler() obj.Object
	SetValueDidChangeHandler(valueDidChangeHandler obj.Object)
	Value() GCPoint2
	IsAnalog() bool
	CanWrap() bool
	LastValueTimestamp() float64
	LastValueLatency() float64
	Sources() []obj.Object
}

Axis2DInput is the Go form of the Objective-C protocol GCAxis2DInput.

type AxisElement added in v0.17.0

type AxisElement interface {
	AbsoluteInput() obj.Object
	RelativeInput() obj.Object
}

AxisElement is the Go form of the Objective-C protocol GCAxisElement.

type AxisElementName added in v0.17.0

type AxisElementName interface {
}

AxisElementName is the Go form of the Objective-C protocol GCAxisElementName.

type AxisInput added in v0.17.0

type AxisInput interface {
	ValueDidChangeHandler() obj.Object
	SetValueDidChangeHandler(valueDidChangeHandler obj.Object)
	Value() float32
	IsAnalog() bool
	CanWrap() bool
	LastValueTimestamp() float64
	LastValueLatency() float64
	Sources() []obj.Object
}

AxisInput is the Go form of the Objective-C protocol GCAxisInput.

type ButtonElement added in v0.17.0

type ButtonElement interface {
	PressedInput() obj.Object
	TouchedInput() obj.Object
	ForceInput() obj.Object
}

ButtonElement is the Go form of the Objective-C protocol GCButtonElement.

type ButtonElementName added in v0.17.0

type ButtonElementName interface {
}

ButtonElementName is the Go form of the Objective-C protocol GCButtonElementName.

type ButtonInput added in v0.17.0

type ButtonInput interface {
}

ButtonInput is the Go form of the Objective-C protocol GCButtonInput.

type Clockid added in v0.17.0

type Clockid int32
const (
	ClockidRealtime           Clockid = 0
	ClockidMonotonic          Clockid = 6
	ClockidMonotonicRaw       Clockid = 4
	ClockidMonotonicRawApprox Clockid = 5
	ClockidUptimeRaw          Clockid = 8
	ClockidUptimeRawApprox    Clockid = 9
	ClockidProcessCputimeID   Clockid = 12
	ClockidThreadCputimeID    Clockid = 16
)

func (Clockid) String added in v0.17.0

func (e Clockid) String() string

String returns the Clockid constant's name, or its numeric form when the value is not a known constant.

type Color added in v0.17.0

type Color struct {
	objref.Handle
}

Color is an idiomatic wrapper over the Objective-C class GCColor.

The color of a device light.

func ColorFromID added in v0.17.0

func ColorFromID(id objc.ID) *Color

ColorFromID adopts an existing Objective-C object as a Color (nil for 0), retaining it and registering a release finalizer.

func NewColorWithRedGreenBlue added in v0.17.0

func NewColorWithRedGreenBlue(red float32, green float32, blue float32) *Color

NewColorWithRedGreenBlue creates a color with the specified red, green, and blue values.

func (*Color) Blue added in v0.17.0

func (c *Color) Blue() float32

Blue returns the blue.

func (*Color) Description added in v0.17.0

func (c *Color) Description() string

Description returns the object's -description text.

func (*Color) Green added in v0.17.0

func (c *Color) Green() float32

Green returns the green.

func (*Color) IsEqual added in v0.17.0

func (c *Color) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Color) IsKind added in v0.17.0

func (c *Color) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Color) Red added in v0.17.0

func (c *Color) Red() float32

Red returns the red.

func (*Color) String added in v0.17.0

func (c *Color) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type Controller added in v0.17.0

type Controller struct {
	objref.Handle
}

Controller is an idiomatic wrapper over the Objective-C class GCController.

A representation of a real game controller, a virtual controller, or a snapshot of a controller.

func ControllerFromID added in v0.17.0

func ControllerFromID(id objc.ID) *Controller

ControllerFromID adopts an existing Objective-C object as a Controller (nil for 0), retaining it and registering a release finalizer.

func ControllerWithExtendedGamepad added in v0.17.0

func ControllerWithExtendedGamepad() *Controller

ControllerWithExtendedGamepad returns a snapshot of a newly created controller with an extended gamepad profile.

func ControllerWithMicroGamepad added in v0.17.0

func ControllerWithMicroGamepad() *Controller

ControllerWithMicroGamepad returns a snapshot of a newly created controller with a micro gamepad profile.

func Controllers added in v0.17.0

func Controllers() []*Controller

Controllers returns the connected controllers for the device.

Controllers returns the collection as a Go slice.

func Current added in v0.17.0

func Current() *Controller

Current returns the most recently used game controller. If a user actuates a game controller input, that controller will become the current one.

func NewController added in v0.17.0

func NewController() *Controller

NewController creates a new Controller.

func (*Controller) Battery added in v0.17.0

func (c *Controller) Battery() *DeviceBattery

Battery 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 (*Controller) Capture added in v0.17.0

func (c *Controller) Capture() *Controller

Capture returns a snapshot of the controller with its current element values.

func (*Controller) Description added in v0.17.0

func (c *Controller) Description() string

Description returns the object's -description text.

func (*Controller) ExtendedGamepad added in v0.17.0

func (c *Controller) ExtendedGamepad() *ExtendedGamepad

ExtendedGamepad returns the extended gamepad.

func (*Controller) Gamepad added in v0.17.0

func (c *Controller) Gamepad() *Gamepad

Gamepad 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.

func (*Controller) Haptics added in v0.17.0

func (c *Controller) Haptics() *DeviceHaptics

Haptics gets the haptics for the controller, if one exists. Use this property to create CHHapticEngine instances according to your needs.

func (*Controller) Input added in v0.17.0

func (c *Controller) Input() *ControllerLiveInput

Input gets the input profile for the controller.

func (*Controller) IsAttachedToDevice added in v0.17.0

func (c *Controller) IsAttachedToDevice() bool

IsAttachedToDevice reports whether 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 (*Controller) IsEqual added in v0.17.0

func (c *Controller) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Controller) IsKind added in v0.17.0

func (c *Controller) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Controller) IsSnapshot added in v0.17.0

func (c *Controller) IsSnapshot() bool

IsSnapshot reports whether 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.

func (*Controller) Light added in v0.17.0

func (c *Controller) Light() *DeviceLight

Light 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 (*Controller) MicroGamepad added in v0.17.0

func (c *Controller) MicroGamepad() *MicroGamepad

MicroGamepad returns the micro gamepad.

func (*Controller) Motion added in v0.17.0

func (c *Controller) Motion() *Motion

Motion 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.

func (*Controller) PhysicalInputProfile added in v0.17.0

func (c *Controller) PhysicalInputProfile() *PhysicalInputProfile

PhysicalInputProfile gets the physical input profile for the controller.

func (*Controller) PlayerIndex added in v0.17.0

func (c *Controller) PlayerIndex() ControllerPlayerIndex

PlayerIndex returns 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 (*Controller) String added in v0.17.0

func (c *Controller) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Controller) WithControllerPausedHandler added in v0.17.0

func (c *Controller) WithControllerPausedHandler(controllerPausedHandler func(obj.Object)) *Controller

WithControllerPausedHandler sets the block that the framework calls when the user presses the pause button on the controller.

func (*Controller) WithPlayerIndex added in v0.17.0

func (c *Controller) WithPlayerIndex(playerIndex ControllerPlayerIndex) *Controller

WithPlayerIndex sets the player index for the controller.

type ControllerAxisInput added in v0.17.0

type ControllerAxisInput struct {
	ControllerElement
}

ControllerAxisInput is an idiomatic wrapper over the Objective-C class GCControllerAxisInput.

It embeds ControllerElement, promoting that type's methods.

A control element that tracks movement along an axis.

func ControllerAxisInputFromID added in v0.17.0

func ControllerAxisInputFromID(id objc.ID) *ControllerAxisInput

ControllerAxisInputFromID adopts an existing Objective-C object as a ControllerAxisInput (nil for 0), retaining it and registering a release finalizer.

func NewControllerAxisInput added in v0.17.0

func NewControllerAxisInput() *ControllerAxisInput

NewControllerAxisInput creates a new ControllerAxisInput.

func (*ControllerAxisInput) Value added in v0.17.0

func (cai *ControllerAxisInput) Value() float32

Value returns 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 (*ControllerAxisInput) WithLocalizedName added in v0.17.0

func (cai *ControllerAxisInput) WithLocalizedName(localizedName string) *ControllerAxisInput

WithLocalizedName sets the localized name for the element or the remapped element.

func (*ControllerAxisInput) WithPreferredSystemGestureState added in v0.17.0

func (cai *ControllerAxisInput) WithPreferredSystemGestureState(preferredSystemGestureState SystemGestureState) *ControllerAxisInput

WithPreferredSystemGestureState sets the preferred state for handling input when the user binds the element to a system gesture.

func (*ControllerAxisInput) WithSfSymbolsName added in v0.17.0

func (cai *ControllerAxisInput) WithSfSymbolsName(sfSymbolsName string) *ControllerAxisInput

WithSfSymbolsName sets a system symbol for the element or the remapped element.

func (*ControllerAxisInput) WithUnmappedLocalizedName added in v0.17.0

func (cai *ControllerAxisInput) WithUnmappedLocalizedName(unmappedLocalizedName string) *ControllerAxisInput

WithUnmappedLocalizedName sets the element’s localized name, not the remapped name.

func (*ControllerAxisInput) WithUnmappedSfSymbolsName added in v0.17.0

func (cai *ControllerAxisInput) WithUnmappedSfSymbolsName(unmappedSfSymbolsName string) *ControllerAxisInput

WithUnmappedSfSymbolsName sets the element’s system symbol, not the remapped symbol.

func (*ControllerAxisInput) WithValue added in v0.17.0

func (cai *ControllerAxisInput) WithValue(value float32) *ControllerAxisInput

WithValue sets the current value of the axis.

func (*ControllerAxisInput) WithValueChangedHandler added in v0.18.0

func (cai *ControllerAxisInput) WithValueChangedHandler(valueChangedHandler func(obj.Object, float32)) *ControllerAxisInput

WithValueChangedHandler sets the block that the element calls when the user changes the axis value.

type ControllerButtonInput added in v0.17.0

type ControllerButtonInput struct {
	ControllerElement
}

ControllerButtonInput is an idiomatic wrapper over the Objective-C class GCControllerButtonInput.

ControllerButtonInput is an abstract base — you do not construct it directly. Construct one of DualSenseAdaptiveTrigger and pass it where a ControllerButtonInput is accepted.

A control element that represents a button touch or press.

func ControllerButtonInputFromID added in v0.17.0

func ControllerButtonInputFromID(id objc.ID) *ControllerButtonInput

ControllerButtonInputFromID adopts an existing Objective-C object as a ControllerButtonInput (nil for 0), retaining it and registering a release finalizer.

func (*ControllerButtonInput) IsPressed added in v0.17.0

func (cbi *ControllerButtonInput) IsPressed() bool

IsPressed reports whether 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.

func (*ControllerButtonInput) IsTouched added in v0.17.0

func (cbi *ControllerButtonInput) IsTouched() bool

IsTouched reports whether 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.

func (*ControllerButtonInput) Value added in v0.17.0

func (cbi *ControllerButtonInput) Value() float32

Value returns 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].

func (*ControllerButtonInput) WithLocalizedName added in v0.17.0

func (cbi *ControllerButtonInput) WithLocalizedName(localizedName string) *ControllerButtonInput

WithLocalizedName sets the localized name for the element or the remapped element.

func (*ControllerButtonInput) WithPreferredSystemGestureState added in v0.17.0

func (cbi *ControllerButtonInput) WithPreferredSystemGestureState(preferredSystemGestureState SystemGestureState) *ControllerButtonInput

WithPreferredSystemGestureState sets the preferred state for handling input when the user binds the element to a system gesture.

func (*ControllerButtonInput) WithPressedChangedHandler added in v0.18.0

func (cbi *ControllerButtonInput) WithPressedChangedHandler(pressedChangedHandler func(obj.Object, float32, bool)) *ControllerButtonInput

WithPressedChangedHandler sets the block that the element calls when the user presses or releases the button.

func (*ControllerButtonInput) WithSfSymbolsName added in v0.17.0

func (cbi *ControllerButtonInput) WithSfSymbolsName(sfSymbolsName string) *ControllerButtonInput

WithSfSymbolsName sets a system symbol for the element or the remapped element.

func (*ControllerButtonInput) WithTouchedChangedHandler added in v0.18.0

func (cbi *ControllerButtonInput) WithTouchedChangedHandler(touchedChangedHandler func(obj.Object, float32, bool, bool)) *ControllerButtonInput

WithTouchedChangedHandler sets the block that the element calls when the user touches the button.

func (*ControllerButtonInput) WithUnmappedLocalizedName added in v0.17.0

func (cbi *ControllerButtonInput) WithUnmappedLocalizedName(unmappedLocalizedName string) *ControllerButtonInput

WithUnmappedLocalizedName sets the element’s localized name, not the remapped name.

func (*ControllerButtonInput) WithUnmappedSfSymbolsName added in v0.17.0

func (cbi *ControllerButtonInput) WithUnmappedSfSymbolsName(unmappedSfSymbolsName string) *ControllerButtonInput

WithUnmappedSfSymbolsName sets the element’s system symbol, not the remapped symbol.

func (*ControllerButtonInput) WithValue added in v0.17.0

func (cbi *ControllerButtonInput) WithValue(value float32) *ControllerButtonInput

WithValue sets the level of pressure the user is applying to the button.

func (*ControllerButtonInput) WithValueChangedHandler added in v0.18.0

func (cbi *ControllerButtonInput) WithValueChangedHandler(valueChangedHandler func(obj.Object, float32, bool)) *ControllerButtonInput

WithValueChangedHandler sets the block that the element calls when the user changes the level of pressure on the button.

type ControllerButtonInputProvider added in v0.17.0

type ControllerButtonInputProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

ControllerButtonInputProvider is accepted wherever a GCControllerButtonInput (or one of its subclasses) is expected.

type ControllerDirectionPad added in v0.17.0

type ControllerDirectionPad struct {
	ControllerElement
}

ControllerDirectionPad is an idiomatic wrapper over the Objective-C class GCControllerDirectionPad.

ControllerDirectionPad is an abstract base — you do not construct it directly. Construct one of DeviceCursor and pass it where a ControllerDirectionPad is accepted.

A control element associated with a directional pad or a thumbstick.

func ControllerDirectionPadFromID added in v0.17.0

func ControllerDirectionPadFromID(id objc.ID) *ControllerDirectionPad

ControllerDirectionPadFromID adopts an existing Objective-C object as a ControllerDirectionPad (nil for 0), retaining it and registering a release finalizer.

func (*ControllerDirectionPad) Down added in v0.17.0

Down returns the down.

func (*ControllerDirectionPad) Left added in v0.17.0

Left returns the left.

func (*ControllerDirectionPad) Right added in v0.17.0

Right returns the right.

func (*ControllerDirectionPad) SetValueForXAxisYAxis added in v0.17.0

func (cdp *ControllerDirectionPad) SetValueForXAxisYAxis(xAxis float32, yAxis float32)

SetValueForXAxisYAxis sets the input values of a snapshot of a directional pad.

func (*ControllerDirectionPad) Up added in v0.17.0

Up returns the up.

func (*ControllerDirectionPad) WithLocalizedName added in v0.17.0

func (cdp *ControllerDirectionPad) WithLocalizedName(localizedName string) *ControllerDirectionPad

WithLocalizedName sets the localized name for the element or the remapped element.

func (*ControllerDirectionPad) WithPreferredSystemGestureState added in v0.17.0

func (cdp *ControllerDirectionPad) WithPreferredSystemGestureState(preferredSystemGestureState SystemGestureState) *ControllerDirectionPad

WithPreferredSystemGestureState sets the preferred state for handling input when the user binds the element to a system gesture.

func (*ControllerDirectionPad) WithSfSymbolsName added in v0.17.0

func (cdp *ControllerDirectionPad) WithSfSymbolsName(sfSymbolsName string) *ControllerDirectionPad

WithSfSymbolsName sets a system symbol for the element or the remapped element.

func (*ControllerDirectionPad) WithUnmappedLocalizedName added in v0.17.0

func (cdp *ControllerDirectionPad) WithUnmappedLocalizedName(unmappedLocalizedName string) *ControllerDirectionPad

WithUnmappedLocalizedName sets the element’s localized name, not the remapped name.

func (*ControllerDirectionPad) WithUnmappedSfSymbolsName added in v0.17.0

func (cdp *ControllerDirectionPad) WithUnmappedSfSymbolsName(unmappedSfSymbolsName string) *ControllerDirectionPad

WithUnmappedSfSymbolsName sets the element’s system symbol, not the remapped symbol.

func (*ControllerDirectionPad) WithValueChangedHandler added in v0.18.0

func (cdp *ControllerDirectionPad) WithValueChangedHandler(valueChangedHandler func(obj.Object, float32, float32)) *ControllerDirectionPad

WithValueChangedHandler sets the block that the directional pad calls when the user changes its values.

func (*ControllerDirectionPad) XAxis added in v0.17.0

XAxis returns the x axis.

func (*ControllerDirectionPad) YAxis added in v0.17.0

YAxis returns the y axis.

type ControllerDirectionPadProvider added in v0.17.0

type ControllerDirectionPadProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

ControllerDirectionPadProvider is accepted wherever a GCControllerDirectionPad (or one of its subclasses) is expected.

type ControllerElement added in v0.17.0

type ControllerElement struct {
	objref.Handle
}

ControllerElement is an idiomatic wrapper over the Objective-C class GCControllerElement.

ControllerElement is an abstract base — you do not construct it directly. Construct one of ControllerAxisInput, ControllerButtonInput, ControllerDirectionPad, ControllerTouchpad and pass it where a ControllerElement is accepted.

An input for a physical control, such as a button or thumbstick.

func ControllerElementFromID added in v0.17.0

func ControllerElementFromID(id objc.ID) *ControllerElement

ControllerElementFromID adopts an existing Objective-C object as a ControllerElement (nil for 0), retaining it and registering a release finalizer.

func (*ControllerElement) Aliases added in v0.17.0

func (ce *ControllerElement) Aliases() []string

Aliases returns a set of aliases that can be used to access this element with keyed subscript notation. The order of the returned elements is unspecified.

func (*ControllerElement) Collection added in v0.17.0

func (ce *ControllerElement) Collection() *ControllerElement

Collection returns 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 (*ControllerElement) Description added in v0.17.0

func (ce *ControllerElement) Description() string

Description returns the object's -description text.

func (*ControllerElement) IsAnalog added in v0.17.0

func (ce *ControllerElement) IsAnalog() bool

IsAnalog reports whether check if the element can support more than just digital values, such as decimal ranges between 0 and 1. Defaults to true for most elements.

func (*ControllerElement) IsBoundToSystemGesture added in v0.17.0

func (ce *ControllerElement) IsBoundToSystemGesture() bool

IsBoundToSystemGesture reports whether check if the element is bound to a system gesture. Defaults to false for most elements.

func (*ControllerElement) IsEqual added in v0.17.0

func (ce *ControllerElement) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ControllerElement) IsKind added in v0.17.0

func (ce *ControllerElement) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ControllerElement) LocalizedName added in v0.17.0

func (ce *ControllerElement) LocalizedName() string

LocalizedName returns the element's localized name, taking input remapping into account.

func (*ControllerElement) PreferredSystemGestureState added in v0.17.0

func (ce *ControllerElement) PreferredSystemGestureState() SystemGestureState

PreferredSystemGestureState returns the preferred system gesture state for this element. Defaults to GCSystemGestureStateEnabled for most elements

func (*ControllerElement) SfSymbolsName added in v0.17.0

func (ce *ControllerElement) SfSymbolsName() string

SfSymbolsName returns the element's SF Symbols name, taking input remapping into account.

func (*ControllerElement) String added in v0.17.0

func (ce *ControllerElement) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*ControllerElement) UnmappedLocalizedName added in v0.17.0

func (ce *ControllerElement) UnmappedLocalizedName() string

UnmappedLocalizedName returns the element's localized name, not taking any input remapping into account.

func (*ControllerElement) UnmappedSfSymbolsName added in v0.17.0

func (ce *ControllerElement) UnmappedSfSymbolsName() string

UnmappedSfSymbolsName returns the element's SF Symbols name, not taking any input remapping into account.

func (*ControllerElement) WithLocalizedName added in v0.17.0

func (ce *ControllerElement) WithLocalizedName(localizedName string) *ControllerElement

WithLocalizedName sets the localized name for the element or the remapped element.

func (*ControllerElement) WithPreferredSystemGestureState added in v0.17.0

func (ce *ControllerElement) WithPreferredSystemGestureState(preferredSystemGestureState SystemGestureState) *ControllerElement

WithPreferredSystemGestureState sets the preferred state for handling input when the user binds the element to a system gesture.

func (*ControllerElement) WithSfSymbolsName added in v0.17.0

func (ce *ControllerElement) WithSfSymbolsName(sfSymbolsName string) *ControllerElement

WithSfSymbolsName sets a system symbol for the element or the remapped element.

func (*ControllerElement) WithUnmappedLocalizedName added in v0.17.0

func (ce *ControllerElement) WithUnmappedLocalizedName(unmappedLocalizedName string) *ControllerElement

WithUnmappedLocalizedName sets the element’s localized name, not the remapped name.

func (*ControllerElement) WithUnmappedSfSymbolsName added in v0.17.0

func (ce *ControllerElement) WithUnmappedSfSymbolsName(unmappedSfSymbolsName string) *ControllerElement

WithUnmappedSfSymbolsName sets the element’s system symbol, not the remapped symbol.

type ControllerElementProvider added in v0.17.0

type ControllerElementProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

ControllerElementProvider is accepted wherever a GCControllerElement (or one of its subclasses) is expected.

type ControllerInputState added in v0.17.0

type ControllerInputState struct {
	objref.Handle
}

ControllerInputState is an idiomatic wrapper over the Objective-C class GCControllerInputState.

ControllerInputState is an abstract base — you do not construct it directly. Construct one of ControllerLiveInput and pass it where a ControllerInputState is accepted.

A class that represents an input state for gamepads and arcade sticks.

func ControllerInputStateFromID added in v0.17.0

func ControllerInputStateFromID(id objc.ID) *ControllerInputState

ControllerInputStateFromID adopts an existing Objective-C object as a ControllerInputState (nil for 0), retaining it and registering a release finalizer.

func (*ControllerInputState) Description added in v0.17.0

func (cis *ControllerInputState) Description() string

Description returns the object's -description text.

func (*ControllerInputState) IsEqual added in v0.17.0

func (cis *ControllerInputState) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*ControllerInputState) IsKind added in v0.17.0

func (cis *ControllerInputState) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*ControllerInputState) String added in v0.17.0

func (cis *ControllerInputState) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type ControllerInputStateProvider added in v0.17.0

type ControllerInputStateProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

ControllerInputStateProvider is accepted wherever a GCControllerInputState (or one of its subclasses) is expected.

type ControllerLiveInput added in v0.17.0

type ControllerLiveInput struct {
	ControllerInputState
}

ControllerLiveInput is an idiomatic wrapper over the Objective-C class GCControllerLiveInput.

It embeds ControllerInputState, promoting that type's methods.

The input profile for a controller.

func ControllerLiveInputFromID added in v0.17.0

func ControllerLiveInputFromID(id objc.ID) *ControllerLiveInput

ControllerLiveInputFromID adopts an existing Objective-C object as a ControllerLiveInput (nil for 0), retaining it and registering a release finalizer.

func NewControllerLiveInput added in v0.17.0

func NewControllerLiveInput() *ControllerLiveInput

NewControllerLiveInput creates a new ControllerLiveInput.

func (*ControllerLiveInput) Capture added in v0.17.0

func (cli *ControllerLiveInput) Capture() *ControllerInputState

Capture returns a snapshot of the physical device inputs.

func (*ControllerLiveInput) NextInputState added in v0.17.0

func (cli *ControllerLiveInput) NextInputState() *ControllerInputState

NextInputState returns the next device input state from the queue.

func (*ControllerLiveInput) UnmappedInput added in v0.17.0

func (cli *ControllerLiveInput) UnmappedInput() *ControllerLiveInput

UnmappedInput get a view of the controller's input without any system-level control remapping applied. Developers should avoid implementing their own control remapping functionality and to instead direct users to the system game controller settings to remap controls. If you choose to implement your own control remapping functionality, or if your app streams controller input to a remote device that implements control remapping functionality, you should access controller physical input through this interface.

type ControllerPlayerIndex added in v0.17.0

type ControllerPlayerIndex int64

The possible values for controller player indices.

const (
	// The default index for a player on a controller.
	ControllerPlayerIndexUnset ControllerPlayerIndex = -1
	// Player one is using the controller.
	ControllerPlayerIndex1 ControllerPlayerIndex = 0
	// Player two is using the controller.
	ControllerPlayerIndex2 ControllerPlayerIndex = 1
	// Player three is using the controller.
	ControllerPlayerIndex3 ControllerPlayerIndex = 2
	// Player four is using the controller.
	ControllerPlayerIndex4 ControllerPlayerIndex = 3
)

func (ControllerPlayerIndex) String added in v0.17.0

func (e ControllerPlayerIndex) String() string

String returns the ControllerPlayerIndex constant's name, or its numeric form when the value is not a known constant.

type ControllerTouchpad added in v0.17.0

type ControllerTouchpad struct {
	ControllerElement
}

ControllerTouchpad is an idiomatic wrapper over the Objective-C class GCControllerTouchpad.

It embeds ControllerElement, promoting that type's methods.

A control element that represents a touch event on a touchpad.

func ControllerTouchpadFromID added in v0.17.0

func ControllerTouchpadFromID(id objc.ID) *ControllerTouchpad

ControllerTouchpadFromID adopts an existing Objective-C object as a ControllerTouchpad (nil for 0), retaining it and registering a release finalizer.

func NewControllerTouchpad added in v0.17.0

func NewControllerTouchpad() *ControllerTouchpad

NewControllerTouchpad creates a new ControllerTouchpad.

func (*ControllerTouchpad) Button added in v0.17.0

Button returns button is the button built into the touch surface.

func (*ControllerTouchpad) ReportsAbsoluteTouchSurfaceValues added in v0.17.0

func (ct *ControllerTouchpad) ReportsAbsoluteTouchSurfaceValues() bool

ReportsAbsoluteTouchSurfaceValues reports whether 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 false; 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 true; 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 true, meaning the touch surface's raw positional values are reported.

func (*ControllerTouchpad) SetValueForXAxisYAxisTouchDownButtonValue added in v0.17.0

func (ct *ControllerTouchpad) SetValueForXAxisYAxisTouchDownButtonValue(xAxis float32, yAxis float32, touchDown bool, buttonValue float32)

SetValueForXAxisYAxisTouchDownButtonValue sets the input values of a snapshot of a touchpad.

func (*ControllerTouchpad) TouchState added in v0.17.0

func (ct *ControllerTouchpad) TouchState() TouchState

TouchState indicates the current state of the touch event on the touchpad.

func (*ControllerTouchpad) TouchSurface added in v0.17.0

func (ct *ControllerTouchpad) TouchSurface() *ControllerDirectionPad

TouchSurface returns 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.

func (*ControllerTouchpad) WithLocalizedName added in v0.17.0

func (ct *ControllerTouchpad) WithLocalizedName(localizedName string) *ControllerTouchpad

WithLocalizedName sets the localized name for the element or the remapped element.

func (*ControllerTouchpad) WithPreferredSystemGestureState added in v0.17.0

func (ct *ControllerTouchpad) WithPreferredSystemGestureState(preferredSystemGestureState SystemGestureState) *ControllerTouchpad

WithPreferredSystemGestureState sets the preferred state for handling input when the user binds the element to a system gesture.

func (*ControllerTouchpad) WithReportsAbsoluteTouchSurfaceValues added in v0.17.0

func (ct *ControllerTouchpad) WithReportsAbsoluteTouchSurfaceValues(reportsAbsoluteTouchSurfaceValues bool) *ControllerTouchpad

WithReportsAbsoluteTouchSurfaceValues sets a Boolean value that determines whether the touch values are absolute or relative.

func (*ControllerTouchpad) WithSfSymbolsName added in v0.17.0

func (ct *ControllerTouchpad) WithSfSymbolsName(sfSymbolsName string) *ControllerTouchpad

WithSfSymbolsName sets a system symbol for the element or the remapped element.

func (*ControllerTouchpad) WithTouchDown added in v0.18.0

func (ct *ControllerTouchpad) WithTouchDown(touchDown func(obj.Object, float32, float32, float32, bool)) *ControllerTouchpad

WithTouchDown sets the block that the element calls when the user begins touching the touchpad.

func (*ControllerTouchpad) WithTouchMoved added in v0.18.0

func (ct *ControllerTouchpad) WithTouchMoved(touchMoved func(obj.Object, float32, float32, float32, bool)) *ControllerTouchpad

WithTouchMoved sets the block that the element calls when the user continues touching the touchpad, not when the user begins or ends touching the touchpad.

func (*ControllerTouchpad) WithTouchUp added in v0.18.0

func (ct *ControllerTouchpad) WithTouchUp(touchUp func(obj.Object, float32, float32, float32, bool)) *ControllerTouchpad

WithTouchUp sets the block that the element calls when the user finishes touching the touchpad.

func (*ControllerTouchpad) WithUnmappedLocalizedName added in v0.17.0

func (ct *ControllerTouchpad) WithUnmappedLocalizedName(unmappedLocalizedName string) *ControllerTouchpad

WithUnmappedLocalizedName sets the element’s localized name, not the remapped name.

func (*ControllerTouchpad) WithUnmappedSfSymbolsName added in v0.17.0

func (ct *ControllerTouchpad) WithUnmappedSfSymbolsName(unmappedSfSymbolsName string) *ControllerTouchpad

WithUnmappedSfSymbolsName sets the element’s system symbol, not the remapped symbol.

type Device added in v0.17.0

type Device interface {
}

Device is the Go form of the Objective-C protocol GCDevice.

type DeviceBattery added in v0.17.0

type DeviceBattery struct {
	objref.Handle
}

DeviceBattery is an idiomatic wrapper over the Objective-C class GCDeviceBattery.

The charge level and state of a device’s battery.

func DeviceBatteryFromID added in v0.17.0

func DeviceBatteryFromID(id objc.ID) *DeviceBattery

DeviceBatteryFromID adopts an existing Objective-C object as a DeviceBattery (nil for 0), retaining it and registering a release finalizer.

func NewDeviceBattery added in v0.17.0

func NewDeviceBattery() *DeviceBattery

NewDeviceBattery creates a new DeviceBattery.

func (*DeviceBattery) BatteryLevel added in v0.17.0

func (db *DeviceBattery) BatteryLevel() float32

BatteryLevel returns 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 (*DeviceBattery) BatteryState added in v0.17.0

func (db *DeviceBattery) BatteryState() DeviceBatteryState

BatteryState returns a battery state for controller, defaults to GCControllerBatteryStateUnknown

func (*DeviceBattery) Description added in v0.17.0

func (db *DeviceBattery) Description() string

Description returns the object's -description text.

func (*DeviceBattery) IsEqual added in v0.17.0

func (db *DeviceBattery) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DeviceBattery) IsKind added in v0.17.0

func (db *DeviceBattery) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DeviceBattery) String added in v0.17.0

func (db *DeviceBattery) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type DeviceBatteryState added in v0.17.0

type DeviceBatteryState int64

A state that indicates whether a device’s battery has power and is charging.

const (
	DeviceBatteryStateUnknown     DeviceBatteryState = -1
	DeviceBatteryStateDischarging DeviceBatteryState = 0
	DeviceBatteryStateCharging    DeviceBatteryState = 1
	DeviceBatteryStateFull        DeviceBatteryState = 2
)

func (DeviceBatteryState) String added in v0.17.0

func (e DeviceBatteryState) String() string

String returns the DeviceBatteryState constant's name, or its numeric form when the value is not a known constant.

type DeviceCursor added in v0.17.0

type DeviceCursor struct {
	ControllerDirectionPad
}

DeviceCursor is an idiomatic wrapper over the Objective-C class GCDeviceCursor.

It embeds ControllerDirectionPad, promoting that type's methods.

A control element for the cursor used as a directional pad.

func DeviceCursorFromID added in v0.17.0

func DeviceCursorFromID(id objc.ID) *DeviceCursor

DeviceCursorFromID adopts an existing Objective-C object as a DeviceCursor (nil for 0), retaining it and registering a release finalizer.

func NewDeviceCursor added in v0.17.0

func NewDeviceCursor() *DeviceCursor

NewDeviceCursor creates a new DeviceCursor.

func (*DeviceCursor) WithLocalizedName added in v0.17.0

func (dc *DeviceCursor) WithLocalizedName(localizedName string) *DeviceCursor

WithLocalizedName sets the localized name for the element or the remapped element.

func (*DeviceCursor) WithPreferredSystemGestureState added in v0.17.0

func (dc *DeviceCursor) WithPreferredSystemGestureState(preferredSystemGestureState SystemGestureState) *DeviceCursor

WithPreferredSystemGestureState sets the preferred state for handling input when the user binds the element to a system gesture.

func (*DeviceCursor) WithSfSymbolsName added in v0.17.0

func (dc *DeviceCursor) WithSfSymbolsName(sfSymbolsName string) *DeviceCursor

WithSfSymbolsName sets a system symbol for the element or the remapped element.

func (*DeviceCursor) WithUnmappedLocalizedName added in v0.17.0

func (dc *DeviceCursor) WithUnmappedLocalizedName(unmappedLocalizedName string) *DeviceCursor

WithUnmappedLocalizedName sets the element’s localized name, not the remapped name.

func (*DeviceCursor) WithUnmappedSfSymbolsName added in v0.17.0

func (dc *DeviceCursor) WithUnmappedSfSymbolsName(unmappedSfSymbolsName string) *DeviceCursor

WithUnmappedSfSymbolsName sets the element’s system symbol, not the remapped symbol.

func (*DeviceCursor) WithValueChangedHandler added in v0.18.0

func (dc *DeviceCursor) WithValueChangedHandler(valueChangedHandler func(obj.Object, float32, float32)) *DeviceCursor

WithValueChangedHandler sets the block that the directional pad calls when the user changes its values.

type DeviceHaptics added in v0.17.0

type DeviceHaptics struct {
	objref.Handle
}

DeviceHaptics is an idiomatic wrapper over the Objective-C class GCDeviceHaptics.

The locations of haptic actuators on a game controller.

func DeviceHapticsFromID added in v0.17.0

func DeviceHapticsFromID(id objc.ID) *DeviceHaptics

DeviceHapticsFromID adopts an existing Objective-C object as a DeviceHaptics (nil for 0), retaining it and registering a release finalizer.

func NewDeviceHaptics added in v0.17.0

func NewDeviceHaptics() *DeviceHaptics

NewDeviceHaptics creates a new DeviceHaptics.

func (*DeviceHaptics) CreateEngineWithLocality added in v0.17.0

func (dh *DeviceHaptics) CreateEngineWithLocality(locality obj.Object) obj.Object

CreateEngineWithLocality creates a haptics engine with the specified locality.

func (*DeviceHaptics) Description added in v0.17.0

func (dh *DeviceHaptics) Description() string

Description returns the object's -description text.

func (*DeviceHaptics) IsEqual added in v0.17.0

func (dh *DeviceHaptics) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DeviceHaptics) IsKind added in v0.17.0

func (dh *DeviceHaptics) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DeviceHaptics) String added in v0.17.0

func (dh *DeviceHaptics) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*DeviceHaptics) SupportedLocalities added in v0.17.0

func (dh *DeviceHaptics) SupportedLocalities() []*foundation.String

SupportedLocalities returns the set of supported haptic localities for this device - representing the locations of its haptic actuators.

type DeviceLight added in v0.17.0

type DeviceLight struct {
	objref.Handle
}

DeviceLight is an idiomatic wrapper over the Objective-C class GCDeviceLight.

The colored light on a device.

func DeviceLightFromID added in v0.17.0

func DeviceLightFromID(id objc.ID) *DeviceLight

DeviceLightFromID adopts an existing Objective-C object as a DeviceLight (nil for 0), retaining it and registering a release finalizer.

func NewDeviceLight added in v0.17.0

func NewDeviceLight() *DeviceLight

NewDeviceLight creates a new DeviceLight.

func (*DeviceLight) Color added in v0.17.0

func (dl *DeviceLight) Color() *Color

Color returns the color.

func (*DeviceLight) Description added in v0.17.0

func (dl *DeviceLight) Description() string

Description returns the object's -description text.

func (*DeviceLight) IsEqual added in v0.17.0

func (dl *DeviceLight) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*DeviceLight) IsKind added in v0.17.0

func (dl *DeviceLight) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*DeviceLight) String added in v0.17.0

func (dl *DeviceLight) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*DeviceLight) WithColor added in v0.17.0

func (dl *DeviceLight) WithColor(color *Color) *DeviceLight

WithColor sets the color of a device’s light.

type DevicePhysicalInput added in v0.17.0

type DevicePhysicalInput interface {
}

DevicePhysicalInput is the Go form of the Objective-C protocol GCDevicePhysicalInput.

type DevicePhysicalInputElementChange added in v0.17.0

type DevicePhysicalInputElementChange 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.
	DevicePhysicalInputElementUnknownChange DevicePhysicalInputElementChange = -1
	// There’s no change to the input value.
	DevicePhysicalInputElementNoChange DevicePhysicalInputElementChange = 0
	// There’s a change to the input value.
	DevicePhysicalInputElementChanged DevicePhysicalInputElementChange = 1
)

func (DevicePhysicalInputElementChange) String added in v0.17.0

String returns the DevicePhysicalInputElementChange constant's name, or its numeric form when the value is not a known constant.

type DevicePhysicalInputState added in v0.17.0

type DevicePhysicalInputState interface {
	ObjectForKeyedSubscript(key string) obj.Object
	Device() obj.Object
	LastEventTimestamp() float64
	LastEventLatency() float64
	Elements() obj.Object
	Buttons() obj.Object
	Axes() obj.Object
	Switches() obj.Object
	Dpads() obj.Object
}

DevicePhysicalInputState is the Go form of the Objective-C protocol GCDevicePhysicalInputState.

type DevicePhysicalInputStateDiff added in v0.17.0

type DevicePhysicalInputStateDiff interface {
	ChangeForElement(element obj.Object) DevicePhysicalInputElementChange
	ChangedElements() obj.Object
}

DevicePhysicalInputStateDiff is the Go form of the Objective-C protocol GCDevicePhysicalInputStateDiff.

type DirectionPadElement added in v0.17.0

type DirectionPadElement interface {
	XyAxes() obj.Object
	XAxis() obj.Object
	YAxis() obj.Object
	Up() obj.Object
	Down() obj.Object
	Left() obj.Object
	Right() obj.Object
}

DirectionPadElement is the Go form of the Objective-C protocol GCDirectionPadElement.

type DirectionPadElementName added in v0.17.0

type DirectionPadElementName interface {
}

DirectionPadElementName is the Go form of the Objective-C protocol GCDirectionPadElementName.

type DirectionalGamepad added in v0.17.0

type DirectionalGamepad struct {
	MicroGamepad
}

DirectionalGamepad is an idiomatic wrapper over the Objective-C class GCDirectionalGamepad.

It embeds MicroGamepad, promoting that type's methods.

A profile that supports only the directional pad, without motion or rotation.

func DirectionalGamepadFromID added in v0.17.0

func DirectionalGamepadFromID(id objc.ID) *DirectionalGamepad

DirectionalGamepadFromID adopts an existing Objective-C object as a DirectionalGamepad (nil for 0), retaining it and registering a release finalizer.

func NewDirectionalGamepad added in v0.17.0

func NewDirectionalGamepad() *DirectionalGamepad

NewDirectionalGamepad creates a new DirectionalGamepad.

func (*DirectionalGamepad) WithAllowsRotation added in v0.17.0

func (dg *DirectionalGamepad) WithAllowsRotation(allowsRotation bool) *DirectionalGamepad

WithAllowsRotation sets a Boolean value that indicates whether the profile reports the directional pad values relative to its current orientation.

func (*DirectionalGamepad) WithReportsAbsoluteDpadValues added in v0.17.0

func (dg *DirectionalGamepad) WithReportsAbsoluteDpadValues(reportsAbsoluteDpadValues bool) *DirectionalGamepad

WithReportsAbsoluteDpadValues sets a Boolean value that indicates whether the directional pad reports absolute or relative values.

func (*DirectionalGamepad) WithValueChangedHandler added in v0.18.0

func (dg *DirectionalGamepad) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *DirectionalGamepad

WithValueChangedHandler sets the block that this profile calls when an element’s value changes.

func (*DirectionalGamepad) WithValueDidChangeHandler added in v0.17.0

func (dg *DirectionalGamepad) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *DirectionalGamepad

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type DispatchAutoreleaseFrequency added in v0.17.0

type DispatchAutoreleaseFrequency uint64
const (
	DispatchAutoreleaseFrequencyInherit  DispatchAutoreleaseFrequency = 0
	DispatchAutoreleaseFrequencyWorkItem DispatchAutoreleaseFrequency = 1
	DispatchAutoreleaseFrequencyNever    DispatchAutoreleaseFrequency = 2
)

func (DispatchAutoreleaseFrequency) String added in v0.17.0

String returns the DispatchAutoreleaseFrequency constant's name, or its numeric form when the value is not a known constant.

type DispatchBlockFlags added in v0.17.0

type DispatchBlockFlags uint64

Bitmask — values may be combined with |.

const (
	DispatchBlockFlagsBarrier         DispatchBlockFlags = 1
	DispatchBlockFlagsDetached        DispatchBlockFlags = 2
	DispatchBlockFlagsAssignCurrent   DispatchBlockFlags = 4
	DispatchBlockFlagsNoQosClass      DispatchBlockFlags = 8
	DispatchBlockFlagsInheritQosClass DispatchBlockFlags = 16
	DispatchBlockFlagsEnforceQosClass DispatchBlockFlags = 32
)

func (DispatchBlockFlags) String added in v0.17.0

func (e DispatchBlockFlags) String() string

String returns the DispatchBlockFlags constant's name, or its numeric form when the value is not a known constant.

type DualSenseAdaptiveTrigger added in v0.17.0

type DualSenseAdaptiveTrigger struct {
	ControllerButtonInput
}

DualSenseAdaptiveTrigger is an idiomatic wrapper over the Objective-C class GCDualSenseAdaptiveTrigger.

It embeds ControllerButtonInput, promoting that type's methods.

A class that encapsulates the features of a DualSense adaptive trigger.

func DualSenseAdaptiveTriggerFromID added in v0.17.0

func DualSenseAdaptiveTriggerFromID(id objc.ID) *DualSenseAdaptiveTrigger

DualSenseAdaptiveTriggerFromID adopts an existing Objective-C object as a DualSenseAdaptiveTrigger (nil for 0), retaining it and registering a release finalizer.

func NewDualSenseAdaptiveTrigger added in v0.17.0

func NewDualSenseAdaptiveTrigger() *DualSenseAdaptiveTrigger

NewDualSenseAdaptiveTrigger creates a new DualSenseAdaptiveTrigger.

func (*DualSenseAdaptiveTrigger) ArmPosition added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) ArmPosition() float32

ArmPosition returns a normalized float from [0-1], with 0 representing the lowest possible trigger arm position and 1 representing the maximum trigger arm position.

func (*DualSenseAdaptiveTrigger) Mode added in v0.17.0

Mode returns 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...].

func (*DualSenseAdaptiveTrigger) SetModeFeedbackWithResistiveStrengths added in v0.18.1

func (dsat *DualSenseAdaptiveTrigger) SetModeFeedbackWithResistiveStrengths(positionalResistiveStrengths GCDualSenseAdaptiveTriggerPositionalResistiveStrengths)

SetModeFeedbackWithResistiveStrengths sets the mode to provide feedback with the specified strengths for each possible trigger position.

func (*DualSenseAdaptiveTrigger) SetModeFeedbackWithStartPositionResistiveStrength added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) SetModeFeedbackWithStartPositionResistiveStrength(startPosition float32, resistiveStrength float32)

SetModeFeedbackWithStartPositionResistiveStrength sets the mode to provide feedback when the user depresses the trigger at the start position or at a greater value.

func (*DualSenseAdaptiveTrigger) SetModeOff added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) SetModeOff()

SetModeOff sets the mode to off and stops any trigger effect.

func (*DualSenseAdaptiveTrigger) SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength(startPosition float32, endPosition float32, startStrength float32, endStrength float32)

SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength sets the mode to provide feedback when the user tilts the trigger between the start and the end positions.

func (*DualSenseAdaptiveTrigger) SetModeVibrationWithAmplitudesFrequency added in v0.18.1

func (dsat *DualSenseAdaptiveTrigger) SetModeVibrationWithAmplitudesFrequency(positionalAmplitudes GCDualSenseAdaptiveTriggerPositionalAmplitudes, frequency float32)

SetModeVibrationWithAmplitudesFrequency sets the mode to vibrate with the specified amplitudes for each possible trigger position.

func (*DualSenseAdaptiveTrigger) SetModeVibrationWithStartPositionAmplitudeFrequency added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) SetModeVibrationWithStartPositionAmplitudeFrequency(startPosition float32, amplitude float32, frequency float32)

SetModeVibrationWithStartPositionAmplitudeFrequency sets the mode to vibrate when the user depresses the trigger at the start position or at a greater value.

func (*DualSenseAdaptiveTrigger) SetModeWeaponWithStartPositionEndPositionResistiveStrength added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) SetModeWeaponWithStartPositionEndPositionResistiveStrength(startPosition float32, endPosition float32, resistiveStrength float32)

SetModeWeaponWithStartPositionEndPositionResistiveStrength sets the mode to provide feedback when the user depresses the trigger between the start and the end positions.

func (*DualSenseAdaptiveTrigger) Status added in v0.17.0

Status returns 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.

func (*DualSenseAdaptiveTrigger) WithLocalizedName added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) WithLocalizedName(localizedName string) *DualSenseAdaptiveTrigger

WithLocalizedName sets the localized name for the element or the remapped element.

func (*DualSenseAdaptiveTrigger) WithPreferredSystemGestureState added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) WithPreferredSystemGestureState(preferredSystemGestureState SystemGestureState) *DualSenseAdaptiveTrigger

WithPreferredSystemGestureState sets the preferred state for handling input when the user binds the element to a system gesture.

func (*DualSenseAdaptiveTrigger) WithPressedChangedHandler added in v0.18.0

func (dsat *DualSenseAdaptiveTrigger) WithPressedChangedHandler(pressedChangedHandler func(obj.Object, float32, bool)) *DualSenseAdaptiveTrigger

WithPressedChangedHandler sets the block that the element calls when the user presses or releases the button.

func (*DualSenseAdaptiveTrigger) WithSfSymbolsName added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) WithSfSymbolsName(sfSymbolsName string) *DualSenseAdaptiveTrigger

WithSfSymbolsName sets a system symbol for the element or the remapped element.

func (*DualSenseAdaptiveTrigger) WithTouchedChangedHandler added in v0.18.0

func (dsat *DualSenseAdaptiveTrigger) WithTouchedChangedHandler(touchedChangedHandler func(obj.Object, float32, bool, bool)) *DualSenseAdaptiveTrigger

WithTouchedChangedHandler sets the block that the element calls when the user touches the button.

func (*DualSenseAdaptiveTrigger) WithUnmappedLocalizedName added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) WithUnmappedLocalizedName(unmappedLocalizedName string) *DualSenseAdaptiveTrigger

WithUnmappedLocalizedName sets the element’s localized name, not the remapped name.

func (*DualSenseAdaptiveTrigger) WithUnmappedSfSymbolsName added in v0.17.0

func (dsat *DualSenseAdaptiveTrigger) WithUnmappedSfSymbolsName(unmappedSfSymbolsName string) *DualSenseAdaptiveTrigger

WithUnmappedSfSymbolsName sets the element’s system symbol, not the remapped symbol.

func (*DualSenseAdaptiveTrigger) WithValue added in v0.17.0

WithValue sets the level of pressure the user is applying to the button.

func (*DualSenseAdaptiveTrigger) WithValueChangedHandler added in v0.18.0

func (dsat *DualSenseAdaptiveTrigger) WithValueChangedHandler(valueChangedHandler func(obj.Object, float32, bool)) *DualSenseAdaptiveTrigger

WithValueChangedHandler sets the block that the element calls when the user changes the level of pressure on the button.

type DualSenseAdaptiveTriggerMode added in v0.17.0

type DualSenseAdaptiveTriggerMode int64

The possible modes of an adaptive trigger.

const (
	// The adaptive trigger effect is disabled.
	DualSenseAdaptiveTriggerModeOff DualSenseAdaptiveTriggerMode = 0
	// The adaptive trigger effect provides constant feedback from the start position onwards.
	DualSenseAdaptiveTriggerModeFeedback DualSenseAdaptiveTriggerMode = 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.
	DualSenseAdaptiveTriggerModeWeapon DualSenseAdaptiveTriggerMode = 2
	// The adaptive trigger effect provides a constant vibration effect from the start position onwards.
	DualSenseAdaptiveTriggerModeVibration DualSenseAdaptiveTriggerMode = 3
	// The adaptive trigger effect provides feedback from the start position to the end position, linearly interpolated between the start and end strengths.
	DualSenseAdaptiveTriggerModeSlopeFeedback DualSenseAdaptiveTriggerMode = 4
)

func (DualSenseAdaptiveTriggerMode) String added in v0.17.0

String returns the DualSenseAdaptiveTriggerMode constant's name, or its numeric form when the value is not a known constant.

type DualSenseAdaptiveTriggerStatus added in v0.17.0

type DualSenseAdaptiveTriggerStatus int64

The possible states of an adaptive trigger.

const (
	// The adaptive trigger status cannot be determined.
	DualSenseAdaptiveTriggerStatusUnknown DualSenseAdaptiveTriggerStatus = -1
	// The adaptive trigger is in feedback mode, and a resistive load has not been applied yet.
	DualSenseAdaptiveTriggerStatusFeedbackNoLoad DualSenseAdaptiveTriggerStatus = 0
	// The adaptive trigger is in feedback mode, and a resistive load is applied.
	DualSenseAdaptiveTriggerStatusFeedbackLoadApplied DualSenseAdaptiveTriggerStatus = 1
	// The adaptive trigger is in weapon mode, the trigger is ready to fire, and a resistive load has not been applied yet.
	DualSenseAdaptiveTriggerStatusWeaponReady DualSenseAdaptiveTriggerStatus = 2
	// The adaptive trigger is in weapon mode, the trigger is firing, and a resistive load is currently being applied.
	DualSenseAdaptiveTriggerStatusWeaponFiring DualSenseAdaptiveTriggerStatus = 3
	// The adaptive trigger is in weapon mode, the trigger has fired, and a resistive load is no longer being applied.
	DualSenseAdaptiveTriggerStatusWeaponFired DualSenseAdaptiveTriggerStatus = 4
	// The adaptive trigger is in vibration mode, and the trigger is not vibrating.
	DualSenseAdaptiveTriggerStatusVibrationNotVibrating DualSenseAdaptiveTriggerStatus = 5
	// The adaptive trigger is in vibration mode, and the trigger is currently vibrating.
	DualSenseAdaptiveTriggerStatusVibrationIsVibrating DualSenseAdaptiveTriggerStatus = 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.
	DualSenseAdaptiveTriggerStatusSlopeFeedbackReady DualSenseAdaptiveTriggerStatus = 7
	// The adaptive trigger is in slope feedback mode, and a resistive load is currently being applied to the trigger.
	DualSenseAdaptiveTriggerStatusSlopeFeedbackApplyingLoad DualSenseAdaptiveTriggerStatus = 8
	// The adaptive trigger is in slope feedback mode, a resistive load has previously been applied, but is no longer being applied.
	DualSenseAdaptiveTriggerStatusSlopeFeedbackFinished DualSenseAdaptiveTriggerStatus = 9
)

func (DualSenseAdaptiveTriggerStatus) String added in v0.17.0

String returns the DualSenseAdaptiveTriggerStatus constant's name, or its numeric form when the value is not a known constant.

type DualSenseGamepad added in v0.17.0

type DualSenseGamepad struct {
	ExtendedGamepad
}

DualSenseGamepad is an idiomatic wrapper over the Objective-C class GCDualSenseGamepad.

It embeds ExtendedGamepad, promoting that type's methods.

A controller profile that supported the DualSense controller.

func DualSenseGamepadFromID added in v0.17.0

func DualSenseGamepadFromID(id objc.ID) *DualSenseGamepad

DualSenseGamepadFromID adopts an existing Objective-C object as a DualSenseGamepad (nil for 0), retaining it and registering a release finalizer.

func NewDualSenseGamepad added in v0.17.0

func NewDualSenseGamepad() *DualSenseGamepad

NewDualSenseGamepad creates a new DualSenseGamepad.

func (*DualSenseGamepad) TouchpadButton added in v0.17.0

func (dsg *DualSenseGamepad) TouchpadButton() *ControllerButtonInput

TouchpadButton returns dualSense controllers have a touchpad with a button and two-finger tracking.

func (*DualSenseGamepad) TouchpadPrimary added in v0.17.0

func (dsg *DualSenseGamepad) TouchpadPrimary() *ControllerDirectionPad

TouchpadPrimary returns the touchpad primary.

func (*DualSenseGamepad) TouchpadSecondary added in v0.17.0

func (dsg *DualSenseGamepad) TouchpadSecondary() *ControllerDirectionPad

TouchpadSecondary returns the touchpad secondary.

func (*DualSenseGamepad) WithValueChangedHandler added in v0.18.0

func (dsg *DualSenseGamepad) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *DualSenseGamepad

WithValueChangedHandler sets the block that the profile calls when an element’s value changes.

func (*DualSenseGamepad) WithValueDidChangeHandler added in v0.17.0

func (dsg *DualSenseGamepad) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *DualSenseGamepad

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type DualShockGamepad added in v0.17.0

type DualShockGamepad struct {
	ExtendedGamepad
}

DualShockGamepad is an idiomatic wrapper over the Objective-C class GCDualShockGamepad.

It embeds ExtendedGamepad, promoting that type's methods.

A controller profile that supports the DualShock 4 controller.

func DualShockGamepadFromID added in v0.17.0

func DualShockGamepadFromID(id objc.ID) *DualShockGamepad

DualShockGamepadFromID adopts an existing Objective-C object as a DualShockGamepad (nil for 0), retaining it and registering a release finalizer.

func NewDualShockGamepad added in v0.17.0

func NewDualShockGamepad() *DualShockGamepad

NewDualShockGamepad creates a new DualShockGamepad.

func (*DualShockGamepad) TouchpadButton added in v0.17.0

func (dsg *DualShockGamepad) TouchpadButton() *ControllerButtonInput

TouchpadButton returns dualShock controllers have a touchpad with a button and two-finger tracking.

func (*DualShockGamepad) TouchpadPrimary added in v0.17.0

func (dsg *DualShockGamepad) TouchpadPrimary() *ControllerDirectionPad

TouchpadPrimary returns the touchpad primary.

func (*DualShockGamepad) TouchpadSecondary added in v0.17.0

func (dsg *DualShockGamepad) TouchpadSecondary() *ControllerDirectionPad

TouchpadSecondary returns the touchpad secondary.

func (*DualShockGamepad) WithValueChangedHandler added in v0.18.0

func (dsg *DualShockGamepad) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *DualShockGamepad

WithValueChangedHandler sets the block that the profile calls when an element’s value changes.

func (*DualShockGamepad) WithValueDidChangeHandler added in v0.17.0

func (dsg *DualShockGamepad) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *DualShockGamepad

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type EntryID added in v0.17.0

type EntryID int32
const (
	EntryIDFirstEntry EntryID = 0
	EntryIDNextEntry  EntryID = -1
	EntryIDLastEntry  EntryID = -2
)

func (EntryID) String added in v0.17.0

func (e EntryID) String() string

String returns the EntryID constant's name, or its numeric form when the value is not a known constant.

type EvCmd

type EvCmd int32
const (
	EVNOP   EvCmd = 0
	EVHIDE  EvCmd = 1
	EVSHOW  EvCmd = 2
	EVMOVE  EvCmd = 3
	EVLEVEL EvCmd = 4
)

func (EvCmd) String

func (e EvCmd) String() string

String returns the EvCmd constant's name, or its numeric form when the value is not a known constant.

type EventViewController added in v0.17.0

type EventViewController struct {
	objref.Handle
}

EventViewController is an idiomatic wrapper over the Objective-C class GCEventViewController.

A view controller that delivers input either from the responder chain to views, or from game controllers to profiles.

func EventViewControllerFromID added in v0.17.0

func EventViewControllerFromID(id objc.ID) *EventViewController

EventViewControllerFromID adopts an existing Objective-C object as a EventViewController (nil for 0), retaining it and registering a release finalizer.

func NewEventViewController added in v0.17.0

func NewEventViewController() *EventViewController

NewEventViewController creates a new EventViewController.

func (*EventViewController) ControllerUserInteractionEnabled added in v0.17.0

func (evc *EventViewController) ControllerUserInteractionEnabled() bool

ControllerUserInteractionEnabled wraps the corresponding Objective-C method.

func (*EventViewController) Description added in v0.17.0

func (evc *EventViewController) Description() string

Description returns the object's -description text.

func (*EventViewController) IsEqual added in v0.17.0

func (evc *EventViewController) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*EventViewController) IsKind added in v0.17.0

func (evc *EventViewController) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*EventViewController) String added in v0.17.0

func (evc *EventViewController) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*EventViewController) WithControllerUserInteractionEnabled added in v0.17.0

func (evc *EventViewController) WithControllerUserInteractionEnabled(controllerUserInteractionEnabled bool) *EventViewController

WithControllerUserInteractionEnabled sets a Boolean value that indicates whether the system delivers game controller input to profile objects or to views using the responder chain.

type EvsioEVSIOCCSIndices

type EvsioEVSIOCCSIndices int32
const (
	EvsioEVSIOCCSIndicesX EvsioEVSIOCCSIndices = 0
	EvsioEVSIOCCSIndicesY EvsioEVSIOCCSIndices = 1
)

func (EvsioEVSIOCCSIndices) String

func (e EvsioEVSIOCCSIndices) String() string

String returns the EvsioEVSIOCCSIndices constant's name, or its numeric form when the value is not a known constant.

type EvsioEVSIOSCSIndices

type EvsioEVSIOSCSIndices int32
const (
	EvsioEVSIOSCSIndicesX EvsioEVSIOSCSIndices = 0
	EvsioEVSIOSCSIndicesY EvsioEVSIOSCSIndices = 1
)

func (EvsioEVSIOSCSIndices) String

func (e EvsioEVSIOSCSIndices) String() string

String returns the EvsioEVSIOSCSIndices constant's name, or its numeric form when the value is not a known constant.

type ExtendedGamepad added in v0.17.0

type ExtendedGamepad struct {
	PhysicalInputProfile
}

ExtendedGamepad is an idiomatic wrapper over the Objective-C class GCExtendedGamepad.

ExtendedGamepad is an abstract base — you do not construct it directly. Construct one of DualSenseGamepad, DualShockGamepad, ExtendedGamepadSnapshot, XboxGamepad and pass it where a ExtendedGamepad is accepted.

A controller profile that supports the extended set of gamepad controls.

func ExtendedGamepadFromID added in v0.17.0

func ExtendedGamepadFromID(id objc.ID) *ExtendedGamepad

ExtendedGamepadFromID adopts an existing Objective-C object as a ExtendedGamepad (nil for 0), retaining it and registering a release finalizer.

func (*ExtendedGamepad) ButtonA added in v0.17.0

func (eg *ExtendedGamepad) ButtonA() *ControllerButtonInput

ButtonA returns 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 (*ExtendedGamepad) ButtonB added in v0.17.0

func (eg *ExtendedGamepad) ButtonB() *ControllerButtonInput

ButtonB returns the button b.

func (*ExtendedGamepad) ButtonHome added in v0.17.0

func (eg *ExtendedGamepad) ButtonHome() *ControllerButtonInput

ButtonHome returns 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 (*ExtendedGamepad) ButtonMenu added in v0.17.0

func (eg *ExtendedGamepad) ButtonMenu() *ControllerButtonInput

ButtonMenu returns button menu is the primary menu button, and should be used to enter the main menu and pause the game.

func (*ExtendedGamepad) ButtonOptions added in v0.17.0

func (eg *ExtendedGamepad) ButtonOptions() *ControllerButtonInput

ButtonOptions returns 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 (*ExtendedGamepad) ButtonX added in v0.17.0

func (eg *ExtendedGamepad) ButtonX() *ControllerButtonInput

ButtonX returns the button x.

func (*ExtendedGamepad) ButtonY added in v0.17.0

func (eg *ExtendedGamepad) ButtonY() *ControllerButtonInput

ButtonY returns the button y.

func (*ExtendedGamepad) Controller added in v0.17.0

func (eg *ExtendedGamepad) Controller() *Controller

Controller returns a profile keeps a reference to the controller that this profile is mapping input from.

func (*ExtendedGamepad) Dpad added in v0.17.0

Dpad returns required to be analog in the Extended profile. All the elements of this directional input are thus analog.

func (*ExtendedGamepad) LeftShoulder added in v0.17.0

func (eg *ExtendedGamepad) LeftShoulder() *ControllerButtonInput

LeftShoulder returns shoulder buttons are required to be analog inputs.

func (*ExtendedGamepad) LeftThumbstick added in v0.17.0

func (eg *ExtendedGamepad) LeftThumbstick() *ControllerDirectionPad

LeftThumbstick returns 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 (*ExtendedGamepad) LeftThumbstickButton added in v0.17.0

func (eg *ExtendedGamepad) LeftThumbstickButton() *ControllerButtonInput

LeftThumbstickButton returns a thumbstick may also have a clickable component, which is treated as a non-analog button.

func (*ExtendedGamepad) LeftTrigger added in v0.17.0

func (eg *ExtendedGamepad) LeftTrigger() *ControllerButtonInput

LeftTrigger returns triggers are required to be analog inputs. Common uses would be acceleration and decelleration in a driving game for example.

func (*ExtendedGamepad) RightShoulder added in v0.17.0

func (eg *ExtendedGamepad) RightShoulder() *ControllerButtonInput

RightShoulder returns shoulder buttons are required to be analog inputs.

func (*ExtendedGamepad) RightThumbstick added in v0.17.0

func (eg *ExtendedGamepad) RightThumbstick() *ControllerDirectionPad

RightThumbstick returns 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 (*ExtendedGamepad) RightThumbstickButton added in v0.17.0

func (eg *ExtendedGamepad) RightThumbstickButton() *ControllerButtonInput

RightThumbstickButton returns the right thumbstick button.

func (*ExtendedGamepad) RightTrigger added in v0.17.0

func (eg *ExtendedGamepad) RightTrigger() *ControllerButtonInput

RightTrigger returns the right trigger.

func (*ExtendedGamepad) SaveSnapshot added in v0.17.0

func (eg *ExtendedGamepad) SaveSnapshot() *ExtendedGamepadSnapshot

SaveSnapshot returns saves a snapshot of all of the profile’s elements.

func (*ExtendedGamepad) SetStateFromExtendedGamepad added in v0.17.0

func (eg *ExtendedGamepad) SetStateFromExtendedGamepad(extendedGamepad *ExtendedGamepad)

SetStateFromExtendedGamepad copies the input values from a specified extended gamepad to a snapshot of an extended gamepad.

func (*ExtendedGamepad) WithValueChangedHandler added in v0.18.0

func (eg *ExtendedGamepad) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *ExtendedGamepad

WithValueChangedHandler sets the block that the profile calls when an element’s value changes.

func (*ExtendedGamepad) WithValueDidChangeHandler added in v0.17.0

func (eg *ExtendedGamepad) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *ExtendedGamepad

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type ExtendedGamepadProvider added in v0.17.0

type ExtendedGamepadProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

ExtendedGamepadProvider is accepted wherever a GCExtendedGamepad (or one of its subclasses) is expected.

type ExtendedGamepadSnapshot added in v0.17.0

type ExtendedGamepadSnapshot struct {
	ExtendedGamepad
}

ExtendedGamepadSnapshot is an idiomatic wrapper over the Objective-C class GCExtendedGamepadSnapshot.

It embeds ExtendedGamepad, promoting that type's methods.

A recording of all of the values provided by a GCExtendedGamepad object.

func ExtendedGamepadSnapshotFromID added in v0.17.0

func ExtendedGamepadSnapshotFromID(id objc.ID) *ExtendedGamepadSnapshot

ExtendedGamepadSnapshotFromID adopts an existing Objective-C object as a ExtendedGamepadSnapshot (nil for 0), retaining it and registering a release finalizer.

func NewExtendedGamepadSnapshotWithControllerSnapshotData added in v0.17.0

func NewExtendedGamepadSnapshotWithControllerSnapshotData(controller *Controller, data []byte) *ExtendedGamepadSnapshot

NewExtendedGamepadSnapshotWithControllerSnapshotData initializes a snapshot object associated with a specific controller using a flattened data representation obtained from another snapshot.

func NewExtendedGamepadSnapshotWithSnapshotData added in v0.17.0

func NewExtendedGamepadSnapshotWithSnapshotData(data []byte) *ExtendedGamepadSnapshot

NewExtendedGamepadSnapshotWithSnapshotData initializes a snapshot object with the flattened data representation obtained from another snapshot.

func (*ExtendedGamepadSnapshot) SnapshotData added in v0.17.0

func (egs *ExtendedGamepadSnapshot) SnapshotData() []byte

SnapshotData returns the snapshot data.

func (*ExtendedGamepadSnapshot) WithSnapshotData added in v0.17.0

func (egs *ExtendedGamepadSnapshot) WithSnapshotData(snapshotData []byte) *ExtendedGamepadSnapshot

WithSnapshotData sets flattens a snapshot into an archivable memory representation.

func (*ExtendedGamepadSnapshot) WithValueChangedHandler added in v0.18.0

func (egs *ExtendedGamepadSnapshot) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *ExtendedGamepadSnapshot

WithValueChangedHandler sets the block that the profile calls when an element’s value changes.

func (*ExtendedGamepadSnapshot) WithValueDidChangeHandler added in v0.17.0

func (egs *ExtendedGamepadSnapshot) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *ExtendedGamepadSnapshot

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type ExtendedGamepadSnapshotDataVersion deprecated added in v0.17.0

type ExtendedGamepadSnapshotDataVersion int64

Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

const (
	ExtendedGamepadSnapshotDataVersion1 ExtendedGamepadSnapshotDataVersion = 256
	ExtendedGamepadSnapshotDataVersion2 ExtendedGamepadSnapshotDataVersion = 257
)

func (ExtendedGamepadSnapshotDataVersion) String added in v0.17.0

String returns the ExtendedGamepadSnapshotDataVersion constant's name, or its numeric form when the value is not a known constant.

type FilesecProperty added in v0.17.0

type FilesecProperty int32
const (
	FilesecPropertyOwner        FilesecProperty = 1
	FilesecPropertyGroup        FilesecProperty = 2
	FilesecPropertyUUID         FilesecProperty = 3
	FilesecPropertyMode         FilesecProperty = 4
	FilesecPropertyACL          FilesecProperty = 5
	FilesecPropertyGrpuuid      FilesecProperty = 6
	FilesecPropertyACLRaw       FilesecProperty = 100
	FilesecPropertyACLAllocsize FilesecProperty = 101
)

func (FilesecProperty) String added in v0.17.0

func (e FilesecProperty) String() string

String returns the FilesecProperty constant's name, or its numeric form when the value is not a known constant.

type Flag added in v0.17.0

type Flag int32
const (
	FlagFlagDeferInherit      Flag = 1
	FlagFlagNoInherit         Flag = 131072
	FlagEntryInherited        Flag = 16
	FlagEntryFileInherit      Flag = 32
	FlagEntryDirectoryInherit Flag = 64
	FlagEntryLimitInherit     Flag = 128
	FlagEntryOnlyInherit      Flag = 256
)

func (Flag) String added in v0.17.0

func (e Flag) String() string

String returns the Flag constant's name, or its numeric form when the value is not a known constant.

type GCAcceleration

type GCAcceleration struct {
	X float64
	Y float64
	Z float64
}

A three-dimensional acceleration vector.

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 GCEulerAngles

type GCEulerAngles struct {
	Pitch float64
	Yaw   float64
	Roll  float64
}

A structure that specifies the controller’s attitude as a series of rotations around the x, y, and z axes.

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.

func GCExtendedGamepadSnapShotDataV100FromNSData

func GCExtendedGamepadSnapShotDataV100FromNSData(data []byte) (ok bool, snapshotData GCExtendedGamepadSnapShotDataV100)

GCExtendedGamepadSnapShotDataV100FromNSData calls the GameController framework function GCExtendedGamepadSnapShotDataV100FromNSData.

func NSDataFromGCExtendedGamepadSnapShotDataV100

func NSDataFromGCExtendedGamepadSnapShotDataV100() (result []byte, snapshotData GCExtendedGamepadSnapShotDataV100)

NSDataFromGCExtendedGamepadSnapShotDataV100 calls the GameController framework function NSDataFromGCExtendedGamepadSnapShotDataV100.

type GCExtendedGamepadSnapshotData

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
}

func GCExtendedGamepadSnapshotDataFromNSData

func GCExtendedGamepadSnapshotDataFromNSData(data []byte) (ok bool, snapshotData GCExtendedGamepadSnapshotData)

GCExtendedGamepadSnapshotDataFromNSData calls the GameController framework function GCExtendedGamepadSnapshotDataFromNSData.

func NSDataFromGCExtendedGamepadSnapshotData

func NSDataFromGCExtendedGamepadSnapshotData() (result []byte, snapshotData GCExtendedGamepadSnapshotData)

NSDataFromGCExtendedGamepadSnapshotData calls the GameController framework function NSDataFromGCExtendedGamepadSnapshotData.

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.

func GCGamepadSnapShotDataV100FromNSData

func GCGamepadSnapShotDataV100FromNSData(data []byte) (ok bool, snapshotData GCGamepadSnapShotDataV100)

GCGamepadSnapShotDataV100FromNSData calls the GameController framework function GCGamepadSnapShotDataV100FromNSData.

func NSDataFromGCGamepadSnapShotDataV100

func NSDataFromGCGamepadSnapShotDataV100() (result []byte, snapshotData GCGamepadSnapShotDataV100)

NSDataFromGCGamepadSnapShotDataV100 calls the GameController framework function NSDataFromGCGamepadSnapShotDataV100.

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.

func GCMicroGamepadSnapShotDataV100FromNSData

func GCMicroGamepadSnapShotDataV100FromNSData(data []byte) (ok bool, snapshotData GCMicroGamepadSnapShotDataV100)

GCMicroGamepadSnapShotDataV100FromNSData calls the GameController framework function GCMicroGamepadSnapShotDataV100FromNSData.

func NSDataFromGCMicroGamepadSnapShotDataV100

func NSDataFromGCMicroGamepadSnapShotDataV100() (result []byte, snapshotData GCMicroGamepadSnapShotDataV100)

NSDataFromGCMicroGamepadSnapShotDataV100 calls the GameController framework function NSDataFromGCMicroGamepadSnapShotDataV100.

type GCMicroGamepadSnapshotData

type GCMicroGamepadSnapshotData struct {
	Version uint16
	Size    uint16
	DpadX   float32
	DpadY   float32
	ButtonA float32
	ButtonX float32
}

func GCMicroGamepadSnapshotDataFromNSData

func GCMicroGamepadSnapshotDataFromNSData(data []byte) (ok bool, snapshotData GCMicroGamepadSnapshotData)

GCMicroGamepadSnapshotDataFromNSData calls the GameController framework function GCMicroGamepadSnapshotDataFromNSData.

func NSDataFromGCMicroGamepadSnapshotData

func NSDataFromGCMicroGamepadSnapshotData() (result []byte, snapshotData GCMicroGamepadSnapshotData)

NSDataFromGCMicroGamepadSnapshotData calls the GameController framework function NSDataFromGCMicroGamepadSnapshotData.

type GCPoint2

type GCPoint2 struct {
	X float32
	Y float32
}

A structure that represents a normalized point in a two-dimensional coordinate system.

func GCPoint2Make

func GCPoint2Make(x float32, y float32) GCPoint2

GCPoint2Make calls the GameController framework function GCPoint2Make.

type GCQuaternion

type GCQuaternion struct {
	X float64
	Y float64
	Z float64
	W float64
}

A quaternion that represents a controller’s measurement of attitude.

type GCRotationRate

type GCRotationRate struct {
	X float64
	Y float64
	Z float64
}

A structure that represents rotation rates around the x, y, and z axes.

type Gamepad added in v0.17.0

type Gamepad struct {
	PhysicalInputProfile
}

Gamepad is an idiomatic wrapper over the Objective-C class GCGamepad.

Gamepad is an abstract base — you do not construct it directly. Construct one of GamepadSnapshot and pass it where a Gamepad is accepted.

The standard set of gamepad controls.

func GamepadFromID added in v0.17.0

func GamepadFromID(id objc.ID) *Gamepad

GamepadFromID adopts an existing Objective-C object as a Gamepad (nil for 0), retaining it and registering a release finalizer.

func (*Gamepad) ButtonA added in v0.17.0

func (g *Gamepad) ButtonA() *ControllerButtonInput

ButtonA returns 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 (*Gamepad) ButtonB added in v0.17.0

func (g *Gamepad) ButtonB() *ControllerButtonInput

ButtonB returns the button b.

func (*Gamepad) ButtonX added in v0.17.0

func (g *Gamepad) ButtonX() *ControllerButtonInput

ButtonX returns the button x.

func (*Gamepad) ButtonY added in v0.17.0

func (g *Gamepad) ButtonY() *ControllerButtonInput

ButtonY returns the button y.

func (*Gamepad) Controller added in v0.17.0

func (g *Gamepad) Controller() *Controller

Controller returns a profile keeps a reference to the controller that this profile is mapping input from.

func (*Gamepad) Dpad added in v0.17.0

func (g *Gamepad) Dpad() *ControllerDirectionPad

Dpad returns required to be analog in the Standard profile. All the elements of this directional input are thus analog.

func (*Gamepad) LeftShoulder added in v0.17.0

func (g *Gamepad) LeftShoulder() *ControllerButtonInput

LeftShoulder returns shoulder buttons are required to be analog inputs.

func (*Gamepad) RightShoulder added in v0.17.0

func (g *Gamepad) RightShoulder() *ControllerButtonInput

RightShoulder returns shoulder buttons are required to be analog inputs.

func (*Gamepad) SaveSnapshot added in v0.17.0

func (g *Gamepad) SaveSnapshot() *GamepadSnapshot

SaveSnapshot returns saves a snapshot of all of the profile’s elements.

func (*Gamepad) WithValueChangedHandler added in v0.18.0

func (g *Gamepad) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *Gamepad

WithValueChangedHandler sets a block called when any element in the profile changes.

func (*Gamepad) WithValueDidChangeHandler added in v0.17.0

func (g *Gamepad) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *Gamepad

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type GamepadProvider added in v0.17.0

type GamepadProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

GamepadProvider is accepted wherever a GCGamepad (or one of its subclasses) is expected.

type GamepadSnapshot added in v0.17.0

type GamepadSnapshot struct {
	Gamepad
}

GamepadSnapshot is an idiomatic wrapper over the Objective-C class GCGamepadSnapshot.

It embeds Gamepad, promoting that type's methods.

A recording of all of the values provided by a GCGamepad object.

func GamepadSnapshotFromID added in v0.17.0

func GamepadSnapshotFromID(id objc.ID) *GamepadSnapshot

GamepadSnapshotFromID adopts an existing Objective-C object as a GamepadSnapshot (nil for 0), retaining it and registering a release finalizer.

func NewGamepadSnapshotWithControllerSnapshotData added in v0.17.0

func NewGamepadSnapshotWithControllerSnapshotData(controller *Controller, data []byte) *GamepadSnapshot

NewGamepadSnapshotWithControllerSnapshotData initializes a snapshot object associated with a specific controller using a flattened data representation obtained from another snapshot.

func NewGamepadSnapshotWithSnapshotData added in v0.17.0

func NewGamepadSnapshotWithSnapshotData(data []byte) *GamepadSnapshot

NewGamepadSnapshotWithSnapshotData initializes a snapshot object with the flattened data representation obtained from another snapshot.

func (*GamepadSnapshot) SnapshotData added in v0.17.0

func (gs *GamepadSnapshot) SnapshotData() []byte

SnapshotData returns the snapshot data.

func (*GamepadSnapshot) WithSnapshotData added in v0.17.0

func (gs *GamepadSnapshot) WithSnapshotData(snapshotData []byte) *GamepadSnapshot

WithSnapshotData sets the flattened control input values for the snapshot.

func (*GamepadSnapshot) WithValueChangedHandler added in v0.18.0

func (gs *GamepadSnapshot) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *GamepadSnapshot

WithValueChangedHandler sets a block called when any element in the profile changes.

func (*GamepadSnapshot) WithValueDidChangeHandler added in v0.17.0

func (gs *GamepadSnapshot) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *GamepadSnapshot

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type GearShifterElement added in v0.17.0

type GearShifterElement struct {
	objref.Handle
}

GearShifterElement is an idiomatic wrapper over the Objective-C class GCGearShifterElement.

An element that represents either a pattern or a sequential gear shift.

func GearShifterElementFromID added in v0.17.0

func GearShifterElementFromID(id objc.ID) *GearShifterElement

GearShifterElementFromID adopts an existing Objective-C object as a GearShifterElement (nil for 0), retaining it and registering a release finalizer.

func NewGearShifterElement added in v0.17.0

func NewGearShifterElement() *GearShifterElement

NewGearShifterElement creates a new GearShifterElement.

func (*GearShifterElement) Description added in v0.17.0

func (gse *GearShifterElement) Description() string

Description returns the object's -description text.

func (*GearShifterElement) IsEqual added in v0.17.0

func (gse *GearShifterElement) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*GearShifterElement) IsKind added in v0.17.0

func (gse *GearShifterElement) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*GearShifterElement) String added in v0.17.0

func (gse *GearShifterElement) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type HIDReportCommandType

type HIDReportCommandType int32

Type of the report command for DriverKit driver

const (
	KIOHIDReportCommandSetReport HIDReportCommandType = 0
	KIOHIDReportCommandGetReport HIDReportCommandType = 1
)

func (HIDReportCommandType) String

func (e HIDReportCommandType) String() string

String returns the HIDReportCommandType constant's name, or its numeric form when the value is not a known constant.

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

String returns the IOHIDButtonModes constant's name, or its numeric form when the value is not a known constant.

type IOHIDElementCommitDirection

type IOHIDElementCommitDirection int32

Commit direction passed in to the commit() function of an IOHIDElement.

const (
	KIOHIDElementCommitDirectionIn  IOHIDElementCommitDirection = 0
	KIOHIDElementCommitDirectionOut IOHIDElementCommitDirection = 1
)

func (IOHIDElementCommitDirection) String

String returns the IOHIDElementCommitDirection constant's name, or its numeric form when the value is not a known constant.

type Idtype added in v0.17.0

type Idtype int32
const (
	IdtypeAll  Idtype = 0
	IdtypePid  Idtype = 1
	IdtypePgid Idtype = 2
)

func (Idtype) String added in v0.17.0

func (e Idtype) String() string

String returns the Idtype constant's name, or its numeric form when the value is not a known constant.

type IpcInfoObjectType added in v0.17.0

type IpcInfoObjectType uint32
const (
	IpcInfoObjectTypeNone               IpcInfoObjectType = 0
	IpcInfoObjectTypeThreadControl      IpcInfoObjectType = 1
	IpcInfoObjectTypeTaskControl        IpcInfoObjectType = 2
	IpcInfoObjectTypeHost               IpcInfoObjectType = 3
	IpcInfoObjectTypeHostPriv           IpcInfoObjectType = 4
	IpcInfoObjectTypeProcessor          IpcInfoObjectType = 5
	IpcInfoObjectTypeProcessorSet       IpcInfoObjectType = 6
	IpcInfoObjectTypeProcessorSetName   IpcInfoObjectType = 7
	IpcInfoObjectTypeTimer              IpcInfoObjectType = 8
	IpcInfoObjectTypePortSubstOnce      IpcInfoObjectType = 9
	IpcInfoObjectTypeMig                IpcInfoObjectType = 10
	IpcInfoObjectTypeMemoryObject       IpcInfoObjectType = 11
	IpcInfoObjectTypeXmmPager           IpcInfoObjectType = 12
	IpcInfoObjectTypeXmmKernel          IpcInfoObjectType = 13
	IpcInfoObjectTypeXmmReply           IpcInfoObjectType = 14
	IpcInfoObjectTypeUndReply           IpcInfoObjectType = 15
	IpcInfoObjectTypeHostNotify         IpcInfoObjectType = 16
	IpcInfoObjectTypeHostSecurity       IpcInfoObjectType = 17
	IpcInfoObjectTypeLedger             IpcInfoObjectType = 18
	IpcInfoObjectTypeMainDevice         IpcInfoObjectType = 19
	IpcInfoObjectTypeTaskName           IpcInfoObjectType = 20
	IpcInfoObjectTypeSubsystem          IpcInfoObjectType = 21
	IpcInfoObjectTypeIODoneQueue        IpcInfoObjectType = 22
	IpcInfoObjectTypeSemaphore          IpcInfoObjectType = 23
	IpcInfoObjectTypeLockSet            IpcInfoObjectType = 24
	IpcInfoObjectTypeClock              IpcInfoObjectType = 25
	IpcInfoObjectTypeClockCtrl          IpcInfoObjectType = 26
	IpcInfoObjectTypeIokitIdent         IpcInfoObjectType = 27
	IpcInfoObjectTypeNamedEntry         IpcInfoObjectType = 28
	IpcInfoObjectTypeIokitConnect       IpcInfoObjectType = 29
	IpcInfoObjectTypeIokitObject        IpcInfoObjectType = 30
	IpcInfoObjectTypeUpl                IpcInfoObjectType = 31
	IpcInfoObjectTypeMemObjControl      IpcInfoObjectType = 32
	IpcInfoObjectTypeAuSessionport      IpcInfoObjectType = 33
	IpcInfoObjectTypeFileport           IpcInfoObjectType = 34
	IpcInfoObjectTypeLabelh             IpcInfoObjectType = 35
	IpcInfoObjectTypeTaskResume         IpcInfoObjectType = 36
	IpcInfoObjectTypeVoucher            IpcInfoObjectType = 37
	IpcInfoObjectTypeVoucherAttrControl IpcInfoObjectType = 38
	IpcInfoObjectTypeWorkInterval       IpcInfoObjectType = 39
	IpcInfoObjectTypeUxHandler          IpcInfoObjectType = 40
	IpcInfoObjectTypeUextObject         IpcInfoObjectType = 41
	IpcInfoObjectTypeArcadeReg          IpcInfoObjectType = 42
	IpcInfoObjectTypeEventlink          IpcInfoObjectType = 43
	IpcInfoObjectTypeTaskInspect        IpcInfoObjectType = 44
	IpcInfoObjectTypeTaskRead           IpcInfoObjectType = 45
	IpcInfoObjectTypeThreadInspect      IpcInfoObjectType = 46
	IpcInfoObjectTypeThreadRead         IpcInfoObjectType = 47
	IpcInfoObjectTypeSuidCred           IpcInfoObjectType = 48
	IpcInfoObjectTypeHypervisor         IpcInfoObjectType = 49
	IpcInfoObjectTypeTaskIDToken        IpcInfoObjectType = 50
	IpcInfoObjectTypeTaskFatal          IpcInfoObjectType = 51
	IpcInfoObjectTypeKcdata             IpcInfoObjectType = 52
	IpcInfoObjectTypeExclavesResource   IpcInfoObjectType = 53
	IpcInfoObjectTypeThreadResume       IpcInfoObjectType = 54
	IpcInfoObjectTypeUnknown            IpcInfoObjectType = 4294967295
)

func (IpcInfoObjectType) String added in v0.17.0

func (e IpcInfoObjectType) String() string

String returns the IpcInfoObjectType constant's name, or its numeric form when the value is not a known constant.

type Keyboard added in v0.17.0

type Keyboard struct {
	objref.Handle
}

Keyboard is an idiomatic wrapper over the Objective-C class GCKeyboard.

An object that represents a physical keyboard connected to a device.

func CoalescedKeyboard added in v0.17.0

func CoalescedKeyboard() *Keyboard

CoalescedKeyboard returns 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 KeyboardFromID added in v0.17.0

func KeyboardFromID(id objc.ID) *Keyboard

KeyboardFromID adopts an existing Objective-C object as a Keyboard (nil for 0), retaining it and registering a release finalizer.

func NewKeyboard added in v0.17.0

func NewKeyboard() *Keyboard

NewKeyboard creates a new Keyboard.

func (*Keyboard) Description added in v0.17.0

func (k *Keyboard) Description() string

Description returns the object's -description text.

func (*Keyboard) IsEqual added in v0.17.0

func (k *Keyboard) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Keyboard) IsKind added in v0.17.0

func (k *Keyboard) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Keyboard) KeyboardInput added in v0.17.0

func (k *Keyboard) KeyboardInput() *KeyboardInput

KeyboardInput returns unlike GCController GCKeyboard only has one input profile. This profile allows you to query buttons and button state

func (*Keyboard) String added in v0.17.0

func (k *Keyboard) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type KeyboardInput added in v0.17.0

type KeyboardInput struct {
	PhysicalInputProfile
}

KeyboardInput is an idiomatic wrapper over the Objective-C class GCKeyboardInput.

It embeds PhysicalInputProfile, promoting that type's methods.

A controller profile that uses the keyboard as the input device.

func KeyboardInputFromID added in v0.17.0

func KeyboardInputFromID(id objc.ID) *KeyboardInput

KeyboardInputFromID adopts an existing Objective-C object as a KeyboardInput (nil for 0), retaining it and registering a release finalizer.

func NewKeyboardInput added in v0.17.0

func NewKeyboardInput() *KeyboardInput

NewKeyboardInput creates a new KeyboardInput.

func (*KeyboardInput) ButtonForKeyCode added in v0.17.0

func (ki *KeyboardInput) ButtonForKeyCode(code int) *ControllerButtonInput

ButtonForKeyCode returns the button element for the specified key code.

func (*KeyboardInput) IsAnyKeyPressed added in v0.17.0

func (ki *KeyboardInput) IsAnyKeyPressed() bool

IsAnyKeyPressed reports whether before querying any key for a value it might be useful to check if any key is actually pressed

func (*KeyboardInput) WithKeyChangedHandler added in v0.18.0

func (ki *KeyboardInput) WithKeyChangedHandler(keyChangedHandler func(obj.Object, obj.Object, int, bool)) *KeyboardInput

WithKeyChangedHandler sets the block that the profile calls when the user presses a key.

func (*KeyboardInput) WithValueDidChangeHandler added in v0.17.0

func (ki *KeyboardInput) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *KeyboardInput

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type LaunchDataType added in v0.17.0

type LaunchDataType int32
const (
	LaunchDataTypeDictionary LaunchDataType = 1
	LaunchDataTypeArray      LaunchDataType = 2
	LaunchDataTypeFd         LaunchDataType = 3
	LaunchDataTypeInteger    LaunchDataType = 4
	LaunchDataTypeReal       LaunchDataType = 5
	LaunchDataTypeBool       LaunchDataType = 6
	LaunchDataTypeString     LaunchDataType = 7
	LaunchDataTypeOpaque     LaunchDataType = 8
	LaunchDataTypeErrno      LaunchDataType = 9
	LaunchDataTypeMachport   LaunchDataType = 10
)

func (LaunchDataType) String added in v0.17.0

func (e LaunchDataType) String() string

String returns the LaunchDataType constant's name, or its numeric form when the value is not a known constant.

type LinearInput added in v0.17.0

type LinearInput interface {
	ValueDidChangeHandler() obj.Object
	SetValueDidChangeHandler(valueDidChangeHandler obj.Object)
	Value() float32
	IsAnalog() bool
	CanWrap() bool
	LastValueTimestamp() float64
	LastValueLatency() float64
	PhysicalExtents() obj.Object
	Sources() []obj.Object
}

LinearInput is the Go form of the Objective-C protocol GCLinearInput.

type MDLabelDomain

type MDLabelDomain int32

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

String returns the MDLabelDomain constant's name, or its numeric form when the value is not a known constant.

type MDQueryOptionFlags

type MDQueryOptionFlags int32
const (
	KMDQuerySynchronous        MDQueryOptionFlags = 1
	KMDQueryWantsUpdates       MDQueryOptionFlags = 4
	KMDQueryAllowFSTranslation MDQueryOptionFlags = 8
)

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

String returns the MDQueryOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int32
const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

String returns the MDQuerySortOptionFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlags added in v0.17.0

type MachVMRangeFlags uint64

Bitmask — values may be combined with |.

const (
	MachVMRangeFlagsNone MachVMRangeFlags = 0
)

func (MachVMRangeFlags) String added in v0.17.0

func (e MachVMRangeFlags) String() string

String returns the MachVMRangeFlags constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeFlavor added in v0.17.0

type MachVMRangeFlavor uint32
const (
	MachVMRangeFlavorInvalid MachVMRangeFlavor = 0
	MachVMRangeFlavorV1      MachVMRangeFlavor = 1
)

func (MachVMRangeFlavor) String added in v0.17.0

func (e MachVMRangeFlavor) String() string

String returns the MachVMRangeFlavor constant's name, or its numeric form when the value is not a known constant.

type MachVMRangeTag added in v0.17.0

type MachVMRangeTag uint16
const (
	MachVMRangeTagDefault MachVMRangeTag = 0
	MachVMRangeTagData    MachVMRangeTag = 1
	MachVMRangeTagFixed   MachVMRangeTag = 2
)

func (MachVMRangeTag) String added in v0.17.0

func (e MachVMRangeTag) String() string

String returns the MachVMRangeTag constant's name, or its numeric form when the value is not a known constant.

type MicroGamepad added in v0.17.0

type MicroGamepad struct {
	PhysicalInputProfile
}

MicroGamepad is an idiomatic wrapper over the Objective-C class GCMicroGamepad.

MicroGamepad is an abstract base — you do not construct it directly. Construct one of DirectionalGamepad, MicroGamepadSnapshot and pass it where a MicroGamepad is accepted.

A controller profile that supports the Siri Remote.

func MicroGamepadFromID added in v0.17.0

func MicroGamepadFromID(id objc.ID) *MicroGamepad

MicroGamepadFromID adopts an existing Objective-C object as a MicroGamepad (nil for 0), retaining it and registering a release finalizer.

func (*MicroGamepad) AllowsRotation added in v0.17.0

func (mg *MicroGamepad) AllowsRotation() bool

AllowsRotation reports whether 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 false.

func (*MicroGamepad) ButtonA added in v0.17.0

func (mg *MicroGamepad) ButtonA() *ControllerButtonInput

ButtonA returns 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 (*MicroGamepad) ButtonMenu added in v0.17.0

func (mg *MicroGamepad) ButtonMenu() *ControllerButtonInput

ButtonMenu returns button menu is the primary menu button, and should be used to enter the main menu and pause the game.

func (*MicroGamepad) ButtonX added in v0.17.0

func (mg *MicroGamepad) ButtonX() *ControllerButtonInput

ButtonX returns 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.

func (*MicroGamepad) Controller added in v0.17.0

func (mg *MicroGamepad) Controller() *Controller

Controller returns a profile keeps a reference to the controller that this profile is mapping input from.

func (*MicroGamepad) Dpad added in v0.17.0

Dpad returns optionally analog in the Micro profile. All the elements of this directional input are either analog or digital.

func (*MicroGamepad) ReportsAbsoluteDpadValues added in v0.17.0

func (mg *MicroGamepad) ReportsAbsoluteDpadValues() bool

ReportsAbsoluteDpadValues reports whether 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 false; 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 true; 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 false, meaning a sliding window is used for the dpad.

func (*MicroGamepad) SaveSnapshot added in v0.17.0

func (mg *MicroGamepad) SaveSnapshot() *MicroGamepadSnapshot

SaveSnapshot returns saves a snapshot of all of the profile’s elements.

func (*MicroGamepad) SetStateFromMicroGamepad added in v0.17.0

func (mg *MicroGamepad) SetStateFromMicroGamepad(microGamepad *MicroGamepad)

SetStateFromMicroGamepad copies the input values from a specified micro gamepad to a snapshot of a micro gamepad.

func (*MicroGamepad) WithAllowsRotation added in v0.17.0

func (mg *MicroGamepad) WithAllowsRotation(allowsRotation bool) *MicroGamepad

WithAllowsRotation sets a Boolean value that indicates whether the profile reports the directional pad values relative to its current orientation.

func (*MicroGamepad) WithReportsAbsoluteDpadValues added in v0.17.0

func (mg *MicroGamepad) WithReportsAbsoluteDpadValues(reportsAbsoluteDpadValues bool) *MicroGamepad

WithReportsAbsoluteDpadValues sets a Boolean value that indicates whether the directional pad reports absolute or relative values.

func (*MicroGamepad) WithValueChangedHandler added in v0.18.0

func (mg *MicroGamepad) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *MicroGamepad

WithValueChangedHandler sets the block that this profile calls when an element’s value changes.

func (*MicroGamepad) WithValueDidChangeHandler added in v0.17.0

func (mg *MicroGamepad) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *MicroGamepad

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type MicroGamepadProvider added in v0.17.0

type MicroGamepadProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

MicroGamepadProvider is accepted wherever a GCMicroGamepad (or one of its subclasses) is expected.

type MicroGamepadSnapshot added in v0.17.0

type MicroGamepadSnapshot struct {
	MicroGamepad
}

MicroGamepadSnapshot is an idiomatic wrapper over the Objective-C class GCMicroGamepadSnapshot.

It embeds MicroGamepad, promoting that type's methods.

A recording of all of the values provided by a GCMicroGamepad object.

func MicroGamepadSnapshotFromID added in v0.17.0

func MicroGamepadSnapshotFromID(id objc.ID) *MicroGamepadSnapshot

MicroGamepadSnapshotFromID adopts an existing Objective-C object as a MicroGamepadSnapshot (nil for 0), retaining it and registering a release finalizer.

func NewMicroGamepadSnapshotWithControllerSnapshotData added in v0.17.0

func NewMicroGamepadSnapshotWithControllerSnapshotData(controller *Controller, data []byte) *MicroGamepadSnapshot

NewMicroGamepadSnapshotWithControllerSnapshotData creates a new MicroGamepadSnapshot.

func NewMicroGamepadSnapshotWithSnapshotData added in v0.17.0

func NewMicroGamepadSnapshotWithSnapshotData(data []byte) *MicroGamepadSnapshot

NewMicroGamepadSnapshotWithSnapshotData initializes a snapshot object with the flattened data representation obtained from another snapshot.

func (*MicroGamepadSnapshot) SnapshotData added in v0.17.0

func (mgs *MicroGamepadSnapshot) SnapshotData() []byte

SnapshotData returns the snapshot data.

func (*MicroGamepadSnapshot) WithAllowsRotation added in v0.17.0

func (mgs *MicroGamepadSnapshot) WithAllowsRotation(allowsRotation bool) *MicroGamepadSnapshot

WithAllowsRotation sets a Boolean value that indicates whether the profile reports the directional pad values relative to its current orientation.

func (*MicroGamepadSnapshot) WithReportsAbsoluteDpadValues added in v0.17.0

func (mgs *MicroGamepadSnapshot) WithReportsAbsoluteDpadValues(reportsAbsoluteDpadValues bool) *MicroGamepadSnapshot

WithReportsAbsoluteDpadValues sets a Boolean value that indicates whether the directional pad reports absolute or relative values.

func (*MicroGamepadSnapshot) WithSnapshotData added in v0.17.0

func (mgs *MicroGamepadSnapshot) WithSnapshotData(snapshotData []byte) *MicroGamepadSnapshot

WithSnapshotData sets the flattened control input values for the snapshot.

func (*MicroGamepadSnapshot) WithValueChangedHandler added in v0.18.0

func (mgs *MicroGamepadSnapshot) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *MicroGamepadSnapshot

WithValueChangedHandler sets the block that this profile calls when an element’s value changes.

func (*MicroGamepadSnapshot) WithValueDidChangeHandler added in v0.17.0

func (mgs *MicroGamepadSnapshot) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *MicroGamepadSnapshot

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type MicroGamepadSnapshotDataVersion deprecated added in v0.17.0

type MicroGamepadSnapshotDataVersion int64

Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

const (
	MicroGamepadSnapshotDataVersion1 MicroGamepadSnapshotDataVersion = 256
)

func (MicroGamepadSnapshotDataVersion) String added in v0.17.0

String returns the MicroGamepadSnapshotDataVersion constant's name, or its numeric form when the value is not a known constant.

type Motion added in v0.17.0

type Motion struct {
	objref.Handle
}

Motion is an idiomatic wrapper over the Objective-C class GCMotion.

A controller profile that supports orientation and motion.

func MotionFromID added in v0.17.0

func MotionFromID(id objc.ID) *Motion

MotionFromID adopts an existing Objective-C object as a Motion (nil for 0), retaining it and registering a release finalizer.

func NewMotion added in v0.17.0

func NewMotion() *Motion

NewMotion creates a new Motion.

func (*Motion) Acceleration added in v0.18.1

func (m *Motion) Acceleration() GCAcceleration

Acceleration returns the total acceleration of the controller.

func (*Motion) Attitude added in v0.18.1

func (m *Motion) Attitude() GCQuaternion

Attitude returns the current attitude of the controller.

func (*Motion) Controller added in v0.17.0

func (m *Motion) Controller() *Controller

Controller returns a profile keeps a reference to the controller that it is mapping input from.

func (*Motion) Description added in v0.17.0

func (m *Motion) Description() string

Description returns the object's -description text.

func (*Motion) Gravity added in v0.18.1

func (m *Motion) Gravity() GCAcceleration

Gravity returns the gravity vector expressed in the controller's reference frame. Note that the total acceleration of the controller is equal to gravity plus userAcceleration.

func (*Motion) HasAttitude added in v0.17.0

func (m *Motion) HasAttitude() bool

HasAttitude reports whether 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 (*Motion) HasAttitudeAndRotationRate added in v0.17.0

func (m *Motion) HasAttitudeAndRotationRate() bool

HasAttitudeAndRotationRate reports whether 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.

func (*Motion) HasGravityAndUserAcceleration added in v0.17.0

func (m *Motion) HasGravityAndUserAcceleration() bool

HasGravityAndUserAcceleration reports whether the controller is capable of reporting gravity and user acceleration separately.

func (*Motion) HasRotationRate added in v0.17.0

func (m *Motion) HasRotationRate() bool

HasRotationRate reports whether 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 (*Motion) IsEqual added in v0.17.0

func (m *Motion) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Motion) IsKind added in v0.17.0

func (m *Motion) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Motion) RotationRate added in v0.18.1

func (m *Motion) RotationRate() GCRotationRate

RotationRate returns the current rotation rate of the controller.

func (*Motion) SensorsActive added in v0.17.0

func (m *Motion) SensorsActive() bool

SensorsActive reports whether set this property to true when you wish to receive motion data from the controller. When you set this property to false, the motion sensors will be disabled and the GCMotion profile will not be updated.

func (*Motion) SensorsRequireManualActivation added in v0.17.0

func (m *Motion) SensorsRequireManualActivation() bool

SensorsRequireManualActivation reports whether if this property is returns true, you are responsible for setting sensorsActive to true 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 false.

func (*Motion) SetStateFromMotion added in v0.17.0

func (m *Motion) SetStateFromMotion(motion *Motion)

SetStateFromMotion copies the input values from a specified motion profile to a snapshot of a motion profile.

func (*Motion) String added in v0.17.0

func (m *Motion) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*Motion) UserAcceleration added in v0.18.1

func (m *Motion) UserAcceleration() GCAcceleration

UserAcceleration returns the acceleration that the user is giving to the controller. Note that the total acceleration of the controller is equal to gravity plus userAcceleration.

func (*Motion) WithAcceleration added in v0.18.1

func (m *Motion) WithAcceleration(acceleration GCAcceleration) *Motion

WithAcceleration sets the total acceleration of the controller that includes gravity and the acceleration the user applies to the controller.

func (*Motion) WithAttitude added in v0.18.1

func (m *Motion) WithAttitude(attitude GCQuaternion) *Motion

WithAttitude sets the attitude of the controller.

func (*Motion) WithGravity added in v0.18.1

func (m *Motion) WithGravity(gravity GCAcceleration) *Motion

WithGravity sets the gravity acceleration vector from the controller’s reference frame.

func (*Motion) WithRotationRate added in v0.18.1

func (m *Motion) WithRotationRate(rotationRate GCRotationRate) *Motion

WithRotationRate sets the rotation rate of the controller.

func (*Motion) WithSensorsActive added in v0.17.0

func (m *Motion) WithSensorsActive(sensorsActive bool) *Motion

WithSensorsActive sets a Boolean value that indicates whether the sensors that compute the motion data are active.

func (*Motion) WithUserAcceleration added in v0.18.1

func (m *Motion) WithUserAcceleration(userAcceleration GCAcceleration) *Motion

WithUserAcceleration sets the acceleration that the user applies to the controller.

func (*Motion) WithValueChangedHandler added in v0.18.0

func (m *Motion) WithValueChangedHandler(valueChangedHandler func(obj.Object)) *Motion

WithValueChangedHandler sets the block that the profile calls when an element’s value changes.

type Mouse added in v0.17.0

type Mouse struct {
	objref.Handle
}

Mouse is an idiomatic wrapper over the Objective-C class GCMouse.

An object that represents a physical mouse connected to a device.

func GCMouseCurrent

func GCMouseCurrent() *Mouse

GCMouseCurrent returns the most recently used mouse device. If a user actuates a mouse input, that mouse will become the current one.

func Mice added in v0.17.0

func Mice() []*Mouse

Mice returns any mice that the user connects to the device.

Mice returns the collection as a Go slice.

func MouseFromID added in v0.17.0

func MouseFromID(id objc.ID) *Mouse

MouseFromID adopts an existing Objective-C object as a Mouse (nil for 0), retaining it and registering a release finalizer.

func NewMouse added in v0.17.0

func NewMouse() *Mouse

NewMouse creates a new Mouse.

func (*Mouse) Description added in v0.17.0

func (m *Mouse) Description() string

Description returns the object's -description text.

func (*Mouse) IsEqual added in v0.17.0

func (m *Mouse) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*Mouse) IsKind added in v0.17.0

func (m *Mouse) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*Mouse) MouseInput added in v0.17.0

func (m *Mouse) MouseInput() *MouseInput

MouseInput returns unlike GCController GCMouse supports only one input profile Profile contains mouse buttons, scroll wheel and pointer delta.

func (*Mouse) String added in v0.17.0

func (m *Mouse) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type MouseInput added in v0.17.0

type MouseInput struct {
	PhysicalInputProfile
}

MouseInput is an idiomatic wrapper over the Objective-C class GCMouseInput.

It embeds PhysicalInputProfile, promoting that type's methods.

A controller profile that tracks input from a mouse.

func MouseInputFromID added in v0.17.0

func MouseInputFromID(id objc.ID) *MouseInput

MouseInputFromID adopts an existing Objective-C object as a MouseInput (nil for 0), retaining it and registering a release finalizer.

func NewMouseInput added in v0.17.0

func NewMouseInput() *MouseInput

NewMouseInput creates a new MouseInput.

func (*MouseInput) AuxiliaryButtons added in v0.17.0

func (mi *MouseInput) AuxiliaryButtons() []*ControllerButtonInput

AuxiliaryButtons returns the auxiliary buttons.

AuxiliaryButtons returns the collection as a Go slice.

func (*MouseInput) LeftButton added in v0.17.0

func (mi *MouseInput) LeftButton() *ControllerButtonInput

LeftButton returns mouse buttons that can be used only as digital inputs

func (*MouseInput) MiddleButton added in v0.17.0

func (mi *MouseInput) MiddleButton() *ControllerButtonInput

MiddleButton returns the middle button.

func (*MouseInput) RightButton added in v0.17.0

func (mi *MouseInput) RightButton() *ControllerButtonInput

RightButton returns the right button.

func (*MouseInput) Scroll added in v0.17.0

func (mi *MouseInput) Scroll() *DeviceCursor

Scroll returns scroll is a dpad with undefined range.

func (*MouseInput) WithMouseMovedHandler added in v0.18.0

func (mi *MouseInput) WithMouseMovedHandler(mouseMovedHandler func(obj.Object, float32, float32)) *MouseInput

WithMouseMovedHandler sets the block that the profile calls when the mouse moves.

func (*MouseInput) WithValueDidChangeHandler added in v0.17.0

func (mi *MouseInput) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *MouseInput

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type MpoFlags added in v0.17.0

type MpoFlags uint32

Bitmask — values may be combined with |.

const (
	MpoFlagsPort                        MpoFlags = 0
	MpoFlagsServicePort                 MpoFlags = 1024
	MpoFlagsConnectionPort              MpoFlags = 2048
	MpoFlagsReplyPort                   MpoFlags = 4096
	MpoFlagsWeakReplyPort               MpoFlags = 16384
	MpoFlagsNotificationPort            MpoFlags = 17408
	MpoFlagsExceptionPort               MpoFlags = 32768
	MpoFlagsConnectionPortWithPortArray MpoFlags = 65536
)

func (MpoFlags) String added in v0.17.0

func (e MpoFlags) String() string

String returns the MpoFlags constant's name, or its numeric form when the value is not a known constant.

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

String returns the NXMouseButton constant's name, or its numeric form when the value is not a known constant.

type OSClockid added in v0.17.0

type OSClockid uint32
const (
	OSClockidTime OSClockid = 32
)

func (OSClockid) String added in v0.17.0

func (e OSClockid) String() string

String returns the OSClockid constant's name, or its numeric form when the value is not a known constant.

type PMPageToPaperMappingType

type PMPageToPaperMappingType int32
const (
	KPMPageToPaperMappingNone       PMPageToPaperMappingType = 1
	KPMPageToPaperMappingScaleToFit PMPageToPaperMappingType = 2
)

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

String returns the PMPageToPaperMappingType constant's name, or its numeric form when the value is not a known constant.

type Perm added in v0.17.0

type Perm int32
const (
	PermReadData           Perm = 2
	PermListDirectory      Perm = 2
	PermWriteData          Perm = 4
	PermAddFile            Perm = 4
	PermExecute            Perm = 8
	PermSearch             Perm = 8
	PermDelete             Perm = 16
	PermAppendData         Perm = 32
	PermAddSubdirectory    Perm = 32
	PermDeleteChild        Perm = 64
	PermReadAttributes     Perm = 128
	PermWriteAttributes    Perm = 256
	PermReadExtattributes  Perm = 512
	PermWriteExtattributes Perm = 1024
	PermReadSecurity       Perm = 2048
	PermWriteSecurity      Perm = 4096
	PermChangeOwner        Perm = 8192
	PermSynchronize        Perm = 1048576
)

func (Perm) String added in v0.17.0

func (e Perm) String() string

String returns the Perm constant's name, or its numeric form when the value is not a known constant.

type PhysicalInputElement added in v0.17.0

type PhysicalInputElement interface {
}

PhysicalInputElement is the Go form of the Objective-C protocol GCPhysicalInputElement.

type PhysicalInputElementCollection added in v0.17.0

type PhysicalInputElementCollection struct {
	objref.Handle
}

PhysicalInputElementCollection is an idiomatic wrapper over the Objective-C class GCPhysicalInputElementCollection.

A collection of physical input elements.

func NewPhysicalInputElementCollection added in v0.17.0

func NewPhysicalInputElementCollection() *PhysicalInputElementCollection

NewPhysicalInputElementCollection creates a new PhysicalInputElementCollection.

func PhysicalInputElementCollectionFromID added in v0.17.0

func PhysicalInputElementCollectionFromID(id objc.ID) *PhysicalInputElementCollection

PhysicalInputElementCollectionFromID adopts an existing Objective-C object as a PhysicalInputElementCollection (nil for 0), retaining it and registering a release finalizer.

func (*PhysicalInputElementCollection) Count added in v0.17.0

func (piec *PhysicalInputElementCollection) Count() int

Count returns the number of elements in the collection.

func (*PhysicalInputElementCollection) Description added in v0.17.0

func (piec *PhysicalInputElementCollection) Description() string

Description returns the object's -description text.

func (*PhysicalInputElementCollection) ElementEnumerator added in v0.17.0

func (piec *PhysicalInputElementCollection) ElementEnumerator() obj.Object

ElementEnumerator returns the element enumerator.

func (*PhysicalInputElementCollection) ElementForAlias added in v0.17.0

func (piec *PhysicalInputElementCollection) ElementForAlias(alias obj.Object) obj.Object

ElementForAlias returns the element associated with a given alias.

func (*PhysicalInputElementCollection) IsEqual added in v0.17.0

func (piec *PhysicalInputElementCollection) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PhysicalInputElementCollection) IsKind added in v0.17.0

func (piec *PhysicalInputElementCollection) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PhysicalInputElementCollection) ObjectForKeyedSubscript added in v0.17.0

func (piec *PhysicalInputElementCollection) ObjectForKeyedSubscript(key obj.Object) obj.Object

ObjectForKeyedSubscript wraps the corresponding Objective-C method.

func (*PhysicalInputElementCollection) String added in v0.17.0

func (piec *PhysicalInputElementCollection) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type PhysicalInputElementName added in v0.17.0

type PhysicalInputElementName interface {
}

PhysicalInputElementName is the Go form of the Objective-C protocol GCPhysicalInputElementName.

type PhysicalInputExtents added in v0.17.0

type PhysicalInputExtents interface {
	ScaledValue() float64
	MinimumValue() float64
	MaximumValue() float64
}

PhysicalInputExtents is the Go form of the Objective-C protocol GCPhysicalInputExtents.

type PhysicalInputProfile added in v0.17.0

type PhysicalInputProfile struct {
	objref.Handle
}

PhysicalInputProfile is an idiomatic wrapper over the Objective-C class GCPhysicalInputProfile.

PhysicalInputProfile is an abstract base — you do not construct it directly. Construct one of ExtendedGamepad, Gamepad, KeyboardInput, MicroGamepad, MouseInput and pass it where a PhysicalInputProfile is accepted.

The base class for controller profiles that support physical buttons, thumbsticks, and directional pads.

func PhysicalInputProfileFromID added in v0.17.0

func PhysicalInputProfileFromID(id objc.ID) *PhysicalInputProfile

PhysicalInputProfileFromID adopts an existing Objective-C object as a PhysicalInputProfile (nil for 0), retaining it and registering a release finalizer.

func (*PhysicalInputProfile) AllAxes added in v0.17.0

func (pip *PhysicalInputProfile) AllAxes() []*ControllerAxisInput

AllAxes returns the order of the returned elements is unspecified.

func (*PhysicalInputProfile) AllButtons added in v0.17.0

func (pip *PhysicalInputProfile) AllButtons() []*ControllerButtonInput

AllButtons returns the order of the returned elements is unspecified.

func (*PhysicalInputProfile) AllDpads added in v0.17.0

func (pip *PhysicalInputProfile) AllDpads() []*ControllerDirectionPad

AllDpads returns the order of the returned elements is unspecified.

func (*PhysicalInputProfile) AllElements added in v0.17.0

func (pip *PhysicalInputProfile) AllElements() []*ControllerElement

AllElements returns the following properties allow for dynamic querying of the input elements available on a profile. The order of the returned elements is unspecified.

func (*PhysicalInputProfile) AllTouchpads added in v0.17.0

func (pip *PhysicalInputProfile) AllTouchpads() []*ControllerTouchpad

AllTouchpads returns the order of the returned elements is unspecified.

func (*PhysicalInputProfile) Axes added in v0.17.0

Axes returns the axes.

func (*PhysicalInputProfile) Buttons added in v0.17.0

Buttons returns the buttons.

func (*PhysicalInputProfile) Capture added in v0.17.0

Capture returns a snapshot of the profile with its current element values.

func (*PhysicalInputProfile) Description added in v0.17.0

func (pip *PhysicalInputProfile) Description() string

Description returns the object's -description text.

func (*PhysicalInputProfile) Dpads added in v0.17.0

Dpads returns the dpads.

func (*PhysicalInputProfile) Elements added in v0.17.0

func (pip *PhysicalInputProfile) Elements() map[string]*ControllerElement

Elements returns the following properties allow for runtime lookup of any input element on a profile, when provided with a valid alias.

func (*PhysicalInputProfile) HasRemappedElements added in v0.17.0

func (pip *PhysicalInputProfile) HasRemappedElements() bool

HasRemappedElements reports whether the user has remapped their physical input controls for this profile at the system level. On iOS and tvOS, users can remap their game controller inputs in Settings.

func (*PhysicalInputProfile) IsEqual added in v0.17.0

func (pip *PhysicalInputProfile) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*PhysicalInputProfile) IsKind added in v0.17.0

func (pip *PhysicalInputProfile) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*PhysicalInputProfile) LastEventTimestamp added in v0.17.0

func (pip *PhysicalInputProfile) LastEventTimestamp() float64

LastEventTimestamp returns the last time elements of this profile were updated.

func (*PhysicalInputProfile) MappedElementAliasForPhysicalInputName added in v0.17.0

func (pip *PhysicalInputProfile) MappedElementAliasForPhysicalInputName(inputName string) string

MappedElementAliasForPhysicalInputName returns the name of the input element to which the user remaps the given physical element.

func (*PhysicalInputProfile) MappedPhysicalInputNamesForElementAlias added in v0.17.0

func (pip *PhysicalInputProfile) MappedPhysicalInputNamesForElementAlias(elementAlias string) []string

MappedPhysicalInputNamesForElementAlias returns the physical input elements to which the user remaps the given input element. The order of the returned elements is unspecified.

func (*PhysicalInputProfile) ObjectForKeyedSubscript added in v0.17.0

func (pip *PhysicalInputProfile) ObjectForKeyedSubscript(key string) *ControllerElement

ObjectForKeyedSubscript returns the element that the key specifies.

func (*PhysicalInputProfile) SetStateFromPhysicalInput added in v0.17.0

func (pip *PhysicalInputProfile) SetStateFromPhysicalInput(physicalInput *PhysicalInputProfile)

SetStateFromPhysicalInput copies the input values from a specified physical input profile to a snapshot of the profile.

func (*PhysicalInputProfile) String added in v0.17.0

func (pip *PhysicalInputProfile) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*PhysicalInputProfile) Touchpads added in v0.17.0

func (pip *PhysicalInputProfile) Touchpads() map[string]*ControllerTouchpad

Touchpads returns the touchpads.

func (*PhysicalInputProfile) WithValueDidChangeHandler added in v0.17.0

func (pip *PhysicalInputProfile) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *PhysicalInputProfile

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type PhysicalInputProfileProvider added in v0.17.0

type PhysicalInputProfileProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

PhysicalInputProfileProvider is accepted wherever a GCPhysicalInputProfile (or one of its subclasses) is expected.

type PhysicalInputSource added in v0.17.0

type PhysicalInputSource interface {
	ElementAliases() []string
	ElementLocalizedName() string
	SfSymbolsName() string
	Direction() PhysicalInputSourceDirection
}

PhysicalInputSource is the Go form of the Objective-C protocol GCPhysicalInputSource.

type PhysicalInputSourceDirection added in v0.17.0

type PhysicalInputSourceDirection uint64

The directions that a physical input source involves. Bitmask — values may be combined with |.

const (
	// The physical input source doesn’t support directions.
	PhysicalInputSourceDirectionNotApplicable PhysicalInputSourceDirection = 0
	// The physical input source contains a value for the up direction.
	PhysicalInputSourceDirectionUp PhysicalInputSourceDirection = 1
	// The physical input source supports the right direction.
	PhysicalInputSourceDirectionRight PhysicalInputSourceDirection = 2
	// The physical input source supports the down direction.
	PhysicalInputSourceDirectionDown PhysicalInputSourceDirection = 4
	// The physical input source supports the left direction.
	PhysicalInputSourceDirectionLeft PhysicalInputSourceDirection = 8
)

func (PhysicalInputSourceDirection) String added in v0.17.0

String returns the PhysicalInputSourceDirection constant's name, or its numeric form when the value is not a known constant.

type PressedStateInput added in v0.17.0

type PressedStateInput interface {
	PressedDidChangeHandler() obj.Object
	SetPressedDidChangeHandler(pressedDidChangeHandler obj.Object)
	IsPressed() bool
	LastPressedStateTimestamp() float64
	LastPressedStateLatency() float64
	Sources() []obj.Object
}

PressedStateInput is the Go form of the Objective-C protocol GCPressedStateInput.

type PtrauthKey added in v0.17.0

type PtrauthKey int32
const (
	Ptrauth_key_none                     PtrauthKey = -1
	Ptrauth_key_asia                     PtrauthKey = 0
	Ptrauth_key_asib                     PtrauthKey = 1
	Ptrauth_key_asda                     PtrauthKey = 2
	Ptrauth_key_asdb                     PtrauthKey = 3
	Ptrauth_key_process_independent_code PtrauthKey = 0
	Ptrauth_key_process_dependent_code   PtrauthKey = 1
	Ptrauth_key_process_independent_data PtrauthKey = 2
	Ptrauth_key_process_dependent_data   PtrauthKey = 3
	Ptrauth_key_return_address           PtrauthKey = 1
	Ptrauth_key_frame_pointer            PtrauthKey = 3
	Ptrauth_key_function_pointer         PtrauthKey = 0
	Ptrauth_key_block_function           PtrauthKey = 0
	Ptrauth_key_cxx_vtable_pointer       PtrauthKey = 2
	Ptrauth_key_method_list_pointer      PtrauthKey = 2
	Ptrauth_key_objc_isa_pointer         PtrauthKey = 2
	Ptrauth_key_objc_super_pointer       PtrauthKey = 2
	Ptrauth_key_objc_sel_pointer         PtrauthKey = 3
	Ptrauth_key_objc_class_ro_pointer    PtrauthKey = 2
	Ptrauth_key_block_descriptor_pointer PtrauthKey = 2
	Ptrauth_key_init_fini_pointer        PtrauthKey = 0
)

func (PtrauthKey) String added in v0.17.0

func (e PtrauthKey) String() string

String returns the PtrauthKey constant's name, or its numeric form when the value is not a known constant.

type QosClass added in v0.17.0

type QosClass uint32
const (
	QosClassUserInteractive QosClass = 33
	QosClassUserInitiated   QosClass = 25
	QosClassDefault         QosClass = 21
	QosClassUtility         QosClass = 17
	QosClassBackground      QosClass = 9
	QosClassUnspecified     QosClass = 0
)

func (QosClass) String added in v0.17.0

func (e QosClass) String() string

String returns the QosClass constant's name, or its numeric form when the value is not a known constant.

type RacingWheel added in v0.17.0

type RacingWheel struct {
	objref.Handle
}

RacingWheel is an idiomatic wrapper over the Objective-C class GCRacingWheel.

An object that represents a physical racing wheel controller connected to a device.

func ConnectedRacingWheels added in v0.17.0

func ConnectedRacingWheels() []*RacingWheel

ConnectedRacingWheels get the collection of racing wheels currently attached to the system.

func NewRacingWheel added in v0.17.0

func NewRacingWheel() *RacingWheel

NewRacingWheel creates a new RacingWheel.

func RacingWheelFromID added in v0.17.0

func RacingWheelFromID(id objc.ID) *RacingWheel

RacingWheelFromID adopts an existing Objective-C object as a RacingWheel (nil for 0), retaining it and registering a release finalizer.

func (*RacingWheel) AcquireDevice added in v0.17.0

func (rw *RacingWheel) AcquireDevice() error

AcquireDevice starts receiving events from the racing wheel.

AcquireDevice returns an error if the operation did not succeed.

func (*RacingWheel) Capture added in v0.17.0

func (rw *RacingWheel) Capture() *RacingWheel

Capture returns a snapshot of the racing wheel with its current element values.

func (*RacingWheel) Description added in v0.17.0

func (rw *RacingWheel) Description() string

Description returns the object's -description text.

func (*RacingWheel) IsAcquired added in v0.17.0

func (rw *RacingWheel) IsAcquired() bool

IsAcquired reports whether checks if the racing wheel has been acquired by the application. This property is observable.

func (*RacingWheel) IsEqual added in v0.17.0

func (rw *RacingWheel) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*RacingWheel) IsKind added in v0.17.0

func (rw *RacingWheel) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*RacingWheel) IsSnapshot added in v0.17.0

func (rw *RacingWheel) IsSnapshot() bool

IsSnapshot reports whether a GCRacingWheel may represent a real device managed by the operating system, or a snapshot created by the developer.

func (*RacingWheel) RelinquishDevice added in v0.17.0

func (rw *RacingWheel) RelinquishDevice()

RelinquishDevice stops receiving events from the racing wheel.

func (*RacingWheel) String added in v0.17.0

func (rw *RacingWheel) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*RacingWheel) WheelInput added in v0.17.0

func (rw *RacingWheel) WheelInput() *RacingWheelInput

WheelInput get the physical input profile for the racing wheel.

type RacingWheelInput added in v0.17.0

type RacingWheelInput struct {
	RacingWheelInputState
}

RacingWheelInput is an idiomatic wrapper over the Objective-C class GCRacingWheelInput.

It embeds RacingWheelInputState, promoting that type's methods.

A controller profile that supports a racing wheel.

func NewRacingWheelInput added in v0.17.0

func NewRacingWheelInput() *RacingWheelInput

NewRacingWheelInput creates a new RacingWheelInput.

func RacingWheelInputFromID added in v0.17.0

func RacingWheelInputFromID(id objc.ID) *RacingWheelInput

RacingWheelInputFromID adopts an existing Objective-C object as a RacingWheelInput (nil for 0), retaining it and registering a release finalizer.

func (*RacingWheelInput) Capture added in v0.17.0

func (rwi *RacingWheelInput) Capture() *RacingWheelInputState

Capture returns a snapshot of the racing wheel inputs.

func (*RacingWheelInput) NextInputState added in v0.17.0

func (rwi *RacingWheelInput) NextInputState() *RacingWheelInputState

NextInputState returns the next input state of the racing wheel from the queue.

type RacingWheelInputState added in v0.17.0

type RacingWheelInputState struct {
	objref.Handle
}

RacingWheelInputState is an idiomatic wrapper over the Objective-C class GCRacingWheelInputState.

RacingWheelInputState is an abstract base — you do not construct it directly. Construct one of RacingWheelInput and pass it where a RacingWheelInputState is accepted.

The input for the wheel of a racing wheel controller.

func RacingWheelInputStateFromID added in v0.17.0

func RacingWheelInputStateFromID(id objc.ID) *RacingWheelInputState

RacingWheelInputStateFromID adopts an existing Objective-C object as a RacingWheelInputState (nil for 0), retaining it and registering a release finalizer.

func (*RacingWheelInputState) Description added in v0.17.0

func (rwis *RacingWheelInputState) Description() string

Description returns the object's -description text.

func (*RacingWheelInputState) IsEqual added in v0.17.0

func (rwis *RacingWheelInputState) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*RacingWheelInputState) IsKind added in v0.17.0

func (rwis *RacingWheelInputState) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*RacingWheelInputState) Shifter added in v0.17.0

func (rwis *RacingWheelInputState) Shifter() *GearShifterElement

Shifter returns 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 (*RacingWheelInputState) String added in v0.17.0

func (rwis *RacingWheelInputState) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

func (*RacingWheelInputState) Wheel added in v0.17.0

Wheel returns the steering wheel element.

type RacingWheelInputStateProvider added in v0.17.0

type RacingWheelInputStateProvider interface {
	objref.Object
	// contains filtered or unexported methods
}

RacingWheelInputStateProvider is accepted wherever a GCRacingWheelInputState (or one of its subclasses) is expected.

type RelativeInput added in v0.17.0

type RelativeInput interface {
	DeltaDidChangeHandler() obj.Object
	SetDeltaDidChangeHandler(deltaDidChangeHandler obj.Object)
	Delta() float32
	IsAnalog() bool
	LastDeltaTimestamp() float64
	LastDeltaLatency() float64
	Sources() []obj.Object
}

RelativeInput is the Go form of the Objective-C protocol GCRelativeInput.

type SteeringWheelElement added in v0.17.0

type SteeringWheelElement struct {
	objref.Handle
}

SteeringWheelElement is an idiomatic wrapper over the Objective-C class GCSteeringWheelElement.

The element that represents the wheel of a racing wheel controller.

func NewSteeringWheelElement added in v0.17.0

func NewSteeringWheelElement() *SteeringWheelElement

NewSteeringWheelElement creates a new SteeringWheelElement.

func SteeringWheelElementFromID added in v0.17.0

func SteeringWheelElementFromID(id objc.ID) *SteeringWheelElement

SteeringWheelElementFromID adopts an existing Objective-C object as a SteeringWheelElement (nil for 0), retaining it and registering a release finalizer.

func (*SteeringWheelElement) Description added in v0.17.0

func (swe *SteeringWheelElement) Description() string

Description returns the object's -description text.

func (*SteeringWheelElement) IsEqual added in v0.17.0

func (swe *SteeringWheelElement) IsEqual(other obj.Object) bool

IsEqual reports Objective-C equality (isEqual:) with another object.

func (*SteeringWheelElement) IsKind added in v0.17.0

func (swe *SteeringWheelElement) IsKind(className string) bool

IsKind reports whether the object is an instance of the named class or a subclass.

func (*SteeringWheelElement) MaximumDegreesOfRotation added in v0.17.0

func (swe *SteeringWheelElement) MaximumDegreesOfRotation() float32

MaximumDegreesOfRotation returns the maximum degrees of rotation.

func (*SteeringWheelElement) String added in v0.17.0

func (swe *SteeringWheelElement) String() string

String returns the object's -description text, so a wrapper prints usefully under fmt.

type SwitchElement added in v0.17.0

type SwitchElement interface {
	PositionInput() obj.Object
}

SwitchElement is the Go form of the Objective-C protocol GCSwitchElement.

type SwitchElementName added in v0.17.0

type SwitchElementName interface {
}

SwitchElementName is the Go form of the Objective-C protocol GCSwitchElementName.

type SwitchInput added in v0.17.0

type SwitchInput interface {
}

SwitchInput is the Go form of the Objective-C protocol GCSwitchInput.

type SwitchPositionInput added in v0.17.0

type SwitchPositionInput interface {
	PositionDidChangeHandler() obj.Object
	SetPositionDidChangeHandler(positionDidChangeHandler obj.Object)
	Position() int
	PositionRange() foundation.NSRange
	IsSequential() bool
	CanWrap() bool
	LastPositionTimestamp() float64
	LastPositionLatency() float64
	Sources() []obj.Object
}

SwitchPositionInput is the Go form of the Objective-C protocol GCSwitchPositionInput.

type SystemGestureState added in v0.17.0

type SystemGestureState 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
	SystemGestureStateEnabled SystemGestureState = 0
	// Input is sent to app and processed by system gesture recognizers simultaneously
	SystemGestureStateAlwaysReceive SystemGestureState = 1
	// System gesture recognizers will not run at all. Input is passed directly to app
	SystemGestureStateDisabled SystemGestureState = 2
)

func (SystemGestureState) String added in v0.17.0

func (e SystemGestureState) String() string

String returns the SystemGestureState constant's name, or its numeric form when the value is not a known constant.

type Tag added in v0.17.0

type Tag int32
const (
	TagUndefinedTag  Tag = 0
	TagExtendedAllow Tag = 1
	TagExtendedDeny  Tag = 2
)

func (Tag) String added in v0.17.0

func (e Tag) String() string

String returns the Tag constant's name, or its numeric form when the value is not a known constant.

type TouchState added in v0.17.0

type TouchState int64

The possible states of the user’s touch.

const (
	TouchStateUp     TouchState = 0
	TouchStateDown   TouchState = 1
	TouchStateMoving TouchState = 2
)

func (TouchState) String added in v0.17.0

func (e TouchState) String() string

String returns the TouchState constant's name, or its numeric form when the value is not a known constant.

type TouchedStateInput added in v0.17.0

type TouchedStateInput interface {
	TouchedDidChangeHandler() obj.Object
	SetTouchedDidChangeHandler(touchedDidChangeHandler obj.Object)
	IsTouched() bool
	LastTouchedStateTimestamp() float64
	LastTouchedStateLatency() float64
	Sources() []obj.Object
}

TouchedStateInput is the Go form of the Objective-C protocol GCTouchedStateInput.

type Type added in v0.17.0

type Type int32
const (
	TypeExtended Type = 256
	TypeAccess   Type = 0
	TypeDefault  Type = 1
	TypeAfs      Type = 2
	TypeCoda     Type = 3
	TypeNtfs     Type = 4
	TypeNwfs     Type = 5
)

func (Type) String added in v0.17.0

func (e Type) String() string

String returns the Type constant's name, or its numeric form when the value is not a known constant.

type VirtualMemoryGuardExceptionCode added in v0.17.0

type VirtualMemoryGuardExceptionCode uint32
const (
	KGUARD_EXC_DEALLOC_GAP                   VirtualMemoryGuardExceptionCode = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        VirtualMemoryGuardExceptionCode = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         VirtualMemoryGuardExceptionCode = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    VirtualMemoryGuardExceptionCode = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    VirtualMemoryGuardExceptionCode = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         VirtualMemoryGuardExceptionCode = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         VirtualMemoryGuardExceptionCode = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  VirtualMemoryGuardExceptionCode = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    VirtualMemoryGuardExceptionCode = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              VirtualMemoryGuardExceptionCode = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        VirtualMemoryGuardExceptionCode = 99
	KGUARD_EXC_SEC_COPY_DENIED               VirtualMemoryGuardExceptionCode = 100
	KGUARD_EXC_SEC_SHARING_DENIED            VirtualMemoryGuardExceptionCode = 101
	KGUARD_EXC_MTE_SYNC_FAULT                VirtualMemoryGuardExceptionCode = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          VirtualMemoryGuardExceptionCode = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          VirtualMemoryGuardExceptionCode = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT VirtualMemoryGuardExceptionCode = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT VirtualMemoryGuardExceptionCode = 204
)

func (VirtualMemoryGuardExceptionCode) String added in v0.17.0

String returns the VirtualMemoryGuardExceptionCode constant's name, or its numeric form when the value is not a known constant.

type XboxGamepad added in v0.17.0

type XboxGamepad struct {
	ExtendedGamepad
}

XboxGamepad is an idiomatic wrapper over the Objective-C class GCXboxGamepad.

It embeds ExtendedGamepad, promoting that type's methods.

A controller profile that supports the Xbox controller.

func NewXboxGamepad added in v0.17.0

func NewXboxGamepad() *XboxGamepad

NewXboxGamepad creates a new XboxGamepad.

func XboxGamepadFromID added in v0.17.0

func XboxGamepadFromID(id objc.ID) *XboxGamepad

XboxGamepadFromID adopts an existing Objective-C object as a XboxGamepad (nil for 0), retaining it and registering a release finalizer.

func (*XboxGamepad) ButtonShare added in v0.17.0

func (xg *XboxGamepad) ButtonShare() *ControllerButtonInput

ButtonShare returns some Xbox controller variants feature a Share button.

func (*XboxGamepad) PaddleButton1 added in v0.17.0

func (xg *XboxGamepad) PaddleButton1() *ControllerButtonInput

PaddleButton1 returns some Xbox controller variants can support up to four additional buttons.

func (*XboxGamepad) PaddleButton2 added in v0.17.0

func (xg *XboxGamepad) PaddleButton2() *ControllerButtonInput

PaddleButton2 returns the paddle button2.

func (*XboxGamepad) PaddleButton3 added in v0.17.0

func (xg *XboxGamepad) PaddleButton3() *ControllerButtonInput

PaddleButton3 returns the paddle button3.

func (*XboxGamepad) PaddleButton4 added in v0.17.0

func (xg *XboxGamepad) PaddleButton4() *ControllerButtonInput

PaddleButton4 returns the paddle button4.

func (*XboxGamepad) WithValueChangedHandler added in v0.18.0

func (xg *XboxGamepad) WithValueChangedHandler(valueChangedHandler func(obj.Object, obj.Object)) *XboxGamepad

WithValueChangedHandler sets the block that the profile calls when an element’s value changes.

func (*XboxGamepad) WithValueDidChangeHandler added in v0.17.0

func (xg *XboxGamepad) WithValueDidChangeHandler(valueDidChangeHandler func(obj.Object, obj.Object)) *XboxGamepad

WithValueDidChangeHandler sets the block that the profile calls when an element’s value changes.

type XpcListenerCreateFlags added in v0.17.0

type XpcListenerCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcListenerCreateFlagsNone            XpcListenerCreateFlags = 0
	XpcListenerCreateFlagsInactive        XpcListenerCreateFlags = 1
	XpcListenerCreateFlagsForceMach       XpcListenerCreateFlags = 2
	XpcListenerCreateFlagsForceXpcservice XpcListenerCreateFlags = 4
)

func (XpcListenerCreateFlags) String added in v0.17.0

func (e XpcListenerCreateFlags) String() string

String returns the XpcListenerCreateFlags constant's name, or its numeric form when the value is not a known constant.

type XpcSessionCreateFlags added in v0.17.0

type XpcSessionCreateFlags uint64

Bitmask — values may be combined with |.

const (
	XpcSessionCreateFlagsNone           XpcSessionCreateFlags = 0
	XpcSessionCreateFlagsInactive       XpcSessionCreateFlags = 1
	XpcSessionCreateFlagsMachPrivileged XpcSessionCreateFlags = 2
)

func (XpcSessionCreateFlags) String added in v0.17.0

func (e XpcSessionCreateFlags) String() string

String returns the XpcSessionCreateFlags constant's name, or its numeric form when the value is not a known constant.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL