common

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: CC0-1.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action int32
const (
	ActionDOWN          Action = 0
	ActionUP            Action = 1
	ActionMOVE          Action = 2
	ActionCANCEL        Action = 3
	ActionOUTSIDE       Action = 4
	ActionPointerDown   Action = 5
	ActionPointerUp     Action = 6
	ActionHoverMove     Action = 7
	ActionSCROLL        Action = 8
	ActionHoverEnter    Action = 9
	ActionHoverExit     Action = 10
	ActionButtonPress   Action = 11
	ActionButtonRelease Action = 12
)

type Axis

type Axis int32
const (
	AxisX           Axis = 0
	AxisY           Axis = 1
	AxisPRESSURE    Axis = 2
	AxisSIZE        Axis = 3
	AxisTouchMajor  Axis = 4
	AxisTouchMinor  Axis = 5
	AxisToolMajor   Axis = 6
	AxisToolMinor   Axis = 7
	AxisORIENTATION Axis = 8
	AxisVSCROLL     Axis = 9
	AxisHSCROLL     Axis = 10
	AxisZ           Axis = 11
	AxisRX          Axis = 12
	AxisRY          Axis = 13
	AxisRZ          Axis = 14
	AxisHatX        Axis = 15
	AxisHatY        Axis = 16
	AxisLTRIGGER    Axis = 17
	AxisRTRIGGER    Axis = 18
	AxisTHROTTLE    Axis = 19
	AxisRUDDER      Axis = 20
	AxisWHEEL       Axis = 21
	AxisGAS         Axis = 22
	AxisBRAKE       Axis = 23
	AxisDISTANCE    Axis = 24
	AxisTILT        Axis = 25
	AxisSCROLL      Axis = 26
	AxisRelativeX   Axis = 27
	AxisRelativeY   Axis = 28
	AxisGeneric1    Axis = 32
	AxisGeneric2    Axis = 33
	AxisGeneric3    Axis = 34
	AxisGeneric4    Axis = 35
	AxisGeneric5    Axis = 36
	AxisGeneric6    Axis = 37
	AxisGeneric7    Axis = 38
	AxisGeneric8    Axis = 39
	AxisGeneric9    Axis = 40
	AxisGeneric10   Axis = 41
	AxisGeneric11   Axis = 42
	AxisGeneric12   Axis = 43
	AxisGeneric13   Axis = 44
	AxisGeneric14   Axis = 45
	AxisGeneric15   Axis = 46
	AxisGeneric16   Axis = 47
)

type Button

type Button int32
const (
	ButtonNONE            Button = 0
	ButtonPRIMARY         Button = (1 << 0)
	ButtonSECONDARY       Button = (1 << 1)
	ButtonTERTIARY        Button = (1 << 2)
	ButtonBACK            Button = (1 << 3)
	ButtonFORWARD         Button = (1 << 4)
	ButtonStylusPrimary   Button = (1 << 5)
	ButtonStylusSecondary Button = (1 << 6)
)

type Classification

type Classification byte
const (
	ClassificationNONE             Classification = 0
	ClassificationAmbiguousGesture Classification = 1
	ClassificationDeepPress        Classification = 2
)

type EdgeFlag

type EdgeFlag int32
const (
	EdgeFlagNONE   EdgeFlag = 0
	EdgeFlagTOP    EdgeFlag = (1 << 0)
	EdgeFlagBOTTOM EdgeFlag = (1 << 1)
	EdgeFlagLEFT   EdgeFlag = (1 << 2)
	EdgeFlagRIGHT  EdgeFlag = (1 << 3)
)

type Flag

type Flag int32
const (
	FlagWindowIsObscured   Flag = (1 << 0)
	FlagIsGeneratedGesture Flag = (1 << 3)
	FlagTAINTED            Flag = -2147483648
)

type Meta

type Meta int32
const (
	MetaNONE         Meta = 0
	MetaAltOn        Meta = (1 << 1)
	MetaAltLeftOn    Meta = (1 << 4)
	MetaAltRightOn   Meta = (1 << 5)
	MetaShiftOn      Meta = (1 << 0)
	MetaShiftLeftOn  Meta = (1 << 6)
	MetaShiftRightOn Meta = (1 << 7)
	MetaSymOn        Meta = (1 << 2)
	MetaFunctionOn   Meta = (1 << 3)
	MetaCtrlOn       Meta = (1 << 12)
	MetaCtrlLeftOn   Meta = (1 << 13)
	MetaCtrlRightOn  Meta = (1 << 14)
	MetaMetaOn       Meta = (1 << 16)
	MetaMetaLeftOn   Meta = (1 << 17)
	MetaMetaRightOn  Meta = (1 << 18)
	MetaCapsLockOn   Meta = (1 << 20)
	MetaNumLockOn    Meta = (1 << 21)
	MetaScrollLockOn Meta = (1 << 22)
)

type MotionEvent

type MotionEvent struct {
	DeviceId          int32
	Source            Source
	DisplayId         int32
	DownTime          int64
	EventTime         int64
	Action            Action
	ActionIndex       byte
	ActionButton      Button
	Flags             Flag
	PolicyFlags       PolicyFlag
	EdgeFlags         EdgeFlag
	MetaState         Meta
	ButtonState       Button
	XPrecision        float32
	YPrecision        float32
	PointerProperties []PointerProperties
	PointerCoords     []PointerCoords
	DeviceTimestamp   int32
	Frames            []VideoFrame
}

func (*MotionEvent) MarshalParcel

func (s *MotionEvent) MarshalParcel(
	p *parcel.Parcel,
) error

func (*MotionEvent) UnmarshalParcel

func (s *MotionEvent) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PointerCoords

type PointerCoords struct {
	Bits   int64
	Values []float32
}

func (*PointerCoords) MarshalParcel

func (s *PointerCoords) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PointerCoords) UnmarshalParcel

func (s *PointerCoords) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PointerProperties

type PointerProperties struct {
	Id       int32
	ToolType ToolType
}

func (*PointerProperties) MarshalParcel

func (s *PointerProperties) MarshalParcel(
	p *parcel.Parcel,
) error

func (*PointerProperties) UnmarshalParcel

func (s *PointerProperties) UnmarshalParcel(
	p *parcel.Parcel,
) error

type PolicyFlag

type PolicyFlag int32
const (
	PolicyFlagWAKE             PolicyFlag = (1 << 0)
	PolicyFlagVIRTUAL          PolicyFlag = (1 << 1)
	PolicyFlagFUNCTION         PolicyFlag = (1 << 2)
	PolicyFlagGESTURE          PolicyFlag = (1 << 3)
	PolicyFlagINJECTED         PolicyFlag = (1 << 24)
	PolicyFlagTRUSTED          PolicyFlag = (1 << 25)
	PolicyFlagFILTERED         PolicyFlag = (1 << 26)
	PolicyFlagDisableKeyRepeat PolicyFlag = (1 << 27)
	PolicyFlagINTERACTIVE      PolicyFlag = (1 << 29)
	PolicyFlagPassToUser       PolicyFlag = (1 << 30)
)

type Source

type Source int32
const (
	SourceUNKNOWN         Source = 0
	SourceKEYBOARD        Source = ((1 << 8) | Source(SourceClassBUTTON))
	SourceDPAD            Source = ((1 << 9) | Source(SourceClassBUTTON))
	SourceGAMEPAD         Source = ((1 << 10) | Source(SourceClassBUTTON))
	SourceTOUCHSCREEN     Source = ((1 << 12) | Source(SourceClassPOINTER))
	SourceMOUSE           Source = ((1 << 13) | Source(SourceClassPOINTER))
	SourceSTYLUS          Source = ((1 << 14) | Source(SourceClassPOINTER))
	SourceBluetoothStylus Source = ((1 << 15) | SourceSTYLUS)
	SourceTRACKBALL       Source = ((1 << 16) | Source(SourceClassNAVIGATION))
	SourceMouseRelative   Source = ((1 << 17) | Source(SourceClassNAVIGATION))
	SourceTOUCHPAD        Source = ((1 << 20) | Source(SourceClassPOSITION))
	SourceTouchNavigation Source = ((1 << 21) | Source(SourceClassNONE))
	SourceRotaryEncoder   Source = ((1 << 22) | Source(SourceClassNONE))
	SourceJOYSTICK        Source = ((1 << 24) | Source(SourceClassJOYSTICK))
	SourceHDMI            Source = ((1 << 25) | Source(SourceClassBUTTON))
	SourceSENSOR          Source = ((1 << 26) | Source(SourceClassNONE))
	SourceANY             Source = -256
)

type SourceClass

type SourceClass byte
const (
	SourceClassNONE       SourceClass = (0 << 0)
	SourceClassBUTTON     SourceClass = (1 << 0)
	SourceClassPOINTER    SourceClass = (1 << 1)
	SourceClassNAVIGATION SourceClass = (1 << 2)
	SourceClassPOSITION   SourceClass = (1 << 3)
	SourceClassJOYSTICK   SourceClass = (1 << 4)
)

type ToolType

type ToolType byte
const (
	ToolTypeUNKNOWN ToolType = 0
	ToolTypeFINGER  ToolType = 1
	ToolTypeSTYLUS  ToolType = 2
	ToolTypeMOUSE   ToolType = 3
	ToolTypeERASER  ToolType = 4
)

type VideoFrame

type VideoFrame struct {
	Data      []uint16
	Height    int32
	Width     int32
	Timestamp int64
}

func (*VideoFrame) MarshalParcel

func (s *VideoFrame) MarshalParcel(
	p *parcel.Parcel,
) error

func (*VideoFrame) UnmarshalParcel

func (s *VideoFrame) UnmarshalParcel(
	p *parcel.Parcel,
) error

Jump to

Keyboard shortcuts

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