mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
layout,app: [API] rename FrameEvent.Queue and Context.Queue to Source
We're about to replace the interface Queue with a concrete input.Source. This change renames the field accordingly. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-3
@@ -24,7 +24,7 @@ type Draggable struct {
|
||||
}
|
||||
|
||||
func (d *Draggable) Layout(gtx layout.Context, w, drag layout.Widget) layout.Dimensions {
|
||||
if gtx.Queue == nil {
|
||||
if gtx.Source == nil {
|
||||
return w(gtx)
|
||||
}
|
||||
dims := w(gtx)
|
||||
@@ -56,7 +56,7 @@ func (d *Draggable) Dragging() bool {
|
||||
// requested to offer data, if any
|
||||
func (d *Draggable) Update(gtx layout.Context) (mime string, requested bool) {
|
||||
pos := d.pos
|
||||
for _, ev := range d.drag.Update(gtx.Metric, gtx.Queue, gesture.Both) {
|
||||
for _, ev := range d.drag.Update(gtx.Metric, gtx.Source, gesture.Both) {
|
||||
switch ev.Kind {
|
||||
case pointer.Press:
|
||||
d.click = ev.Position
|
||||
@@ -67,7 +67,7 @@ func (d *Draggable) Update(gtx layout.Context) (mime string, requested bool) {
|
||||
}
|
||||
d.pos = pos
|
||||
|
||||
for _, ev := range gtx.Queue.Events(&d.handle) {
|
||||
for _, ev := range gtx.Source.Events(&d.handle) {
|
||||
if e, ok := ev.(transfer.RequestEvent); ok {
|
||||
return e.Type, true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user