several: add modifiers to mouse events and clicks

macOS only, for the os-specific bits.

Signed-off-by: Larry Clapp <larry@theclapp.org>
This commit is contained in:
Larry Clapp
2019-11-18 08:11:37 -05:00
committed by Elias Naur
parent 26f34a3331
commit f8de7545f4
4 changed files with 41 additions and 27 deletions
+4
View File
@@ -11,6 +11,7 @@ import (
"gioui.org/f32"
"gioui.org/internal/opconst"
"gioui.org/io/event"
"gioui.org/io/key"
"gioui.org/op"
)
@@ -40,6 +41,9 @@ type Event struct {
Position f32.Point
// Scroll is the scroll amount, if any.
Scroll f32.Point
// Modifiers is the set of active modifiers when
// the mouse button was pressed.
Modifiers key.Modifiers
}
// AreaOp updates the hit area to the intersection of the current