app,io/pointer: [API] remove CursorNameOp and rename CursorName -> Cursor

It's now possible to directly user pointer.Cursor to add to the ops.

   pointer.CursorText.Add(gtx.Ops)

This is an API change. Use pointer.Cursor directly instead of CursorNameOp.

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2022-02-26 12:54:42 +02:00
committed by Elias Naur
parent 4172566aad
commit cdb288d1f9
18 changed files with 57 additions and 68 deletions
+2 -2
View File
@@ -193,7 +193,7 @@ func (q *Router) ReadClipboard() bool {
}
// Cursor returns the last cursor set.
func (q *Router) Cursor() pointer.CursorName {
func (q *Router) Cursor() pointer.Cursor {
return q.pointer.queue.cursor
}
@@ -298,7 +298,7 @@ func (q *Router) collect() {
}
pc.inputOp(op, &q.handlers)
case ops.TypeCursor:
name := pointer.CursorName(encOp.Data[1])
name := pointer.Cursor(encOp.Data[1])
pc.cursor(name)
case ops.TypeSource:
op := transfer.SourceOp{