Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppData ¶
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 Icon(theme string, size int) fyne.Resource // Icon returns an icon for the app in the requested theme and size }
AppData is an interface for accessing information about application icons
type ApplicationProvider ¶
type ApplicationProvider interface { AvailableApps() []AppData AvailableThemes() []string FindAppFromName(appName string) AppData FindAppFromWinInfo(win Window) AppData FindAppsMatching(pattern string) []AppData DefaultApps() []AppData }
ApplicationProvider describes a type that can locate icons and applications for the current system
type DeskSettings ¶
type DeskSettings interface { Background() string IconTheme() string LauncherIcons() []string LauncherIconSize() int LauncherDisableTaskbar() bool LauncherDisableZoom() bool LauncherZoomScale() float64 AddChangeListener(listener chan DeskSettings) }
DeskSettings describes the configuration options available for Fyne desktop
type Desktop ¶
type Desktop interface { Root() fyne.Window Run() RunApp(AppData) error Settings() DeskSettings ContentSizePixels(screen *Screen) (uint32, uint32) Screens() ScreenList IconProvider() ApplicationProvider WindowManager() WindowManager }
Desktop defines an embedded or full desktop environment that we can run.
type Screen ¶
type Screen struct { Name string // Name is the randr provided name of the screen X, Y, Width, Height int // Geometry of the screen }
Screen provides relative information about a single physical screen
type ScreenList ¶
type ScreenList interface { Screens() []*Screen // Screens returns a Screen type slice of each available physical screen Active() *Screen // Active returns the screen index of the currently active screen Primary() *Screen // Primary returns the screen index of the primary screen Scale() float32 // Return the scale calculated for use across screens ScreenForWindow(Window) *Screen // Return the screen that a window is located on ScreenForGeometry(x int, y int, width int, height int) *Screen // Return the screen that a geometry is located on }
ScreenList provides information about available physical screens for Fyne desktop
type Stack ¶
type Stack interface { AddWindow(Window) // Add a new window to the stack RemoveWindow(Window) // Remove a specified window from the stack TopWindow() Window // Get the currently top most window Windows() []Window // Return a list of all managed windows. This should not be modified RaiseToTop(Window) // Request that the passed window become top of the stack. }
Stack describes an ordered list of windows. The order of the windows in this list matches the stacking order on screen. TopWindow() returns the 0th element with each item after that being stacked below the previous.
type StackListener ¶
StackListener is used to listen for events in the window manager stack (window list). See WindowManager.AddStackListener.
type Window ¶
type Window interface { Decorated() bool // Should this window have borders drawn? Title() string // The name of this window Class() []string // The class of this window Command() string // The command of this window IconName() string // The icon name of this window Icon() fyne.Resource // The icon of this window Fullscreened() bool // Is the window Fullscreen? Iconic() bool // Is the window Iconified? Maximized() bool // Is the window Maximized? TopWindow() bool // Is this the window on top? SkipTaskbar() bool // Should this window be added to the taskbar? Focused() bool // Is this the currently focused window? Focus() // Ask this window to get input focus Close() // Close this window and possibly the application running it Fullscreen() // Request to fullscreen this window Unfullscreen() // Request to unfullscreen this window Iconify() // Request to inimize this window and possibly children of this window Uniconify() // Request to restore this window and possibly children of this window from being minimized Maximize() // Request to resize this window to it's largest possible size Unmaximize() // Request to restore this window to its size before being maximized RaiseAbove(Window) // Raise this window above a given other window RaiseToTop() // Raise this window to the top of the stack }
Window represents a single managed window within a window manager. There may be borders or not depending on configuration.
type WindowManager ¶
type WindowManager interface { Stack AddStackListener(StackListener) Close() SetRoot(fyne.Window) Blank() }
WindowManager describes a full window manager which may be loaded as part of the setup.