gamepad

package
v0.0.0-...-41cedfc Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Overview

Package gamepad is low-level interface that represents gamepad devices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gamepad

type Gamepad struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

class: Gamepad

func GamepadFromJS

func GamepadFromJS(value js.Value) *Gamepad

GamepadFromJS is casting a js.Value into Gamepad.

func GamepadFromWrapper

func GamepadFromWrapper(input core.Wrapper) *Gamepad

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

func (_this *Gamepad) Connected() bool

Connected returning attribute 'connected' with type bool (idl: boolean).

func (*Gamepad) DisplayId

func (_this *Gamepad) DisplayId() uint

DisplayId returning attribute 'displayId' with type uint (idl: unsigned long).

func (*Gamepad) Id

func (_this *Gamepad) Id() string

Id returning attribute 'id' with type string (idl: DOMString).

func (*Gamepad) Index

func (_this *Gamepad) Index() int

Index returning attribute 'index' with type int (idl: long).

func (*Gamepad) JSValue

func (_this *Gamepad) JSValue() js.Value

JSValue returns the js.Value or js.Null() if _this is nil

func (*Gamepad) Mapping

func (_this *Gamepad) Mapping() GamepadMappingType

Mapping returning attribute 'mapping' with type GamepadMappingType (idl: GamepadMappingType).

func (*Gamepad) Timestamp

func (_this *Gamepad) Timestamp() float64

Timestamp returning attribute 'timestamp' with type float64 (idl: double).

type GamepadButton

type GamepadButton struct {
	// Value_JS holds a reference to a javascript value
	Value_JS js.Value
}

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

type GamepadEvent struct {
	domcore.Event
}

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

type GamepadEventInit struct {
	Bubbles    bool
	Cancelable bool
	Composed   bool
	Gamepad    *Gamepad
}

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

type Union

type Union struct {
	Value js.Value
}

func UnionFromJS

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue

func (u *Union) JSValue() js.Value

Jump to

Keyboard shortcuts

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