mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
io/event: [API] rename InputOp to Op
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -93,7 +93,7 @@ func (b *Clickable) layout(t event.Tag, gtx layout.Context, w layout.Widget) lay
|
||||
defer clip.Rect(image.Rectangle{Max: dims.Size}).Push(gtx.Ops).Pop()
|
||||
semantic.EnabledOp(gtx.Enabled()).Add(gtx.Ops)
|
||||
b.click.Add(gtx.Ops)
|
||||
event.InputOp(gtx.Ops, t)
|
||||
event.Op(gtx.Ops, t)
|
||||
c.Add(gtx.Ops)
|
||||
return dims
|
||||
}
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ func (d *Draggable) Layout(gtx layout.Context, w, drag layout.Widget) layout.Dim
|
||||
|
||||
stack := clip.Rect{Max: dims.Size}.Push(gtx.Ops)
|
||||
d.drag.Add(gtx.Ops)
|
||||
event.InputOp(gtx.Ops, d)
|
||||
event.Op(gtx.Ops, d)
|
||||
stack.Pop()
|
||||
|
||||
if drag != nil && d.drag.Pressed() {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ func TestDraggable(t *testing.T) {
|
||||
return layout.Dimensions{Size: gtx.Constraints.Min}
|
||||
}, nil)
|
||||
stack := clip.Rect{Max: dims.Size}.Push(gtx.Ops)
|
||||
event.InputOp(gtx.Ops, tgt)
|
||||
event.Op(gtx.Ops, tgt)
|
||||
stack.Pop()
|
||||
|
||||
drag.Update(gtx)
|
||||
|
||||
+1
-1
@@ -662,7 +662,7 @@ func (e *Editor) layout(gtx layout.Context, textMaterial, selectMaterial op.Call
|
||||
|
||||
defer clip.Rect(image.Rectangle{Max: visibleDims.Size}).Push(gtx.Ops).Pop()
|
||||
pointer.CursorText.Add(gtx.Ops)
|
||||
event.InputOp(gtx.Ops, e)
|
||||
event.Op(gtx.Ops, e)
|
||||
key.InputHintOp{Tag: e, Hint: e.InputHint}.Add(gtx.Ops)
|
||||
|
||||
e.scroller.Add(gtx.Ops)
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ func (e *Enum) Layout(gtx layout.Context, k string, content layout.Widget) layou
|
||||
}
|
||||
clk := &state.click
|
||||
clk.Add(gtx.Ops)
|
||||
event.InputOp(gtx.Ops, &state.tag)
|
||||
event.Op(gtx.Ops, &state.tag)
|
||||
semantic.SelectedOp(k == e.Value).Add(gtx.Ops)
|
||||
semantic.EnabledOp(gtx.Enabled()).Add(gtx.Ops)
|
||||
c.Add(gtx.Ops)
|
||||
|
||||
@@ -105,7 +105,7 @@ func ExampleDraggable_Layout() {
|
||||
Min: image.Pt(20, 20),
|
||||
Max: image.Pt(40, 40),
|
||||
}.Push(gtx.Ops)
|
||||
event.InputOp(gtx.Ops, &drop)
|
||||
event.Op(gtx.Ops, &drop)
|
||||
ds.Pop()
|
||||
|
||||
// Check for the received data.
|
||||
|
||||
@@ -196,7 +196,7 @@ func (l *Selectable) Layout(gtx layout.Context, lt *text.Shaper, font font.Font,
|
||||
dims := l.text.Dimensions()
|
||||
defer clip.Rect(image.Rectangle{Max: dims.Size}).Push(gtx.Ops).Pop()
|
||||
pointer.CursorText.Add(gtx.Ops)
|
||||
event.InputOp(gtx.Ops, l)
|
||||
event.Op(gtx.Ops, l)
|
||||
|
||||
l.clicker.Add(gtx.Ops)
|
||||
l.dragger.Add(gtx.Ops)
|
||||
|
||||
Reference in New Issue
Block a user