mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
io/input: [API] introduce Source, the interface between a Router and widgets
This change gets rid of the event.Queue interface by replacing it with input.Source values. Source provides the interface to Router necessary to implement interface widgets. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -298,10 +298,10 @@ func (e *Selectable) processPointer(gtx layout.Context) {
|
||||
|
||||
func (e *Selectable) clickDragEvents(gtx layout.Context) []event.Event {
|
||||
var combinedEvents []event.Event
|
||||
for _, evt := range e.clicker.Update(gtx) {
|
||||
for _, evt := range e.clicker.Update(gtx.Source) {
|
||||
combinedEvents = append(combinedEvents, evt)
|
||||
}
|
||||
for _, evt := range e.dragger.Update(gtx.Metric, gtx, gesture.Both) {
|
||||
for _, evt := range e.dragger.Update(gtx.Metric, gtx.Source, gesture.Both) {
|
||||
combinedEvents = append(combinedEvents, evt)
|
||||
}
|
||||
return combinedEvents
|
||||
|
||||
Reference in New Issue
Block a user