tabletinput

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT, MIT Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package tabletinput carries drawing tablets and the events of their tools from the input backend to the compositor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Axes

type Axes struct {
	Changed            Axis
	X, Y               float64
	Pressure, Distance float64
	TiltX, TiltY       float64
	Rotation           float64
	Slider             float64
	Wheel              float64
	WheelClicks        int32
}

type Axis

type Axis uint16
const (
	AxisX Axis = 1 << iota
	AxisY
	AxisPressure
	AxisDistance
	AxisTiltX
	AxisTiltY
	AxisRotation
	AxisSlider
	AxisWheel
)

func (Axis) Any

func (a Axis) Any(flags Axis) bool

type Button

type Button struct {
	Time    time.Duration
	Tool    *Tool
	Button  uint32
	Pressed bool
}

func (Button) Timestamp

func (e Button) Timestamp() time.Duration

type Capability

type Capability uint8
const (
	CanTilt Capability = 1 << iota
	CanPressure
	CanDistance
	CanRotation
	CanSlider
	CanWheel
)

func (Capability) Has

func (c Capability) Has(flag Capability) bool

type ID

type ID struct {
	Vendor, Product uint32
}

type Motion

type Motion struct {
	Time time.Duration
	Tool *Tool
	Axes Axes
}

func (Motion) Timestamp

func (e Motion) Timestamp() time.Duration

type Pad

type Pad interface {
	backend.Device
	Pad() (PadLayout, bool)
	Group() uintptr
}

type PadButton

type PadButton struct {
	Time    time.Duration
	Button  uint32
	Pressed bool
	Group   uint32
	Mode    uint32
}

func (PadButton) Timestamp

func (e PadButton) Timestamp() time.Duration

type PadDial

type PadDial struct {
	Time  time.Duration
	Dial  uint32
	Delta int32
	Group uint32
	Mode  uint32
}

func (PadDial) Timestamp

func (e PadDial) Timestamp() time.Duration

type PadGroup

type PadGroup struct {
	Buttons []uint32
	Rings   []uint32
	Strips  []uint32
	Dials   []uint32
	Modes   uint32
	Mode    uint32
}

type PadLayout

type PadLayout struct {
	Buttons uint32
	Groups  []PadGroup
}

type PadRing

type PadRing struct {
	Time    time.Duration
	Ring    uint32
	Degrees float64
	Stopped bool
	Finger  bool
	Group   uint32
	Mode    uint32
}

func (PadRing) Timestamp

func (e PadRing) Timestamp() time.Duration

type PadStrip

type PadStrip struct {
	Time     time.Duration
	Strip    uint32
	Position float64
	Stopped  bool
	Finger   bool
	Group    uint32
	Mode     uint32
}

func (PadStrip) Timestamp

func (e PadStrip) Timestamp() time.Duration

type Proximity

type Proximity struct {
	Time time.Duration
	Tool *Tool
	In   bool
	Axes Axes
}

func (Proximity) Timestamp

func (e Proximity) Timestamp() time.Duration

type Tablet

type Tablet interface {
	backend.Device
	Tablet() (ID, bool)
	Group() uintptr
}

type Tip

type Tip struct {
	Time time.Duration
	Tool *Tool
	Down bool
	Axes Axes
}

func (Tip) Timestamp

func (e Tip) Timestamp() time.Duration

type Tool

type Tool struct {
	Type       ToolType
	Serial     uint64
	HardwareID uint64
	Caps       Capability
}

type ToolType

type ToolType uint8
const (
	Pen ToolType = iota + 1
	Eraser
	Brush
	Pencil
	Airbrush
	Mouse
	Lens
	Totem
)

Jump to

Keyboard shortcuts

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