-
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathdesk.go
43 lines (33 loc) · 927 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
37
38
39
40
41
42
43
package fynedesk // import "fyshos.com/fynedesk"
import (
"fyne.io/fyne/v2"
"github.com/FyshOS/appie"
)
// Desktop defines an embedded or full desktop environment that we can run.
type Desktop interface {
Run()
RunApp(appie.AppData) error
RecentApps() []appie.AppData
Settings() DeskSettings
ContentBoundsPixels(*Screen) (x, y, w, h uint32)
RootSizePixels() (w, h uint32)
Screens() ScreenList
IconProvider() appie.Provider
WindowManager() WindowManager
Modules() []Module
AddShortcut(shortcut *Shortcut, handler func())
ShowMenuAt(menu *fyne.Menu, pos fyne.Position)
Desktop() int
SetDesktop(int)
DelayScreenSaver()
TriggerScreenSaver()
}
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
}