autorotate

package
v0.0.0-...-9f8be89 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrientationUnknown  = Orientation("unknown")
	OrientationNormal   = Orientation("normal")
	OrientationInverted = Orientation("inverted")
	OrientationLeft     = Orientation("left")
	OrientationRight    = Orientation("right")

	AxisX = Axis(iota)
	AxisY
)

Variables

View Source
var AutodetectKeywords = []string{
	"Wacom HID",
}

Functions

func DetectTouchScreens

func DetectTouchScreens() ([]string, error)

Types

type Autorotate

type Autorotate struct {
	// contains filtered or unexported fields
}

func NewAutorotate

func NewAutorotate(display string, touchscreens []string, accelerometerName string, threshold float64, refreshRate time.Duration, maxTicks int) *Autorotate

func (Autorotate) GetOrientationEdges

func (a Autorotate) GetOrientationEdges() map[Orientation]edge

func (Autorotate) SetOrientation

func (a Autorotate) SetOrientation(orientation Orientation) error

func (*Autorotate) Watch

func (a *Autorotate) Watch(ctx context.Context) error

type Axis

type Axis int

type Orientation

type Orientation string

type XInputCoordinates

type XInputCoordinates [9]int

Jump to

Keyboard shortcuts

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