mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +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:
@@ -22,7 +22,7 @@ func TestBool(t *testing.T) {
|
||||
r input.Router
|
||||
b widget.Bool
|
||||
)
|
||||
gtx := app.NewContext(&ops, app.FrameEvent{Source: &r})
|
||||
gtx := app.NewContext(&ops, app.FrameEvent{Source: r.Source()})
|
||||
layout := func() {
|
||||
b.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
|
||||
semantic.CheckBox.Add(gtx.Ops)
|
||||
|
||||
Reference in New Issue
Block a user