2
0
mirror of synced 2025-02-23 23:08:14 +00:00
mobile/event/config/config.go
Nigel Tao 84f8e5edcc event: move event.Filter to app.Filter.
Change-Id: I11044a6e01b53e441c05fc1baec36718e783622f
Reviewed-on: https://go-review.googlesource.com/12288
Reviewed-by: David Crawshaw <crawshaw@golang.org>
2015-07-17 01:18:36 +00:00

28 lines
978 B
Go

// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package config defines an event for the dimensions and physical resolution
// of the app's window.
//
// See the golang.org/x/mobile/app package for details on the event model.
package config // import "golang.org/x/mobile/event/config"
import (
"golang.org/x/mobile/geom"
)
// Event holds the dimensions and physical resolution of the app's window.
type Event struct {
// Width and Height are the window's dimensions.
Width, Height geom.Pt
// PixelsPerPt is the window's physical resolution. It is the number of
// pixels in a single geom.Pt, from the golang.org/x/mobile/geom package.
//
// There are a wide variety of pixel densities in existing phones and
// tablets, so apps should be written to expect various non-integer
// PixelsPerPt values. In general, work in geom.Pt.
PixelsPerPt float32
}