2
0
mirror of synced 2025-02-22 06:28:04 +00:00

event: add String method to LifecycleStage enum

Change-Id: Iaa723e8db258540d60170216430295ac9dee1901
Reviewed-on: https://go-review.googlesource.com/11813
Reviewed-by: Nigel Tao <nigeltao@golang.org>
This commit is contained in:
David Crawshaw 2015-06-30 14:06:51 -04:00
parent e19b161d0d
commit f02d32beeb

View File

@ -166,6 +166,21 @@ const (
LifecycleStageFocused
)
func (l LifecycleStage) String() string {
switch l {
case LifecycleStageDead:
return "LifecycleStageDead"
case LifecycleStageAlive:
return "LifecycleStageAlive"
case LifecycleStageVisible:
return "LifecycleStageVisible"
case LifecycleStageFocused:
return "LifecycleStageFocused"
default:
return fmt.Sprintf("LifecycleStageInvalid:%d", l)
}
}
// Touch is a user touch event.
//
// The same ID is shared by all events in a sequence. A sequence starts with a