~eliasnaur/gio-example

gio-example/haptic/example_android.go -rw-r--r-- 400 bytes
a9116b22Chris Waldon go.*: update to latest gio{,/x} and prune deps 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main

import (
	"gioui.org/app"
	"gioui.org/io/event"
)

// ProcessPlatformEvent handles platform-specific event processing. If it
// consumed the provided event, it returns true. In this case, no further
// event processing should occur.
func ProcessPlatformEvent(event event.Event) bool {
	if ve, ok := event.(app.ViewEvent); ok {
		buzzer.SetView(ve.View)
		return true
	}
	return false
}