io/pointer: add Drag event type

This eliminates needless redraws for handlers that care about drag events and not move events, like gesture.Scroll.

Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>
This commit is contained in:
Gordon Klaus
2020-06-03 18:44:42 +02:00
committed by Elias Naur
parent cb5cc02560
commit 1a070a36b6
5 changed files with 14 additions and 6 deletions
+4
View File
@@ -92,6 +92,8 @@ const (
Release
// Move of a pointer.
Move
// Drag of a pointer.
Drag
// Pointer enters an area watching for pointer input
Enter
// Pointer leaves an area watching for pointer input
@@ -180,6 +182,8 @@ func (t Type) String() string {
return "Cancel"
case Move:
return "Move"
case Drag:
return "Drag"
case Enter:
return "Enter"
case Leave: