webapi: github.com/gowebapi/webapi/device/sensor Index | Files

package sensor

import "github.com/gowebapi/webapi/device/sensor"

Package sensor is to access (mobile phone) sensors like accelerometer, ambient light, geolocation, gyroscope etc.

Index

Package Files

doc.go sensor.go

Constants

const (
    PERMISSIONDENIED_PositionError    int = 1
    POSITIONUNAVAILABLE_PositionError int = 2
    TIMEOUT_PositionError             int = 3
)

type AbsoluteOrientationReadingValues Uses

type AbsoluteOrientationReadingValues struct {
    Quaternion *javascript.FrozenArray
}

dictionary: AbsoluteOrientationReadingValues

func AbsoluteOrientationReadingValuesFromJS Uses

func AbsoluteOrientationReadingValuesFromJS(value js.Wrapper) *AbsoluteOrientationReadingValues

AbsoluteOrientationReadingValuesFromJS is allocating a new AbsoluteOrientationReadingValues object and copy all values from input javascript object

func (*AbsoluteOrientationReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type AbsoluteOrientationSensor Uses

type AbsoluteOrientationSensor struct {
    OrientationSensor
}

class: AbsoluteOrientationSensor

func AbsoluteOrientationSensorFromJS Uses

func AbsoluteOrientationSensorFromJS(value js.Wrapper) *AbsoluteOrientationSensor

AbsoluteOrientationSensorFromJS is casting a js.Wrapper into AbsoluteOrientationSensor.

func NewAbsoluteOrientationSensor Uses

func NewAbsoluteOrientationSensor(sensorOptions *OrientationSensorOptions) (_result *AbsoluteOrientationSensor)

type Accelerometer Uses

type Accelerometer struct {
    Sensor
}

class: Accelerometer

func AccelerometerFromJS Uses

func AccelerometerFromJS(value js.Wrapper) *Accelerometer

AccelerometerFromJS is casting a js.Wrapper into Accelerometer.

func NewAccelerometer Uses

func NewAccelerometer(options *AccelerometerSensorOptions) (_result *Accelerometer)

func (*Accelerometer) X Uses

func (_this *Accelerometer) X() *float64

X returning attribute 'x' with type float64 (idl: double).

func (*Accelerometer) Y Uses

func (_this *Accelerometer) Y() *float64

Y returning attribute 'y' with type float64 (idl: double).

func (*Accelerometer) Z Uses

func (_this *Accelerometer) Z() *float64

Z returning attribute 'z' with type float64 (idl: double).

type AccelerometerReadingValues Uses

type AccelerometerReadingValues struct {
    X   *float64
    Y   *float64
    Z   *float64
}

dictionary: AccelerometerReadingValues

func AccelerometerReadingValuesFromJS Uses

func AccelerometerReadingValuesFromJS(value js.Wrapper) *AccelerometerReadingValues

AccelerometerReadingValuesFromJS is allocating a new AccelerometerReadingValues object and copy all values from input javascript object

func (*AccelerometerReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type AccelerometerSensorOptions Uses

type AccelerometerSensorOptions struct {
    Frequency      float64
    ReferenceFrame LocalCoordinateSystem
}

dictionary: AccelerometerSensorOptions

func AccelerometerSensorOptionsFromJS Uses

func AccelerometerSensorOptionsFromJS(value js.Wrapper) *AccelerometerSensorOptions

AccelerometerSensorOptionsFromJS is allocating a new AccelerometerSensorOptions object and copy all values from input javascript object

func (*AccelerometerSensorOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type AmbientLightReadingValues Uses

type AmbientLightReadingValues struct {
    Illuminance *float64
}

dictionary: AmbientLightReadingValues

func AmbientLightReadingValuesFromJS Uses

func AmbientLightReadingValuesFromJS(value js.Wrapper) *AmbientLightReadingValues

AmbientLightReadingValuesFromJS is allocating a new AmbientLightReadingValues object and copy all values from input javascript object

func (*AmbientLightReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type AmbientLightSensor Uses

type AmbientLightSensor struct {
    Sensor
}

class: AmbientLightSensor

func AmbientLightSensorFromJS Uses

func AmbientLightSensorFromJS(value js.Wrapper) *AmbientLightSensor

AmbientLightSensorFromJS is casting a js.Wrapper into AmbientLightSensor.

func NewAmbientLightSensor Uses

func NewAmbientLightSensor(sensorOptions *SensorOptions) (_result *AmbientLightSensor)

func (*AmbientLightSensor) Illuminance Uses

func (_this *AmbientLightSensor) Illuminance() *float64

Illuminance returning attribute 'illuminance' with type float64 (idl: double).

type Coordinates Uses

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

class: Coordinates

func CoordinatesFromJS Uses

func CoordinatesFromJS(value js.Wrapper) *Coordinates

CoordinatesFromJS is casting a js.Wrapper into Coordinates.

func (*Coordinates) Accuracy Uses

func (_this *Coordinates) Accuracy() float64

Accuracy returning attribute 'accuracy' with type float64 (idl: double).

func (*Coordinates) Altitude Uses

func (_this *Coordinates) Altitude() *float64

Altitude returning attribute 'altitude' with type float64 (idl: double).

func (*Coordinates) AltitudeAccuracy Uses

func (_this *Coordinates) AltitudeAccuracy() *float64

AltitudeAccuracy returning attribute 'altitudeAccuracy' with type float64 (idl: double).

func (*Coordinates) Heading Uses

func (_this *Coordinates) Heading() *float64

Heading returning attribute 'heading' with type float64 (idl: double).

func (*Coordinates) JSValue Uses

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

func (*Coordinates) Latitude Uses

func (_this *Coordinates) Latitude() float64

Latitude returning attribute 'latitude' with type float64 (idl: double).

func (*Coordinates) Longitude Uses

func (_this *Coordinates) Longitude() float64

Longitude returning attribute 'longitude' with type float64 (idl: double).

func (*Coordinates) Speed Uses

func (_this *Coordinates) Speed() *float64

Speed returning attribute 'speed' with type float64 (idl: double).

type DeviceAcceleration Uses

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

class: DeviceAcceleration

func DeviceAccelerationFromJS Uses

func DeviceAccelerationFromJS(value js.Wrapper) *DeviceAcceleration

DeviceAccelerationFromJS is casting a js.Wrapper into DeviceAcceleration.

func (*DeviceAcceleration) JSValue Uses

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

func (*DeviceAcceleration) X Uses

func (_this *DeviceAcceleration) X() *float64

X returning attribute 'x' with type float64 (idl: double).

func (*DeviceAcceleration) Y Uses

func (_this *DeviceAcceleration) Y() *float64

Y returning attribute 'y' with type float64 (idl: double).

func (*DeviceAcceleration) Z Uses

func (_this *DeviceAcceleration) Z() *float64

Z returning attribute 'z' with type float64 (idl: double).

type DeviceAccelerationInit Uses

type DeviceAccelerationInit struct {
    X   *float64
    Y   *float64
    Z   *float64
}

dictionary: DeviceAccelerationInit

func DeviceAccelerationInitFromJS Uses

func DeviceAccelerationInitFromJS(value js.Wrapper) *DeviceAccelerationInit

DeviceAccelerationInitFromJS is allocating a new DeviceAccelerationInit object and copy all values from input javascript object

func (*DeviceAccelerationInit) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type DeviceMotionEvent Uses

type DeviceMotionEvent struct {
    domcore.Event
}

class: DeviceMotionEvent

func DeviceMotionEventFromJS Uses

func DeviceMotionEventFromJS(value js.Wrapper) *DeviceMotionEvent

DeviceMotionEventFromJS is casting a js.Wrapper into DeviceMotionEvent.

func NewDeviceMotionEvent Uses

func NewDeviceMotionEvent(_type string, eventInitDict *DeviceMotionEventInit) (_result *DeviceMotionEvent)

func (*DeviceMotionEvent) Acceleration Uses

func (_this *DeviceMotionEvent) Acceleration() *DeviceAcceleration

Acceleration returning attribute 'acceleration' with type DeviceAcceleration (idl: DeviceAcceleration).

func (*DeviceMotionEvent) AccelerationIncludingGravity Uses

func (_this *DeviceMotionEvent) AccelerationIncludingGravity() *DeviceAcceleration

AccelerationIncludingGravity returning attribute 'accelerationIncludingGravity' with type DeviceAcceleration (idl: DeviceAcceleration).

func (*DeviceMotionEvent) Interval Uses

func (_this *DeviceMotionEvent) Interval() float64

Interval returning attribute 'interval' with type float64 (idl: double).

func (*DeviceMotionEvent) RotationRate Uses

func (_this *DeviceMotionEvent) RotationRate() *DeviceRotationRate

RotationRate returning attribute 'rotationRate' with type DeviceRotationRate (idl: DeviceRotationRate).

type DeviceMotionEventInit Uses

type DeviceMotionEventInit struct {
    Bubbles                      bool
    Cancelable                   bool
    Composed                     bool
    Acceleration                 *DeviceAccelerationInit
    AccelerationIncludingGravity *DeviceAccelerationInit
    RotationRate                 *DeviceRotationRateInit
    Interval                     float64
}

dictionary: DeviceMotionEventInit

func DeviceMotionEventInitFromJS Uses

func DeviceMotionEventInitFromJS(value js.Wrapper) *DeviceMotionEventInit

DeviceMotionEventInitFromJS is allocating a new DeviceMotionEventInit object and copy all values from input javascript object

func (*DeviceMotionEventInit) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type DeviceOrientationEvent Uses

type DeviceOrientationEvent struct {
    domcore.Event
}

class: DeviceOrientationEvent

func DeviceOrientationEventFromJS Uses

func DeviceOrientationEventFromJS(value js.Wrapper) *DeviceOrientationEvent

DeviceOrientationEventFromJS is casting a js.Wrapper into DeviceOrientationEvent.

func NewDeviceOrientationEvent Uses

func NewDeviceOrientationEvent(_type string, eventInitDict *DeviceOrientationEventInit) (_result *DeviceOrientationEvent)

func (*DeviceOrientationEvent) Absolute Uses

func (_this *DeviceOrientationEvent) Absolute() bool

Absolute returning attribute 'absolute' with type bool (idl: boolean).

func (*DeviceOrientationEvent) Alpha Uses

func (_this *DeviceOrientationEvent) Alpha() *float64

Alpha returning attribute 'alpha' with type float64 (idl: double).

func (*DeviceOrientationEvent) Beta Uses

func (_this *DeviceOrientationEvent) Beta() *float64

Beta returning attribute 'beta' with type float64 (idl: double).

func (*DeviceOrientationEvent) Gamma Uses

func (_this *DeviceOrientationEvent) Gamma() *float64

Gamma returning attribute 'gamma' with type float64 (idl: double).

type DeviceOrientationEventInit Uses

type DeviceOrientationEventInit struct {
    Bubbles    bool
    Cancelable bool
    Composed   bool
    Alpha      *float64
    Beta       *float64
    Gamma      *float64
    Absolute   bool
}

dictionary: DeviceOrientationEventInit

func DeviceOrientationEventInitFromJS Uses

func DeviceOrientationEventInitFromJS(value js.Wrapper) *DeviceOrientationEventInit

DeviceOrientationEventInitFromJS is allocating a new DeviceOrientationEventInit object and copy all values from input javascript object

func (*DeviceOrientationEventInit) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type DeviceRotationRate Uses

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

class: DeviceRotationRate

func DeviceRotationRateFromJS Uses

func DeviceRotationRateFromJS(value js.Wrapper) *DeviceRotationRate

DeviceRotationRateFromJS is casting a js.Wrapper into DeviceRotationRate.

func (*DeviceRotationRate) Alpha Uses

func (_this *DeviceRotationRate) Alpha() *float64

Alpha returning attribute 'alpha' with type float64 (idl: double).

func (*DeviceRotationRate) Beta Uses

func (_this *DeviceRotationRate) Beta() *float64

Beta returning attribute 'beta' with type float64 (idl: double).

func (*DeviceRotationRate) Gamma Uses

func (_this *DeviceRotationRate) Gamma() *float64

Gamma returning attribute 'gamma' with type float64 (idl: double).

func (*DeviceRotationRate) JSValue Uses

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

type DeviceRotationRateInit Uses

type DeviceRotationRateInit struct {
    Alpha *float64
    Beta  *float64
    Gamma *float64
}

dictionary: DeviceRotationRateInit

func DeviceRotationRateInitFromJS Uses

func DeviceRotationRateInitFromJS(value js.Wrapper) *DeviceRotationRateInit

DeviceRotationRateInitFromJS is allocating a new DeviceRotationRateInit object and copy all values from input javascript object

func (*DeviceRotationRateInit) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type Geolocation Uses

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

class: Geolocation

func GeolocationFromJS Uses

func GeolocationFromJS(value js.Wrapper) *Geolocation

GeolocationFromJS is casting a js.Wrapper into Geolocation.

func (*Geolocation) ClearWatch Uses

func (_this *Geolocation) ClearWatch(watchId int)

func (*Geolocation) GetCurrentPosition Uses

func (_this *Geolocation) GetCurrentPosition(successCallback *PositionCallback, errorCallback *PositionErrorCallback, options *PositionOptions)

func (*Geolocation) JSValue Uses

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

func (*Geolocation) WatchPosition Uses

func (_this *Geolocation) WatchPosition(successCallback *PositionCallback, errorCallback *PositionErrorCallback, options *PositionOptions) (_result int)

type GeolocationReadingValues Uses

type GeolocationReadingValues struct {
    Latitude         *float64
    Longitude        *float64
    Altitude         *float64
    Accuracy         *float64
    AltitudeAccuracy *float64
    Heading          *float64
    Speed            *float64
}

dictionary: GeolocationReadingValues

func GeolocationReadingValuesFromJS Uses

func GeolocationReadingValuesFromJS(value js.Wrapper) *GeolocationReadingValues

GeolocationReadingValuesFromJS is allocating a new GeolocationReadingValues object and copy all values from input javascript object

func (*GeolocationReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type GeolocationSensor Uses

type GeolocationSensor struct {
    Sensor
}

class: GeolocationSensor

func GeolocationSensorFromJS Uses

func GeolocationSensorFromJS(value js.Wrapper) *GeolocationSensor

GeolocationSensorFromJS is casting a js.Wrapper into GeolocationSensor.

func NewGeolocationSensor Uses

func NewGeolocationSensor(options *GeolocationSensorOptions) (_result *GeolocationSensor)

func (*GeolocationSensor) Accuracy Uses

func (_this *GeolocationSensor) Accuracy() *float64

Accuracy returning attribute 'accuracy' with type float64 (idl: unrestricted double).

func (*GeolocationSensor) Altitude Uses

func (_this *GeolocationSensor) Altitude() *float64

Altitude returning attribute 'altitude' with type float64 (idl: unrestricted double).

func (*GeolocationSensor) AltitudeAccuracy Uses

func (_this *GeolocationSensor) AltitudeAccuracy() *float64

AltitudeAccuracy returning attribute 'altitudeAccuracy' with type float64 (idl: unrestricted double).

func (*GeolocationSensor) Heading Uses

func (_this *GeolocationSensor) Heading() *float64

Heading returning attribute 'heading' with type float64 (idl: unrestricted double).

func (*GeolocationSensor) Latitude Uses

func (_this *GeolocationSensor) Latitude() *float64

Latitude returning attribute 'latitude' with type float64 (idl: unrestricted double).

func (*GeolocationSensor) Longitude Uses

func (_this *GeolocationSensor) Longitude() *float64

Longitude returning attribute 'longitude' with type float64 (idl: unrestricted double).

func (*GeolocationSensor) Speed Uses

func (_this *GeolocationSensor) Speed() *float64

Speed returning attribute 'speed' with type float64 (idl: unrestricted double).

type GeolocationSensorOptions Uses

type GeolocationSensorOptions struct {
    Frequency float64
}

dictionary: GeolocationSensorOptions

func GeolocationSensorOptionsFromJS Uses

func GeolocationSensorOptionsFromJS(value js.Wrapper) *GeolocationSensorOptions

GeolocationSensorOptionsFromJS is allocating a new GeolocationSensorOptions object and copy all values from input javascript object

func (*GeolocationSensorOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type GeolocationSensorReading Uses

type GeolocationSensorReading struct {
    Timestamp        *float64
    Latitude         *float64
    Longitude        *float64
    Altitude         *float64
    Accuracy         *float64
    AltitudeAccuracy *float64
    Heading          *float64
    Speed            *float64
}

dictionary: GeolocationSensorReading

func GeolocationSensorReadingFromJS Uses

func GeolocationSensorReadingFromJS(value js.Wrapper) *GeolocationSensorReading

GeolocationSensorReadingFromJS is allocating a new GeolocationSensorReading object and copy all values from input javascript object

func (*GeolocationSensorReading) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type GravityReadingValues Uses

type GravityReadingValues struct {
    X   *float64
    Y   *float64
    Z   *float64
}

dictionary: GravityReadingValues

func GravityReadingValuesFromJS Uses

func GravityReadingValuesFromJS(value js.Wrapper) *GravityReadingValues

GravityReadingValuesFromJS is allocating a new GravityReadingValues object and copy all values from input javascript object

func (*GravityReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type GravitySensor Uses

type GravitySensor struct {
    Accelerometer
}

class: GravitySensor

func GravitySensorFromJS Uses

func GravitySensorFromJS(value js.Wrapper) *GravitySensor

GravitySensorFromJS is casting a js.Wrapper into GravitySensor.

func NewGravitySensor Uses

func NewGravitySensor(options *AccelerometerSensorOptions) (_result *GravitySensor)

type Gyroscope Uses

type Gyroscope struct {
    Sensor
}

class: Gyroscope

func GyroscopeFromJS Uses

func GyroscopeFromJS(value js.Wrapper) *Gyroscope

GyroscopeFromJS is casting a js.Wrapper into Gyroscope.

func NewGyroscope Uses

func NewGyroscope(sensorOptions *GyroscopeSensorOptions) (_result *Gyroscope)

func (*Gyroscope) X Uses

func (_this *Gyroscope) X() *float64

X returning attribute 'x' with type float64 (idl: double).

func (*Gyroscope) Y Uses

func (_this *Gyroscope) Y() *float64

Y returning attribute 'y' with type float64 (idl: double).

func (*Gyroscope) Z Uses

func (_this *Gyroscope) Z() *float64

Z returning attribute 'z' with type float64 (idl: double).

type GyroscopeReadingValues Uses

type GyroscopeReadingValues struct {
    X   *float64
    Y   *float64
    Z   *float64
}

dictionary: GyroscopeReadingValues

func GyroscopeReadingValuesFromJS Uses

func GyroscopeReadingValuesFromJS(value js.Wrapper) *GyroscopeReadingValues

GyroscopeReadingValuesFromJS is allocating a new GyroscopeReadingValues object and copy all values from input javascript object

func (*GyroscopeReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type GyroscopeSensorOptions Uses

type GyroscopeSensorOptions struct {
    Frequency      float64
    ReferenceFrame LocalCoordinateSystem
}

dictionary: GyroscopeSensorOptions

func GyroscopeSensorOptionsFromJS Uses

func GyroscopeSensorOptionsFromJS(value js.Wrapper) *GyroscopeSensorOptions

GyroscopeSensorOptionsFromJS is allocating a new GyroscopeSensorOptions object and copy all values from input javascript object

func (*GyroscopeSensorOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type LinearAccelerationReadingValues Uses

type LinearAccelerationReadingValues struct {
    X   *float64
    Y   *float64
    Z   *float64
}

dictionary: LinearAccelerationReadingValues

func LinearAccelerationReadingValuesFromJS Uses

func LinearAccelerationReadingValuesFromJS(value js.Wrapper) *LinearAccelerationReadingValues

LinearAccelerationReadingValuesFromJS is allocating a new LinearAccelerationReadingValues object and copy all values from input javascript object

func (*LinearAccelerationReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type LinearAccelerationSensor Uses

type LinearAccelerationSensor struct {
    Accelerometer
}

class: LinearAccelerationSensor

func LinearAccelerationSensorFromJS Uses

func LinearAccelerationSensorFromJS(value js.Wrapper) *LinearAccelerationSensor

LinearAccelerationSensorFromJS is casting a js.Wrapper into LinearAccelerationSensor.

func NewLinearAccelerationSensor Uses

func NewLinearAccelerationSensor(options *AccelerometerSensorOptions) (_result *LinearAccelerationSensor)

type LocalCoordinateSystem Uses

type LocalCoordinateSystem int

enum: GenericSensorLocalCoordinateSystem

const (
    CoordinateSystemDevice LocalCoordinateSystem = iota
    CoordinateSystemScreen
)

func LocalCoordinateSystemFromJS Uses

func LocalCoordinateSystemFromJS(value js.Value) LocalCoordinateSystem

LocalCoordinateSystemFromJS is converting a javascript value into a LocalCoordinateSystem enum value.

func (*LocalCoordinateSystem) JSValue Uses

func (this *LocalCoordinateSystem) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (LocalCoordinateSystem) Value Uses

func (this LocalCoordinateSystem) Value() string

Value is converting this into javascript defined string value

type Magnetometer Uses

type Magnetometer struct {
    Sensor
}

class: Magnetometer

func MagnetometerFromJS Uses

func MagnetometerFromJS(value js.Wrapper) *Magnetometer

MagnetometerFromJS is casting a js.Wrapper into Magnetometer.

func NewMagnetometer Uses

func NewMagnetometer(sensorOptions *MagnetometerSensorOptions) (_result *Magnetometer)

func (*Magnetometer) X Uses

func (_this *Magnetometer) X() *float64

X returning attribute 'x' with type float64 (idl: double).

func (*Magnetometer) Y Uses

func (_this *Magnetometer) Y() *float64

Y returning attribute 'y' with type float64 (idl: double).

func (*Magnetometer) Z Uses

func (_this *Magnetometer) Z() *float64

Z returning attribute 'z' with type float64 (idl: double).

type MagnetometerReadingValues Uses

type MagnetometerReadingValues struct {
    X   *float64
    Y   *float64
    Z   *float64
}

dictionary: MagnetometerReadingValues

func MagnetometerReadingValuesFromJS Uses

func MagnetometerReadingValuesFromJS(value js.Wrapper) *MagnetometerReadingValues

MagnetometerReadingValuesFromJS is allocating a new MagnetometerReadingValues object and copy all values from input javascript object

func (*MagnetometerReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type MagnetometerSensorOptions Uses

type MagnetometerSensorOptions struct {
    Frequency      float64
    ReferenceFrame LocalCoordinateSystem
}

dictionary: MagnetometerSensorOptions

func MagnetometerSensorOptionsFromJS Uses

func MagnetometerSensorOptionsFromJS(value js.Wrapper) *MagnetometerSensorOptions

MagnetometerSensorOptionsFromJS is allocating a new MagnetometerSensorOptions object and copy all values from input javascript object

func (*MagnetometerSensorOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type MockSensor Uses

type MockSensor struct {
    MaxSamplingFrequency       float64
    MinSamplingFrequency       float64
    RequestedSamplingFrequency float64
}

dictionary: MockSensor

func MockSensorFromJS Uses

func MockSensorFromJS(value js.Wrapper) *MockSensor

MockSensorFromJS is allocating a new MockSensor object and copy all values from input javascript object

func (*MockSensor) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type MockSensorConfiguration Uses

type MockSensorConfiguration struct {
    MockSensorType       MockSensorType
    Connected            bool
    MaxSamplingFrequency *float64
    MinSamplingFrequency *float64
}

dictionary: MockSensorConfiguration

func MockSensorConfigurationFromJS Uses

func MockSensorConfigurationFromJS(value js.Wrapper) *MockSensorConfiguration

MockSensorConfigurationFromJS is allocating a new MockSensorConfiguration object and copy all values from input javascript object

func (*MockSensorConfiguration) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type MockSensorReadingValues Uses

type MockSensorReadingValues struct {
}

dictionary: MockSensorReadingValues

func MockSensorReadingValuesFromJS Uses

func MockSensorReadingValuesFromJS(value js.Wrapper) *MockSensorReadingValues

MockSensorReadingValuesFromJS is allocating a new MockSensorReadingValues object and copy all values from input javascript object

func (*MockSensorReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type MockSensorType Uses

type MockSensorType int

enum: MockSensorType

const (
    AmbientLightMockSensorType MockSensorType = iota
    AccelerometerMockSensorType
    LinearAccelerationMockSensorType
    GravityMockSensorType
    GyroscopeMockSensorType
    MagnetometerMockSensorType
    UncalibratedMagnetometerMockSensorType
    AbsoluteOrientationMockSensorType
    RelativeOrientationMockSensorType
    GeolocationMockSensorType
    ProximityMockSensorType
)

func MockSensorTypeFromJS Uses

func MockSensorTypeFromJS(value js.Value) MockSensorType

MockSensorTypeFromJS is converting a javascript value into a MockSensorType enum value.

func (*MockSensorType) JSValue Uses

func (this *MockSensorType) JSValue() js.Value

JSValue is converting this enum into a javascript object

func (MockSensorType) Value Uses

func (this MockSensorType) Value() string

Value is converting this into javascript defined string value

type OrientationSensor Uses

type OrientationSensor struct {
    Sensor
}

class: OrientationSensor

func OrientationSensorFromJS Uses

func OrientationSensorFromJS(value js.Wrapper) *OrientationSensor

OrientationSensorFromJS is casting a js.Wrapper into OrientationSensor.

func (*OrientationSensor) PopulateMatrix Uses

func (_this *OrientationSensor) PopulateMatrix(targetMatrix *Union)

func (*OrientationSensor) Quaternion Uses

func (_this *OrientationSensor) Quaternion() *javascript.FrozenArray

Quaternion returning attribute 'quaternion' with type javascript.FrozenArray (idl: FrozenArray).

type OrientationSensorOptions Uses

type OrientationSensorOptions struct {
    Frequency      float64
    ReferenceFrame LocalCoordinateSystem
}

dictionary: OrientationSensorOptions

func OrientationSensorOptionsFromJS Uses

func OrientationSensorOptionsFromJS(value js.Wrapper) *OrientationSensorOptions

OrientationSensorOptionsFromJS is allocating a new OrientationSensorOptions object and copy all values from input javascript object

func (*OrientationSensorOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type Position Uses

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

class: Position

func PositionFromJS Uses

func PositionFromJS(value js.Wrapper) *Position

PositionFromJS is casting a js.Wrapper into Position.

func (*Position) Coords Uses

func (_this *Position) Coords() *Coordinates

Coords returning attribute 'coords' with type Coordinates (idl: Coordinates).

func (*Position) JSValue Uses

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

func (*Position) Timestamp Uses

func (_this *Position) Timestamp() int

Timestamp returning attribute 'timestamp' with type int (idl: unsigned long long).

type PositionCallback Uses

type PositionCallback js.Func

PositionCallback is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PositionCallbackToJS Uses

func PositionCallbackToJS(callback PositionCallbackFunc) *PositionCallback

type PositionCallbackFunc Uses

type PositionCallbackFunc func(position *Position)

callback: PositionCallback

func PositionCallbackFromJS Uses

func PositionCallbackFromJS(_value js.Value) PositionCallbackFunc

type PositionError Uses

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

class: PositionError

func PositionErrorFromJS Uses

func PositionErrorFromJS(value js.Wrapper) *PositionError

PositionErrorFromJS is casting a js.Wrapper into PositionError.

func (*PositionError) Code Uses

func (_this *PositionError) Code() int

Code returning attribute 'code' with type int (idl: unsigned short).

func (*PositionError) JSValue Uses

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

func (*PositionError) Message Uses

func (_this *PositionError) Message() string

Message returning attribute 'message' with type string (idl: DOMString).

type PositionErrorCallback Uses

type PositionErrorCallback js.Func

PositionErrorCallback is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PositionErrorCallbackToJS Uses

func PositionErrorCallbackToJS(callback PositionErrorCallbackFunc) *PositionErrorCallback

type PositionErrorCallbackFunc Uses

type PositionErrorCallbackFunc func(positionError *PositionError)

callback: PositionErrorCallback

func PositionErrorCallbackFromJS Uses

func PositionErrorCallbackFromJS(_value js.Value) PositionErrorCallbackFunc

type PositionOptions Uses

type PositionOptions struct {
    EnableHighAccuracy bool
    Timeout            uint
    MaximumAge         uint
}

dictionary: PositionOptions

func PositionOptionsFromJS Uses

func PositionOptionsFromJS(value js.Wrapper) *PositionOptions

PositionOptionsFromJS is allocating a new PositionOptions object and copy all values from input javascript object

func (*PositionOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type PromiseGeolocationSensorReading Uses

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

class: Promise

func PromiseGeolocationSensorReadingFromJS Uses

func PromiseGeolocationSensorReadingFromJS(value js.Wrapper) *PromiseGeolocationSensorReading

PromiseGeolocationSensorReadingFromJS is casting a js.Wrapper into PromiseGeolocationSensorReading.

func Read Uses

func Read(readOptions *ReadOptions) (_result *PromiseGeolocationSensorReading)

func (*PromiseGeolocationSensorReading) Catch Uses

func (_this *PromiseGeolocationSensorReading) Catch(onRejected *PromiseGeolocationSensorReadingOnRejected) (_result *PromiseGeolocationSensorReading)

func (*PromiseGeolocationSensorReading) Finally Uses

func (_this *PromiseGeolocationSensorReading) Finally(onFinally *javascript.PromiseFinally) (_result *PromiseGeolocationSensorReading)

func (*PromiseGeolocationSensorReading) JSValue Uses

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

func (*PromiseGeolocationSensorReading) Then Uses

func (_this *PromiseGeolocationSensorReading) Then(onFulfilled *PromiseGeolocationSensorReadingOnFulfilled, onRejected *PromiseGeolocationSensorReadingOnRejected) (_result *PromiseGeolocationSensorReading)

type PromiseGeolocationSensorReadingOnFulfilled Uses

type PromiseGeolocationSensorReadingOnFulfilled js.Func

PromiseGeolocationSensorReadingOnFulfilled is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseGeolocationSensorReadingOnFulfilledToJS Uses

func PromiseGeolocationSensorReadingOnFulfilledToJS(callback PromiseGeolocationSensorReadingOnFulfilledFunc) *PromiseGeolocationSensorReadingOnFulfilled

type PromiseGeolocationSensorReadingOnFulfilledFunc Uses

type PromiseGeolocationSensorReadingOnFulfilledFunc func(value *GeolocationSensorReading)

callback: PromiseTemplateOnFulfilled

func PromiseGeolocationSensorReadingOnFulfilledFromJS Uses

func PromiseGeolocationSensorReadingOnFulfilledFromJS(_value js.Value) PromiseGeolocationSensorReadingOnFulfilledFunc

type PromiseGeolocationSensorReadingOnRejected Uses

type PromiseGeolocationSensorReadingOnRejected js.Func

PromiseGeolocationSensorReadingOnRejected is a javascript function type.

Call Release() when done to release resouces allocated to this type.

func PromiseGeolocationSensorReadingOnRejectedToJS Uses

func PromiseGeolocationSensorReadingOnRejectedToJS(callback PromiseGeolocationSensorReadingOnRejectedFunc) *PromiseGeolocationSensorReadingOnRejected

type PromiseGeolocationSensorReadingOnRejectedFunc Uses

type PromiseGeolocationSensorReadingOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromiseGeolocationSensorReadingOnRejectedFromJS Uses

func PromiseGeolocationSensorReadingOnRejectedFromJS(_value js.Value) PromiseGeolocationSensorReadingOnRejectedFunc

type ProximityReadingValues Uses

type ProximityReadingValues struct {
    Distance *float64
    Max      *float64
    Near     *bool
}

dictionary: ProximityReadingValues

func ProximityReadingValuesFromJS Uses

func ProximityReadingValuesFromJS(value js.Wrapper) *ProximityReadingValues

ProximityReadingValuesFromJS is allocating a new ProximityReadingValues object and copy all values from input javascript object

func (*ProximityReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type ProximitySensor Uses

type ProximitySensor struct {
    Sensor
}

class: ProximitySensor

func NewProximitySensor Uses

func NewProximitySensor(sensorOptions *SensorOptions) (_result *ProximitySensor)

func ProximitySensorFromJS Uses

func ProximitySensorFromJS(value js.Wrapper) *ProximitySensor

ProximitySensorFromJS is casting a js.Wrapper into ProximitySensor.

func (*ProximitySensor) Distance Uses

func (_this *ProximitySensor) Distance() *float64

Distance returning attribute 'distance' with type float64 (idl: double).

func (*ProximitySensor) Max Uses

func (_this *ProximitySensor) Max() *float64

Max returning attribute 'max' with type float64 (idl: double).

func (*ProximitySensor) Near Uses

func (_this *ProximitySensor) Near() *bool

Near returning attribute 'near' with type bool (idl: boolean).

type ReadOptions Uses

type ReadOptions struct {
    Frequency float64
    Signal    *domcore.AbortSignal
}

dictionary: ReadOptions

func ReadOptionsFromJS Uses

func ReadOptionsFromJS(value js.Wrapper) *ReadOptions

ReadOptionsFromJS is allocating a new ReadOptions object and copy all values from input javascript object

func (*ReadOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type RelativeOrientationReadingValues Uses

type RelativeOrientationReadingValues struct {
    Quaternion *javascript.FrozenArray
}

dictionary: RelativeOrientationReadingValues

func RelativeOrientationReadingValuesFromJS Uses

func RelativeOrientationReadingValuesFromJS(value js.Wrapper) *RelativeOrientationReadingValues

RelativeOrientationReadingValuesFromJS is allocating a new RelativeOrientationReadingValues object and copy all values from input javascript object

func (*RelativeOrientationReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type RelativeOrientationSensor Uses

type RelativeOrientationSensor struct {
    OrientationSensor
}

class: RelativeOrientationSensor

func NewRelativeOrientationSensor Uses

func NewRelativeOrientationSensor(sensorOptions *OrientationSensorOptions) (_result *RelativeOrientationSensor)

func RelativeOrientationSensorFromJS Uses

func RelativeOrientationSensorFromJS(value js.Wrapper) *RelativeOrientationSensor

RelativeOrientationSensorFromJS is casting a js.Wrapper into RelativeOrientationSensor.

type Sensor Uses

type Sensor struct {
    domcore.EventTarget
}

class: Sensor

func SensorFromJS Uses

func SensorFromJS(value js.Wrapper) *Sensor

SensorFromJS is casting a js.Wrapper into Sensor.

func (*Sensor) Activated Uses

func (_this *Sensor) Activated() bool

Activated returning attribute 'activated' with type bool (idl: boolean).

func (*Sensor) AddEventActivate Uses

func (_this *Sensor) AddEventActivate(listener func(event *domcore.Event, currentTarget *Sensor)) js.Func

AddActivate is adding doing AddEventListener for 'Activate' on target. This method is returning allocated javascript function that need to be released.

func (*Sensor) AddEventError Uses

func (_this *Sensor) AddEventError(listener func(event *SensorErrorEvent, currentTarget *Sensor)) js.Func

AddError is adding doing AddEventListener for 'Error' on target. This method is returning allocated javascript function that need to be released.

func (*Sensor) AddEventReading Uses

func (_this *Sensor) AddEventReading(listener func(event *domcore.Event, currentTarget *Sensor)) js.Func

AddReading is adding doing AddEventListener for 'Reading' on target. This method is returning allocated javascript function that need to be released.

func (*Sensor) HasReading Uses

func (_this *Sensor) HasReading() bool

HasReading returning attribute 'hasReading' with type bool (idl: boolean).

func (*Sensor) OnActivate Uses

func (_this *Sensor) OnActivate() domcore.EventHandlerFunc

OnActivate returning attribute 'onactivate' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Sensor) OnError Uses

func (_this *Sensor) OnError() domcore.EventHandlerFunc

OnError returning attribute 'onerror' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Sensor) OnReading Uses

func (_this *Sensor) OnReading() domcore.EventHandlerFunc

OnReading returning attribute 'onreading' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*Sensor) SetOnActivate Uses

func (_this *Sensor) SetOnActivate(listener func(event *domcore.Event, currentTarget *Sensor)) js.Func

SetOnActivate is assigning a function to 'onactivate'. This This method is returning allocated javascript function that need to be released.

func (*Sensor) SetOnError Uses

func (_this *Sensor) SetOnError(listener func(event *SensorErrorEvent, currentTarget *Sensor)) js.Func

SetOnError is assigning a function to 'onerror'. This This method is returning allocated javascript function that need to be released.

func (*Sensor) SetOnReading Uses

func (_this *Sensor) SetOnReading(listener func(event *domcore.Event, currentTarget *Sensor)) js.Func

SetOnReading is assigning a function to 'onreading'. This This method is returning allocated javascript function that need to be released.

func (*Sensor) Start Uses

func (_this *Sensor) Start()

func (*Sensor) Stop Uses

func (_this *Sensor) Stop()

func (*Sensor) Timestamp Uses

func (_this *Sensor) Timestamp() *float64

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

type SensorErrorEvent Uses

type SensorErrorEvent struct {
    domcore.Event
}

class: SensorErrorEvent

func NewSensorErrorEvent Uses

func NewSensorErrorEvent(_type string, errorEventInitDict *SensorErrorEventInit) (_result *SensorErrorEvent)

func SensorErrorEventFromJS Uses

func SensorErrorEventFromJS(value js.Wrapper) *SensorErrorEvent

SensorErrorEventFromJS is casting a js.Wrapper into SensorErrorEvent.

func (*SensorErrorEvent) Error Uses

func (_this *SensorErrorEvent) Error() *domcore.DOMException

Error returning attribute 'error' with type domcore.DOMException (idl: DOMException).

type SensorErrorEventInit Uses

type SensorErrorEventInit struct {
    Bubbles    bool
    Cancelable bool
    Composed   bool
    Error      *domcore.DOMException
}

dictionary: SensorErrorEventInit

func SensorErrorEventInitFromJS Uses

func SensorErrorEventInitFromJS(value js.Wrapper) *SensorErrorEventInit

SensorErrorEventInitFromJS is allocating a new SensorErrorEventInit object and copy all values from input javascript object

func (*SensorErrorEventInit) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type SensorOptions Uses

type SensorOptions struct {
    Frequency float64
}

dictionary: SensorOptions

func SensorOptionsFromJS Uses

func SensorOptionsFromJS(value js.Wrapper) *SensorOptions

SensorOptionsFromJS is allocating a new SensorOptions object and copy all values from input javascript object

func (*SensorOptions) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type UncalibratedMagnetometer Uses

type UncalibratedMagnetometer struct {
    Sensor
}

class: UncalibratedMagnetometer

func NewUncalibratedMagnetometer Uses

func NewUncalibratedMagnetometer(sensorOptions *MagnetometerSensorOptions) (_result *UncalibratedMagnetometer)

func UncalibratedMagnetometerFromJS Uses

func UncalibratedMagnetometerFromJS(value js.Wrapper) *UncalibratedMagnetometer

UncalibratedMagnetometerFromJS is casting a js.Wrapper into UncalibratedMagnetometer.

func (*UncalibratedMagnetometer) X Uses

func (_this *UncalibratedMagnetometer) X() *float64

X returning attribute 'x' with type float64 (idl: double).

func (*UncalibratedMagnetometer) XBias Uses

func (_this *UncalibratedMagnetometer) XBias() *float64

XBias returning attribute 'xBias' with type float64 (idl: double).

func (*UncalibratedMagnetometer) Y Uses

func (_this *UncalibratedMagnetometer) Y() *float64

Y returning attribute 'y' with type float64 (idl: double).

func (*UncalibratedMagnetometer) YBias Uses

func (_this *UncalibratedMagnetometer) YBias() *float64

YBias returning attribute 'yBias' with type float64 (idl: double).

func (*UncalibratedMagnetometer) Z Uses

func (_this *UncalibratedMagnetometer) Z() *float64

Z returning attribute 'z' with type float64 (idl: double).

func (*UncalibratedMagnetometer) ZBias Uses

func (_this *UncalibratedMagnetometer) ZBias() *float64

ZBias returning attribute 'zBias' with type float64 (idl: double).

type UncalibratedMagnetometerReadingValues Uses

type UncalibratedMagnetometerReadingValues struct {
    X     *float64
    Y     *float64
    Z     *float64
    XBias *float64
    YBias *float64
    ZBias *float64
}

dictionary: UncalibratedMagnetometerReadingValues

func UncalibratedMagnetometerReadingValuesFromJS Uses

func UncalibratedMagnetometerReadingValuesFromJS(value js.Wrapper) *UncalibratedMagnetometerReadingValues

UncalibratedMagnetometerReadingValuesFromJS is allocating a new UncalibratedMagnetometerReadingValues object and copy all values from input javascript object

func (*UncalibratedMagnetometerReadingValues) JSValue Uses

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

JSValue is allocating a new javasript object and copy all values

type Union Uses

type Union struct {
    Value js.Value
}

func UnionFromJS Uses

func UnionFromJS(value js.Value) *Union

func (*Union) JSValue Uses

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

Package sensor imports 3 packages (graph) and is imported by 2 packages. Updated 2019-09-15. Refresh now. Tools for package owners.