mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +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:
@@ -25,7 +25,7 @@ func ExampleClickable_passthrough() {
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
Source: &r,
|
||||
Source: r.Source(),
|
||||
}
|
||||
|
||||
// widget lays out two buttons on top of each other.
|
||||
@@ -75,7 +75,7 @@ func ExampleDraggable_Layout() {
|
||||
gtx := layout.Context{
|
||||
Ops: new(op.Ops),
|
||||
Constraints: layout.Exact(image.Pt(100, 100)),
|
||||
Source: &r,
|
||||
Source: r.Source(),
|
||||
}
|
||||
// mime is the type used to match drag and drop operations.
|
||||
// It could be left empty in this example.
|
||||
|
||||
Reference in New Issue
Block a user