mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-06 06:30:14 +08:00

This commit includes the addition of common events for the Linux platform. Refactored and standardized the method receivers for the application from 'm' to 'l'. Also, the application startup events in the window example have been updated according to the new naming scheme.
30 lines
509 B
Go
30 lines
509 B
Go
//go:build linux
|
|
|
|
package application
|
|
|
|
import (
|
|
"fmt"
|
|
"sync"
|
|
)
|
|
|
|
func (l *linuxApp) getPrimaryScreen() (*Screen, error) {
|
|
return nil, fmt.Errorf("not implemented")
|
|
}
|
|
|
|
func (l *linuxApp) getScreens() ([]*Screen, error) {
|
|
var wg sync.WaitGroup
|
|
var screens []*Screen
|
|
var err error
|
|
wg.Add(1)
|
|
InvokeSync(func() {
|
|
screens, err = getScreens(l.application)
|
|
wg.Done()
|
|
})
|
|
wg.Wait()
|
|
return screens, err
|
|
}
|
|
|
|
func getScreenForWindow(window *linuxWebviewWindow) (*Screen, error) {
|
|
return window.getScreen()
|
|
}
|