mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
all: make unit.Converter concrete and rename to Metric
An interface for scaling dp and sp is overkill, at least for all current uses. Make it a concrete struct type, and rename it to the shorter and more precise Metric. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-7
@@ -17,10 +17,11 @@ import (
|
||||
// operations that describes what to display and how to handle
|
||||
// input.
|
||||
type FrameEvent struct {
|
||||
Config Config
|
||||
// Now is the current animation. Use Now instead of time.Now to
|
||||
// synchronize animation and to avoid the time.Now call overhead.
|
||||
Now time.Time
|
||||
// Metric converts device independent dp and sp to device pixels.
|
||||
Metric unit.Metric
|
||||
// Size is the dimensions of the window.
|
||||
Size image.Point
|
||||
// Insets is the insets to apply.
|
||||
@@ -51,12 +52,6 @@ type FrameEvent struct {
|
||||
Queue event.Queue
|
||||
}
|
||||
|
||||
// Config defines the essential properties of
|
||||
// the environment.
|
||||
type Config interface {
|
||||
unit.Converter
|
||||
}
|
||||
|
||||
// DestroyEvent is the last event sent through
|
||||
// a window event channel.
|
||||
type DestroyEvent struct {
|
||||
|
||||
Reference in New Issue
Block a user