webapi: github.com/gowebapi/webapi/media/orientation Index | Files

package orientation

import "github.com/gowebapi/webapi/media/orientation"

Package orientation provides the ability to read the screen orientation type and angle, to be informed when the screen orientation changes, and to lock the screen to a specific orientation.

Browser support on https://caniuse.com/#feat=screen-orientation

Index

Package Files

doc.go orientation.go

type OrientationLockType Uses

type OrientationLockType int

enum: OrientationLockType

const (
    AnyOrientationLockType OrientationLockType = iota
    NaturalOrientationLockType
    LandscapeOrientationLockType
    PortraitOrientationLockType
    PortraitPrimaryOrientationLockType
    PortraitSecondaryOrientationLockType
    LandscapePrimaryOrientationLockType
    LandscapeSecondaryOrientationLockType
)

func OrientationLockTypeFromJS Uses

func OrientationLockTypeFromJS(value js.Value) OrientationLockType

OrientationLockTypeFromJS is converting a javascript value into a OrientationLockType enum value.

func (*OrientationLockType) JSValue Uses

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

JSValue is converting this enum into a javascript object

func (OrientationLockType) Value Uses

func (this OrientationLockType) Value() string

Value is converting this into javascript defined string value

type OrientationType Uses

type OrientationType int

enum: OrientationType

const (
    PortraitPrimaryOrientationType OrientationType = iota
    PortraitSecondaryOrientationType
    LandscapePrimaryOrientationType
    LandscapeSecondaryOrientationType
)

func OrientationTypeFromJS Uses

func OrientationTypeFromJS(value js.Value) OrientationType

OrientationTypeFromJS is converting a javascript value into a OrientationType enum value.

func (*OrientationType) JSValue Uses

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

JSValue is converting this enum into a javascript object

func (OrientationType) Value Uses

func (this OrientationType) Value() string

Value is converting this into javascript defined string value

type ScreenOrientation Uses

type ScreenOrientation struct {
    domcore.EventTarget
}

class: ScreenOrientation

func ScreenOrientationFromJS Uses

func ScreenOrientationFromJS(value js.Wrapper) *ScreenOrientation

ScreenOrientationFromJS is casting a js.Wrapper into ScreenOrientation.

func (*ScreenOrientation) AddEventChange Uses

func (_this *ScreenOrientation) AddEventChange(listener func(event *domcore.Event, currentTarget *ScreenOrientation)) js.Func

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

func (*ScreenOrientation) Angle Uses

func (_this *ScreenOrientation) Angle() int

Angle returning attribute 'angle' with type int (idl: unsigned short).

func (*ScreenOrientation) Lock Uses

func (_this *ScreenOrientation) Lock(orientation OrientationLockType) (_result *javascript.PromiseVoid)

func (*ScreenOrientation) OnChange Uses

func (_this *ScreenOrientation) OnChange() domcore.EventHandlerFunc

OnChange returning attribute 'onchange' with type domcore.EventHandler (idl: EventHandlerNonNull).

func (*ScreenOrientation) SetOnChange Uses

func (_this *ScreenOrientation) SetOnChange(listener func(event *domcore.Event, currentTarget *ScreenOrientation)) js.Func

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

func (*ScreenOrientation) Type Uses

func (_this *ScreenOrientation) Type() OrientationType

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

func (*ScreenOrientation) Unlock Uses

func (_this *ScreenOrientation) Unlock()

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 orientation imports 3 packages (graph) and is imported by 2 packages. Updated 2019-09-21. Refresh now. Tools for package owners.