op: add package op for operations

Extract operation types from package ui into package op.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-09-30 15:41:15 +02:00
parent eba1b3a95f
commit 8cf35a1f97
27 changed files with 225 additions and 227 deletions
+2 -2
View File
@@ -7,7 +7,7 @@ package profile
import (
"gioui.org/internal/opconst"
"gioui.org/io/event"
"gioui.org/ui"
"gioui.org/op"
)
// Op registers a handler for receiving
@@ -23,7 +23,7 @@ type Event struct {
Timings string
}
func (p Op) Add(o *ui.Ops) {
func (p Op) Add(o *op.Ops) {
data := make([]byte, opconst.TypeProfileLen)
data[0] = byte(opconst.TypeProfile)
o.Write(data, p.Key)