Documentation
¶
Index ¶
- func NewAppData(name string) fynedesk.AppData
- func NewAppProvider(appNames ...string) fynedesk.ApplicationProvider
- func NewScreensProvider(screens ...*fynedesk.Screen) fynedesk.ScreenList
- type Desktop
- func (*Desktop) AddShortcut(shortcut *fynedesk.Shortcut, handler func())
- func (*Desktop) Capture() image.Image
- func (*Desktop) ContentBoundsPixels(_ *fynedesk.Screen) (x, y, w, h uint32)
- func (*Desktop) Desktop() int
- func (td *Desktop) IconProvider() fynedesk.ApplicationProvider
- func (*Desktop) Modules() []fynedesk.Module
- func (td *Desktop) RecentApps() []fynedesk.AppData
- func (*Desktop) Root() fyne.Window
- func (*Desktop) RootSizePixels() (w, h uint32)
- func (*Desktop) Run()
- func (*Desktop) RunApp(app fynedesk.AppData) error
- func (td *Desktop) Screens() fynedesk.ScreenList
- func (*Desktop) SetDesktop(int)
- func (td *Desktop) SetIconProvider(icons fynedesk.ApplicationProvider)
- func (td *Desktop) Settings() fynedesk.DeskSettings
- func (td *Desktop) ShowMenuAt(menu *fyne.Menu, pos fyne.Position)
- func (td *Desktop) WindowManager() fynedesk.WindowManager
- type Settings
- func (*Settings) AddChangeListener(listener chan fynedesk.DeskSettings)
- func (s *Settings) Background() string
- func (s *Settings) BorderButtonPosition() string
- func (s *Settings) ClockFormatting() string
- func (s *Settings) IconTheme() string
- func (s *Settings) KeyboardModifier() fyne.KeyModifier
- func (s *Settings) LauncherDisableTaskbar() bool
- func (s *Settings) LauncherDisableZoom() bool
- func (s *Settings) LauncherIconSize() float32
- func (s *Settings) LauncherIcons() []string
- func (s *Settings) LauncherZoomScale() float32
- func (s *Settings) ModuleNames() []string
- func (s *Settings) NarrowLeftLauncher() bool
- func (s *Settings) NarrowWidgetPanel() bool
- func (s *Settings) SetBackground(bg string)
- func (s *Settings) SetBorderButtonPosition(pos string)
- func (s *Settings) SetClockFormatting(format string)
- func (s *Settings) SetIconTheme(theme string)
- func (s *Settings) SetLauncherDisableTaskbar(bar bool)
- func (s *Settings) SetLauncherDisableZoom(zoom bool)
- func (s *Settings) SetLauncherIconSize(size float32)
- func (s *Settings) SetLauncherIcons(icons []string)
- func (s *Settings) SetLauncherZoomScale(scale float32)
- func (s *Settings) SetModuleNames(mods []string)
- func (s *Settings) SetNarrowLeftLauncher(narrow bool)
- func (s *Settings) SetNarrowWidgetPanel(narrow bool)
- type Window
- func (w *Window) Capture() image.Image
- func (w *Window) ChildID() xproto.Window
- func (w *Window) Close()
- func (w *Window) Desktop() int
- func (w *Window) Expose()
- func (w *Window) Focus()
- func (w *Window) Focused() bool
- func (w *Window) FrameID() xproto.Window
- func (w *Window) Fullscreen()
- func (w *Window) Fullscreened() bool
- func (w *Window) Geometry() (int, int, uint, uint)
- func (w *Window) Iconic() bool
- func (w *Window) Iconify()
- func (w *Window) Maximize()
- func (w *Window) Maximized() bool
- func (w *Window) Move(_ fyne.Position)
- func (w *Window) NotifyBorderChange()
- func (w *Window) NotifyFullscreen()
- func (w *Window) NotifyGeometry(int, int, uint, uint)
- func (w *Window) NotifyIconify()
- func (w *Window) NotifyMaximize()
- func (w *Window) NotifyMouseDrag(int16, int16)
- func (w *Window) NotifyMouseMotion(int16, int16)
- func (w *Window) NotifyMousePress(int16, int16, xproto.Button)
- func (w *Window) NotifyMouseRelease(int16, int16, xproto.Button)
- func (w *Window) NotifyMoveResizeEnded()
- func (w *Window) NotifyUnFullscreen()
- func (w *Window) NotifyUnIconify()
- func (w *Window) NotifyUnMaximize()
- func (w *Window) Parent() fynedesk.Window
- func (w *Window) Position() fyne.Position
- func (w *Window) Properties() fynedesk.WindowProperties
- func (w *Window) QueueMoveResizeGeometry(int, int, uint, uint)
- func (w *Window) RaiseAbove(fynedesk.Window)
- func (w *Window) RaiseToTop()
- func (w *Window) Refresh()
- func (w *Window) Resize(_ fyne.Size)
- func (w *Window) SetClass(class []string)
- func (w *Window) SetCommand(cmd string)
- func (w *Window) SetDesktop(id int)
- func (w *Window) SetGeometry(x, y int, width, height uint)
- func (w *Window) SetIconName(name string)
- func (w *Window) SetParent(p fynedesk.Window)
- func (w *Window) SettingsChanged()
- func (w *Window) Size() fyne.Size
- func (w *Window) SizeMax() (int, int)
- func (w *Window) SizeMin() (uint, uint)
- func (w *Window) TopWindow() bool
- func (w *Window) Unfullscreen()
- func (w *Window) Uniconify()
- func (w *Window) Unmaximize()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAppData ¶
NewAppData returns a new test app icon with the specified name
func NewAppProvider ¶
func NewAppProvider(appNames ...string) fynedesk.ApplicationProvider
NewAppProvider returns a simple provider of applications from the provided list of app names
func NewScreensProvider ¶
func NewScreensProvider(screens ...*fynedesk.Screen) fynedesk.ScreenList
NewScreensProvider returns a simple screen manager for the specified screens
Types ¶
type Desktop ¶
type Desktop struct {
// contains filtered or unexported fields
}
Desktop is an in-memory implementation for test purposes
func NewDesktopWithWM ¶
func NewDesktopWithWM(wm fynedesk.WindowManager) *Desktop
NewDesktopWithWM returns a new in-memory desktop instance using the specified window manager
func (*Desktop) AddShortcut ¶
AddShortcut is called from modules that wish to register keyboard handlers
func (*Desktop) Capture ¶
Capture the desktop to an image. Our test code cowardly refuses to do this.
func (*Desktop) ContentBoundsPixels ¶
ContentBoundsPixels returns a default value for how much space maximised apps should use
func (*Desktop) Desktop ¶
Desktop returns the index of the current desktop (in test this is always 0)
func (*Desktop) IconProvider ¶
func (td *Desktop) IconProvider() fynedesk.ApplicationProvider
IconProvider returns the icon provider, by default it uses a simple in-memory implementation
func (*Desktop) Modules ¶
Modules returns the list of modules currently loaded (by default no modules for this implementation)
func (*Desktop) RecentApps ¶
RecentApps returns applications that have recently been run. This test instance returns nil.
func (*Desktop) Root ¶
func (*Desktop) Root() fyne.Window
Root returns the root window, this is an in-memory test Fyne window
func (*Desktop) RootSizePixels ¶
RootSizePixels returns the total number of pixels required to fit all the screens
func (*Desktop) Screens ¶
func (td *Desktop) Screens() fynedesk.ScreenList
Screens returns the list of screens this desktop runs on, by default a simple 2000x1000 value
func (*Desktop) SetDesktop ¶
SetDesktop sets the desired desktop index, a no-op in test code
func (*Desktop) SetIconProvider ¶
func (td *Desktop) SetIconProvider(icons fynedesk.ApplicationProvider)
SetIconProvider allows tests to set the icon provider used in this desktop
func (*Desktop) Settings ¶
func (td *Desktop) Settings() fynedesk.DeskSettings
Settings returns an in-memory test settings implementation
func (*Desktop) ShowMenuAt ¶
func (td *Desktop) ShowMenuAt(menu *fyne.Menu, pos fyne.Position)
ShowMenuAt is used to show a menu overlay above the desktop
func (*Desktop) WindowManager ¶
func (td *Desktop) WindowManager() fynedesk.WindowManager
WindowManager returns the window manager for this desktop, an in-memory test instance unless configured through the constructor
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
Settings is a simple struct for managing settings within our tests
func (*Settings) AddChangeListener ¶
func (*Settings) AddChangeListener(listener chan fynedesk.DeskSettings)
AddChangeListener is ignored for test instance
func (*Settings) Background ¶
Background returns the path to background image (or "" if not set)
func (*Settings) BorderButtonPosition ¶
BorderButtonPosition returns the position of the toolbar buttons.
func (*Settings) ClockFormatting ¶
ClockFormatting returns the format that the clock uses for displaying the time. Either 12h or 24h.
func (*Settings) KeyboardModifier ¶
func (s *Settings) KeyboardModifier() fyne.KeyModifier
KeyboardModifier returns the preferred keyboard modifier for shortcuts.
func (*Settings) LauncherDisableTaskbar ¶
LauncherDisableTaskbar returns true if the taskbar should be disabled
func (*Settings) LauncherDisableZoom ¶
LauncherDisableZoom returns true if zoom is disabled on the launcher
func (*Settings) LauncherIconSize ¶
LauncherIconSize returns the standard (non-zoomed) icon size for app launcher
func (*Settings) LauncherIcons ¶
LauncherIcons returns the names of the apps to appear in the launcher
func (*Settings) LauncherZoomScale ¶
LauncherZoomScale returns how much the icons should zoom when hovered
func (*Settings) ModuleNames ¶
ModuleNames returns the names of modules that should be enabled
func (*Settings) NarrowLeftLauncher ¶
NarrowLeftLauncher returns true when the user requested a narrow launcher bar on the left.
func (*Settings) NarrowWidgetPanel ¶
NarrowWidgetPanel returns true when the user requested a narrow widget panel.
func (*Settings) SetBackground ¶
SetBackground configures a background image path, passing "" removes the configuration
func (*Settings) SetBorderButtonPosition ¶
SetBorderButtonPosition sets the toolbar button position.
func (*Settings) SetClockFormatting ¶
SetClockFormatting support setting the format that the clock should display
func (*Settings) SetIconTheme ¶
SetIconTheme supports setting the chosen icon theme
func (*Settings) SetLauncherDisableTaskbar ¶
SetLauncherDisableTaskbar allows configuring whether the taskbar should be disabled
func (*Settings) SetLauncherDisableZoom ¶
SetLauncherDisableZoom allows configuring whether the taskbar should disable zooming
func (*Settings) SetLauncherIconSize ¶
SetLauncherIconSize allows configuring the icon size in app launcher
func (*Settings) SetLauncherIcons ¶
SetLauncherIcons configures the app to be included in the launcher
func (*Settings) SetLauncherZoomScale ¶
SetLauncherZoomScale supports setting the scale value for hovered bar icons
func (*Settings) SetModuleNames ¶
SetModuleNames supports configuring the modules that should be loaded
func (*Settings) SetNarrowLeftLauncher ¶
SetNarrowLeftLauncher allows tests to specify the value for a narrow left hand launcher.
func (*Settings) SetNarrowWidgetPanel ¶
SetNarrowWidgetPanel allows tests to specify the value for a narrow widget panel.
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window is an in-memory virtual window for test purposes
func (*Window) Capture ¶
Capture the contents of the window. Our test code cowardly refuses to do this.
func (*Window) Expose ¶
func (w *Window) Expose()
Expose is called when this window has been revealed but not changed
func (*Window) Fullscreen ¶
func (w *Window) Fullscreen()
Fullscreen simulates this window becoming full screen
func (*Window) Fullscreened ¶
Fullscreened returns true if this window has been made full screen
func (*Window) Geometry ¶
Geometry returns the x, y position and width, height size of this window's outer bounds
func (*Window) Iconify ¶
func (w *Window) Iconify()
Iconify sets this window to be reduced to an icon
func (*Window) Maximize ¶
func (w *Window) Maximize()
Maximize simulates this window becoming maximized
func (*Window) Move ¶
func (w *Window) Move(_ fyne.Position)
Move the window, does nothing in test windows
func (*Window) NotifyBorderChange ¶
func (w *Window) NotifyBorderChange()
NotifyBorderChange is called when the border should be shown or hidden
func (*Window) NotifyFullscreen ¶
func (w *Window) NotifyFullscreen()
NotifyFullscreen is called when the window is instructed to become fullscreen
func (*Window) NotifyGeometry ¶
NotifyGeometry is called when the window is instructed to change it's geometry
func (*Window) NotifyIconify ¶
func (w *Window) NotifyIconify()
NotifyIconify is called when the window is instructed to become iconified
func (*Window) NotifyMaximize ¶
func (w *Window) NotifyMaximize()
NotifyMaximize is called when the window is instructed to become maximized
func (*Window) NotifyMouseDrag ¶
NotifyMouseDrag is called when the mouse was seen to drag inside the window frame
func (*Window) NotifyMouseMotion ¶
NotifyMouseMotion is called when the mouse was seen to move inside the window frame
func (*Window) NotifyMousePress ¶
NotifyMousePress is called when the mouse was seen to press inside the window frame
func (*Window) NotifyMouseRelease ¶
NotifyMouseRelease is called when the mouse was seen to release inside the window frame
func (*Window) NotifyMoveResizeEnded ¶
func (w *Window) NotifyMoveResizeEnded()
NotifyMoveResizeEnded is called to inform the window that it was moved or resized
func (*Window) NotifyUnFullscreen ¶
func (w *Window) NotifyUnFullscreen()
NotifyUnFullscreen is called when the window is instructed to revert from fullscreen size
func (*Window) NotifyUnIconify ¶
func (w *Window) NotifyUnIconify()
NotifyUnIconify is called when the window is instructed to return from icon form
func (*Window) NotifyUnMaximize ¶
func (w *Window) NotifyUnMaximize()
NotifyUnMaximize is called when the window is instructed to return from maximized size
func (*Window) Position ¶
func (w *Window) Position() fyne.Position
Position returns 0, 0 for test windows
func (*Window) Properties ¶
func (w *Window) Properties() fynedesk.WindowProperties
Properties obtains the window properties currently set
func (*Window) QueueMoveResizeGeometry ¶
QueueMoveResizeGeometry is called when a MoveResize event reports new geometry
func (*Window) RaiseAbove ¶
RaiseAbove sets this window to be above the passed window
func (*Window) RaiseToTop ¶
func (w *Window) RaiseToTop()
RaiseToTop sets this window to be the topmost
func (*Window) Refresh ¶
func (w *Window) Refresh()
Refresh is called when the window should update with new border state
func (*Window) Resize ¶
func (w *Window) Resize(_ fyne.Size)
Resize the window, does nothing in test windows
func (*Window) SetCommand ¶
SetCommand is a test utility to set the command property of this window
func (*Window) SetDesktop ¶
SetDesktop sets the index of a desktop this window would associate with
func (*Window) SetGeometry ¶
SetGeometry is a test utility to set the position and size of this window
func (*Window) SetIconName ¶
SetIconName is a test utility to set the icon-name property of this window
func (*Window) SettingsChanged ¶
func (w *Window) SettingsChanged()
SettingsChanged is called on a window when the theme or icon set changes
func (*Window) SizeMax ¶
SizeMax returns the maximum size this window can become (which may disable maximize)
func (*Window) Unfullscreen ¶
func (w *Window) Unfullscreen()
Unfullscreen removes the fullscreen state of this window
func (*Window) Uniconify ¶
func (w *Window) Uniconify()
Uniconify returns this window to its normal state
func (*Window) Unmaximize ¶
func (w *Window) Unmaximize()
Unmaximize removes the maximized state of this window