Documentation ¶
Overview ¶
Package gamepad is low-level interface that represents gamepad devices.
Index ¶
- type Gamepad
- func (_this *Gamepad) Axes() *javascript.FrozenArray
- func (_this *Gamepad) Buttons() *javascript.FrozenArray
- func (_this *Gamepad) Connected() bool
- func (_this *Gamepad) DisplayId() uint
- func (_this *Gamepad) Id() string
- func (_this *Gamepad) Index() int
- func (_this *Gamepad) JSValue() js.Value
- func (_this *Gamepad) Mapping() GamepadMappingType
- func (_this *Gamepad) Timestamp() float64
- type GamepadButton
- type GamepadEvent
- type GamepadEventInit
- type GamepadMappingType
- type Union
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gamepad ¶
class: Gamepad
func GamepadFromJS ¶
GamepadFromJS is casting a js.Value into Gamepad.
func GamepadFromWrapper ¶
GamepadFromJS is casting from something that holds a js.Value into Gamepad.
func (*Gamepad) Axes ¶
func (_this *Gamepad) Axes() *javascript.FrozenArray
Axes returning attribute 'axes' with type javascript.FrozenArray (idl: FrozenArray).
func (*Gamepad) Buttons ¶
func (_this *Gamepad) Buttons() *javascript.FrozenArray
Buttons returning attribute 'buttons' with type javascript.FrozenArray (idl: FrozenArray).
func (*Gamepad) Connected ¶
Connected returning attribute 'connected' with type bool (idl: boolean).
func (*Gamepad) DisplayId ¶
DisplayId returning attribute 'displayId' with type uint (idl: unsigned long).
func (*Gamepad) Mapping ¶
func (_this *Gamepad) Mapping() GamepadMappingType
Mapping returning attribute 'mapping' with type GamepadMappingType (idl: GamepadMappingType).
type GamepadButton ¶
class: GamepadButton
func GamepadButtonFromJS ¶
func GamepadButtonFromJS(value js.Value) *GamepadButton
GamepadButtonFromJS is casting a js.Value into GamepadButton.
func GamepadButtonFromWrapper ¶
func GamepadButtonFromWrapper(input core.Wrapper) *GamepadButton
GamepadButtonFromJS is casting from something that holds a js.Value into GamepadButton.
func (*GamepadButton) JSValue ¶
func (_this *GamepadButton) JSValue() js.Value
JSValue returns the js.Value or js.Null() if _this is nil
func (*GamepadButton) Pressed ¶
func (_this *GamepadButton) Pressed() bool
Pressed returning attribute 'pressed' with type bool (idl: boolean).
func (*GamepadButton) Touched ¶
func (_this *GamepadButton) Touched() bool
Touched returning attribute 'touched' with type bool (idl: boolean).
func (*GamepadButton) Value ¶
func (_this *GamepadButton) Value() float64
Value returning attribute 'value' with type float64 (idl: double).
type GamepadEvent ¶
class: GamepadEvent
func GamepadEventFromJS ¶
func GamepadEventFromJS(value js.Value) *GamepadEvent
GamepadEventFromJS is casting a js.Value into GamepadEvent.
func GamepadEventFromWrapper ¶
func GamepadEventFromWrapper(input core.Wrapper) *GamepadEvent
GamepadEventFromJS is casting from something that holds a js.Value into GamepadEvent.
func NewGamepadEvent ¶
func NewGamepadEvent(_type string, eventInitDict *GamepadEventInit) (_result *GamepadEvent)
func (*GamepadEvent) Gamepad ¶
func (_this *GamepadEvent) Gamepad() *Gamepad
Gamepad returning attribute 'gamepad' with type Gamepad (idl: Gamepad).
type GamepadEventInit ¶
dictionary: GamepadEventInit
func GamepadEventInitFromJS ¶
func GamepadEventInitFromJS(value js.Value) *GamepadEventInit
GamepadEventInitFromJS is allocating a new GamepadEventInit object and copy all values in the value javascript object.
func (*GamepadEventInit) JSValue ¶
func (_this *GamepadEventInit) JSValue() js.Value
JSValue is allocating a new javascript object and copy all values
type GamepadMappingType ¶
type GamepadMappingType int
enum: GamepadMappingType
const ( EmptyString0GamepadMappingType GamepadMappingType = iota StandardGamepadMappingType )
func GamepadMappingTypeFromJS ¶
func GamepadMappingTypeFromJS(value js.Value) GamepadMappingType
GamepadMappingTypeFromJS is converting a javascript value into a GamepadMappingType enum value.
func (*GamepadMappingType) JSValue ¶
func (this *GamepadMappingType) JSValue() js.Value
JSValue is converting this enum into a javascript object
func (GamepadMappingType) Value ¶
func (this GamepadMappingType) Value() string
Value is converting this into javascript defined string value