mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 17:35:36 +00:00
ui/app,apps/gophers,apps/hello: revert NewWindow to CreateWindow
It turns out we already support multiple windows on Android: when
the activity is recreated.
This reverts commit f21b5eb1df.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+9
-4
@@ -59,12 +59,13 @@ const (
|
||||
// Set it with the go tool linker flag -X.
|
||||
var extraArgs string
|
||||
|
||||
// NewWindow creates a new window for a set of window
|
||||
var windows = make(chan *Window)
|
||||
|
||||
// CreateWindow creates a new window for a set of window
|
||||
// options. The options are hints; the platform is free to
|
||||
// ignore or adjust them.
|
||||
// If the current program is running on iOS and Android,
|
||||
// NewWindow the window previously created by the platform.
|
||||
func NewWindow(opts *WindowOptions) (*Window, error) {
|
||||
// CreateWindow is not supported on iOS and Android.
|
||||
func CreateWindow(opts *WindowOptions) error {
|
||||
if opts == nil {
|
||||
opts = &WindowOptions{
|
||||
Width: ui.Dp(800),
|
||||
@@ -78,6 +79,10 @@ func NewWindow(opts *WindowOptions) (*Window, error) {
|
||||
return createWindow(opts)
|
||||
}
|
||||
|
||||
func Windows() <-chan *Window {
|
||||
return windows
|
||||
}
|
||||
|
||||
func (l Stage) String() string {
|
||||
switch l {
|
||||
case StageDead:
|
||||
|
||||
Reference in New Issue
Block a user