Use internal constants for pointer buttons, instead of x11 mapping

This commit is contained in:
Unrud 2018-09-30 00:26:31 +02:00
parent 07678e56ab
commit b3b068fe59
7 changed files with 54 additions and 30 deletions

View file

@ -19,6 +19,15 @@
package main
type PointerButton int
const (
PointerButtonLeft PointerButton = iota
PointerButtonRight
PointerButtonMiddle
PointerButtonLimit
)
type PluginInfo struct {
Name string
Init func() (Plugin, error)
@ -41,7 +50,7 @@ func (e UnsupportedPlatformError) Error() string {
type Plugin interface {
Close() error
KeyboardText(text string) error
PointerButton(button uint, press bool) error
PointerButton(button PointerButton, press bool) error
PointerMove(deltaX, deltaY int) error
PointerScroll(deltaHorizontal, deltaVertical int) error
PointerScrollFinish() error