~eliasnaur/gio-example

ref: 112655e32697e0e4efdd57e100 gio-example/x/haptic/example_android.go -rw-r--r-- 400 bytes
112655e3Chris Waldon livedit: improve visual quality of demo 6 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
}