trayicon

package
v0.0.0-...-61f35a2 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2022 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpcodeSystemTrayRequestDock uint32 = iota
	OpcodeSystemTrayBeginMessage
	OpcodeSystemTrayCancelMessage
)

Variables

View Source
var (
	XConn *x.Conn

	XA_NET_SYSTEM_TRAY_S0         x.Atom
	XA_NET_SYSTEM_TRAY_OPCODE     x.Atom
	XA_NET_SYSTEM_TRAY_VISUAL     x.Atom
	XA_NET_SYSTEM_TRAY_ORIENTAION x.Atom
	XA_MANAGER                    x.Atom
)

Functions

This section is empty.

Types

type Daemon

type Daemon struct {
	*loader.ModuleBase
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(logger *log.Logger) *Daemon

func (*Daemon) GetDependencies

func (d *Daemon) GetDependencies() []string

func (*Daemon) Name

func (d *Daemon) Name() string

func (*Daemon) Start

func (d *Daemon) Start() error

func (*Daemon) Stop

func (d *Daemon) Stop() error

type DamageNotifyEventHandler

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

type StatusNotifierWatcher

type StatusNotifierWatcher struct {
	PropsMu sync.RWMutex
	// dbusutil-gen: equal=nil
	RegisteredStatusNotifierItems  strv.Strv
	IsStatusNotifierHostRegistered bool

	// dbusutil-gen: ignore
	ProtocolVersion int32
	// contains filtered or unexported fields
}

func (*StatusNotifierWatcher) GetExportedMethods

func (v *StatusNotifierWatcher) GetExportedMethods() dbusutil.ExportedMethods

func (*StatusNotifierWatcher) GetInterfaceName

func (*StatusNotifierWatcher) GetInterfaceName() string

func (*StatusNotifierWatcher) RegisterStatusNotifierHost

func (snw *StatusNotifierWatcher) RegisterStatusNotifierHost(serviceName string) *dbus.Error

func (*StatusNotifierWatcher) RegisterStatusNotifierItem

func (snw *StatusNotifierWatcher) RegisterStatusNotifierItem(sender dbus.Sender, serviceOrPath string) *dbus.Error

type TrayIcon

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

func NewTrayIcon

func NewTrayIcon(win x.Window) *TrayIcon

type TrayManager

type TrayManager struct {

	// 目前已有系统托盘窗口的id。
	PropsMu sync.RWMutex
	// dbusutil-gen: equal=nil
	TrayIcons []uint32
	// contains filtered or unexported fields
}

TrayManager为系统托盘的管理器。

func NewTrayManager

func NewTrayManager(service *dbusutil.Service) *TrayManager

func (*TrayManager) EnableNotification

func (m *TrayManager) EnableNotification(win uint32, enabled bool) *dbus.Error

EnableNotification设置对应id的窗口是否可以通知。

func (*TrayManager) GetExportedMethods

func (v *TrayManager) GetExportedMethods() dbusutil.ExportedMethods

func (*TrayManager) GetInterfaceName

func (*TrayManager) GetInterfaceName() string

func (*TrayManager) GetName

func (m *TrayManager) GetName(win uint32) (name string, busErr *dbus.Error)

GetName返回传入的系统图标的窗口id的窗口名。

func (*TrayManager) Manage

func (m *TrayManager) Manage() (ok bool, busErr *dbus.Error)

Manage方法获取系统托盘图标的管理权。

Jump to

Keyboard shortcuts

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