wakelock

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 wakelock is to request a wake lock that prevents some aspect of the device from entering a power-saving state (e.g., preventing the system from turning off the screen).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PromiseWakeLock

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

class: Promise

func PromiseWakeLockFromJS

func PromiseWakeLockFromJS(value js.Value) *PromiseWakeLock

PromiseWakeLockFromJS is casting a js.Value into PromiseWakeLock.

func PromiseWakeLockFromWrapper

func PromiseWakeLockFromWrapper(input core.Wrapper) *PromiseWakeLock

PromiseWakeLockFromJS is casting from something that holds a js.Value into PromiseWakeLock.

func (*PromiseWakeLock) Catch

func (_this *PromiseWakeLock) Catch(onRejected *PromiseWakeLockOnRejected) (_result *PromiseWakeLock)

func (*PromiseWakeLock) Finally

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

func (*PromiseWakeLock) JSValue

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

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

func (*PromiseWakeLock) Then

func (_this *PromiseWakeLock) Then(onFulfilled *PromiseWakeLockOnFulfilled, onRejected *PromiseWakeLockOnRejected) (_result *PromiseWakeLock)

type PromiseWakeLockOnFulfilled

type PromiseWakeLockOnFulfilled js.Func

PromiseWakeLockOnFulfilled is a javascript function type.

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

type PromiseWakeLockOnFulfilledFunc

type PromiseWakeLockOnFulfilledFunc func(value *WakeLock)

callback: PromiseTemplateOnFulfilled

func PromiseWakeLockOnFulfilledFromJS

func PromiseWakeLockOnFulfilledFromJS(_value js.Value) PromiseWakeLockOnFulfilledFunc

type PromiseWakeLockOnRejected

type PromiseWakeLockOnRejected js.Func

PromiseWakeLockOnRejected is a javascript function type.

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

type PromiseWakeLockOnRejectedFunc

type PromiseWakeLockOnRejectedFunc func(reason js.Value)

callback: PromiseTemplateOnRejected

func PromiseWakeLockOnRejectedFromJS

func PromiseWakeLockOnRejectedFromJS(_value js.Value) PromiseWakeLockOnRejectedFunc

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

type WakeLock

type WakeLock struct {
	domcore.EventTarget
}

class: WakeLock

func WakeLockFromJS

func WakeLockFromJS(value js.Value) *WakeLock

WakeLockFromJS is casting a js.Value into WakeLock.

func WakeLockFromWrapper

func WakeLockFromWrapper(input core.Wrapper) *WakeLock

WakeLockFromJS is casting from something that holds a js.Value into WakeLock.

func (*WakeLock) Active

func (_this *WakeLock) Active() bool

Active returning attribute 'active' with type bool (idl: boolean).

func (*WakeLock) AddEventActiveChange

func (_this *WakeLock) AddEventActiveChange(listener func(event *domcore.Event, currentTarget *WakeLock)) js.Func

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

func (*WakeLock) CreateRequest

func (_this *WakeLock) CreateRequest() (_result *WakeLockRequest)

func (*WakeLock) OnActiveChange

func (_this *WakeLock) OnActiveChange() domcore.EventHandlerFunc

OnActiveChange returning attribute 'onactivechange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*WakeLock) SetOnActiveChange

func (_this *WakeLock) SetOnActiveChange(listener func(event *domcore.Event, currentTarget *WakeLock)) js.Func

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

func (*WakeLock) Type

func (_this *WakeLock) Type() WakeLockType

Type returning attribute 'type' with type WakeLockType (idl: WakeLockType).

type WakeLockRequest

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

class: WakeLockRequest

func WakeLockRequestFromJS

func WakeLockRequestFromJS(value js.Value) *WakeLockRequest

WakeLockRequestFromJS is casting a js.Value into WakeLockRequest.

func WakeLockRequestFromWrapper

func WakeLockRequestFromWrapper(input core.Wrapper) *WakeLockRequest

WakeLockRequestFromJS is casting from something that holds a js.Value into WakeLockRequest.

func (*WakeLockRequest) Cancel

func (_this *WakeLockRequest) Cancel()

func (*WakeLockRequest) JSValue

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

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

type WakeLockType

type WakeLockType int

enum: WakeLockType

const (
	ScreenWakeLockType WakeLockType = iota
	SystemWakeLockType
)

func WakeLockTypeFromJS

func WakeLockTypeFromJS(value js.Value) WakeLockType

WakeLockTypeFromJS is converting a javascript value into a WakeLockType enum value.

func (*WakeLockType) JSValue

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

JSValue is converting this enum into a javascript object

func (WakeLockType) Value

func (this WakeLockType) Value() string

Value is converting this into javascript defined string value

Jump to

Keyboard shortcuts

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