mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 00:16:15 +00:00
all: rename the gioui.org/ui module to gioui.org
The "ui" is redundant and stutters. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// SPDX-License-Identifier: Unlicense OR MIT
|
||||
|
||||
// Package system contain ops and types for
|
||||
// system events.
|
||||
package system
|
||||
|
||||
import (
|
||||
"gioui.org/ui"
|
||||
"gioui.org/internal/opconst"
|
||||
)
|
||||
|
||||
// ProfileOp registers a handler for receiving
|
||||
// ProfileEvents.
|
||||
type ProfileOp struct {
|
||||
Key ui.Key
|
||||
}
|
||||
|
||||
// ProfileEvent contain profile data from a single
|
||||
// rendered frame.
|
||||
type ProfileEvent struct {
|
||||
// String with timings. Very likely to change.
|
||||
Timings string
|
||||
}
|
||||
|
||||
func (p ProfileOp) Add(o *ui.Ops) {
|
||||
data := make([]byte, opconst.TypeProfileLen)
|
||||
data[0] = byte(opconst.TypeProfile)
|
||||
o.Write(data, p.Key)
|
||||
}
|
||||
|
||||
func (p ProfileEvent) ImplementsEvent() {}
|
||||
Reference in New Issue
Block a user