diff --git a/ui/input/input.go b/ui/input/input.go index 96ca0d2e..3a4c4b4e 100644 --- a/ui/input/input.go +++ b/ui/input/input.go @@ -10,8 +10,8 @@ type Queue interface { Events(k Key) []Event } -// Key is the stable identifier for an event handler. For a handler h, the -// key is typically &h. +// Key is the stable identifier for an event handler. +// For a handler h, the key is typically &h. type Key interface{} // Event is the marker interface for input events. diff --git a/ui/layout/layout.go b/ui/layout/layout.go index f433855c..0a608d97 100644 --- a/ui/layout/layout.go +++ b/ui/layout/layout.go @@ -8,11 +8,15 @@ import ( "gioui.org/ui" ) +// Constraints represent a set of acceptable ranges for +// a widget's width and height. type Constraints struct { Width Constraint Height Constraint } +// Constraint is a range of acceptable sizes in a single +// dimension. type Constraint struct { Min, Max int }