2018-07-27 16:55:06 +03:00
|
|
|
package rfb
|
2017-06-12 14:11:23 +03:00
|
|
|
|
|
|
|
// Button represents a mask of pointer presses/releases.
|
|
|
|
type Button uint8
|
|
|
|
|
|
|
|
//go:generate stringer -type=Button
|
|
|
|
|
|
|
|
// All available button mask components.
|
|
|
|
const (
|
|
|
|
BtnLeft Button = 1 << iota
|
|
|
|
BtnMiddle
|
|
|
|
BtnRight
|
|
|
|
BtnFour
|
|
|
|
BtnFive
|
|
|
|
BtnSix
|
|
|
|
BtnSeven
|
|
|
|
BtnEight
|
|
|
|
BtnNone Button = 0
|
|
|
|
)
|
|
|
|
|
2017-07-04 01:36:10 +03:00
|
|
|
// Mask returns button mask
|
2017-06-12 14:11:23 +03:00
|
|
|
func Mask(button Button) uint8 {
|
|
|
|
return uint8(button)
|
|
|
|
}
|