-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
icons.go
24 lines (20 loc) · 1.02 KB
/
icons.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
package fynedesk
import "fyne.io/fyne/v2"
// AppData is an interface for accessing information about application icons
type AppData interface {
Name() string // Name is the name of the app usually
Run([]string) error // Run is the command to run the app, passing any environment variables to be set
Categories() []string // Categories is a list of categories that the app fits in (platform specific)
Hidden() bool // Hidden specifies whether instances of this app should be hidden
Icon(theme string, size int) fyne.Resource // Icon returns an icon for the app in the requested theme and size
}
// ApplicationProvider describes a type that can locate icons and applications for the current system
type ApplicationProvider interface {
AvailableApps() []AppData
AvailableThemes() []string
FindAppFromName(appName string) AppData
FindAppFromWinInfo(win Window) AppData
FindAppsMatching(pattern string) []AppData
DefaultApps() []AppData
CategorizedApps() map[string][]AppData
}