-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
desk.go
36 lines (28 loc) · 844 Bytes
/
desk.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package fynedesk // import "fyshos.com/fynedesk"
import "fyne.io/fyne/v2"
// Desktop defines an embedded or full desktop environment that we can run.
type Desktop interface {
Run()
RunApp(AppData) error
RecentApps() []AppData
Settings() DeskSettings
ContentBoundsPixels(*Screen) (x, y, w, h uint32)
RootSizePixels() (w, h uint32)
Screens() ScreenList
IconProvider() ApplicationProvider
WindowManager() WindowManager
Modules() []Module
AddShortcut(shortcut *Shortcut, handler func())
ShowMenuAt(menu *fyne.Menu, pos fyne.Position)
Desktop() int
SetDesktop(int)
}
var instance Desktop
// Instance returns the current desktop environment and provides access to injected functionality.
func Instance() Desktop {
return instance
}
// SetInstance is an internal call :( TODO
func SetInstance(desk Desktop) {
instance = desk
}