Documentation
¶
Overview ¶
Package desktop holds desktop shell and window components.
Index ¶
- func About(c *ui.Context, app string, o AboutOptions) ui.Element
- func Art(c *ui.Context, name string, size float32) ui.Element
- func BatteryItem(c *ui.Context, level float32, o BatteryItemOptions) ui.Element
- func BrightnessHUD(c *ui.Context, level float32, o BrightnessHUDOptions) ui.Element
- func ClockItem(c *ui.Context, o ClockItemOptions) ui.Element
- func ControlCenter(c *ui.Context, s *Controls, o ControlCenterOptions) ui.Element
- func DesktopIcon(c *ui.Context, name, artName string, selected *bool, opened *int) ui.Element
- func Dock(c *ui.Context, apps []DockApp, opened, right *string) ui.Element
- func InspectorPane(c *ui.Context, sections []InspectorSection) ui.Element
- func Launcher(c *ui.Context, apps []LaunchApp, query, picked *string, o LauncherOptions) ui.Element
- func LockScreen(c *ui.Context, user string, password *string, check func(string) bool, ...) ui.Element
- func MenuBar(c *ui.Context, app string, menus []Menu, chosen *string, o MenuBarOptions) ui.Element
- func NotificationCenter(c *ui.Context, notes []DesktopNote, o NotificationCenterOptions) (root, clear ui.Element)
- func PermissionPrompt(c *ui.Context, app, resource string, access *Access, o PermissionPromptOptions) ui.Element
- func Preferences(c *ui.Context, tabs []PrefTab, picked *int, body func()) ui.Element
- func ProgressWindow(c *ui.Context, title string, done, total int, o ProgressWindowOptions) (root, cancel ui.Element)
- func SnapLayouts(c *ui.Context, picked *Snap, o SnapLayoutsOptions) ui.Element
- func SourceList(c *ui.Context, groups []SourceGroup, current *string) ui.Element
- func Spaces(c *ui.Context, names []string, current *int) ui.Element
- func StatusBar(c *ui.Context, left, right []StatusItem) ui.Element
- func TaskManager(c *ui.Context, procs []Process, o TaskManagerOptions) ui.Element
- func TerminalWindow(c *ui.Context, title string, lines []string, o TerminalWindowOptions) ui.Element
- func TitleTabs(c *ui.Context, tabs []string, picked *int, o TitleTabsOptions) (root, add ui.Element)
- func TrafficLights(c *ui.Context, o TrafficLightsOptions) (root, close, minimize, zoom ui.Element)
- func TrayMenu(c *ui.Context, items []TrayItem, chosen *string, o TrayMenuOptions) ui.Element
- func UnifiedToolbar(c *ui.Context, title string, query *string, o UnifiedToolbarOptions) (root, back, forward ui.Element)
- func UpdatePrompt(c *ui.Context, app, version string, notes []string, o UpdatePromptOptions) (root, install, later ui.Element)
- func VolumeHUD(c *ui.Context, level float32, o VolumeHUDOptions) ui.Element
- func WifiItem(c *ui.Context, networks []Network, current *string, o WifiItemOptions) ui.Element
- func WindowFrame(c *ui.Context, title string, o WindowFrameOptions, body func()) ui.Element
- func WindowSwitcher(c *ui.Context, windows []SwitchWindow, current *int, o WindowSwitcherOptions) (root, next ui.Element)
- type AboutOptions
- type Access
- type BatteryItemOptions
- type BrightnessHUDOptions
- type ClockItemOptions
- type ControlCenterOptions
- type Controls
- type DesktopNote
- type DockApp
- type InspectorRow
- type InspectorSection
- type LaunchApp
- type LauncherOptions
- type LockScreenOptions
- type Menu
- type MenuBarOptions
- type MenuItem
- type Network
- type NotificationCenterOptions
- type PermissionPromptOptions
- type PrefTab
- type Process
- type ProgressWindowOptions
- type Snap
- type SnapLayoutsOptions
- type SourceGroup
- type SourceItem
- type StatusItem
- type SwitchWindow
- type TaskManagerOptions
- type TerminalWindowOptions
- type TitleTabsOptions
- type TrafficLightsOptions
- type TrayItem
- type TrayMenuOptions
- type UnifiedToolbarOptions
- type UpdatePromptOptions
- type VolumeHUDOptions
- type WifiItemOptions
- type WindowFrameOptions
- type WindowSwitcherOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatteryItem ¶
BatteryItem is a menu bar battery with its charge.
func BrightnessHUD ¶
BrightnessHUD shows brightness, fading after a change.
func ClockItem ¶
func ClockItem(c *ui.Context, o ClockItemOptions) ui.Element
ClockItem is a menu bar clock; it turns each minute.
func ControlCenter ¶
ControlCenter has quick toggles and sliders; cue Toggle.
func DesktopIcon ¶
DesktopIcon selects on click; opening bumps opened; cue Open.
func InspectorPane ¶
func InspectorPane(c *ui.Context, sections []InspectorSection) ui.Element
InspectorPane is folding sections of values; folds report; cue Toggle.
func LockScreen ¶
func LockScreen(c *ui.Context, user string, password *string, check func(string) bool, unlocked *bool, o LockScreenOptions) ui.Element
LockScreen unlocks when check passes; cue Success.
func NotificationCenter ¶
func NotificationCenter(c *ui.Context, notes []DesktopNote, o NotificationCenterOptions) (root, clear ui.Element)
NotificationCenter lists notifications by app; clear cues Delete.
func PermissionPrompt ¶
func PermissionPrompt(c *ui.Context, app, resource string, access *Access, o PermissionPromptOptions) ui.Element
PermissionPrompt asks to allow access; cue Tap.
func Preferences ¶
Preferences is a window of icon tabs; cue Select.
func ProgressWindow ¶
func ProgressWindow(c *ui.Context, title string, done, total int, o ProgressWindowOptions) (root, cancel ui.Element)
ProgressWindow shows a task's progress with a cancel; cue Tap.
func SnapLayouts ¶
SnapLayouts picks an area of a window layout; cue Select.
func SourceList ¶
SourceList is a grouped sidebar list; cue Select.
func StatusBar ¶
func StatusBar(c *ui.Context, left, right []StatusItem) ui.Element
StatusBar is a window's status bar, items left and right.
func TaskManager ¶
TaskManager lists processes busiest first, with CPU and memory.
func TerminalWindow ¶
func TerminalWindow(c *ui.Context, title string, lines []string, o TerminalWindowOptions) ui.Element
TerminalWindow is a terminal window with a blinking caret.
func TitleTabs ¶
func TitleTabs(c *ui.Context, tabs []string, picked *int, o TitleTabsOptions) (root, add ui.Element)
TitleTabs are tabs in a title bar; cue Select.
func TrafficLights ¶
func TrafficLights(c *ui.Context, o TrafficLightsOptions) (root, close, minimize, zoom ui.Element)
TrafficLights close, minimize and zoom; cue Tap.
func UnifiedToolbar ¶
func UnifiedToolbar(c *ui.Context, title string, query *string, o UnifiedToolbarOptions) (root, back, forward ui.Element)
UnifiedToolbar has nav, a title and search; cue Tap.
func UpdatePrompt ¶
func UpdatePrompt(c *ui.Context, app, version string, notes []string, o UpdatePromptOptions) (root, install, later ui.Element)
UpdatePrompt offers a new version; Install cues Success, Later Tap.
func WindowFrame ¶
WindowFrame is a window with a title bar around body.
func WindowSwitcher ¶
func WindowSwitcher(c *ui.Context, windows []SwitchWindow, current *int, o WindowSwitcherOptions) (root, next ui.Element)
WindowSwitcher is an alt-tab strip; next cycles; cue Tick.
Types ¶
type AboutOptions ¶
type AboutOptions struct{ Icon, Version, Format, Copyright, Credits string }
AboutOptions describe the app; Format words the version.
type BatteryItemOptions ¶
BatteryItemOptions mark charging and format the percent.
type BrightnessHUDOptions ¶
type BrightnessHUDOptions struct{ Label string }
BrightnessHUDOptions name the overlay.
type ClockItemOptions ¶
type ClockItemOptions struct{ Format string }
ClockItemOptions set the time layout.
type ControlCenterOptions ¶
ControlCenterOptions name the four toggles, the sliders and states.
type DesktopNote ¶
DesktopNote is one notification.
type DockApp ¶
type DockApp struct {
Name, Art string
Running bool
Badge int
// Separator draws a divider before the icon, as before the trash.
Separator bool
}
DockApp is a dock app; Art names its icon and a positive Badge shows.
type InspectorRow ¶
type InspectorRow struct{ Label, Value string }
InspectorRow is a labeled value.
type InspectorSection ¶
type InspectorSection struct {
Title string
Rows []InspectorRow
}
InspectorSection is a titled group of rows.
type LaunchApp ¶
type LaunchApp struct{ Name, Icon, Category string }
LaunchApp is an app in the launcher grid.
type LauncherOptions ¶
type LauncherOptions struct{ Placeholder, Empty string }
LauncherOptions word the search.
type LockScreenOptions ¶
type LockScreenOptions struct {
Photo *ui.Bitmap
Clock, Date, Password, Unlock, Wrong string
Welcome string
}
LockScreenOptions dress the screen; Clock and Date are layouts.
type MenuBarOptions ¶
type MenuBarOptions struct{ Flat bool }
MenuBarOptions set how the bar sits in its host surface: Flat drops the bar's own fill and edge, for a host that already draws them.
type MenuItem ¶
type MenuItem struct{ Label, Shortcut string }
MenuItem is a command with an optional shortcut.
type NotificationCenterOptions ¶
type NotificationCenterOptions struct{ Title, Clear, Empty, Time string }
NotificationCenterOptions word the panel; Time is a layout.
type PermissionPromptOptions ¶
type PermissionPromptOptions struct{ Icon, Title, Text, Allow, Deny, Allowed, Denied string }
PermissionPromptOptions word the prompt; Title formats app and resource.
type PrefTab ¶
type PrefTab struct{ Name, Icon string }
PrefTab is a preferences pane's name and icon.
type ProgressWindowOptions ¶
type ProgressWindowOptions struct{ Detail, Count, Cancel, Done, Icon string }
ProgressWindowOptions word the window; Count formats done of total.
type Snap ¶
type Snap struct{ Layout, Zone int }
SnapLayoutsOptions word areas: layout, then area number.
type SnapLayoutsOptions ¶
type SnapLayoutsOptions struct{ Zone string }
SnapLayoutsOptions word the areas; Zone formats layout and area.
type SourceGroup ¶
type SourceGroup struct {
Title string
Items []SourceItem
}
SourceGroup is a titled run of entries.
type SourceItem ¶
SourceItem is a sidebar entry; a positive Count shows.
type StatusItem ¶
StatusItem is a fact; Tone: muted, good, warning, bad.
type SwitchWindow ¶
type SwitchWindow struct{ App, Title, Icon string }
SwitchWindow is an open window: its app, title and icon.
type TaskManagerOptions ¶
type TaskManagerOptions struct{ Title, CPU string }
TaskManagerOptions word the table; CPU formats a percent.
type TerminalWindowOptions ¶
type TerminalWindowOptions struct{ Prompt string }
TerminalWindowOptions set the prompt that marks typed lines.
type TitleTabsOptions ¶
type TitleTabsOptions struct{ New string }
TitleTabsOptions word the new-tab button.
type TrafficLightsOptions ¶
type TrafficLightsOptions struct{ Close, Minimize, Zoom string }
TrafficLightsOptions name the three buttons.
type TrayMenuOptions ¶
type TrayMenuOptions struct{ Label, Icon string }
TrayMenuOptions name the tray icon.
type UnifiedToolbarOptions ¶
UnifiedToolbarOptions word the toolbar; Compact leaves the title to the window frame and keeps only the nav and the search field.
type UpdatePromptOptions ¶
type UpdatePromptOptions struct{ Icon, Title, Version, Install, Later string }
UpdatePromptOptions word the prompt; Title formats the app name.
type VolumeHUDOptions ¶
VolumeHUDOptions mute the sound and name the overlay.
type WifiItemOptions ¶
type WifiItemOptions struct{ Label, Title, Empty string }
WifiItemOptions word the item, its menu and the empty state.
type WindowFrameOptions ¶
type WindowFrameOptions struct{ Inactive bool }
WindowFrameOptions mark an inactive window.
type WindowSwitcherOptions ¶
type WindowSwitcherOptions struct{ Next string }
WindowSwitcherOptions word the next button.
Source Files
¶
- about.go
- battery_item.go
- brightness_hud.go
- clock_item.go
- control_center.go
- desktop_icon.go
- dock.go
- helpers.go
- hud.go
- inspector_pane.go
- launcher.go
- lock_screen.go
- menu_bar.go
- notification_center.go
- permission_prompt.go
- preferences.go
- progress_window.go
- snap_layouts.go
- source_list.go
- spaces.go
- status_bar.go
- task_manager.go
- terminal_window.go
- title_tabs.go
- traffic_lights.go
- tray_menu.go
- unified_toolbar.go
- update_prompt.go
- volume_hud.go
- wifi_item.go
- window_frame.go
- window_switcher.go