gamecontroller

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Rendered for darwin/amd64

Overview

Package gamecontroller provides purego-based Go bindings for the macOS GameController framework.

Apple documentation: https://developer.apple.com/documentation/gamecontroller

Index

Constants

View Source
const (
	GCDualSenseAdaptiveTriggerDiscretePositionCount = 10
)

Variables

This section is empty.

Functions

func GCControllerControllers

func GCControllerControllers() *foundation.NSArray[*GCController]

Get a list of controllers currently attached to the system. @see GCControllerDidConnectNotification @see GCControllerDidDisconnectNotification

func GCControllerDidBecomeCurrentNotification

func GCControllerDidBecomeCurrentNotification() uintptr

Use these constants with NSNotificationCenter to listen to a controller becoming the most recently used controller. This is a good time to swap out UI to match the new current controller, and unregister any handlers with the old current controller. The 'object' property of the notification will contain the GCController that became the current controller. For example: - (void)controllerDidBecomeCurrent:(NSNotification *)note { GCController *controller = note.object; ... } @see NSNotificationCenter @see GCController.controllers

func GCControllerDidConnectNotification

func GCControllerDidConnectNotification() uintptr

Use these constants with NSNotificationCenter to listen to connection and disconnection events. Use GCControllerDidConnectNotification for observing connections of controllers. Use GCControllerDidDisconnectNotification for observing disconnections of controllers. Connections and disconnections of controllers will also be reflected in the controllers array of the GCController class. The 'object' property of the notification will contain the GCController that was connected or disconnected. For example: - (void)controllerDidConnect:(NSNotification *)note { GCController *controller = note.object; .... } @see NSNotificationCenter @see GCController.controllers

func GCControllerDidDisconnectNotification

func GCControllerDidDisconnectNotification() uintptr

func GCControllerDidStopBeingCurrentNotification

func GCControllerDidStopBeingCurrentNotification() uintptr

func GCControllerSetShouldMonitorBackgroundEvents

func GCControllerSetShouldMonitorBackgroundEvents(shouldMonitorBackgroundEvents bool)

func GCControllerShouldMonitorBackgroundEvents

func GCControllerShouldMonitorBackgroundEvents() bool

Whether the current application should monitor and respond to game controller events when it is not the frontmost application. @example If shouldMonitorBackgroundEvents is NO, and the application is not the frontmost application, any inputs from a game controller will not be forwarded to the application. Once the application becomes the frontmost application, game controller events will be forwarded. @note Starting with macOS Big Sur 11.3, shouldMonitorBackgroundEvents will be NO by default. For applications built prior to macOS Big Sur 11.3, (or running on devices with an earlier version of macOS), shouldMonitorBackgroundEvents will be YES by default. On iOS and tvOS, this property is ignored.

func GCControllerStartWirelessControllerDiscoveryWithCompletionHandler

func GCControllerStartWirelessControllerDiscoveryWithCompletionHandler(completionHandler func())

Start discovery of new wireless controllers that are discoverable. This is an asynchronous and the supplied completionHandler will get called once no more devices can be found. If there are already multiple controllers available for use, there may be little reason to automatically start discovery of new wireless controllers. In this situation it may be best to allow the user to start discovery manually via in-game UI. Once discovery has started new controllers will notify themselves as connected via GCControllerDidConnectNotification. As the notification arrives the controller is also available in the controllers array. The completionHandler could be used to update UI and/or game state to indicate that no more controllers will be found and the current set of controllers is what is available for use in the game. If a completionHandler was provided, it will be called once when discovery stops. Either from an explicit call to stopWirelessControllerDiscovery or from timing out or stopping in its natural course of operation. Thus the completionHandler will at most be called once per call to startWirelessControllerDiscoveryWithCompletionHandler:. The completionHandler may also not get called at all, if for example startWirelessControllerDiscoveryWithCompletionHandler: is called multiple times during dicovery. For this case the net effect is that the completionHandler is replaced with each call and only the last one set before discovery stops will be called. @param completionHandler an optional handler that is called when discovery stops. (may be nil, in which case you will not be notified when discovery stops) @see stopWirelessControllerDiscovery @see controllers

func GCControllerStopWirelessControllerDiscovery

func GCControllerStopWirelessControllerDiscovery()

If no more controllers are needed, depending on game state or number of controllers supported by a game, the discovery process can be stopped. Calling stopWirelessControllerDiscovery when no discovery is currently in progress will return immediately without any effect, thus it is safe to call even if the completionHandler of startWirelessControllerDiscoveryWithCompletionHandler: has been called. @see startWirelessControllerDiscoveryWithCompletionHandler:

func GCControllerSupportsHIDDevice

func GCControllerSupportsHIDDevice(device unsafe.Pointer) bool

Returns YES if the given HID device is supported by the Game Controller framework, and will have an associated GCController instance. @note This is not cheap, be sure to cache the result

func GCControllerUserCustomizationsDidChangeNotification

func GCControllerUserCustomizationsDidChangeNotification() uintptr

Use this constant with NSNotificationCenter to listen to controller user customization events. When a user customizes the button mappings or other settings of a controller this notification will be posted. This is a good time to swap out UI to match the new user settings. Users can modify game controller settings through the Settings app on iOS, tvOS, and macOS. The 'object' property of the notification will contain the GCController that was customized. For example: - (void)controllerDidConnect:(NSNotification *)note { GCController *controller = note.object; .... } @see NSNotificationCenter @see GCController.controllers

func GCExtendedGamepadSnapShotDataV100FromNSData

func GCExtendedGamepadSnapShotDataV100FromNSData(snapshotData *GCExtendedGamepadSnapShotDataV100, data *foundation.NSData) bool

Fills out a v100 snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

func GCExtendedGamepadSnapshotDataFromNSData

func GCExtendedGamepadSnapshotDataFromNSData(snapshotData *GCExtendedGamepadSnapshotData, data *foundation.NSData) bool

Fills out a snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

func GCGamepadSnapShotDataV100FromNSData

func GCGamepadSnapShotDataV100FromNSData(snapshotData *GCGamepadSnapShotDataV100, data *foundation.NSData) bool

Fills out a v100 snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use GCExtendedGamepad instead

func GCHapticDurationInfinite

func GCHapticDurationInfinite() uintptr

func GCHapticsLocalityAll

func GCHapticsLocalityAll() *foundation.NSString

func GCHapticsLocalityDefault

func GCHapticsLocalityDefault() *foundation.NSString

func GCHapticsLocalityHandles

func GCHapticsLocalityHandles() *foundation.NSString

func GCHapticsLocalityLeftHandle

func GCHapticsLocalityLeftHandle() *foundation.NSString

func GCHapticsLocalityLeftTrigger

func GCHapticsLocalityLeftTrigger() *foundation.NSString

func GCHapticsLocalityRightHandle

func GCHapticsLocalityRightHandle() *foundation.NSString

func GCHapticsLocalityRightTrigger

func GCHapticsLocalityRightTrigger() *foundation.NSString

func GCHapticsLocalityTriggers

func GCHapticsLocalityTriggers() *foundation.NSString

func GCInputArcadeButtonName

func GCInputArcadeButtonName(row int, column int) unsafe.Pointer

Gets the name of an arcade button at a certain position.

func GCInputBackLeftButton

func GCInputBackLeftButton(position int) unsafe.Pointer

func GCInputBackRightButton

func GCInputBackRightButton(position int) unsafe.Pointer

func GCInputButtonA

func GCInputButtonA() uintptr

func GCInputButtonB

func GCInputButtonB() uintptr

func GCInputButtonHome

func GCInputButtonHome() uintptr

func GCInputButtonMenu

func GCInputButtonMenu() uintptr

func GCInputButtonOptions

func GCInputButtonOptions() uintptr

func GCInputButtonShare

func GCInputButtonShare() uintptr

func GCInputButtonX

func GCInputButtonX() uintptr

func GCInputButtonY

func GCInputButtonY() uintptr

func GCInputDirectionPad

func GCInputDirectionPad() uintptr

func GCInputDirectionalCardinalDpad

func GCInputDirectionalCardinalDpad() uintptr

An optional secondary directional input surface for the directional gamepad. This input is guaranteed to be an 8-way digital dpad with physical Up, Down, Left, Right butttons. @note For the 2021 2nd generation Siri Remote, this represents pressing on the outer ring of the touch surface.

func GCInputDirectionalCenterButton

func GCInputDirectionalCenterButton() uintptr

An optional button for the directional gamepad. This input represents the center button of the cardinal dpad. @note For the 2021 2nd generation Siri Remote, this represents pressing anywhere on the inner ring of the touch surface.

func GCInputDirectionalDpad

func GCInputDirectionalDpad() uintptr

The primary directional input surface for the directional gamepad @note Equivalent to microgamepad.dpad @note For the 2021 2nd generation Siri Remote, this represents touching anywhere on the entire touch surface - including the inner and outer rings.

func GCInputDirectionalTouchSurfaceButton

func GCInputDirectionalTouchSurfaceButton() uintptr

The button corresponding to pressing anywhere on the primary directional input surface for the directional gamepad @note Equivalent to microgamepad.buttonA @note For the 2021 2nd generation Siri Remote, this represents pressing anywhere the entire touch surface - including the inner and outer rings.

func GCInputDualShockTouchpadButton

func GCInputDualShockTouchpadButton() uintptr

func GCInputDualShockTouchpadOne

func GCInputDualShockTouchpadOne() uintptr

A set of strings commonly used to access DualShock buttons @example controller.physicalInputProfile.dpads[GCInputDualShockTouchpadOne] @see GCController.h @see GCPhysicalInputProfile.h

func GCInputDualShockTouchpadTwo

func GCInputDualShockTouchpadTwo() uintptr

func GCInputGripButton

func GCInputGripButton() uintptr

func GCInputLeftBumper

func GCInputLeftBumper() uintptr

Identifies the button element located at the top-left/right of a gamepad, between the left/right shoulder button and the gamepad's horizontal center.

func GCInputLeftPaddle

func GCInputLeftPaddle() uintptr

func GCInputLeftShoulder

func GCInputLeftShoulder() uintptr

func GCInputLeftSideButton

func GCInputLeftSideButton() uintptr

func GCInputLeftThumbstick

func GCInputLeftThumbstick() uintptr

func GCInputLeftThumbstickButton

func GCInputLeftThumbstickButton() uintptr

func GCInputLeftTrigger

func GCInputLeftTrigger() uintptr

func GCInputMicroGamepadButtonA

func GCInputMicroGamepadButtonA() uintptr

The primary button for the microgamepad @note For the 1st generation and 2nd generation Siri Remotes, this represents pressing anywhere on the touch surface.

func GCInputMicroGamepadButtonMenu

func GCInputMicroGamepadButtonMenu() uintptr

The primary menu button for the microgamepad @note Equivalent to microgamepad.buttonMenu @note For the 1st generation Siri Remote, this represents pressing the play/pause button. For the 2nd generation Siri Remote, this represents pressing the back button. @note You should avoid polling this button every frame. tvOS will run a gesture recognizer on events before forwarding them to your application that can reduce the window to poll button changes. Instead, register a pressedChangedHandler or a valueChangedHandler.

func GCInputMicroGamepadButtonX

func GCInputMicroGamepadButtonX() uintptr

The secondary button for the microgamepad @note Equivalent to microgamepad.buttonX @note For the 1st and 2nd generation Siri Remotes, this represents pressing the play/pause button.

func GCInputMicroGamepadDpad

func GCInputMicroGamepadDpad() uintptr

The primary directional input surface for the directional gamepad @note Equivalent to microgamepad.dpad @note For the 1st generation and 2nd generation Siri Remotes, this represents touching anywhere on the entire touch surface.

func GCInputPedalAccelerator

func GCInputPedalAccelerator() uintptr

func GCInputPedalBrake

func GCInputPedalBrake() uintptr

func GCInputPedalClutch

func GCInputPedalClutch() uintptr

func GCInputRightBumper

func GCInputRightBumper() uintptr

func GCInputRightPaddle

func GCInputRightPaddle() uintptr

func GCInputRightShoulder

func GCInputRightShoulder() uintptr

func GCInputRightSideButton

func GCInputRightSideButton() uintptr

func GCInputRightThumbstick

func GCInputRightThumbstick() uintptr

func GCInputRightThumbstickButton

func GCInputRightThumbstickButton() uintptr

func GCInputRightTrigger

func GCInputRightTrigger() uintptr

func GCInputShifter

func GCInputShifter() uintptr

func GCInputSteeringWheel

func GCInputSteeringWheel() uintptr

A set of strings commonly used by racing wheels.

func GCInputThumbstick

func GCInputThumbstick() uintptr

func GCInputThumbstickButton

func GCInputThumbstickButton() uintptr

func GCInputTrigger

func GCInputTrigger() uintptr

func GCInputXboxPaddleFour

func GCInputXboxPaddleFour() uintptr

func GCInputXboxPaddleOne

func GCInputXboxPaddleOne() uintptr

A set of strings commonly used to access Xbox buttons @example controller.physicalInputProfile.buttons[GCInputButtonPaddleOne] @see GCController.h @see GCPhysicalInputProfile.h

func GCInputXboxPaddleThree

func GCInputXboxPaddleThree() uintptr

func GCInputXboxPaddleTwo

func GCInputXboxPaddleTwo() uintptr

func GCKeyA

func GCKeyA() uintptr

func GCKeyApplication

func GCKeyApplication() uintptr

func GCKeyB

func GCKeyB() uintptr

func GCKeyBackslash

func GCKeyBackslash() uintptr

func GCKeyC

func GCKeyC() uintptr

func GCKeyCapsLock

func GCKeyCapsLock() uintptr

func GCKeyCloseBracket

func GCKeyCloseBracket() uintptr

func GCKeyCodeApplication

func GCKeyCodeApplication() int

func GCKeyCodeBackslash

func GCKeyCodeBackslash() int

func GCKeyCodeCapsLock

func GCKeyCodeCapsLock() int

func GCKeyCodeCloseBracket

func GCKeyCodeCloseBracket() int

func GCKeyCodeComma

func GCKeyCodeComma() int

func GCKeyCodeDeleteForward

func GCKeyCodeDeleteForward() int

func GCKeyCodeDeleteOrBackspace

func GCKeyCodeDeleteOrBackspace() int

func GCKeyCodeDownArrow

func GCKeyCodeDownArrow() int

func GCKeyCodeEight

func GCKeyCodeEight() int

func GCKeyCodeEnd

func GCKeyCodeEnd() int

func GCKeyCodeEqualSign

func GCKeyCodeEqualSign() int

func GCKeyCodeEscape

func GCKeyCodeEscape() int

func GCKeyCodeF1

func GCKeyCodeF1() int

func GCKeyCodeF2

func GCKeyCodeF2() int

func GCKeyCodeF3

func GCKeyCodeF3() int

func GCKeyCodeF4

func GCKeyCodeF4() int

func GCKeyCodeF5

func GCKeyCodeF5() int

func GCKeyCodeF6

func GCKeyCodeF6() int

func GCKeyCodeF7

func GCKeyCodeF7() int

func GCKeyCodeF8

func GCKeyCodeF8() int

func GCKeyCodeF9

func GCKeyCodeF9() int

func GCKeyCodeF10

func GCKeyCodeF10() int

func GCKeyCodeF11

func GCKeyCodeF11() int

func GCKeyCodeF12

func GCKeyCodeF12() int

func GCKeyCodeF13

func GCKeyCodeF13() int

func GCKeyCodeF14

func GCKeyCodeF14() int

func GCKeyCodeF15

func GCKeyCodeF15() int

func GCKeyCodeF16

func GCKeyCodeF16() int

func GCKeyCodeF17

func GCKeyCodeF17() int

func GCKeyCodeF18

func GCKeyCodeF18() int

func GCKeyCodeF19

func GCKeyCodeF19() int

func GCKeyCodeF20

func GCKeyCodeF20() int

func GCKeyCodeFive

func GCKeyCodeFive() int

func GCKeyCodeFour

func GCKeyCodeFour() int

func GCKeyCodeGraveAccentAndTilde

func GCKeyCodeGraveAccentAndTilde() int

func GCKeyCodeHome

func GCKeyCodeHome() int

func GCKeyCodeHyphen

func GCKeyCodeHyphen() int

func GCKeyCodeInsert

func GCKeyCodeInsert() int

func GCKeyCodeInternational1

func GCKeyCodeInternational1() int

func GCKeyCodeInternational2

func GCKeyCodeInternational2() int

func GCKeyCodeInternational3

func GCKeyCodeInternational3() int

func GCKeyCodeInternational4

func GCKeyCodeInternational4() int

func GCKeyCodeInternational5

func GCKeyCodeInternational5() int

func GCKeyCodeInternational6

func GCKeyCodeInternational6() int

func GCKeyCodeInternational7

func GCKeyCodeInternational7() int

func GCKeyCodeInternational8

func GCKeyCodeInternational8() int

func GCKeyCodeInternational9

func GCKeyCodeInternational9() int

func GCKeyCodeKeyA

func GCKeyCodeKeyA() int

func GCKeyCodeKeyB

func GCKeyCodeKeyB() int

func GCKeyCodeKeyC

func GCKeyCodeKeyC() int

func GCKeyCodeKeyD

func GCKeyCodeKeyD() int

func GCKeyCodeKeyE

func GCKeyCodeKeyE() int

func GCKeyCodeKeyF

func GCKeyCodeKeyF() int

func GCKeyCodeKeyG

func GCKeyCodeKeyG() int

func GCKeyCodeKeyH

func GCKeyCodeKeyH() int

func GCKeyCodeKeyI

func GCKeyCodeKeyI() int

func GCKeyCodeKeyJ

func GCKeyCodeKeyJ() int

func GCKeyCodeKeyK

func GCKeyCodeKeyK() int

func GCKeyCodeKeyL

func GCKeyCodeKeyL() int

func GCKeyCodeKeyM

func GCKeyCodeKeyM() int

func GCKeyCodeKeyN

func GCKeyCodeKeyN() int

func GCKeyCodeKeyO

func GCKeyCodeKeyO() int

func GCKeyCodeKeyP

func GCKeyCodeKeyP() int

func GCKeyCodeKeyQ

func GCKeyCodeKeyQ() int

func GCKeyCodeKeyR

func GCKeyCodeKeyR() int

func GCKeyCodeKeyS

func GCKeyCodeKeyS() int

func GCKeyCodeKeyT

func GCKeyCodeKeyT() int

func GCKeyCodeKeyU

func GCKeyCodeKeyU() int

func GCKeyCodeKeyV

func GCKeyCodeKeyV() int

func GCKeyCodeKeyW

func GCKeyCodeKeyW() int

func GCKeyCodeKeyX

func GCKeyCodeKeyX() int

func GCKeyCodeKeyY

func GCKeyCodeKeyY() int

func GCKeyCodeKeyZ

func GCKeyCodeKeyZ() int

func GCKeyCodeKeypad0

func GCKeyCodeKeypad0() int

func GCKeyCodeKeypad1

func GCKeyCodeKeypad1() int

func GCKeyCodeKeypad2

func GCKeyCodeKeypad2() int

func GCKeyCodeKeypad3

func GCKeyCodeKeypad3() int

func GCKeyCodeKeypad4

func GCKeyCodeKeypad4() int

func GCKeyCodeKeypad5

func GCKeyCodeKeypad5() int

func GCKeyCodeKeypad6

func GCKeyCodeKeypad6() int

func GCKeyCodeKeypad7

func GCKeyCodeKeypad7() int

func GCKeyCodeKeypad8

func GCKeyCodeKeypad8() int

func GCKeyCodeKeypad9

func GCKeyCodeKeypad9() int

func GCKeyCodeKeypadAsterisk

func GCKeyCodeKeypadAsterisk() int

func GCKeyCodeKeypadEnter

func GCKeyCodeKeypadEnter() int

func GCKeyCodeKeypadEqualSign

func GCKeyCodeKeypadEqualSign() int

func GCKeyCodeKeypadHyphen

func GCKeyCodeKeypadHyphen() int

func GCKeyCodeKeypadNumLock

func GCKeyCodeKeypadNumLock() int

func GCKeyCodeKeypadPeriod

func GCKeyCodeKeypadPeriod() int

func GCKeyCodeKeypadPlus

func GCKeyCodeKeypadPlus() int

func GCKeyCodeKeypadSlash

func GCKeyCodeKeypadSlash() int

func GCKeyCodeLANG1

func GCKeyCodeLANG1() int

func GCKeyCodeLANG2

func GCKeyCodeLANG2() int

func GCKeyCodeLANG3

func GCKeyCodeLANG3() int

func GCKeyCodeLANG4

func GCKeyCodeLANG4() int

func GCKeyCodeLANG5

func GCKeyCodeLANG5() int

func GCKeyCodeLANG6

func GCKeyCodeLANG6() int

func GCKeyCodeLANG7

func GCKeyCodeLANG7() int

func GCKeyCodeLANG8

func GCKeyCodeLANG8() int

func GCKeyCodeLANG9

func GCKeyCodeLANG9() int

func GCKeyCodeLeftAlt

func GCKeyCodeLeftAlt() int

func GCKeyCodeLeftArrow

func GCKeyCodeLeftArrow() int

func GCKeyCodeLeftControl

func GCKeyCodeLeftControl() int

func GCKeyCodeLeftGUI

func GCKeyCodeLeftGUI() int

func GCKeyCodeLeftShift

func GCKeyCodeLeftShift() int

func GCKeyCodeNine

func GCKeyCodeNine() int

func GCKeyCodeNonUSBackslash

func GCKeyCodeNonUSBackslash() int

func GCKeyCodeNonUSPound

func GCKeyCodeNonUSPound() int

func GCKeyCodeOne

func GCKeyCodeOne() int

func GCKeyCodeOpenBracket

func GCKeyCodeOpenBracket() int

func GCKeyCodePageDown

func GCKeyCodePageDown() int

func GCKeyCodePageUp

func GCKeyCodePageUp() int

func GCKeyCodePause

func GCKeyCodePause() int

func GCKeyCodePeriod

func GCKeyCodePeriod() int

func GCKeyCodePower

func GCKeyCodePower() int

func GCKeyCodePrintScreen

func GCKeyCodePrintScreen() int

func GCKeyCodeQuote

func GCKeyCodeQuote() int

func GCKeyCodeReturnOrEnter

func GCKeyCodeReturnOrEnter() int

func GCKeyCodeRightAlt

func GCKeyCodeRightAlt() int

func GCKeyCodeRightArrow

func GCKeyCodeRightArrow() int

func GCKeyCodeRightControl

func GCKeyCodeRightControl() int

func GCKeyCodeRightGUI

func GCKeyCodeRightGUI() int

func GCKeyCodeRightShift

func GCKeyCodeRightShift() int

func GCKeyCodeScrollLock

func GCKeyCodeScrollLock() int

func GCKeyCodeSemicolon

func GCKeyCodeSemicolon() int

func GCKeyCodeSeven

func GCKeyCodeSeven() int

func GCKeyCodeSix

func GCKeyCodeSix() int

func GCKeyCodeSlash

func GCKeyCodeSlash() int

func GCKeyCodeSpacebar

func GCKeyCodeSpacebar() int

func GCKeyCodeTab

func GCKeyCodeTab() int

func GCKeyCodeThree

func GCKeyCodeThree() int

func GCKeyCodeTwo

func GCKeyCodeTwo() int

func GCKeyCodeUpArrow

func GCKeyCodeUpArrow() int

func GCKeyCodeZero

func GCKeyCodeZero() int

func GCKeyComma

func GCKeyComma() uintptr

func GCKeyD

func GCKeyD() uintptr

func GCKeyDeleteForward

func GCKeyDeleteForward() uintptr

func GCKeyDeleteOrBackspace

func GCKeyDeleteOrBackspace() uintptr

func GCKeyDownArrow

func GCKeyDownArrow() uintptr

func GCKeyE

func GCKeyE() uintptr

func GCKeyEight

func GCKeyEight() uintptr

func GCKeyEnd

func GCKeyEnd() uintptr

func GCKeyEqualSign

func GCKeyEqualSign() uintptr

func GCKeyEscape

func GCKeyEscape() uintptr

func GCKeyF

func GCKeyF() uintptr

func GCKeyF1

func GCKeyF1() uintptr

func GCKeyF2

func GCKeyF2() uintptr

func GCKeyF3

func GCKeyF3() uintptr

func GCKeyF4

func GCKeyF4() uintptr

func GCKeyF5

func GCKeyF5() uintptr

func GCKeyF6

func GCKeyF6() uintptr

func GCKeyF7

func GCKeyF7() uintptr

func GCKeyF8

func GCKeyF8() uintptr

func GCKeyF9

func GCKeyF9() uintptr

func GCKeyF10

func GCKeyF10() uintptr

func GCKeyF11

func GCKeyF11() uintptr

func GCKeyF12

func GCKeyF12() uintptr

func GCKeyF13

func GCKeyF13() uintptr

func GCKeyF14

func GCKeyF14() uintptr

func GCKeyF15

func GCKeyF15() uintptr

func GCKeyF16

func GCKeyF16() uintptr

func GCKeyF17

func GCKeyF17() uintptr

func GCKeyF18

func GCKeyF18() uintptr

func GCKeyF19

func GCKeyF19() uintptr

func GCKeyF20

func GCKeyF20() uintptr

func GCKeyFive

func GCKeyFive() uintptr

func GCKeyFour

func GCKeyFour() uintptr

func GCKeyG

func GCKeyG() uintptr

func GCKeyGraveAccentAndTilde

func GCKeyGraveAccentAndTilde() uintptr

func GCKeyH

func GCKeyH() uintptr

func GCKeyHome

func GCKeyHome() uintptr

func GCKeyHyphen

func GCKeyHyphen() uintptr

func GCKeyI

func GCKeyI() uintptr

func GCKeyInsert

func GCKeyInsert() uintptr

func GCKeyInternational1

func GCKeyInternational1() uintptr

func GCKeyInternational2

func GCKeyInternational2() uintptr

func GCKeyInternational3

func GCKeyInternational3() uintptr

func GCKeyInternational4

func GCKeyInternational4() uintptr

func GCKeyInternational5

func GCKeyInternational5() uintptr

func GCKeyInternational6

func GCKeyInternational6() uintptr

func GCKeyInternational7

func GCKeyInternational7() uintptr

func GCKeyInternational8

func GCKeyInternational8() uintptr

func GCKeyInternational9

func GCKeyInternational9() uintptr

func GCKeyJ

func GCKeyJ() uintptr

func GCKeyK

func GCKeyK() uintptr

func GCKeyKeypad0

func GCKeyKeypad0() uintptr

func GCKeyKeypad1

func GCKeyKeypad1() uintptr

func GCKeyKeypad2

func GCKeyKeypad2() uintptr

func GCKeyKeypad3

func GCKeyKeypad3() uintptr

func GCKeyKeypad4

func GCKeyKeypad4() uintptr

func GCKeyKeypad5

func GCKeyKeypad5() uintptr

func GCKeyKeypad6

func GCKeyKeypad6() uintptr

func GCKeyKeypad7

func GCKeyKeypad7() uintptr

func GCKeyKeypad8

func GCKeyKeypad8() uintptr

func GCKeyKeypad9

func GCKeyKeypad9() uintptr

func GCKeyKeypadAsterisk

func GCKeyKeypadAsterisk() uintptr

func GCKeyKeypadEnter

func GCKeyKeypadEnter() uintptr

func GCKeyKeypadEqualSign

func GCKeyKeypadEqualSign() uintptr

func GCKeyKeypadHyphen

func GCKeyKeypadHyphen() uintptr

func GCKeyKeypadNumLock

func GCKeyKeypadNumLock() uintptr

func GCKeyKeypadPeriod

func GCKeyKeypadPeriod() uintptr

func GCKeyKeypadPlus

func GCKeyKeypadPlus() uintptr

func GCKeyKeypadSlash

func GCKeyKeypadSlash() uintptr

func GCKeyL

func GCKeyL() uintptr

func GCKeyLANG1

func GCKeyLANG1() uintptr

func GCKeyLANG2

func GCKeyLANG2() uintptr

func GCKeyLANG3

func GCKeyLANG3() uintptr

func GCKeyLANG4

func GCKeyLANG4() uintptr

func GCKeyLANG5

func GCKeyLANG5() uintptr

func GCKeyLANG6

func GCKeyLANG6() uintptr

func GCKeyLANG7

func GCKeyLANG7() uintptr

func GCKeyLANG8

func GCKeyLANG8() uintptr

func GCKeyLANG9

func GCKeyLANG9() uintptr

func GCKeyLeftAlt

func GCKeyLeftAlt() uintptr

func GCKeyLeftArrow

func GCKeyLeftArrow() uintptr

func GCKeyLeftControl

func GCKeyLeftControl() uintptr

func GCKeyLeftGUI

func GCKeyLeftGUI() uintptr

func GCKeyLeftShift

func GCKeyLeftShift() uintptr

func GCKeyM

func GCKeyM() uintptr

func GCKeyN

func GCKeyN() uintptr

func GCKeyNine

func GCKeyNine() uintptr

func GCKeyNonUSBackslash

func GCKeyNonUSBackslash() uintptr

func GCKeyNonUSPound

func GCKeyNonUSPound() uintptr

func GCKeyO

func GCKeyO() uintptr

func GCKeyOne

func GCKeyOne() uintptr

func GCKeyOpenBracket

func GCKeyOpenBracket() uintptr

func GCKeyP

func GCKeyP() uintptr

func GCKeyPageDown

func GCKeyPageDown() uintptr

func GCKeyPageUp

func GCKeyPageUp() uintptr

func GCKeyPause

func GCKeyPause() uintptr

func GCKeyPeriod

func GCKeyPeriod() uintptr

func GCKeyPower

func GCKeyPower() uintptr

func GCKeyPrintScreen

func GCKeyPrintScreen() uintptr

func GCKeyQ

func GCKeyQ() uintptr

func GCKeyQuote

func GCKeyQuote() uintptr

func GCKeyR

func GCKeyR() uintptr

func GCKeyReturnOrEnter

func GCKeyReturnOrEnter() uintptr

func GCKeyRightAlt

func GCKeyRightAlt() uintptr

func GCKeyRightArrow

func GCKeyRightArrow() uintptr

func GCKeyRightControl

func GCKeyRightControl() uintptr

func GCKeyRightGUI

func GCKeyRightGUI() uintptr

func GCKeyRightShift

func GCKeyRightShift() uintptr

func GCKeyS

func GCKeyS() uintptr

func GCKeyScrollLock

func GCKeyScrollLock() uintptr

func GCKeySemicolon

func GCKeySemicolon() uintptr

func GCKeySeven

func GCKeySeven() uintptr

func GCKeySix

func GCKeySix() uintptr

func GCKeySlash

func GCKeySlash() uintptr

func GCKeySpacebar

func GCKeySpacebar() uintptr

func GCKeyT

func GCKeyT() uintptr

func GCKeyTab

func GCKeyTab() uintptr

func GCKeyThree

func GCKeyThree() uintptr

func GCKeyTwo

func GCKeyTwo() uintptr

func GCKeyU

func GCKeyU() uintptr

func GCKeyUpArrow

func GCKeyUpArrow() uintptr

func GCKeyV

func GCKeyV() uintptr

func GCKeyW

func GCKeyW() uintptr

func GCKeyX

func GCKeyX() uintptr

func GCKeyY

func GCKeyY() uintptr

func GCKeyZ

func GCKeyZ() uintptr

func GCKeyZero

func GCKeyZero() uintptr

func GCKeyboardDidConnectNotification

func GCKeyboardDidConnectNotification() uintptr

Use these constants with NSNotificationCenter to listen to connection and disconnection events Use GCKeyboardDidConnectNotification for observing keyboard connection Use GCKeyboardDidDisconnectNotification for observing keyboard disconnection The 'object' property of the notification will contain the GCKeyboard that was connected or disconnected. @see NSNotificationCetner @note All connected keyboards are coalesced into one keyboard object, so notification about connection/disconnection will only be delivered once until last keyboard disconnects.

func GCKeyboardDidDisconnectNotification

func GCKeyboardDidDisconnectNotification() uintptr

func GCMicroGamepadSnapShotDataV100FromNSData

func GCMicroGamepadSnapShotDataV100FromNSData(snapshotData *GCMicroGamepadSnapShotDataV100, data *foundation.NSData) bool

Fills out a v100 snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

func GCMicroGamepadSnapshotDataFromNSData

func GCMicroGamepadSnapshotDataFromNSData(snapshotData *GCMicroGamepadSnapshotData, data *foundation.NSData) bool

Fills out a snapshot from any compatible NSData source @return NO if data is nil, snapshotData is nil or the contents of data does not contain a compatible snapshot. YES for all other cases. Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

func GCMouseDidBecomeCurrentNotification

func GCMouseDidBecomeCurrentNotification() uintptr

Use these constants with NSNotificationCenter to listen to a controller becoming the most recently used mouse. This is a good time to swap out UI to match the new current mouse, and unregister any handlers with the old current controller. The 'object' property of the notification will contain the GCMouse that became the current one. For example: - (void)mouseDidBecomeCurrent:(NSNotification *)note { GCMouse *mouse = note.object; ... } @see NSNotificationCenter @see GCMouse.mice @see GCMouse.current

func GCMouseDidConnectNotification

func GCMouseDidConnectNotification() uintptr

Use these constants with NSNotificationCenter to listen to connection and disconnection events. Use GCMouseDidConnectNotification for observing connections of mice. Use GCMouserDidDisconnectNotification for observing disconnections of mice. Connections and disconnections of mice will also be reflected in the mice array of the GCMouse class. The 'object' property of the notification will contain the GCMouse that was connected or disconnected. For example: - (void)controllerDidConnect:(NSNotification *)note { GCMouse *mouse = note.object; .... } @see NSNotificationCenter @see GCMouse.mice

func GCMouseDidDisconnectNotification

func GCMouseDidDisconnectNotification() uintptr

func GCMouseDidStopBeingCurrentNotification

func GCMouseDidStopBeingCurrentNotification() uintptr

func GCMouseMice

func GCMouseMice() *foundation.NSArray[*GCMouse]

func GCPoint2Equal

func GCPoint2Equal(point1 GCPoint2, point2 GCPoint2) bool

func GCProductCategoryArcadeStick

func GCProductCategoryArcadeStick() uintptr

func GCProductCategoryCoalescedRemote

func GCProductCategoryCoalescedRemote() uintptr

If multiple remotes have been combined into one, the device will have the GCProductCategoryCoalescedRemote product category. @discussion By default, the Game Controller framework will try to coalesce, or combine, the physical Apple TV Remote and the virtual Control Center remote and treat them as a single GCDevice instance. By setting GCSupportsMultipleMicroGamepads in your app's plist to true, you can disable this behavior.

func GCProductCategoryControlCenterRemote

func GCProductCategoryControlCenterRemote() uintptr

Users can use Apple TV Remote controls in Control Center on an iOS or iPadOS device.

func GCProductCategoryDualSense

func GCProductCategoryDualSense() uintptr

func GCProductCategoryDualShock4

func GCProductCategoryDualShock4() uintptr

func GCProductCategoryHID

func GCProductCategoryHID() uintptr

func GCProductCategoryKeyboard

func GCProductCategoryKeyboard() uintptr

func GCProductCategoryMFi

func GCProductCategoryMFi() uintptr

func GCProductCategoryMouse

func GCProductCategoryMouse() uintptr

func GCProductCategorySiriRemote1stGen

func GCProductCategorySiriRemote1stGen() uintptr

The Siri Remote (1st generation), or Apple TV Remote (1st generation), was first introduced in 2015. It features a Touch surface for touch navigation, and supports device motion.

func GCProductCategorySiriRemote2ndGen

func GCProductCategorySiriRemote2ndGen() uintptr

The Siri Remote (2nd generation), or Apple TV Remote (2nd generation), was first introduced in 2021. It features a touch-enabled clickpad for navigation.

func GCProductCategorySpatialController

func GCProductCategorySpatialController() uintptr

The category for game controller products that support 6DoF tracking on visionOS.

func GCProductCategoryUniversalElectronicsRemote

func GCProductCategoryUniversalElectronicsRemote() uintptr

The Universal Electronics remote is an infrared and Bluetooth Low Energy remote designed to work with the Apple TV.

func GCProductCategoryXboxOne

func GCProductCategoryXboxOne() uintptr

func GCRacingWheelConnectedRacingWheels

func GCRacingWheelConnectedRacingWheels() *foundation.NSSet[*GCRacingWheel]

Get the collection of racing wheels currently attached to the system. @see GCRacingWheelDidConnectNotification @see GCRacingWheelDidDisconnectNotification

func GCRacingWheelDidConnectNotification

func GCRacingWheelDidConnectNotification() uintptr

Use these constants with NSNotificationCenter to listen to connection and disconnection events. Use GCRacingWheelDidConnectNotification for observing connections of racing wheels. Use GCRacingWheelDidDisconnectNotification for observing disconnections of racing wheels. Connections and disconnections of racing wheels will also be reflected in the connectedRacingWheels array of the GCRacingWheel class. The 'object' property of the notification will contain the GCRacingWheel that was connected or disconnected. For example: - (void)wheelDidConnect:(NSNotification *)note { GCRacingWheel *controller = note.object; .... } @see NSNotificationCenter @see GCRacingWheel.connectedRacingWheels

func GCRacingWheelDidDisconnectNotification

func GCRacingWheelDidDisconnectNotification() uintptr

func NSDataFromGCExtendedGamepadSnapShotDataV100

func NSDataFromGCExtendedGamepadSnapShotDataV100(snapshotData *GCExtendedGamepadSnapShotDataV100) *foundation.NSData

Creates an NSData object from a v100 snapshot. If the version and size is not set in the snapshot the data will automatically have version 0x100 and sizeof(GCExtendedGamepadSnapShotDataV100) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCExtendedGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

func NSDataFromGCExtendedGamepadSnapshotData

func NSDataFromGCExtendedGamepadSnapshotData(snapshotData *GCExtendedGamepadSnapshotData) *foundation.NSData

Creates an NSData object from a snapshot. If the version and size is not set in the snapshot the data will automatically have the version GCCurrentExtendedGamepadSnapshotDataVersion and sizeof(GCExtendedGamepadSnapshotData) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCExtendedGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

func NSDataFromGCGamepadSnapShotDataV100

func NSDataFromGCGamepadSnapShotDataV100(snapshotData *GCGamepadSnapShotDataV100) *foundation.NSData

Creates an NSData object from a v100 snapshot. If the version and size is not set in the snapshot the data will automatically have version 0x100 and sizeof(GCGamepadSnapShotDataV100) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCGamepadSnapshot.snapshotData Deprecated: Use GCExtendedGamepad instead

func NSDataFromGCMicroGamepadSnapShotDataV100

func NSDataFromGCMicroGamepadSnapShotDataV100(snapshotData *GCMicroGamepadSnapShotDataV100) *foundation.NSData

Creates an NSData object from a v100 snapshot. If the version and size is not set in the snapshot the data will automatically have version 0x100 and sizeof(GCMicroGamepadSnapShotDataV100) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

func NSDataFromGCMicroGamepadSnapshotData

func NSDataFromGCMicroGamepadSnapshotData(snapshotData *GCMicroGamepadSnapshotData) *foundation.NSData

Creates an NSData object from a snapshot. If the version and size is not set in the snapshot the data will automatically have version GCCurrentMicroGamepadSnapshotDataVersion and sizeof(GCMicroGamepadSnapshotData) set as the values implicitly. @return nil if the snapshot is NULL, otherwise an NSData instance compatible with GCGamepadSnapshot.snapshotData Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

func NSStringFromGCPoint2

func NSStringFromGCPoint2(point GCPoint2) *foundation.NSString

func SymbolAvailable

func SymbolAvailable(symbol string) bool

SymbolAvailable reports whether the named C symbol was bound when the library loaded. Calling a generated wrapper whose symbol is unavailable dereferences a nil function variable and panics.

Types

type Acl_entry_id_t

type Acl_entry_id_t int64
const (
	ACL_FIRST_ENTRY Acl_entry_id_t = 0
	ACL_NEXT_ENTRY  Acl_entry_id_t = -1
	ACL_LAST_ENTRY  Acl_entry_id_t = -2
)

func (Acl_entry_id_t) String

func (e Acl_entry_id_t) String() string

type Acl_flag_t

type Acl_flag_t int64
const (
	ACL_FLAG_DEFER_INHERIT      Acl_flag_t = 1
	ACL_FLAG_NO_INHERIT         Acl_flag_t = 131072
	ACL_ENTRY_INHERITED         Acl_flag_t = 16
	ACL_ENTRY_FILE_INHERIT      Acl_flag_t = 32
	ACL_ENTRY_DIRECTORY_INHERIT Acl_flag_t = 64
	ACL_ENTRY_LIMIT_INHERIT     Acl_flag_t = 128
	ACL_ENTRY_ONLY_INHERIT      Acl_flag_t = 256
)

func (Acl_flag_t) String

func (e Acl_flag_t) String() string

type Acl_perm_t

type Acl_perm_t int64
const (
	ACL_READ_DATA           Acl_perm_t = 2
	ACL_LIST_DIRECTORY      Acl_perm_t = 2
	ACL_WRITE_DATA          Acl_perm_t = 4
	ACL_ADD_FILE            Acl_perm_t = 4
	ACL_EXECUTE             Acl_perm_t = 8
	ACL_SEARCH              Acl_perm_t = 8
	ACL_DELETE              Acl_perm_t = 16
	ACL_APPEND_DATA         Acl_perm_t = 32
	ACL_ADD_SUBDIRECTORY    Acl_perm_t = 32
	ACL_DELETE_CHILD        Acl_perm_t = 64
	ACL_READ_ATTRIBUTES     Acl_perm_t = 128
	ACL_WRITE_ATTRIBUTES    Acl_perm_t = 256
	ACL_READ_EXTATTRIBUTES  Acl_perm_t = 512
	ACL_WRITE_EXTATTRIBUTES Acl_perm_t = 1024
	ACL_READ_SECURITY       Acl_perm_t = 2048
	ACL_WRITE_SECURITY      Acl_perm_t = 4096
	ACL_CHANGE_OWNER        Acl_perm_t = 8192
	ACL_SYNCHRONIZE         Acl_perm_t = 1048576
)

func (Acl_perm_t) String

func (e Acl_perm_t) String() string

type Acl_tag_t

type Acl_tag_t int64
const (
	ACL_UNDEFINED_TAG  Acl_tag_t = 0
	ACL_EXTENDED_ALLOW Acl_tag_t = 1
	ACL_EXTENDED_DENY  Acl_tag_t = 2
)

func (Acl_tag_t) String

func (e Acl_tag_t) String() string

type Acl_type_t

type Acl_type_t int64
const (
	ACL_TYPE_EXTENDED Acl_type_t = 256
	ACL_TYPE_ACCESS   Acl_type_t = 0
	ACL_TYPE_DEFAULT  Acl_type_t = 1
	ACL_TYPE_AFS      Acl_type_t = 2
	ACL_TYPE_CODA     Acl_type_t = 3
	ACL_TYPE_NTFS     Acl_type_t = 4
	ACL_TYPE_NWFS     Acl_type_t = 5
)

func (Acl_type_t) String

func (e Acl_type_t) String() string

type Clockid_t

type Clockid_t int64

func (Clockid_t) String

func (e Clockid_t) String() string

type Dispatch_autorelease_frequency_t

type Dispatch_autorelease_frequency_t uint64
const (
	DISPATCH_AUTORELEASE_FREQUENCY_INHERIT   Dispatch_autorelease_frequency_t = 0
	DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM Dispatch_autorelease_frequency_t = 1
	DISPATCH_AUTORELEASE_FREQUENCY_NEVER     Dispatch_autorelease_frequency_t = 2
)

func (Dispatch_autorelease_frequency_t) String

type Dispatch_block_flags_t

type Dispatch_block_flags_t uint64
const (
	DISPATCH_BLOCK_BARRIER           Dispatch_block_flags_t = 1
	DISPATCH_BLOCK_DETACHED          Dispatch_block_flags_t = 2
	DISPATCH_BLOCK_ASSIGN_CURRENT    Dispatch_block_flags_t = 4
	DISPATCH_BLOCK_NO_QOS_CLASS      Dispatch_block_flags_t = 8
	DISPATCH_BLOCK_INHERIT_QOS_CLASS Dispatch_block_flags_t = 16
	DISPATCH_BLOCK_ENFORCE_QOS_CLASS Dispatch_block_flags_t = 32
)

func (Dispatch_block_flags_t) String

func (e Dispatch_block_flags_t) String() string

type EvCmd

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

func (EvCmd) String

func (e EvCmd) String() string

type EvsioEVSIOCCSIndices

type EvsioEVSIOCCSIndices int64
const (
	EVSIOCCS_X EvsioEVSIOCCSIndices = 0
	EVSIOCCS_Y EvsioEVSIOCCSIndices = 1
)

func (EvsioEVSIOCCSIndices) String

func (e EvsioEVSIOCCSIndices) String() string

type EvsioEVSIOSCSIndices

type EvsioEVSIOSCSIndices int64
const (
	EVSIOSCS_X EvsioEVSIOSCSIndices = 0
	EVSIOSCS_Y EvsioEVSIOSCSIndices = 1
)

func (EvsioEVSIOSCSIndices) String

func (e EvsioEVSIOSCSIndices) String() string

type Filesec_property_t

type Filesec_property_t int64
const (
	FILESEC_OWNER         Filesec_property_t = 1
	FILESEC_GROUP         Filesec_property_t = 2
	FILESEC_UUID          Filesec_property_t = 3
	FILESEC_MODE          Filesec_property_t = 4
	FILESEC_ACL           Filesec_property_t = 5
	FILESEC_GRPUUID       Filesec_property_t = 6
	FILESEC_ACL_RAW       Filesec_property_t = 100
	FILESEC_ACL_ALLOCSIZE Filesec_property_t = 101
)

func (Filesec_property_t) String

func (e Filesec_property_t) String() string

type GCAcceleration

type GCAcceleration struct {
	X float64
	Y float64
	Z float64
}

A 3 dimensional acceleration vector measured as scalar multiples of earth's gravitational acceleration, G. The azimuth direction is assumed to be (0, 0, 1), so a device held at rest with the z axis aligned with the azimuth is assumed to have gravitation applying the vector (0, 0, -1). @field x X-axis acceleration as a scalar multiple of earth's gravitational acceleration, G. @field y Y-axis acceleration as a scalar multiple of earth's gravitational acceleration, G. @field z Z-axis acceleration as a scalar multiple of earth's gravitational acceleration, G.

type GCAxis2DInput

type GCAxis2DInput interface {
	ValueDidChangeHandler() objc.Block
	SetValueDidChangeHandler(valueDidChangeHandler objc.Block)
	Value() GCPoint2
	IsAnalog() bool
	CanWrap() bool
	LastValueTimestamp() float64
	LastValueLatency() float64
	Sources() *foundation.NSSet[GCPhysicalInputSource]
}

GCAxis2DInput wraps the ObjC protocol GCAxis2DInput.

type GCAxisElement

type GCAxisElement interface {
	GCPhysicalInputElement
	AbsoluteInput() GCAxisInput
	RelativeInput() GCRelativeInput
}

GCAxisElement wraps the ObjC protocol GCAxisElement.

type GCAxisElementName

type GCAxisElementName interface {
	GCPhysicalInputElementName
}

GCAxisElementName wraps the ObjC protocol GCAxisElementName.

type GCAxisInput

type GCAxisInput interface {
	ValueDidChangeHandler() objc.Block
	SetValueDidChangeHandler(valueDidChangeHandler func(objc.ID, objc.ID, float32))
	Value() float32
	IsAnalog() bool
	CanWrap() bool
	LastValueTimestamp() float64
	LastValueLatency() float64
	Sources() *foundation.NSSet[GCPhysicalInputSource]
}

GCAxisInput wraps the ObjC protocol GCAxisInput.

type GCButtonElement

type GCButtonElement interface {
	GCPhysicalInputElement
	PressedInput() objc.ID
	TouchedInput() GCTouchedStateInput
	ForceInput() GCLinearInput
}

GCButtonElement wraps the ObjC protocol GCButtonElement.

type GCButtonElementName

type GCButtonElementName interface {
	GCPhysicalInputElementName
}

GCButtonElementName wraps the ObjC protocol GCButtonElementName.

type GCButtonInput

type GCButtonInput interface {
}

GCButtonInput wraps the ObjC protocol GCButtonInput.

type GCColor

type GCColor struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccolor

func GCColorFromID

func GCColorFromID(id objc.ID) *GCColor

func (*GCColor) Blue

func (o *GCColor) Blue() float32

func (*GCColor) Green

func (o *GCColor) Green() float32

func (*GCColor) InitWithRedGreenBlue

func (o *GCColor) InitWithRedGreenBlue(red float32, green float32, blue float32) *GCColor

func (*GCColor) Red

func (o *GCColor) Red() float32

type GCController

type GCController struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontroller

func GCControllerControllerWithExtendedGamepad

func GCControllerControllerWithExtendedGamepad() *GCController

Creates a controller with an extended gamepad profile. This controller will be considered a snapshot, allowing developers to write to any GCControllerElement of its profiles. @see snapshot @return A new controller with an extended gamepad profile

func GCControllerControllerWithMicroGamepad

func GCControllerControllerWithMicroGamepad() *GCController

Creates a controller with a micro gamepad profile. This controller will be considered a snapshot, allowing developers to write to any GCControllerElement of its profiles. @see snapshot @return A new controller with a micro gamepad profile

func GCControllerCurrent

func GCControllerCurrent() *GCController

The most recently used game controller. If a user actuates a game controller input, that controller will become the current one. @note This is useful for single player games where you only care about whether an input is pressed, and not where it came from. You will still need to register for changes to GCController.current so that your UI can remain up-to-date with the current controller.

func GCControllerFromID

func GCControllerFromID(id objc.ID) *GCController

func (*GCController) Battery

func (o *GCController) Battery() *GCDeviceBattery

Gets the battery information if controller supports one This property is useful when you try to notify your user to change or charge controller before it runs out of battery life or simply display the current battery level and status.

func (*GCController) Capture

func (o *GCController) Capture() *GCController

Polls the state vector of the controller and saves it to a new and writable instance of GCController. If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on user input once it is taken. @see snapshot @return A new controller with the duplicated state vector of the current controller.

func (*GCController) ControllerPausedHandler

func (o *GCController) ControllerPausedHandler() objc.Block

Set this block to be notified when a user intends to suspend or resume the current game state. A controller will have a button dedicated to suspending and resuming play and invoking context sensitive actions. During event handling the system will notify the application using this block such that the application can handle the suspension and resumption from the given controller. Use this to implement your canonical transition to a pause menu for example if that is your application's desired handling of suspension in play. You may pause and resume based on game state as well so the event is only called each time the pause/resume button is pressed. @note This handler has been deprecated in favor of the Menu button found on GCMicroGamepad and GCExtendedGamepad. @see microGamepad @see extendedGamepad Deprecated: Use the Menu button found on the controller's input profile, if it exists.

func (*GCController) ExtendedGamepad

func (o *GCController) ExtendedGamepad() *GCExtendedGamepad

func (*GCController) Gamepad

func (o *GCController) Gamepad() *GCGamepad

Gets the profile for the controller that suits current application. There are several supported profiles, with an additional optional profile for motion as well. Each controller may be able to map its inputs into all profiles or just one kind of profile. Query for the controller profile that suits your game, the simplest kind will be supported by the broadest variety of controllers. A controller supporting the Extended Gamepad profile for example supports the Gamepad profile and more. As such it can always be used just in the Gamepad profile if that suits the game. A physical controller that supports a profile must support it completely. That means that all buttons and axis inputs must be valid inputs that a developer can utilize. If a controller does not support the given profile the returned value will be nil. Use this to filter controllers if the application requires a specific kind of profile. @see motion Deprecated: since macOS 10.12.

func (*GCController) Haptics

func (o *GCController) Haptics() *GCDeviceHaptics

Gets the haptics for the controller, if one exists. Use this property to create CHHapticEngine instances according to your needs. @note Haptics are a drain on the controller's battery, and can be distracting when used excessively.

func (*GCController) Input

func (o *GCController) Input() *GCControllerLiveInput

Gets the input profile for the controller.

func (*GCController) IsAttachedToDevice

func (o *GCController) IsAttachedToDevice() bool

A controller may be form fitting or otherwise closely attached to the device. This closeness to other inputs on the device may suggest that interaction with the device may use other inputs easily. This is presented to developers to allow them to make informed decisions about UI and interactions to choose for their game in this situation.

func (*GCController) IsSnapshot

func (o *GCController) IsSnapshot() bool

A controller may represent a real device managed by the operating system, or a virtual snapshot created by the developer. If a controller is created by the developer, it is considered to be a snapshot, allowing direct writes to any GCControllerElement of its profiles. If the controller is not snapshot, the system will reject any write requests to GCControllerElement. @see controllerWithMicroGamepad @see controllerWithExtendedGamepad @see capture

func (*GCController) Light

func (o *GCController) Light() *GCDeviceLight

Gets the light for the controller, if one exists. A controller's light can be used to signal information to the player, such as using different light colors based on the player index. It can also be used to react to in-game events and enhance user immersion.

func (*GCController) MicroGamepad

func (o *GCController) MicroGamepad() *GCMicroGamepad

func (*GCController) Motion

func (o *GCController) Motion() *GCMotion

Gets the motion input profile. This profile is optional and may be available if the controller is attached to a device that supports motion. If this is nil the controller does not support motion input and only the gamepad & extendedGamepad profiles are available. @see gamepad @see extendedGamepad

func (*GCController) PhysicalInputProfile

func (o *GCController) PhysicalInputProfile() *GCPhysicalInputProfile

Gets the physical input profile for the controller. @note This is equivalent to the controller's microGamepad, or extendedGamepad instance. @see microGamepad @see extendedGamepad

func (*GCController) PlayerIndex

func (o *GCController) PlayerIndex() GCControllerPlayerIndex

A player index for the controller, defaults to GCControllerPlayerIndexUnset. This can be set both for the application to keep track of controllers and as a signal to make a controller display a player index on a set of LEDs or some other mechanism. A controller is not guaranteed to have a visual display of the playerIndex, playerIndex does not persist for a controller with regards to a system. Negative values less than GCControllerPlayerIndexUnset will just map back to GCControllerPlayerIndexUnset when read back.

func (*GCController) SetControllerPausedHandler deprecated

func (o *GCController) SetControllerPausedHandler(controllerPausedHandler func(*GCController))

Deprecated: Use the Menu button found on the controller's input profile, if it exists.

func (*GCController) SetPlayerIndex

func (o *GCController) SetPlayerIndex(playerIndex GCControllerPlayerIndex)

type GCControllerAxisInput

type GCControllerAxisInput struct {
	GCControllerElement
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrolleraxisinput

func GCControllerAxisInputFromID

func GCControllerAxisInputFromID(id objc.ID) *GCControllerAxisInput

func (*GCControllerAxisInput) SetValue

func (o *GCControllerAxisInput) SetValue(value float32)

Sets the normalized value for the input. @param value the value to set the input to. @note If the controller's snapshot flag is set to NO, this method has no effect. @see value

func (*GCControllerAxisInput) SetValueChangedHandler

func (o *GCControllerAxisInput) SetValueChangedHandler(valueChangedHandler func(*GCControllerAxisInput, float32))

func (*GCControllerAxisInput) Value

func (o *GCControllerAxisInput) Value() float32

A normalized value for the input, between -1 and 1 for axis inputs. The values are deadzoned and saturated before they are returned so there is no value ouside the range. Deadzoning does not remove values from the range, the full 0 to 1 magnitude of values are possible from the input. As an axis is often used in a digital sense, you can rely on a value of 0 meaning the axis is inside the deadzone. Any value greater than or less than zero is not in the deadzone.

func (*GCControllerAxisInput) ValueChangedHandler

func (o *GCControllerAxisInput) ValueChangedHandler() objc.Block

type GCControllerButtonInput

type GCControllerButtonInput struct {
	GCControllerElement
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerbuttoninput

func GCControllerButtonInputFromID

func GCControllerButtonInputFromID(id objc.ID) *GCControllerButtonInput

func (*GCControllerButtonInput) IsPressed

func (o *GCControllerButtonInput) IsPressed() bool

Buttons are mostly used in a digital sense, thus we have a recommended method for checking for pressed state instead of interpreting the value. As a general guideline a button is pressed if the value exceeds 0. However there may be hysterisis applied to counter noisy input values, thus incidental values around the threshold value may not trigger a change in pressed state. Others buttons may support two-stage actuation, where the button reports a value between 0 and 1 but is only considered pressed when its value is greater than some threshold other than 0. @see pressedChangedHandler @see value

func (*GCControllerButtonInput) IsTouched

func (o *GCControllerButtonInput) IsTouched() bool

Some buttons feature capacitive touch capabilities where the user can touch the button without pressing it. In such cases, a button will be touched before it is pressed. For buttons without capacitive sensing, the touched state is true if the value exceeds 0. @see touchChangedHandler @see pressed

func (*GCControllerButtonInput) PressedChangedHandler

func (o *GCControllerButtonInput) PressedChangedHandler() objc.Block

Set this block if you want to be notified when only the pressed state on this button changes. This will get called less often than the valueChangedHandler with the additional feature of the pressed state being different to the last time it was called.

func (*GCControllerButtonInput) SetPressedChangedHandler

func (o *GCControllerButtonInput) SetPressedChangedHandler(pressedChangedHandler func(*GCControllerButtonInput, float32, bool))

func (*GCControllerButtonInput) SetTouchedChangedHandler

func (o *GCControllerButtonInput) SetTouchedChangedHandler(touchedChangedHandler func(*GCControllerButtonInput, float32, bool, bool))

func (*GCControllerButtonInput) SetValue

func (o *GCControllerButtonInput) SetValue(value float32)

Sets the normalized value for the button input. Will update the pressed state of the button. @param value the value to set the input to. @note If the controller's snapshot flag is set to NO, this method has no effect. @see value

func (*GCControllerButtonInput) SetValueChangedHandler

func (o *GCControllerButtonInput) SetValueChangedHandler(valueChangedHandler func(*GCControllerButtonInput, float32, bool))

func (*GCControllerButtonInput) TouchedChangedHandler

func (o *GCControllerButtonInput) TouchedChangedHandler() objc.Block

func (*GCControllerButtonInput) Value

func (o *GCControllerButtonInput) Value() float32

A normalized value for the input. Between 0 and 1 for button inputs. Values are saturated and thus never exceed the range of [0, 1]. @see valueChangedHandler @see pressed

func (*GCControllerButtonInput) ValueChangedHandler

func (o *GCControllerButtonInput) ValueChangedHandler() objc.Block

type GCControllerDirectionPad

type GCControllerDirectionPad struct {
	GCControllerElement
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerdirectionpad

func GCControllerDirectionPadFromID

func GCControllerDirectionPadFromID(id objc.ID) *GCControllerDirectionPad

func (*GCControllerDirectionPad) Down

func (*GCControllerDirectionPad) Left

func (*GCControllerDirectionPad) Right

func (*GCControllerDirectionPad) SetValueChangedHandler

func (o *GCControllerDirectionPad) SetValueChangedHandler(valueChangedHandler func(*GCControllerDirectionPad, float32, float32))

func (*GCControllerDirectionPad) SetValueForXAxisYAxis

func (o *GCControllerDirectionPad) SetValueForXAxisYAxis(xAxis float32, yAxis float32)

Sets the normalized value for the direction pad's axis inputs. Will update the states of the direction pad's button inputs as well. @param xAxis the value to set the xAxis of the touchpad to. @param yAxis the value to set the yAxis of the touchpad to. @note If the controller's snapshot flag is set to NO, this method has no effect. @see value @see pressed

func (*GCControllerDirectionPad) Up

func (*GCControllerDirectionPad) ValueChangedHandler

func (o *GCControllerDirectionPad) ValueChangedHandler() objc.Block

func (*GCControllerDirectionPad) XAxis

func (*GCControllerDirectionPad) YAxis

type GCControllerElement

type GCControllerElement struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerelement

func GCControllerElementFromID

func GCControllerElementFromID(id objc.ID) *GCControllerElement

func (*GCControllerElement) Aliases

A set of aliases that can be used to access this element with keyed subscript notation.

func (*GCControllerElement) Collection

func (o *GCControllerElement) Collection() *GCControllerElement

Each element can be part of a wider collection of inputs that map to a single logical element. A directional pad (dpad) is a logical collection of two axis inputs and thus each axis belongs to the same collection element - the dpad.

func (*GCControllerElement) IsAnalog

func (o *GCControllerElement) IsAnalog() bool

Check if the element can support more than just digital values, such as decimal ranges between 0 and 1. Defaults to YES for most elements.

func (*GCControllerElement) IsBoundToSystemGesture

func (o *GCControllerElement) IsBoundToSystemGesture() bool

Check if the element is bound to a system gesture. Defaults to NO for most elements. @see preferredSystemGestureState @see GCSystemGestureState

func (*GCControllerElement) LocalizedName

func (o *GCControllerElement) LocalizedName() *foundation.NSString

The element's localized name, taking input remapping into account. @note In almost all instances, you should use this over unmappedLocalizedName in your UI.

func (*GCControllerElement) PreferredSystemGestureState

func (o *GCControllerElement) PreferredSystemGestureState() GCSystemGestureState

The preferred system gesture state for this element. Defaults to GCSystemGestureStateEnabled for most elements @note This is merely the preferred system gesture state - it is not guaranteed to be respected by the system. @note It is highly recommended to leave this set to the default value, however there may be situations (for example, game streaming apps) where it is preferrable to disable system gestures. @see boundToSystemGesture

func (*GCControllerElement) SetLocalizedName

func (o *GCControllerElement) SetLocalizedName(localizedName *foundation.NSString)

func (*GCControllerElement) SetPreferredSystemGestureState

func (o *GCControllerElement) SetPreferredSystemGestureState(preferredSystemGestureState GCSystemGestureState)

func (*GCControllerElement) SetSfSymbolsName

func (o *GCControllerElement) SetSfSymbolsName(sfSymbolsName *foundation.NSString)

func (*GCControllerElement) SetUnmappedLocalizedName

func (o *GCControllerElement) SetUnmappedLocalizedName(unmappedLocalizedName *foundation.NSString)

func (*GCControllerElement) SetUnmappedSfSymbolsName

func (o *GCControllerElement) SetUnmappedSfSymbolsName(unmappedSfSymbolsName *foundation.NSString)

func (*GCControllerElement) SfSymbolsName

func (o *GCControllerElement) SfSymbolsName() *foundation.NSString

The element's SF Symbols name, taking input remapping into account. @note In almost all instances, you should use this over unmappedSfSymbolsName in your UI.

func (*GCControllerElement) UnmappedLocalizedName

func (o *GCControllerElement) UnmappedLocalizedName() *foundation.NSString

The element's localized name, not taking any input remapping into account. @note Use this in your games own remapping UI, or when you need to prompt a user that a given button has no mapping (localizedName is nil).

func (*GCControllerElement) UnmappedSfSymbolsName

func (o *GCControllerElement) UnmappedSfSymbolsName() *foundation.NSString

The element's SF Symbols name, not taking any input remapping into account. @note Use this in your games own remapping UI, or when you need to prompt a user that a given button has no mapping (sfSymbolsName is nil).

type GCControllerInputState

type GCControllerInputState struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerinputstate

func GCControllerInputStateFromID

func GCControllerInputStateFromID(id objc.ID) *GCControllerInputState

type GCControllerLiveInput

type GCControllerLiveInput struct {
	GCControllerInputState
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollerliveinput

func GCControllerLiveInputFromID

func GCControllerLiveInputFromID(id objc.ID) *GCControllerLiveInput

func (*GCControllerLiveInput) Capture

func (*GCControllerLiveInput) NextInputState

func (o *GCControllerLiveInput) NextInputState() *GCControllerInputState

func (*GCControllerLiveInput) UnmappedInput

func (o *GCControllerLiveInput) UnmappedInput() *GCControllerLiveInput

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

type GCControllerPlayerIndex

type GCControllerPlayerIndex int64
const (
	GCControllerPlayerIndexUnset GCControllerPlayerIndex = -1
	GCControllerPlayerIndex1     GCControllerPlayerIndex = 0
	GCControllerPlayerIndex2     GCControllerPlayerIndex = 1
	GCControllerPlayerIndex3     GCControllerPlayerIndex = 2
	GCControllerPlayerIndex4     GCControllerPlayerIndex = 3
)

func (GCControllerPlayerIndex) String

func (e GCControllerPlayerIndex) String() string

type GCControllerTouchpad

type GCControllerTouchpad struct {
	GCControllerElement
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gccontrollertouchpad

func GCControllerTouchpadFromID

func GCControllerTouchpadFromID(id objc.ID) *GCControllerTouchpad

func (*GCControllerTouchpad) Button

Button is the button built into the touch surface.

func (*GCControllerTouchpad) ReportsAbsoluteTouchSurfaceValues

func (o *GCControllerTouchpad) ReportsAbsoluteTouchSurfaceValues() bool

The touchpad can use the raw position values of its surface as D-pad values, or it can create a virtual dpad centered around the first contact point with the surface. If NO; a smaller sliding window is created around the initial touch point and subsequent movement is relative to that center. Movement outside the window will slide the window with it to re-center it. This is great for surfaces where there is no clear sense of a middle and drift over time is an issue. If YES; the absolute values are used and any drift will have to managed manually either through user traning or by a developer using the dpad. The default value for this property is YES, meaning the touch surface's raw positional values are reported.

func (*GCControllerTouchpad) SetReportsAbsoluteTouchSurfaceValues

func (o *GCControllerTouchpad) SetReportsAbsoluteTouchSurfaceValues(reportsAbsoluteTouchSurfaceValues bool)

func (*GCControllerTouchpad) SetTouchDown

func (o *GCControllerTouchpad) SetTouchDown(touchDown func(*GCControllerTouchpad, float32, float32, float32, bool))

func (*GCControllerTouchpad) SetTouchMoved

func (o *GCControllerTouchpad) SetTouchMoved(touchMoved func(*GCControllerTouchpad, float32, float32, float32, bool))

func (*GCControllerTouchpad) SetTouchUp

func (o *GCControllerTouchpad) SetTouchUp(touchUp func(*GCControllerTouchpad, float32, float32, float32, bool))

func (*GCControllerTouchpad) SetValueForXAxisYAxisTouchDownButtonValue

func (o *GCControllerTouchpad) SetValueForXAxisYAxisTouchDownButtonValue(xAxis float32, yAxis float32, touchDown bool, buttonValue float32)

Sets the normalized value for the touchpad's axes, as well as its current touch and button state. @note If the controller's snapshot flag is set to NO, this method has no effect. @see touchSurface @see touchState

func (*GCControllerTouchpad) TouchDown

func (o *GCControllerTouchpad) TouchDown() objc.Block

Called when a touch event begins on the touchpad.

func (*GCControllerTouchpad) TouchMoved

func (o *GCControllerTouchpad) TouchMoved() objc.Block

Called when a touch event continues on the touchpad, but not when it begins or ends.

func (*GCControllerTouchpad) TouchState

func (o *GCControllerTouchpad) TouchState() GCTouchState

Indicates the current state of the touch event on the touchpad.

func (*GCControllerTouchpad) TouchSurface

The touch surface is a 2-axis control that represents the position of a touch event on the touchpad. The axes will indicate the most recent touch position - a non-zero value does not indicate that the surface is being touched, and a value of (0, 0) does not indicate the surface is not being touched. @see touchState - Should be polled in conjunction with touchSurface to determine if values are valid

func (*GCControllerTouchpad) TouchUp

func (o *GCControllerTouchpad) TouchUp() objc.Block

Called when a touch event ends on the touchpad.

type GCDevice

type GCDevice interface {
}

GCDevice wraps the ObjC protocol GCDevice.

type GCDeviceBattery

type GCDeviceBattery struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicebattery

func GCDeviceBatteryFromID

func GCDeviceBatteryFromID(id objc.ID) *GCDeviceBattery

func (*GCDeviceBattery) BatteryLevel

func (o *GCDeviceBattery) BatteryLevel() float32

This is the battery level for controller. Battery level ranges from 0.0 (fully discharged) to 1.0 (100% charged) and defaults to 0

func (*GCDeviceBattery) BatteryState

func (o *GCDeviceBattery) BatteryState() GCDeviceBatteryState

A battery state for controller, defaults to GCControllerBatteryStateUnknown @note This property might be useful if you display the information about currently connected controller for player's convenience

type GCDeviceBatteryState

type GCDeviceBatteryState int64
const (
	GCDeviceBatteryStateUnknown     GCDeviceBatteryState = -1
	GCDeviceBatteryStateDischarging GCDeviceBatteryState = 0
	GCDeviceBatteryStateCharging    GCDeviceBatteryState = 1
	GCDeviceBatteryStateFull        GCDeviceBatteryState = 2
)

func (GCDeviceBatteryState) String

func (e GCDeviceBatteryState) String() string

type GCDeviceCursor

type GCDeviceCursor struct {
	GCControllerDirectionPad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicecursor

func GCDeviceCursorFromID

func GCDeviceCursorFromID(id objc.ID) *GCDeviceCursor

type GCDeviceHaptics

type GCDeviceHaptics struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicehaptics

func GCDeviceHapticsFromID

func GCDeviceHapticsFromID(id objc.ID) *GCDeviceHaptics

func (*GCDeviceHaptics) CreateEngineWithLocality

func (o *GCDeviceHaptics) CreateEngineWithLocality(locality *foundation.NSString) *corehaptics.CHHapticEngine

Creates and returns a new instance of CHHapticEngine with a given GCHapticsLocality. Any patterns you send to this engine will play on all specified actuators. @note Often times, it is best to use GCHapticsLocalityDefault. Engines created with the default locality will give users an expected haptic experience. On most game controllers, this will cause your haptic patterns to play on the handles. If you want to play different experiences on different actuators (for example, using the left handle actuator as a woofer and the right actuator as a tweeter), you can create multiple engines (for example, one with a GCHapticsLocalityLeftHandle locality and another with a GCHapticsLocalityRightHandle locality). @see CHHapticEngine @see GCHapticsLocality

func (*GCDeviceHaptics) SupportedLocalities

func (o *GCDeviceHaptics) SupportedLocalities() *foundation.NSSet[*foundation.NSString]

The set of supported haptic localities for this device - representing the locations of its haptic actuators. @note GCHapticsLocalityDefault and GCHapticsLocalityAll are guaranteed to be supported - and they may be equivalent. @see GCHapticsLocality

type GCDeviceLight

type GCDeviceLight struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdevicelight

func GCDeviceLightFromID

func GCDeviceLightFromID(id objc.ID) *GCDeviceLight

func (*GCDeviceLight) Color

func (o *GCDeviceLight) Color() *GCColor

func (*GCDeviceLight) SetColor

func (o *GCDeviceLight) SetColor(color *GCColor)

type GCDevicePhysicalInput

type GCDevicePhysicalInput interface {
	GCDevicePhysicalInputState
}

GCDevicePhysicalInput wraps the ObjC protocol GCDevicePhysicalInput.

type GCDevicePhysicalInputElementChange

type GCDevicePhysicalInputElementChange int64
const (
	// Indicates that a change could not be determined.  This is typically because the input state queue filled up and older input state snapshots were dropped.
	GCDevicePhysicalInputElementUnknownChange GCDevicePhysicalInputElementChange = -1
	// Indicates that no value of the element changed.
	GCDevicePhysicalInputElementNoChange GCDevicePhysicalInputElementChange = 0
	// Indicates that a value of the element changed.
	GCDevicePhysicalInputElementChanged GCDevicePhysicalInputElementChange = 1
)

func (GCDevicePhysicalInputElementChange) String

type GCDevicePhysicalInputState

GCDevicePhysicalInputState wraps the ObjC protocol GCDevicePhysicalInputState.

type GCDevicePhysicalInputStateDiff

type GCDevicePhysicalInputStateDiff interface {
	ChangeForElement(element GCPhysicalInputElement) GCDevicePhysicalInputElementChange
	ChangedElements() *foundation.NSEnumerator[GCPhysicalInputElement]
}

GCDevicePhysicalInputStateDiff wraps the ObjC protocol GCDevicePhysicalInputStateDiff.

type GCDirectionPadElement

type GCDirectionPadElement interface {
	GCPhysicalInputElement
	XyAxes() GCAxis2DInput
	XAxis() GCAxisInput
	YAxis() GCAxisInput
	Up() objc.ID
	Down() objc.ID
	Left() objc.ID
	Right() objc.ID
}

GCDirectionPadElement wraps the ObjC protocol GCDirectionPadElement.

type GCDirectionPadElementName

type GCDirectionPadElementName interface {
	GCPhysicalInputElementName
}

GCDirectionPadElementName wraps the ObjC protocol GCDirectionPadElementName.

type GCDirectionalGamepad

type GCDirectionalGamepad struct {
	GCMicroGamepad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdirectionalgamepad

func GCDirectionalGamepadFromID

func GCDirectionalGamepadFromID(id objc.ID) *GCDirectionalGamepad

type GCDualSenseAdaptiveTrigger

type GCDualSenseAdaptiveTrigger struct {
	GCControllerButtonInput
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdualsenseadaptivetrigger

func GCDualSenseAdaptiveTriggerFromID

func GCDualSenseAdaptiveTriggerFromID(id objc.ID) *GCDualSenseAdaptiveTrigger

func (*GCDualSenseAdaptiveTrigger) ArmPosition

func (o *GCDualSenseAdaptiveTrigger) ArmPosition() float32

A normalized float from [0-1], with 0 representing the lowest possible trigger arm position and 1 representing the maximum trigger arm position. @see GCDualSenseAdaptiveTriggerStatus

func (*GCDualSenseAdaptiveTrigger) Mode

The mode that the adaptive trigger is currently in. This property reflects the physical state of the triggers - and requires a response from the controller. It does not update immediately after calling -[GCDualSenseAdaptiveTrigger setMode...]. @see GCDualSenseAdaptiveTriggerMode

func (*GCDualSenseAdaptiveTrigger) SetModeFeedbackWithResistiveStrengths

func (o *GCDualSenseAdaptiveTrigger) SetModeFeedbackWithResistiveStrengths(positionalResistiveStrengths GCDualSenseAdaptiveTriggerPositionalResistiveStrengths)

Sets the adaptive trigger to feedback mode. The strength of the effect can be set for each possible trigger position. The trigger arm will provide a degree of feedback based on the resistive strength for a given position. @param positionalResistiveStrengths - Positional normalized floats from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength.

func (*GCDualSenseAdaptiveTrigger) SetModeFeedbackWithStartPositionResistiveStrength

func (o *GCDualSenseAdaptiveTrigger) SetModeFeedbackWithStartPositionResistiveStrength(startPosition float32, resistiveStrength float32)

Sets the adaptive trigger to feedback mode. The start position and strength of the effect can be set arbitrarily. The trigger arm will continue to provide a constant degree of feedback whenever it is depressed further than the start position. @param startPosition - A normalized float from [0-1], with 0 representing the smallest possible trigger depression and 1 representing the maximum trigger depression. @param resistiveStrength - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength.

func (*GCDualSenseAdaptiveTrigger) SetModeOff

func (o *GCDualSenseAdaptiveTrigger) SetModeOff()

Sets the adaptive trigger to off mode. This turns off the adaptive trigger effect.

func (*GCDualSenseAdaptiveTrigger) SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength

func (o *GCDualSenseAdaptiveTrigger) SetModeSlopeFeedbackWithStartPositionEndPositionStartStrengthEndStrength(startPosition float32, endPosition float32, startStrength float32, endStrength float32)

Sets the adaptive trigger to slope feedback mode. The start position, end position, start strength, and end strength of the effect can be set arbitrarily; however the end position must be larger than the start position. The trigger arm will provide a linearly interpolated degree of feedback whenever it is depressed between the start and end positions based on the starting and ending strengths. @param startPosition - A normalized float from [0-1], with 0 representing the smallest possible trigger depression and 1 representing the maximum trigger depression. The effect will begin once the trigger is depressed beyond this point. @param endPosition - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. Must be greater than startPosition. The effect will end once the trigger is depressed beyond this point. @param startStrength - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength. The effect will begin at startStrength once the trigger is depressed beyond startPosition. @param endStrength - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength. The effect will end at endStrength once the trigger is depressed to endPosition.

func (*GCDualSenseAdaptiveTrigger) SetModeVibrationWithAmplitudesFrequency

func (o *GCDualSenseAdaptiveTrigger) SetModeVibrationWithAmplitudesFrequency(positionalAmplitudes GCDualSenseAdaptiveTriggerPositionalAmplitudes, frequency float32)

Sets the adaptive trigger to vibration mode. The amplitude of the effect can be set for each possible trigger position. The trigger arm will provide a degree of feedback based on the amplitude for a given position. The trigger arm will continue to strike against the trigger, providing a "sense of vibration". @param positionalAmplitudes - Positional normalized floats from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength. @param frequency - A normalized float from [0-1], with 0 representing the minimum frequency and 1 representing the maximum frequency of the vibration effect.

func (*GCDualSenseAdaptiveTrigger) SetModeVibrationWithStartPositionAmplitudeFrequency

func (o *GCDualSenseAdaptiveTrigger) SetModeVibrationWithStartPositionAmplitudeFrequency(startPosition float32, amplitude float32, frequency float32)

Sets the adaptive trigger to vibration mode. The start position, amplitude, and frequency of the effect can be set arbitrarily. The trigger arm will continue to strike against the trigger whenever it is depressed further than the start position, providing a "sense of vibration". @param startPosition - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. The effect will begin once the trigger is depressed beyond this point. @param amplitude - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength. @param frequency - A normalized float from [0-1], with 0 representing the minimum frequency and 1 representing the maximum frequency of the vibration effect.

func (*GCDualSenseAdaptiveTrigger) SetModeWeaponWithStartPositionEndPositionResistiveStrength

func (o *GCDualSenseAdaptiveTrigger) SetModeWeaponWithStartPositionEndPositionResistiveStrength(startPosition float32, endPosition float32, resistiveStrength float32)

Sets the adaptive trigger to weapon mode. The start position, end position, and strength of the effect can be set arbitrarily; however the end position must be larger than the start position. The trigger arm will continue to provide a constant degree of feedback whenever it is depressed further than the start position. Once the trigger arm has been depressed past the end position, the strength of the effect will immediately fall to zero, providing a "sense of release" similar to that provided by pulling the trigger of a weapon. @param startPosition - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. The effect will begin once the trigger is depressed beyond this point. @param endPosition - A normalized float from [0-1], with 0 representing the smallest possible depression and 1 representing the maximum trigger depression. Must be greater than startPosition. The effect will end once the trigger is depressed beyond this point. @param resistiveStrength - A normalized float from [0-1], with 0 representing the minimum effect strength (off entirely) and 1 representing the maximum effect strength.

func (*GCDualSenseAdaptiveTrigger) Status

The current status of the adaptive trigger - whether it is ready to apply a load, is currently applying a load, or has finished applying a load. @see GCDualSenseAdaptiveTriggerStatus

type GCDualSenseAdaptiveTriggerMode

type GCDualSenseAdaptiveTriggerMode int64
const (
	// The adaptive trigger effect is disabled.
	GCDualSenseAdaptiveTriggerModeOff GCDualSenseAdaptiveTriggerMode = 0
	// The adaptive trigger effect provides constant feedback from the start position onwards.
	GCDualSenseAdaptiveTriggerModeFeedback GCDualSenseAdaptiveTriggerMode = 1
	// The adaptive trigger effect provides feedback from the start position to the end position, emulating the feeling of pulling the trigger on a weapon.
	GCDualSenseAdaptiveTriggerModeWeapon GCDualSenseAdaptiveTriggerMode = 2
	// The adaptive trigger effect provides a constant vibration effect from the start position onwards.
	GCDualSenseAdaptiveTriggerModeVibration GCDualSenseAdaptiveTriggerMode = 3
	// The adaptive trigger effect provides feedback from the start position to the end position, linearly interpolated between the start and end strengths.
	GCDualSenseAdaptiveTriggerModeSlopeFeedback GCDualSenseAdaptiveTriggerMode = 4
)

func (GCDualSenseAdaptiveTriggerMode) String

type GCDualSenseAdaptiveTriggerPositionalAmplitudes

type GCDualSenseAdaptiveTriggerPositionalAmplitudes struct {
	Values [10]float32
}

type GCDualSenseAdaptiveTriggerPositionalResistiveStrengths

type GCDualSenseAdaptiveTriggerPositionalResistiveStrengths struct {
	Values [10]float32
}

type GCDualSenseAdaptiveTriggerStatus

type GCDualSenseAdaptiveTriggerStatus int64
const (
	// The adaptive trigger status cannot be determined.
	GCDualSenseAdaptiveTriggerStatusUnknown GCDualSenseAdaptiveTriggerStatus = -1
	// The adaptive trigger is in feedback mode, and a resistive load has not been applied yet.
	GCDualSenseAdaptiveTriggerStatusFeedbackNoLoad GCDualSenseAdaptiveTriggerStatus = 0
	// The adaptive trigger is in feedback mode, and a resistive load is applied.
	GCDualSenseAdaptiveTriggerStatusFeedbackLoadApplied GCDualSenseAdaptiveTriggerStatus = 1
	// The adaptive trigger is in weapon mode, the trigger is ready to fire, and a resistive load has not been applied yet.
	GCDualSenseAdaptiveTriggerStatusWeaponReady GCDualSenseAdaptiveTriggerStatus = 2
	// The adaptive trigger is in weapon mode, the trigger is firing, and a resistive load is currently being applied.
	GCDualSenseAdaptiveTriggerStatusWeaponFiring GCDualSenseAdaptiveTriggerStatus = 3
	// The adaptive trigger is in weapon mode, the trigger has fired, and a resistive load is no longer being applied.
	GCDualSenseAdaptiveTriggerStatusWeaponFired GCDualSenseAdaptiveTriggerStatus = 4
	// The adaptive trigger is in vibration mode, and the trigger is not vibrating.
	GCDualSenseAdaptiveTriggerStatusVibrationNotVibrating GCDualSenseAdaptiveTriggerStatus = 5
	// The adaptive trigger is in vibration mode, and the trigger is currently vibrating.
	GCDualSenseAdaptiveTriggerStatusVibrationIsVibrating GCDualSenseAdaptiveTriggerStatus = 6
	// The adaptive trigger is in slope feedback mode, the trigger is ready to apply a resistive load, but a resistive load has not been applied yet.
	GCDualSenseAdaptiveTriggerStatusSlopeFeedbackReady GCDualSenseAdaptiveTriggerStatus = 7
	// The adaptive trigger is in slope feedback mode, and a resistive load is currently being applied to the trigger.
	GCDualSenseAdaptiveTriggerStatusSlopeFeedbackApplyingLoad GCDualSenseAdaptiveTriggerStatus = 8
	// The adaptive trigger is in slope feedback mode, a resistive load has previously been applied, but is no longer being applied.
	GCDualSenseAdaptiveTriggerStatusSlopeFeedbackFinished GCDualSenseAdaptiveTriggerStatus = 9
)

func (GCDualSenseAdaptiveTriggerStatus) String

type GCDualSenseGamepad

type GCDualSenseGamepad struct {
	GCExtendedGamepad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdualsensegamepad

func GCDualSenseGamepadFromID

func GCDualSenseGamepadFromID(id objc.ID) *GCDualSenseGamepad

func (*GCDualSenseGamepad) TouchpadButton

func (o *GCDualSenseGamepad) TouchpadButton() *GCControllerButtonInput

DualSense controllers have a touchpad with a button and two-finger tracking.

func (*GCDualSenseGamepad) TouchpadPrimary

func (o *GCDualSenseGamepad) TouchpadPrimary() *GCControllerDirectionPad

func (*GCDualSenseGamepad) TouchpadSecondary

func (o *GCDualSenseGamepad) TouchpadSecondary() *GCControllerDirectionPad

type GCDualShockGamepad

type GCDualShockGamepad struct {
	GCExtendedGamepad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcdualshockgamepad

func GCDualShockGamepadFromID

func GCDualShockGamepadFromID(id objc.ID) *GCDualShockGamepad

func (*GCDualShockGamepad) TouchpadButton

func (o *GCDualShockGamepad) TouchpadButton() *GCControllerButtonInput

DualShock controllers have a touchpad with a button and two-finger tracking.

func (*GCDualShockGamepad) TouchpadPrimary

func (o *GCDualShockGamepad) TouchpadPrimary() *GCControllerDirectionPad

func (*GCDualShockGamepad) TouchpadSecondary

func (o *GCDualShockGamepad) TouchpadSecondary() *GCControllerDirectionPad

type GCEulerAngles

type GCEulerAngles struct {
	Pitch float64
	Yaw   float64
	Roll  float64
}

A structure containing 3-axis rotation data. The angles are rotated in order or pitch then yaw then roll. @field pitch X-axis rotation in radians. The sign follows the right hand rule (i.e. if the right hand is wrapped around the X axis such that the tip of the thumb points toward positive X, a positive rotation is one toward the tips of the other 4 fingers). @field yaw Y-axis rotation in radians. The sign follows the right hand rule (i.e. if the right hand is wrapped around the Y axis such that the tip of the thumb points toward positive Y, a positive rotation is one toward the tips of the other 4 fingers). @field roll Z-axis rotation in radians. The sign follows the right hand rule (i.e. if the right hand is wrapped around the Z axis such that the tip of the thumb points toward positive Z, a positive rotation is one toward the tips of the other 4 fingers).

type GCEventViewController

type GCEventViewController struct {
	appkit.NSViewController
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gceventviewcontroller

func GCEventViewControllerFromID

func GCEventViewControllerFromID(id objc.ID) *GCEventViewController

func (*GCEventViewController) ControllerUserInteractionEnabled

func (o *GCEventViewController) ControllerUserInteractionEnabled() bool

func (*GCEventViewController) SetControllerUserInteractionEnabled

func (o *GCEventViewController) SetControllerUserInteractionEnabled(controllerUserInteractionEnabled bool)

type GCExtendedGamepad

type GCExtendedGamepad struct {
	GCPhysicalInputProfile
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcextendedgamepad

func GCExtendedGamepadFromID

func GCExtendedGamepadFromID(id objc.ID) *GCExtendedGamepad

func (*GCExtendedGamepad) ButtonA

All face buttons are required to be analog in the Extended profile. These must be arranged in the diamond pattern given below: Y / \ X B \ / A

func (*GCExtendedGamepad) ButtonB

func (*GCExtendedGamepad) ButtonHome

func (o *GCExtendedGamepad) ButtonHome() *GCControllerButtonInput

Button home is a special menu button. If the system does not consume button home events, they will be passed to your application and should be used to enter a secondary menu, and pause the game.

func (*GCExtendedGamepad) ButtonMenu

func (o *GCExtendedGamepad) ButtonMenu() *GCControllerButtonInput

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

func (*GCExtendedGamepad) ButtonOptions

func (o *GCExtendedGamepad) ButtonOptions() *GCControllerButtonInput

Button options is the secondary menu button. It should be used to enter a secondary menu, such as graphics and sound configuration, and pause the game.

func (*GCExtendedGamepad) ButtonX

func (*GCExtendedGamepad) ButtonY

func (*GCExtendedGamepad) Controller

func (o *GCExtendedGamepad) Controller() *GCController

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

func (*GCExtendedGamepad) Dpad

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

func (*GCExtendedGamepad) LeftShoulder

func (o *GCExtendedGamepad) LeftShoulder() *GCControllerButtonInput

Shoulder buttons are required to be analog inputs.

func (*GCExtendedGamepad) LeftThumbstick

func (o *GCExtendedGamepad) LeftThumbstick() *GCControllerDirectionPad

A thumbstick is a 2-axis control that is physically required to be analog. All the elements of this directional input are thus analog.

func (*GCExtendedGamepad) LeftThumbstickButton

func (o *GCExtendedGamepad) LeftThumbstickButton() *GCControllerButtonInput

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

func (*GCExtendedGamepad) LeftTrigger

func (o *GCExtendedGamepad) LeftTrigger() *GCControllerButtonInput

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

func (*GCExtendedGamepad) RightShoulder

func (o *GCExtendedGamepad) RightShoulder() *GCControllerButtonInput

Shoulder buttons are required to be analog inputs.

func (*GCExtendedGamepad) RightThumbstick

func (o *GCExtendedGamepad) RightThumbstick() *GCControllerDirectionPad

A thumbstick is a 2-axis control that is physically required to be analog. All the elements of this directional input are thus analog.

func (*GCExtendedGamepad) RightThumbstickButton

func (o *GCExtendedGamepad) RightThumbstickButton() *GCControllerButtonInput

func (*GCExtendedGamepad) RightTrigger

func (o *GCExtendedGamepad) RightTrigger() *GCControllerButtonInput

func (*GCExtendedGamepad) SaveSnapshot

func (o *GCExtendedGamepad) SaveSnapshot() *GCExtendedGamepadSnapshot

Polls the state vector of the controller and saves it to a snapshot. The snapshot is stored in a device independent format that can be serialized and used at a later date. This is useful for features such as quality assurance, save game or replay functionality among many. If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on user input once it is taken. Deprecated: Use the -[GCController capture] method instead

func (*GCExtendedGamepad) SetStateFromExtendedGamepad

func (o *GCExtendedGamepad) SetStateFromExtendedGamepad(extendedGamepad *GCExtendedGamepad)

Sets the state vector of the extended gamepad to a copy of the input extended gamepad's state vector. @note If the controller's snapshot flag is set to NO, this method has no effect. @see GCController.snapshot

func (*GCExtendedGamepad) SetValueChangedHandler

func (o *GCExtendedGamepad) SetValueChangedHandler(valueChangedHandler func(*GCExtendedGamepad, *GCControllerElement))

func (*GCExtendedGamepad) ValueChangedHandler

func (o *GCExtendedGamepad) ValueChangedHandler() objc.Block

type GCExtendedGamepadSnapShotDataV100

type GCExtendedGamepadSnapShotDataV100 struct {
	Version          uint16
	Size             uint16
	DpadX            float32
	DpadY            float32
	ButtonA          float32
	ButtonB          float32
	ButtonX          float32
	ButtonY          float32
	LeftShoulder     float32
	RightShoulder    float32
	LeftThumbstickX  float32
	LeftThumbstickY  float32
	RightThumbstickX float32
	RightThumbstickY float32
	LeftTrigger      float32
	RightTrigger     float32
}

type GCExtendedGamepadSnapshot

type GCExtendedGamepadSnapshot struct {
	GCExtendedGamepad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcextendedgamepadsnapshot Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

func GCExtendedGamepadSnapshotFromID

func GCExtendedGamepadSnapshotFromID(id objc.ID) *GCExtendedGamepadSnapshot

func (*GCExtendedGamepadSnapshot) InitWithControllerSnapshotData

func (o *GCExtendedGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCExtendedGamepadSnapshot

func (*GCExtendedGamepadSnapshot) InitWithSnapshotData

func (o *GCExtendedGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCExtendedGamepadSnapshot

func (*GCExtendedGamepadSnapshot) SetSnapshotData

func (o *GCExtendedGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)

func (*GCExtendedGamepadSnapshot) SnapshotData deprecated

func (o *GCExtendedGamepadSnapshot) SnapshotData() *foundation.NSData

Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

type GCExtendedGamepadSnapshotData deprecated

type GCExtendedGamepadSnapshotData struct {
	Version                      uint16
	Size                         uint16
	DpadX                        float32
	DpadY                        float32
	ButtonA                      float32
	ButtonB                      float32
	ButtonX                      float32
	ButtonY                      float32
	LeftShoulder                 float32
	RightShoulder                float32
	LeftThumbstickX              float32
	LeftThumbstickY              float32
	RightThumbstickX             float32
	RightThumbstickY             float32
	LeftTrigger                  float32
	RightTrigger                 float32
	SupportsClickableThumbsticks bool
	LeftThumbstickButton         bool
	RightThumbstickButton        bool
}

Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

type GCExtendedGamepadSnapshotDataVersion deprecated

type GCExtendedGamepadSnapshotDataVersion int64

Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

const (
	GCExtendedGamepadSnapshotDataVersion1 GCExtendedGamepadSnapshotDataVersion = 256
	GCExtendedGamepadSnapshotDataVersion2 GCExtendedGamepadSnapshotDataVersion = 257
)

func GCCurrentExtendedGamepadSnapshotDataVersion deprecated

func GCCurrentExtendedGamepadSnapshotDataVersion() GCExtendedGamepadSnapshotDataVersion

Deprecated: Use the -[GCController controllerWithExtendedGamepad] method instead

func (GCExtendedGamepadSnapshotDataVersion) String

type GCGamepad

type GCGamepad struct {
	GCPhysicalInputProfile
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcgamepad Deprecated: since macOS 10.12.

func GCGamepadFromID

func GCGamepadFromID(id objc.ID) *GCGamepad

func (*GCGamepad) ButtonA

func (o *GCGamepad) ButtonA() *GCControllerButtonInput

All face buttons are required to be analog in the Standard profile. These must be arranged in the diamond pattern given below: Y / \ X B \ / A

func (*GCGamepad) ButtonB

func (o *GCGamepad) ButtonB() *GCControllerButtonInput

func (*GCGamepad) ButtonX

func (o *GCGamepad) ButtonX() *GCControllerButtonInput

func (*GCGamepad) ButtonY

func (o *GCGamepad) ButtonY() *GCControllerButtonInput

func (*GCGamepad) Controller

func (o *GCGamepad) Controller() *GCController

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

func (*GCGamepad) Dpad

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

func (*GCGamepad) LeftShoulder

func (o *GCGamepad) LeftShoulder() *GCControllerButtonInput

Shoulder buttons are required to be analog inputs.

func (*GCGamepad) RightShoulder

func (o *GCGamepad) RightShoulder() *GCControllerButtonInput

Shoulder buttons are required to be analog inputs.

func (*GCGamepad) SaveSnapshot

func (o *GCGamepad) SaveSnapshot() *GCGamepadSnapshot

Polls the state vector of the controller and saves it to a snapshot. The snapshot is stored in a device independent format that can be serialized and used at a later date. This is useful for features such as quality assurance, save game or replay functionality among many. If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on user input once it is taken.

func (*GCGamepad) SetValueChangedHandler

func (o *GCGamepad) SetValueChangedHandler(valueChangedHandler func(*GCGamepad, *GCControllerElement))

func (*GCGamepad) ValueChangedHandler

func (o *GCGamepad) ValueChangedHandler() objc.Block

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
}

type GCGamepadSnapshot

type GCGamepadSnapshot struct {
	GCGamepad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcgamepadsnapshot Deprecated: Use GCExtendedGamepad instead

func GCGamepadSnapshotFromID

func GCGamepadSnapshotFromID(id objc.ID) *GCGamepadSnapshot

func (*GCGamepadSnapshot) InitWithControllerSnapshotData

func (o *GCGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCGamepadSnapshot

func (*GCGamepadSnapshot) InitWithSnapshotData deprecated

func (o *GCGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCGamepadSnapshot

Deprecated: Use GCExtendedGamepad instead

func (*GCGamepadSnapshot) SetSnapshotData

func (o *GCGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)

func (*GCGamepadSnapshot) SnapshotData deprecated

func (o *GCGamepadSnapshot) SnapshotData() *foundation.NSData

Deprecated: Use GCExtendedGamepad instead

type GCGearShifterElement

type GCGearShifterElement struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcgearshifterelement

func GCGearShifterElementFromID

func GCGearShifterElementFromID(id objc.ID) *GCGearShifterElement

func (*GCGearShifterElement) PatternInput

func (o *GCGearShifterElement) PatternInput() GCSwitchPositionInput

Get the input reporting the position of the pattern gear shifter. If this property is \c nil, the gear shifter is not a pattern gear shifter. In the returned input, a position of \c -1 corresponds to the "reverse gear". A position of \c 0 corresponds to the neutral gear.

func (*GCGearShifterElement) SequentialInput

func (o *GCGearShifterElement) SequentialInput() GCRelativeInput

Get the input reporting changes to the sequential gear shifter. If this property is \c nil, the gear shifter is not a sequential gear shifter.

type GCKeyboard

type GCKeyboard struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gckeyboard

func GCKeyboardCoalescedKeyboard

func GCKeyboardCoalescedKeyboard() *GCKeyboard

Keyboard object that represents all keyboards connected to the device Should be used to query key states every time input needs to be handled

func GCKeyboardFromID

func GCKeyboardFromID(id objc.ID) *GCKeyboard

func (*GCKeyboard) KeyboardInput

func (o *GCKeyboard) KeyboardInput() *GCKeyboardInput

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

type GCKeyboardInput

type GCKeyboardInput struct {
	GCPhysicalInputProfile
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gckeyboardinput

func GCKeyboardInputFromID

func GCKeyboardInputFromID(id objc.ID) *GCKeyboardInput

func (*GCKeyboardInput) ButtonForKeyCode

func (o *GCKeyboardInput) ButtonForKeyCode(code int) *GCControllerButtonInput

Alongside general subscript notation of GCPhysicalInputProfile keys can be accessed using this method. @example [keyboard buttonForKey:GCKeyCode.UpArrow] == keyboard[GCKeyUpArrow] @param code is a low level key code that can be used for accessing a keyboard button. @note Full list of supported key constants can be found in GCKeyCodes.h and GCKeyNames.h

func (*GCKeyboardInput) IsAnyKeyPressed

func (o *GCKeyboardInput) IsAnyKeyPressed() bool

Before querying any key for a value it might be useful to check if any key is actually pressed

func (*GCKeyboardInput) KeyChangedHandler

func (o *GCKeyboardInput) KeyChangedHandler() objc.Block

func (*GCKeyboardInput) SetKeyChangedHandler

func (o *GCKeyboardInput) SetKeyChangedHandler(keyChangedHandler func(*GCKeyboardInput, *GCControllerButtonInput, int, bool))

type GCLinearInput

type GCLinearInput interface {
	ValueDidChangeHandler() objc.Block
	SetValueDidChangeHandler(valueDidChangeHandler func(objc.ID, objc.ID, float32))
	Value() float32
	IsAnalog() bool
	CanWrap() bool
	LastValueTimestamp() float64
	LastValueLatency() float64
	PhysicalExtents() GCPhysicalInputExtents
	Sources() *foundation.NSSet[GCPhysicalInputSource]
}

GCLinearInput wraps the ObjC protocol GCLinearInput.

type GCMicroGamepad

type GCMicroGamepad struct {
	GCPhysicalInputProfile
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmicrogamepad

func GCMicroGamepadFromID

func GCMicroGamepadFromID(id objc.ID) *GCMicroGamepad

func (*GCMicroGamepad) AllowsRotation

func (o *GCMicroGamepad) AllowsRotation() bool

Allows the Micro profile to monitor the orientation of the controller, if the controller is positioned in landscape orientation, D-pad input values will be transposed 90 degrees to match the new orientation. The default value for this property is NO.

func (*GCMicroGamepad) ButtonA

The Micro profile has two buttons that are optionally analog in the Micro profile. Button A is the primary action button, it indicates affirmative action and should be used to advance in menus or perform the primary action in gameplay.

func (*GCMicroGamepad) ButtonMenu

func (o *GCMicroGamepad) ButtonMenu() *GCControllerButtonInput

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

func (*GCMicroGamepad) ButtonX

Button X is the secondary action button, it indicates an alternate affirmative action and should be used to perform a secondary action. If there is no secondary action it should be used as equivalent to buttonA. Unlike on other profiles there is no negative button on this profile. Instead the menu button should be used to present menu content or to retreat in a menu flow. @see buttonA

func (*GCMicroGamepad) Controller

func (o *GCMicroGamepad) Controller() *GCController

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

func (*GCMicroGamepad) Dpad

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

func (*GCMicroGamepad) ReportsAbsoluteDpadValues

func (o *GCMicroGamepad) ReportsAbsoluteDpadValues() bool

The Micro profile can use the raw position values of the touchpad on the remote as D-pad values, or it can create a virtual dpad centered around the first contact point with the surface. If NO; a smaller sliding window is created around the initial touch point and subsequent movement is relative to that center. Movement outside the window will slide the window with it to re-center it. This is great for surfaces where there is no clear sense of a middle and drift over time is an issue. If YES; the absolute values are used and any drift will have to managed manually either through user traning or by a developer using the dpad. The default value for this property is NO, meaning a sliding window is used for the dpad.

func (*GCMicroGamepad) SaveSnapshot

func (o *GCMicroGamepad) SaveSnapshot() *GCMicroGamepadSnapshot

Polls the state vector of the controller and saves it to a snapshot. The snapshot is stored in a device independent format that can be serialized and used at a later date. This is useful for features such as quality assurance, save game or replay functionality among many. If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on user input once it is taken. @see GCMicroGamepadSnapshot Deprecated: Use the -[GCController capture] method instead

func (*GCMicroGamepad) SetAllowsRotation

func (o *GCMicroGamepad) SetAllowsRotation(allowsRotation bool)

func (*GCMicroGamepad) SetReportsAbsoluteDpadValues

func (o *GCMicroGamepad) SetReportsAbsoluteDpadValues(reportsAbsoluteDpadValues bool)

func (*GCMicroGamepad) SetStateFromMicroGamepad

func (o *GCMicroGamepad) SetStateFromMicroGamepad(microGamepad *GCMicroGamepad)

Sets the state vector of the micro gamepad to a copy of the input micro gamepad's state vector. @note If the controller's snapshot flag is set to NO, this method has no effect. @see GCController.snapshot

func (*GCMicroGamepad) SetValueChangedHandler

func (o *GCMicroGamepad) SetValueChangedHandler(valueChangedHandler func(*GCMicroGamepad, *GCControllerElement))

func (*GCMicroGamepad) ValueChangedHandler

func (o *GCMicroGamepad) ValueChangedHandler() objc.Block

type GCMicroGamepadSnapShotDataV100

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

type GCMicroGamepadSnapshot

type GCMicroGamepadSnapshot struct {
	GCMicroGamepad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmicrogamepadsnapshot Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

func GCMicroGamepadSnapshotFromID

func GCMicroGamepadSnapshotFromID(id objc.ID) *GCMicroGamepadSnapshot

func (*GCMicroGamepadSnapshot) InitWithControllerSnapshotData

func (o *GCMicroGamepadSnapshot) InitWithControllerSnapshotData(controller *GCController, data *foundation.NSData) *GCMicroGamepadSnapshot

func (*GCMicroGamepadSnapshot) InitWithSnapshotData

func (o *GCMicroGamepadSnapshot) InitWithSnapshotData(data *foundation.NSData) *GCMicroGamepadSnapshot

func (*GCMicroGamepadSnapshot) SetSnapshotData

func (o *GCMicroGamepadSnapshot) SetSnapshotData(snapshotData *foundation.NSData)

func (*GCMicroGamepadSnapshot) SnapshotData deprecated

func (o *GCMicroGamepadSnapshot) SnapshotData() *foundation.NSData

Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

type GCMicroGamepadSnapshotData deprecated

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

Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

type GCMicroGamepadSnapshotDataVersion deprecated

type GCMicroGamepadSnapshotDataVersion int64

Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

const (
	GCMicroGamepadSnapshotDataVersion1 GCMicroGamepadSnapshotDataVersion = 256
)

func GCCurrentMicroGamepadSnapshotDataVersion deprecated

func GCCurrentMicroGamepadSnapshotDataVersion() GCMicroGamepadSnapshotDataVersion

Deprecated: Use the -[GCController controllerWithMicroGamepad] method instead

func (GCMicroGamepadSnapshotDataVersion) String

type GCMotion

type GCMotion struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmotion

func GCMotionFromID

func GCMotionFromID(id objc.ID) *GCMotion

func (*GCMotion) Acceleration

func (o *GCMotion) Acceleration() GCAcceleration

The total acceleration of the controller. @see gravity @see userAcceleration

func (*GCMotion) Attitude

func (o *GCMotion) Attitude() GCQuaternion

The current attitude of the controller. @note Remotes without accurate attitude and rotation rate can not determine a stable attitude so the values will be (0,0,0,1) at all times. @see hasAttitude @see GCMicroGamepad

func (*GCMotion) Controller

func (o *GCMotion) Controller() *GCController

A profile keeps a reference to the controller that it is mapping input from. @see GCController

func (*GCMotion) Gravity

func (o *GCMotion) Gravity() GCAcceleration

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

func (*GCMotion) HasAttitude

func (o *GCMotion) HasAttitude() bool

The controller generating the motion data has sensors that can accurately determine the current attitude. If this is enabled the motion data for attitude is usable for inputs.

func (*GCMotion) HasAttitudeAndRotationRate

func (o *GCMotion) HasAttitudeAndRotationRate() bool

The controller generating the motion data has sensors that can accurately determine the current attitude and rotation rate. If this is enabled the motion data for attitude and rotation rate are usable for inputs. Deprecated: Use -hasAttitude and -hasRotationRate methods instead

func (*GCMotion) HasGravityAndUserAcceleration

func (o *GCMotion) HasGravityAndUserAcceleration() bool

Returns YES if the controller is capable of reporting gravity and user acceleration separately. @note Some controllers do not separate gravity from user acceleration, and only report the total acceleration of the controller. Query whether the connected controller has the ability to separate gravity and user acceleration, and it doesn’t, use acceleration instead. @see acceleration

func (*GCMotion) HasRotationRate

func (o *GCMotion) HasRotationRate() bool

The controller generating the motion data has sensors that can accurately determine the current rotation rate. If this is enabled the motion data for rotation rate is usable for inputs.

func (*GCMotion) RotationRate

func (o *GCMotion) RotationRate() GCRotationRate

The current rotation rate of the controller. @note Remotes without accurate attitude and rotation rate can not determine a stable rotation rate so the values will be (0,0,0) at all times. @see hasRotationRate @see GCMicroGamepad

func (*GCMotion) SensorsActive

func (o *GCMotion) SensorsActive() bool

Set this property to YES when you wish to receive motion data from the controller. When you set this property to NO, the motion sensors will be disabled and the GCMotion profile will not be updated. @note It is highly recommended that you only enable sensor during the period of time you directly need motion data. Motion sensors can drain controller battery, device battery, and needlessly consume Bluetooth bandwidth. @see sensorsRequireManualActivation

func (*GCMotion) SensorsRequireManualActivation

func (o *GCMotion) SensorsRequireManualActivation() bool

If this property is returns YES, you are responsible for setting sensorsActive to YES when you need motion data from the controller. Some controllers, such as the Siri Remote, automatically activate and deactivate motion sensors. In such a case, this property will return NO. @see sensorsActive

func (*GCMotion) SetAcceleration

func (o *GCMotion) SetAcceleration(acceleration GCAcceleration)

Sets the acceleration that the user is giving to the controller. @note If the controller's snapshot flag is set to NO, this method has no effect. @see userAcceleration

func (*GCMotion) SetAttitude

func (o *GCMotion) SetAttitude(attitude GCQuaternion)

Sets the current rotation rate of the controller. @note If the controller's snapshot flag is set to NO, this method has no effect. @see attitude

func (*GCMotion) SetGravity

func (o *GCMotion) SetGravity(gravity GCAcceleration)

Sets the gravity vector expressed in the controller's reference frame. @note If the controller's snapshot flag is set to NO, this method has no effect. @see gravity

func (*GCMotion) SetRotationRate

func (o *GCMotion) SetRotationRate(rotationRate GCRotationRate)

Sets the current rotation rate of the controller. @note If the controller's snapshot flag is set to NO, this method has no effect. @see rotationRate

func (*GCMotion) SetSensorsActive

func (o *GCMotion) SetSensorsActive(sensorsActive bool)

func (*GCMotion) SetStateFromMotion

func (o *GCMotion) SetStateFromMotion(motion *GCMotion)

Sets the state vector of the motion profile to a copy of the input motion profile's state vector. @note If the controller's snapshot flag is set to NO, this method has no effect. @see GCController.snapshot

func (*GCMotion) SetUserAcceleration

func (o *GCMotion) SetUserAcceleration(userAcceleration GCAcceleration)

Sets the acceleration that the user is giving to the controller. @note If the controller's snapshot flag is set to NO, this method has no effect. @see userAcceleration

func (*GCMotion) SetValueChangedHandler

func (o *GCMotion) SetValueChangedHandler(valueChangedHandler func(*GCMotion))

func (*GCMotion) UserAcceleration

func (o *GCMotion) UserAcceleration() GCAcceleration

The acceleration that the user is giving to the controller. Note that the total acceleration of the controller is equal to gravity plus userAcceleration. @see gravity @see acceleration

func (*GCMotion) ValueChangedHandler

func (o *GCMotion) ValueChangedHandler() objc.Block

type GCMouse

type GCMouse struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmouse

func GCMouseCurrent

func GCMouseCurrent() *GCMouse

The most recently used mouse device. If a user actuates a mouse input, that mouse will become the current one. @see GCMouseDidBecomeCurrentNotification @see GCMouseDidStopBeingCurrentNotification

func GCMouseFromID

func GCMouseFromID(id objc.ID) *GCMouse

func (*GCMouse) MouseInput

func (o *GCMouse) MouseInput() *GCMouseInput

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

type GCMouseInput

type GCMouseInput struct {
	GCPhysicalInputProfile
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcmouseinput

func GCMouseInputFromID

func GCMouseInputFromID(id objc.ID) *GCMouseInput

func (*GCMouseInput) AuxiliaryButtons

func (o *GCMouseInput) AuxiliaryButtons() *foundation.NSArray[*GCControllerButtonInput]

func (*GCMouseInput) LeftButton

func (o *GCMouseInput) LeftButton() *GCControllerButtonInput

Mouse buttons that can be used only as digital inputs

func (*GCMouseInput) MiddleButton

func (o *GCMouseInput) MiddleButton() *GCControllerButtonInput

func (*GCMouseInput) MouseMovedHandler

func (o *GCMouseInput) MouseMovedHandler() objc.Block

func (*GCMouseInput) RightButton

func (o *GCMouseInput) RightButton() *GCControllerButtonInput

func (*GCMouseInput) Scroll

func (o *GCMouseInput) Scroll() *GCDeviceCursor

Scroll is a dpad with undefined range.

func (*GCMouseInput) SetMouseMovedHandler

func (o *GCMouseInput) SetMouseMovedHandler(mouseMovedHandler func(*GCMouseInput, float32, float32))

type GCPhysicalInputElement

type GCPhysicalInputElement interface {
}

GCPhysicalInputElement wraps the ObjC protocol GCPhysicalInputElement.

type GCPhysicalInputElementCollection

type GCPhysicalInputElementCollection[Key purego.AnyObject, Element purego.AnyObject] struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcphysicalinputelementcollection

func GCPhysicalInputElementCollectionFromID

func GCPhysicalInputElementCollectionFromID[Key purego.AnyObject, Element purego.AnyObject](id objc.ID) *GCPhysicalInputElementCollection[Key, Element]

func (*GCPhysicalInputElementCollection[Key, Element]) Count

func (o *GCPhysicalInputElementCollection[Key, Element]) Count() uint

The number of elements in the collection.

func (*GCPhysicalInputElementCollection[Key, Element]) ElementEnumerator

func (o *GCPhysicalInputElementCollection[Key, Element]) ElementEnumerator() *foundation.NSEnumerator[Element]

func (*GCPhysicalInputElementCollection[Key, Element]) ElementForAlias

func (o *GCPhysicalInputElementCollection[Key, Element]) ElementForAlias(alias Key) Element

Returns the element associated with a given alias. @param alias The alias for which to return the corresponding element. Typically, you pass one of the constants defined in \c GCInputNames.h. @return The element associated with \a alias, or nil if no element is associated with \a alias.

func (*GCPhysicalInputElementCollection[Key, Element]) ObjectForKeyedSubscript

func (o *GCPhysicalInputElementCollection[Key, Element]) ObjectForKeyedSubscript(key Key) Element

type GCPhysicalInputElementName

type GCPhysicalInputElementName interface {
}

GCPhysicalInputElementName wraps the ObjC protocol GCPhysicalInputElementName.

type GCPhysicalInputExtents

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

GCPhysicalInputExtents wraps the ObjC protocol GCPhysicalInputExtents.

type GCPhysicalInputProfile

type GCPhysicalInputProfile struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcphysicalinputprofile

func GCPhysicalInputProfileFromID

func GCPhysicalInputProfileFromID(id objc.ID) *GCPhysicalInputProfile

func (*GCPhysicalInputProfile) AllAxes

func (*GCPhysicalInputProfile) AllButtons

func (*GCPhysicalInputProfile) AllDpads

func (*GCPhysicalInputProfile) AllElements

The following properties allow for dynamic querying of the input elements available on a profile.

func (*GCPhysicalInputProfile) AllTouchpads

func (*GCPhysicalInputProfile) Axes

func (*GCPhysicalInputProfile) Buttons

func (*GCPhysicalInputProfile) Capture

Polls the state vector of the physical input input and saves it to a new and writable instance of GCPhysicalInputProfile. If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on user input once it is taken. @see snapshot @return A new physical input profile with the duplicated state vector of the current physical input

func (*GCPhysicalInputProfile) Device

func (o *GCPhysicalInputProfile) Device() GCDevice

A profile keeps a reference to the device that this profile is mapping input from

func (*GCPhysicalInputProfile) Dpads

func (*GCPhysicalInputProfile) Elements

The following properties allow for runtime lookup of any input element on a profile, when provided with a valid alias. @example extendedGamepad.elements["Button A"] == extendedGamepad.buttonA // YES @example extendedGamepad.dpads["Left Thumbstick"] == extendedGamepad.leftThumbstick // YES @example extendedGamepad.dpads["Button B"] // returns nil, "Button B" is not a GCControllerDirectionPad

func (*GCPhysicalInputProfile) HasRemappedElements

func (o *GCPhysicalInputProfile) HasRemappedElements() bool

Whether the user has remapped their physical input controls for this profile at the system level. @discussion On iOS and tvOS, users can remap their game controller inputs in Settings.

func (*GCPhysicalInputProfile) LastEventTimestamp

func (o *GCPhysicalInputProfile) LastEventTimestamp() float64

The last time elements of this profile were updated.

func (*GCPhysicalInputProfile) MappedElementAliasForPhysicalInputName

func (o *GCPhysicalInputProfile) MappedElementAliasForPhysicalInputName(inputName *foundation.NSString) *foundation.NSString

Returns the primary alias of the GCControllerElement that a given physical input maps to. @discussion If the user were to map a physical press of the A button of their game controller to the B button, then -[GCPhysicalInputProfile mappedElementAliasForPhysicalInputName: GCInputButtonA] would return GCInputButtonB. Note that mappings can change anytime your app is backgrounded, so make sure you update any relevant visuals when returning to foreground. @param inputName A GCInput string corresponding to the physical button you want the mapped element alias for. @returns A GCInput string corresponding to the primary alias of the GCControllerElement that a given physical button maps to, or nil if there is no mapping.

func (*GCPhysicalInputProfile) MappedPhysicalInputNamesForElementAlias

func (o *GCPhysicalInputProfile) MappedPhysicalInputNamesForElementAlias(elementAlias *foundation.NSString) *foundation.NSSet[*foundation.NSString]

Returns a set of GCInput strings corresponding to physical inputs that are mapped to a given GCControllerElement. @discussion If the user mapped the physical press of the A button, the B button, and the X button to the B button, then -[GCPhysicalInputProfile mappedPhysicalInputNamesForElementAlias: GCInputButtonB] would return [GCInputButtonA, GCInputButtonB, GCInputButtonX]. Note that mappings can change anytime your app is backgrounded, so make sure you update any relevant visuals when returning to foreground. @param elementAlias A GCInput string corresponding to an alias of the GCControllerElement you want the physical buttons for. @returns A set of GCInput strings corresponding to physical inputs that are mapped to a given GCControllerElement, or an empty set if there are no mappings.

func (*GCPhysicalInputProfile) ObjectForKeyedSubscript

func (o *GCPhysicalInputProfile) ObjectForKeyedSubscript(key *foundation.NSString) *GCControllerElement

Profile elements can be accessed using keyed subscript notation, with a valid alias of its inputs. @example extendedGamepad["Button A"] == extendedGamepad.buttonA // YES @example microGamepad["Button X"] == microGamepad.buttonX // YES @note Equivalent to -elements

func (*GCPhysicalInputProfile) SetStateFromPhysicalInput

func (o *GCPhysicalInputProfile) SetStateFromPhysicalInput(physicalInput *GCPhysicalInputProfile)

Sets the state vector of the physical input profile to a copy of the passed in physical input profile's state vector. @note If the controller's snapshot flag is set to NO, this method has no effect. @see GCController.snapshot

func (*GCPhysicalInputProfile) SetValueDidChangeHandler

func (o *GCPhysicalInputProfile) SetValueDidChangeHandler(valueDidChangeHandler func(*GCPhysicalInputProfile, *GCControllerElement))

func (*GCPhysicalInputProfile) Touchpads

func (*GCPhysicalInputProfile) ValueDidChangeHandler

func (o *GCPhysicalInputProfile) ValueDidChangeHandler() objc.Block

Set this block if you want to be notified when a value on a element changed. If multiple elements have changed this block will be called for each element that changed. @param profile this profile that is being used to map the raw input data into logical values on controller elements such as the dpad or the buttons. @param element the element that has been modified.

type GCPhysicalInputSource

type GCPhysicalInputSource interface {
	ElementAliases() *foundation.NSSet[*foundation.NSString]
	ElementLocalizedName() *foundation.NSString
	SfSymbolsName() *foundation.NSString
	Direction() GCPhysicalInputSourceDirection
}

GCPhysicalInputSource wraps the ObjC protocol GCPhysicalInputSource.

type GCPhysicalInputSourceDirection

type GCPhysicalInputSourceDirection uint64
const (
	GCPhysicalInputSourceDirectionNotApplicable GCPhysicalInputSourceDirection = 0
	GCPhysicalInputSourceDirectionUp            GCPhysicalInputSourceDirection = 1
	GCPhysicalInputSourceDirectionRight         GCPhysicalInputSourceDirection = 2
	GCPhysicalInputSourceDirectionDown          GCPhysicalInputSourceDirection = 4
	GCPhysicalInputSourceDirectionLeft          GCPhysicalInputSourceDirection = 8
)

func (GCPhysicalInputSourceDirection) String

type GCPoint2

type GCPoint2 struct {
	X float32
	Y float32
}

func GCPoint2Make

func GCPoint2Make(x float32, y float32) GCPoint2

func GCPoint2Zero

func GCPoint2Zero() GCPoint2

type GCPressedStateInput

type GCPressedStateInput interface {
	PressedDidChangeHandler() objc.Block
	SetPressedDidChangeHandler(pressedDidChangeHandler func(objc.ID, objc.ID, bool))
	IsPressed() bool
	LastPressedStateTimestamp() float64
	LastPressedStateLatency() float64
	Sources() *foundation.NSSet[GCPhysicalInputSource]
}

GCPressedStateInput wraps the ObjC protocol GCPressedStateInput.

type GCQuaternion

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

Represents a quaternion (one way of parameterizing attitude). If q is an instance of GCQuaternion, mathematically it represents the following quaternion: q.x*i + q.y*j + q.z*k + q.w

type GCRacingWheel

type GCRacingWheel struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcracingwheel

func GCRacingWheelFromID

func GCRacingWheelFromID(id objc.ID) *GCRacingWheel

func (*GCRacingWheel) AcquireDeviceWithError

func (o *GCRacingWheel) AcquireDeviceWithError() (bool, error)

A GCRacingWheel must be acquired before your application can begin receiving events from it. Prior to acquisition, your application may only query the properties of the racing wheel. Acquisition is exclusive and may fail.

func (*GCRacingWheel) Capture

func (o *GCRacingWheel) Capture() *GCRacingWheel

Polls the state vector of the racing wheel and saves it to a new instance of GCRacingWheel. If your application is heavily multithreaded this may also be useful to guarantee atomicity of input handling as a snapshot will not change based on user input once it is taken. @see snapshot @return A new racing wheel with the duplicated state vector of the receiver.

func (*GCRacingWheel) IsAcquired

func (o *GCRacingWheel) IsAcquired() bool

Checks if the racing wheel has been acquired by the application. This property is observable.

func (*GCRacingWheel) IsSnapshot

func (o *GCRacingWheel) IsSnapshot() bool

A GCRacingWheel may represent a real device managed by the operating system, or a snapshot created by the developer. @see capture

func (*GCRacingWheel) RelinquishDevice

func (o *GCRacingWheel) RelinquishDevice()

Releases a previous acquisition of the racing wheel.

func (*GCRacingWheel) WheelInput

func (o *GCRacingWheel) WheelInput() *GCRacingWheelInput

Get the physical input profile for the racing wheel.

type GCRacingWheelInput

type GCRacingWheelInput struct {
	GCRacingWheelInputState
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcracingwheelinput

func GCRacingWheelInputFromID

func GCRacingWheelInputFromID(id objc.ID) *GCRacingWheelInput

func (*GCRacingWheelInput) Capture

Polls the current state vector of the racing wheel input and saves it to a new instance.

func (*GCRacingWheelInput) NextInputState

func (o *GCRacingWheelInput) NextInputState() *GCRacingWheelInputState

type GCRacingWheelInputState

type GCRacingWheelInputState struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcracingwheelinputstate

func GCRacingWheelInputStateFromID

func GCRacingWheelInputStateFromID(id objc.ID) *GCRacingWheelInputState

func (*GCRacingWheelInputState) AcceleratorPedal

func (o *GCRacingWheelInputState) AcceleratorPedal() GCButtonElement

func (*GCRacingWheelInputState) BrakePedal

func (o *GCRacingWheelInputState) BrakePedal() GCButtonElement

func (*GCRacingWheelInputState) ClutchPedal

func (o *GCRacingWheelInputState) ClutchPedal() GCButtonElement

func (*GCRacingWheelInputState) Shifter

The element representing an attached gear shifter accessory. Note that this element only represents an external gear shifter accessory. Many racing wheels have a pair of built in paddle buttons that can be used for sequential gear shifting. Those buttons are can be looked up with the \c GCInputLeftPaddle and \c GCInputRightPaddle input names.

func (*GCRacingWheelInputState) Wheel

The steering wheel element.

type GCRelativeInput

type GCRelativeInput interface {
	DeltaDidChangeHandler() objc.Block
	SetDeltaDidChangeHandler(deltaDidChangeHandler func(objc.ID, objc.ID, float32))
	Delta() float32
	IsAnalog() bool
	LastDeltaTimestamp() float64
	LastDeltaLatency() float64
	Sources() *foundation.NSSet[GCPhysicalInputSource]
}

GCRelativeInput wraps the ObjC protocol GCRelativeInput.

type GCRotationRate

type GCRotationRate struct {
	X float64
	Y float64
	Z float64
}

A structure containing 3-axis rotation rate data. @field x X-axis rotation rate in radians/second. The sign follows the right hand rule (i.e. if the right hand is wrapped around the X axis such that the tip of the thumb points toward positive X, a positive rotation is one toward the tips of the other 4 fingers). @field y Y-axis rotation rate in radians/second. The sign follows the right hand rule (i.e. if the right hand is wrapped around the Y axis such that the tip of the thumb points toward positive Y, a positive rotation is one toward the tips of the other 4 fingers). @field z Z-axis rotation rate in radians/second. The sign follows the right hand rule (i.e. if the right hand is wrapped around the Z axis such that the tip of the thumb points toward positive Z, a positive rotation is one toward the tips of the other 4 fingers).

type GCSteeringWheelElement

type GCSteeringWheelElement struct {
	foundation.NSObject
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcsteeringwheelelement

func GCSteeringWheelElementFromID

func GCSteeringWheelElementFromID(id objc.ID) *GCSteeringWheelElement

func (*GCSteeringWheelElement) MaximumDegreesOfRotation

func (o *GCSteeringWheelElement) MaximumDegreesOfRotation() float32

type GCSwitchElement

type GCSwitchElement interface {
	GCPhysicalInputElement
	PositionInput() GCSwitchPositionInput
}

GCSwitchElement wraps the ObjC protocol GCSwitchElement.

type GCSwitchElementName

type GCSwitchElementName interface {
	GCPhysicalInputElementName
}

GCSwitchElementName wraps the ObjC protocol GCSwitchElementName.

type GCSwitchInput

type GCSwitchInput interface {
}

GCSwitchInput wraps the ObjC protocol GCSwitchInput.

type GCSwitchPositionInput

type GCSwitchPositionInput interface {
	PositionDidChangeHandler() objc.Block
	SetPositionDidChangeHandler(positionDidChangeHandler func(objc.ID, objc.ID, int))
	Position() int
	PositionRange() foundation.NSRange
	IsSequential() bool
	CanWrap() bool
	LastPositionTimestamp() float64
	LastPositionLatency() float64
	Sources() *foundation.NSSet[GCPhysicalInputSource]
}

GCSwitchPositionInput wraps the ObjC protocol GCSwitchPositionInput.

type GCSystemGestureState

type GCSystemGestureState int64
const (
	// System gesture recognizers will run before input is sent to app, this is the default state
	GCSystemGestureStateEnabled GCSystemGestureState = 0
	// Input is sent to app and processed by system gesture recognizers simultaneously
	GCSystemGestureStateAlwaysReceive GCSystemGestureState = 1
	// System gesture recognizers will not run at all. Input is passed directly to app
	GCSystemGestureStateDisabled GCSystemGestureState = 2
)

func (GCSystemGestureState) String

func (e GCSystemGestureState) String() string

type GCTouchState

type GCTouchState int64
const (
	GCTouchStateUp     GCTouchState = 0
	GCTouchStateDown   GCTouchState = 1
	GCTouchStateMoving GCTouchState = 2
)

func (GCTouchState) String

func (e GCTouchState) String() string

type GCTouchedStateInput

type GCTouchedStateInput interface {
	TouchedDidChangeHandler() objc.Block
	SetTouchedDidChangeHandler(touchedDidChangeHandler func(objc.ID, objc.ID, bool))
	IsTouched() bool
	LastTouchedStateTimestamp() float64
	LastTouchedStateLatency() float64
	Sources() *foundation.NSSet[GCPhysicalInputSource]
}

GCTouchedStateInput wraps the ObjC protocol GCTouchedStateInput.

type GCXboxGamepad

type GCXboxGamepad struct {
	GCExtendedGamepad
}

Apple documentation: https://developer.apple.com/documentation/gamecontroller/gcxboxgamepad

func GCXboxGamepadFromID

func GCXboxGamepadFromID(id objc.ID) *GCXboxGamepad

func (*GCXboxGamepad) ButtonShare

func (o *GCXboxGamepad) ButtonShare() *GCControllerButtonInput

Some Xbox controller variants feature a Share button. @example The Bluetooth-enabled Xbox Wireless Controller introduced with the Xbox Series X and Xbox Series S in 2020 has a Share button. @note The Share button is reserved by the system for screenshot and video recording gestures. If you wish to disable these gestures in your app and take control of the Share button, set buttonShare.preferredSystemGestureState to GCSystemGestureStateDisabled.

func (*GCXboxGamepad) PaddleButton1

func (o *GCXboxGamepad) PaddleButton1() *GCControllerButtonInput

Some Xbox controller variants can support up to four additional buttons. @example The standard Bluetooth-enabled Xbox Wireless Controller does not have paddle buttons @example The Xbox Elite Wireless Controller has four extra digital buttons. @note The four extra digital buttons on the Xbox Elite Wireless Controller are only directly addressable when the controller is on its default mapping profile. Otherwise, the paddle buttons are directly bound to other inputs on the controller.

func (*GCXboxGamepad) PaddleButton2

func (o *GCXboxGamepad) PaddleButton2() *GCControllerButtonInput

func (*GCXboxGamepad) PaddleButton3

func (o *GCXboxGamepad) PaddleButton3() *GCControllerButtonInput

func (*GCXboxGamepad) PaddleButton4

func (o *GCXboxGamepad) PaddleButton4() *GCControllerButtonInput

type HIDReportCommandType

type HIDReportCommandType int64

@typedef HIDReportCommandType @abstract Type of the report command for DriverKit driver

const (
	KIOHIDReportCommandSetReport HIDReportCommandType = 0
	KIOHIDReportCommandGetReport HIDReportCommandType = 1
)

func (HIDReportCommandType) String

func (e HIDReportCommandType) String() string

type IOHIDButtonModes

type IOHIDButtonModes int64
const (
	KIOHIDButtonMode_BothLeftClicks         IOHIDButtonModes = 0
	KIOHIDButtonMode_ReverseLeftRightClicks IOHIDButtonModes = 1
	KIOHIDButtonMode_EnableRightClick       IOHIDButtonModes = 2
)

func (IOHIDButtonModes) String

func (e IOHIDButtonModes) String() string

type IOHIDElementCommitDirection

type IOHIDElementCommitDirection int64

@typedef IOHIDElementCommitDirection @abstract Commit direction passed in to the commit() function of an IOHIDElement. @field kIOHIDElementCommitDirectionIn Passing in kIOHIDElementCommitDirectionIn will issue a getReport call to the device, and the element will be updated with the value retrieved by the device. The value can be accessed via the getValue() or getDataValue() functions. @field kIOHIDElementCommitDirectionOut Passing in kIOHIDElementCommitDirectionOut will issue a setReport call to the device. Before issuing this call, the desired value should be set on the element with the setValue() or setDataValue() functions.

const (
	KIOHIDElementCommitDirectionIn  IOHIDElementCommitDirection = 0
	KIOHIDElementCommitDirectionOut IOHIDElementCommitDirection = 1
)

func (IOHIDElementCommitDirection) String

type Idtype_t

type Idtype_t int64
const (
	P_ALL  Idtype_t = 0
	P_PID  Idtype_t = 1
	P_PGID Idtype_t = 2
)

func (Idtype_t) String

func (e Idtype_t) String() string

type Ipc_info_object_type_t

type Ipc_info_object_type_t int64
const (
	IPC_OTYPE_NONE                 Ipc_info_object_type_t = 0
	IPC_OTYPE_THREAD_CONTROL       Ipc_info_object_type_t = 1
	IPC_OTYPE_TASK_CONTROL         Ipc_info_object_type_t = 2
	IPC_OTYPE_HOST                 Ipc_info_object_type_t = 3
	IPC_OTYPE_HOST_PRIV            Ipc_info_object_type_t = 4
	IPC_OTYPE_PROCESSOR            Ipc_info_object_type_t = 5
	IPC_OTYPE_PROCESSOR_SET        Ipc_info_object_type_t = 6
	IPC_OTYPE_PROCESSOR_SET_NAME   Ipc_info_object_type_t = 7
	IPC_OTYPE_TIMER                Ipc_info_object_type_t = 8
	IPC_OTYPE_PORT_SUBST_ONCE      Ipc_info_object_type_t = 9
	IPC_OTYPE_MIG                  Ipc_info_object_type_t = 10
	IPC_OTYPE_MEMORY_OBJECT        Ipc_info_object_type_t = 11
	IPC_OTYPE_XMM_PAGER            Ipc_info_object_type_t = 12
	IPC_OTYPE_XMM_KERNEL           Ipc_info_object_type_t = 13
	IPC_OTYPE_XMM_REPLY            Ipc_info_object_type_t = 14
	IPC_OTYPE_UND_REPLY            Ipc_info_object_type_t = 15
	IPC_OTYPE_HOST_NOTIFY          Ipc_info_object_type_t = 16
	IPC_OTYPE_HOST_SECURITY        Ipc_info_object_type_t = 17
	IPC_OTYPE_LEDGER               Ipc_info_object_type_t = 18
	IPC_OTYPE_MAIN_DEVICE          Ipc_info_object_type_t = 19
	IPC_OTYPE_TASK_NAME            Ipc_info_object_type_t = 20
	IPC_OTYPE_SUBSYSTEM            Ipc_info_object_type_t = 21
	IPC_OTYPE_IO_DONE_QUEUE        Ipc_info_object_type_t = 22
	IPC_OTYPE_SEMAPHORE            Ipc_info_object_type_t = 23
	IPC_OTYPE_LOCK_SET             Ipc_info_object_type_t = 24
	IPC_OTYPE_CLOCK                Ipc_info_object_type_t = 25
	IPC_OTYPE_CLOCK_CTRL           Ipc_info_object_type_t = 26
	IPC_OTYPE_IOKIT_IDENT          Ipc_info_object_type_t = 27
	IPC_OTYPE_NAMED_ENTRY          Ipc_info_object_type_t = 28
	IPC_OTYPE_IOKIT_CONNECT        Ipc_info_object_type_t = 29
	IPC_OTYPE_IOKIT_OBJECT         Ipc_info_object_type_t = 30
	IPC_OTYPE_UPL                  Ipc_info_object_type_t = 31
	IPC_OTYPE_MEM_OBJ_CONTROL      Ipc_info_object_type_t = 32
	IPC_OTYPE_AU_SESSIONPORT       Ipc_info_object_type_t = 33
	IPC_OTYPE_FILEPORT             Ipc_info_object_type_t = 34
	IPC_OTYPE_LABELH               Ipc_info_object_type_t = 35
	IPC_OTYPE_TASK_RESUME          Ipc_info_object_type_t = 36
	IPC_OTYPE_VOUCHER              Ipc_info_object_type_t = 37
	IPC_OTYPE_VOUCHER_ATTR_CONTROL Ipc_info_object_type_t = 38
	IPC_OTYPE_WORK_INTERVAL        Ipc_info_object_type_t = 39
	IPC_OTYPE_UX_HANDLER           Ipc_info_object_type_t = 40
	IPC_OTYPE_UEXT_OBJECT          Ipc_info_object_type_t = 41
	IPC_OTYPE_ARCADE_REG           Ipc_info_object_type_t = 42
	IPC_OTYPE_EVENTLINK            Ipc_info_object_type_t = 43
	IPC_OTYPE_TASK_INSPECT         Ipc_info_object_type_t = 44
	IPC_OTYPE_TASK_READ            Ipc_info_object_type_t = 45
	IPC_OTYPE_THREAD_INSPECT       Ipc_info_object_type_t = 46
	IPC_OTYPE_THREAD_READ          Ipc_info_object_type_t = 47
	IPC_OTYPE_SUID_CRED            Ipc_info_object_type_t = 48
	IPC_OTYPE_HYPERVISOR           Ipc_info_object_type_t = 49
	IPC_OTYPE_TASK_ID_TOKEN        Ipc_info_object_type_t = 50
	IPC_OTYPE_TASK_FATAL           Ipc_info_object_type_t = 51
	IPC_OTYPE_KCDATA               Ipc_info_object_type_t = 52
	IPC_OTYPE_EXCLAVES_RESOURCE    Ipc_info_object_type_t = 53
	IPC_OTYPE_THREAD_RESUME        Ipc_info_object_type_t = 54
	IPC_OTYPE_UNKNOWN              Ipc_info_object_type_t = 4294967295
)

func (Ipc_info_object_type_t) String

func (e Ipc_info_object_type_t) String() string

type Launch_data_type_t

type Launch_data_type_t int64
const (
	LAUNCH_DATA_DICTIONARY Launch_data_type_t = 1
	LAUNCH_DATA_ARRAY      Launch_data_type_t = 2
	LAUNCH_DATA_FD         Launch_data_type_t = 3
	LAUNCH_DATA_INTEGER    Launch_data_type_t = 4
	LAUNCH_DATA_REAL       Launch_data_type_t = 5
	LAUNCH_DATA_BOOL       Launch_data_type_t = 6
	LAUNCH_DATA_STRING     Launch_data_type_t = 7
	LAUNCH_DATA_OPAQUE     Launch_data_type_t = 8
	LAUNCH_DATA_ERRNO      Launch_data_type_t = 9
	LAUNCH_DATA_MACHPORT   Launch_data_type_t = 10
)

func (Launch_data_type_t) String

func (e Launch_data_type_t) String() string

type MDLabelDomain

type MDLabelDomain int64

@typedef MDLabelDomain @abstract These constants are used to specify a domain to MDLabelCreate().

const (
	KMDLabelUserDomain  MDLabelDomain = 0
	KMDLabelLocalDomain MDLabelDomain = 1
)

func (MDLabelDomain) String

func (e MDLabelDomain) String() string

type MDQueryOptionFlags

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

func (MDQueryOptionFlags) String

func (e MDQueryOptionFlags) String() string

type MDQuerySortOptionFlags

type MDQuerySortOptionFlags int64

@enum MDQuerySortOptionFlags @constant kMDQueryReverseSortOrderFlag Sort the attribute in reverse order.

const (
	KMDQueryReverseSortOrderFlag MDQuerySortOptionFlags = 1
)

func (MDQuerySortOptionFlags) String

func (e MDQuerySortOptionFlags) String() string

type Mach_vm_range_flags_t

type Mach_vm_range_flags_t int64
const (
	MACH_VM_RANGE_NONE Mach_vm_range_flags_t = 0
)

func (Mach_vm_range_flags_t) String

func (e Mach_vm_range_flags_t) String() string

type Mach_vm_range_flavor_t

type Mach_vm_range_flavor_t int64
const (
	MACH_VM_RANGE_FLAVOR_INVALID Mach_vm_range_flavor_t = 0
	MACH_VM_RANGE_FLAVOR_V1      Mach_vm_range_flavor_t = 1
)

func (Mach_vm_range_flavor_t) String

func (e Mach_vm_range_flavor_t) String() string

type Mach_vm_range_tag_t

type Mach_vm_range_tag_t int64
const (
	MACH_VM_RANGE_DEFAULT Mach_vm_range_tag_t = 0
	MACH_VM_RANGE_DATA    Mach_vm_range_tag_t = 1
	MACH_VM_RANGE_FIXED   Mach_vm_range_tag_t = 2
)

func (Mach_vm_range_tag_t) String

func (e Mach_vm_range_tag_t) String() string

type Mpo_flags_t

type Mpo_flags_t int64
const (
	MPO_PORT                            Mpo_flags_t = 0
	MPO_SERVICE_PORT                    Mpo_flags_t = 1024
	MPO_CONNECTION_PORT                 Mpo_flags_t = 2048
	MPO_REPLY_PORT                      Mpo_flags_t = 4096
	MPO_WEAK_REPLY_PORT                 Mpo_flags_t = 16384
	MPO_NOTIFICATION_PORT               Mpo_flags_t = 17408
	MPO_EXCEPTION_PORT                  Mpo_flags_t = 32768
	MPO_CONNECTION_PORT_WITH_PORT_ARRAY Mpo_flags_t = 65536
)

func (Mpo_flags_t) String

func (e Mpo_flags_t) String() string

type NXMouseButton

type NXMouseButton int64
const (
	NX_OneButton   NXMouseButton = 0
	NX_LeftButton  NXMouseButton = 1
	NX_RightButton NXMouseButton = 2
)

func (NXMouseButton) String

func (e NXMouseButton) String() string

type Os_clockid_t

type Os_clockid_t int64
const (
	OS_CLOCK_MACH_ABSOLUTE_TIME Os_clockid_t = 32
)

func (Os_clockid_t) String

func (e Os_clockid_t) String() string

type PMPageToPaperMappingType

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

func (PMPageToPaperMappingType) String

func (e PMPageToPaperMappingType) String() string

type Ptrauth_key

type Ptrauth_key int64
const (
	Ptrauth_key_none                     Ptrauth_key = -1
	Ptrauth_key_asia                     Ptrauth_key = 0
	Ptrauth_key_asib                     Ptrauth_key = 1
	Ptrauth_key_asda                     Ptrauth_key = 2
	Ptrauth_key_asdb                     Ptrauth_key = 3
	Ptrauth_key_process_independent_code Ptrauth_key = 0
	Ptrauth_key_process_dependent_code   Ptrauth_key = 1
	Ptrauth_key_process_independent_data Ptrauth_key = 2
	Ptrauth_key_process_dependent_data   Ptrauth_key = 3
	Ptrauth_key_return_address           Ptrauth_key = 1
	Ptrauth_key_frame_pointer            Ptrauth_key = 3
	Ptrauth_key_function_pointer         Ptrauth_key = 0
	Ptrauth_key_block_function           Ptrauth_key = 0
	Ptrauth_key_cxx_vtable_pointer       Ptrauth_key = 2
	Ptrauth_key_method_list_pointer      Ptrauth_key = 2
	Ptrauth_key_objc_isa_pointer         Ptrauth_key = 2
	Ptrauth_key_objc_super_pointer       Ptrauth_key = 2
	Ptrauth_key_objc_sel_pointer         Ptrauth_key = 3
	Ptrauth_key_objc_class_ro_pointer    Ptrauth_key = 2
	Ptrauth_key_block_descriptor_pointer Ptrauth_key = 2
	Ptrauth_key_init_fini_pointer        Ptrauth_key = 0
)

func (Ptrauth_key) String

func (e Ptrauth_key) String() string

type Qos_class_t

type Qos_class_t uint32
const (
	QOS_CLASS_USER_INTERACTIVE Qos_class_t = 33
	QOS_CLASS_USER_INITIATED   Qos_class_t = 25
	QOS_CLASS_DEFAULT          Qos_class_t = 21
	QOS_CLASS_UTILITY          Qos_class_t = 17
	QOS_CLASS_BACKGROUND       Qos_class_t = 9
	QOS_CLASS_UNSPECIFIED      Qos_class_t = 0
)

func (Qos_class_t) String

func (e Qos_class_t) String() string

type Virtual_memory_guard_exception_code_t

type Virtual_memory_guard_exception_code_t int64
const (
	KGUARD_EXC_DEALLOC_GAP                   Virtual_memory_guard_exception_code_t = 1
	KGUARD_EXC_RECLAIM_COPYIO_FAILURE        Virtual_memory_guard_exception_code_t = 2
	KGUARD_EXC_RECLAIM_INDEX_FAILURE         Virtual_memory_guard_exception_code_t = 4
	KGUARD_EXC_RECLAIM_DEALLOCATE_FAILURE    Virtual_memory_guard_exception_code_t = 8
	KGUARD_EXC_RECLAIM_ACCOUNTING_FAILURE    Virtual_memory_guard_exception_code_t = 9
	KGUARD_EXC_SEC_IOPL_ON_EXEC_PAGE         Virtual_memory_guard_exception_code_t = 10
	KGUARD_EXC_SEC_EXEC_ON_IOPL_PAGE         Virtual_memory_guard_exception_code_t = 11
	KGUARD_EXC_SEC_UPL_WRITE_ON_EXEC_REGION  Virtual_memory_guard_exception_code_t = 12
	KGUARD_EXC_LARGE_ALLOCATION_TELEMETRY    Virtual_memory_guard_exception_code_t = 13
	KGUARD_EXC_SEC_ACCESS_FAULT              Virtual_memory_guard_exception_code_t = 98
	KGUARD_EXC_SEC_ASYNC_ACCESS_FAULT        Virtual_memory_guard_exception_code_t = 99
	KGUARD_EXC_SEC_COPY_DENIED               Virtual_memory_guard_exception_code_t = 100
	KGUARD_EXC_SEC_SHARING_DENIED            Virtual_memory_guard_exception_code_t = 101
	KGUARD_EXC_MTE_SYNC_FAULT                Virtual_memory_guard_exception_code_t = 200
	KGUARD_EXC_MTE_ASYNC_USER_FAULT          Virtual_memory_guard_exception_code_t = 201
	KGUARD_EXC_MTE_ASYNC_KERN_FAULT          Virtual_memory_guard_exception_code_t = 202
	KGUARD_EXC_GUARD_OBJECT_ASYNC_USER_FAULT Virtual_memory_guard_exception_code_t = 203
	KGUARD_EXC_GUARD_OBJECT_ASYNC_KERN_FAULT Virtual_memory_guard_exception_code_t = 204
)

func (Virtual_memory_guard_exception_code_t) String

type Xpc_listener_create_flags_t

type Xpc_listener_create_flags_t int64
const (
	XPC_LISTENER_CREATE_NONE             Xpc_listener_create_flags_t = 0
	XPC_LISTENER_CREATE_INACTIVE         Xpc_listener_create_flags_t = 1
	XPC_LISTENER_CREATE_FORCE_MACH       Xpc_listener_create_flags_t = 2
	XPC_LISTENER_CREATE_FORCE_XPCSERVICE Xpc_listener_create_flags_t = 4
)

func (Xpc_listener_create_flags_t) String

type Xpc_session_create_flags_t

type Xpc_session_create_flags_t int64
const (
	XPC_SESSION_CREATE_NONE            Xpc_session_create_flags_t = 0
	XPC_SESSION_CREATE_INACTIVE        Xpc_session_create_flags_t = 1
	XPC_SESSION_CREATE_MACH_PRIVILEGED Xpc_session_create_flags_t = 2
)

func (Xpc_session_create_flags_t) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL