ui/app,apps/gophers,apps/hello: replace CreateWindow with NewWindow

Gio doesn't support multiple windows anyway, so get rid of the
app.Windows channel and use NewWindow call for the mobile platforms
as well.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-03-31 13:36:24 +02:00
parent cf258f707f
commit f21b5eb1df
10 changed files with 81 additions and 93 deletions
+4 -2
View File
@@ -55,6 +55,8 @@ type window struct {
var theJVM *C.JavaVM
var windows = make(chan *Window)
var views = make(map[C.jlong]*window)
func jniGetMethodID(env *C.JNIEnv, class C.jclass, method, sig string) C.jmethodID {
@@ -379,6 +381,6 @@ func Main() {
panic("unreachable")
}
func createWindow(opts WindowOptions) error {
return errors.New("createWindow not supported")
func createWindow(opts WindowOptions) (*Window, error) {
return <- windows, nil
}