Help us shape the future of Go! Take the 2026 Go Developer Survey

dock

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BadgeOptions

type BadgeOptions struct {
	TextColour       color.RGBA
	BackgroundColour color.RGBA
	FontName         string
	FontSize         int
	SmallFontSize    int
}

BadgeOptions represents options for customizing badge appearance

type DockService

type DockService struct {
	// contains filtered or unexported fields
}

Service represents the dock service

func New

func New() *DockService

New creates a new Dock Service. On Linux, this returns a stub implementation since dock icon visibility and badge functionality are not standardized across desktop environments.

func NewWithOptions

func NewWithOptions(options BadgeOptions) *DockService

NewWithOptions creates a new dock service with badge options. On Linux, this returns a stub implementation since badge functionality is not standardized across desktop environments. Options are ignored.

func (*DockService) GetBadge

func (d *DockService) GetBadge() *string

GetBadge returns the badge label on the application icon.

func (*DockService) HideAppIcon

func (d *DockService) HideAppIcon()

HideAppIcon hides the app icon in the dock/taskbar.

func (*DockService) RemoveBadge

func (d *DockService) RemoveBadge() error

RemoveBadge removes the badge label from the application icon.

func (*DockService) ServiceName

func (d *DockService) ServiceName() string

ServiceName returns the name of the service.

func (*DockService) ServiceShutdown

func (d *DockService) ServiceShutdown() error

ServiceShutdown is called when the service is unloaded.

func (*DockService) ServiceStartup

func (d *DockService) ServiceStartup(ctx context.Context, options application.ServiceOptions) error

ServiceStartup is called when the service is loaded.

func (*DockService) SetBadge

func (d *DockService) SetBadge(label string) error

SetBadge sets the badge label on the application icon.

func (*DockService) SetCustomBadge

func (d *DockService) SetCustomBadge(label string, options BadgeOptions) error

SetCustomBadge sets the badge label on the application icon with custom options.

func (*DockService) ShowAppIcon

func (d *DockService) ShowAppIcon()

ShowAppIcon shows the app icon in the dock/taskbar.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL