mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-04 08:55:35 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user