Documentation
¶
Index ¶
- Constants
- func NewNRGBAImageFromEwmhIcon(icon *ewmh.WMIcon) *image.NRGBA
- type AppEntries
- func (entries *AppEntries) Append(entry *AppEntry)
- func (entries *AppEntries) FilterDocked() (dockedEntries []*AppEntry)
- func (entries *AppEntries) GetByDesktopFilePath(desktopFilePath string) (*AppEntry, error)
- func (entries *AppEntries) GetByInnerId(id string) *AppEntry
- func (entries *AppEntries) GetByWindowPid(pid uint) *AppEntry
- func (entries *AppEntries) GetType() reflect.Type
- func (entries *AppEntries) GetValue() (val interface{}, err *dbus.Error)
- func (entries *AppEntries) IndexOf(entry *AppEntry) int
- func (entries *AppEntries) Insert(entry *AppEntry, index int)
- func (entries *AppEntries) Move(index, newIndex int) error
- func (entries *AppEntries) Remove(entry *AppEntry)
- func (entries *AppEntries) SetNotifyChangedFunc(func(val interface{}))
- func (entries *AppEntries) SetValue(val interface{}) (changed bool, err *dbus.Error)
- type AppEntry
- func (entry *AppEntry) Activate(timestamp uint32) *dbus.Error
- func (entry *AppEntry) Check() *dbus.Error
- func (entry *AppEntry) ForceQuit() *dbus.Error
- func (entry *AppEntry) GetAllowedCloseWindows() ([]uint32, *dbus.Error)
- func (e *AppEntry) GetInterfaceName() string
- func (e *AppEntry) HandleDragDrop(timestamp uint32, files []string) *dbus.Error
- func (e *AppEntry) HandleMenuItem(timestamp uint32, id string) *dbus.Error
- func (entry *AppEntry) NewInstance(timestamp uint32) *dbus.Error
- func (entry *AppEntry) PresentWindows() *dbus.Error
- func (entry *AppEntry) RequestDock() *dbus.Error
- func (entry *AppEntry) RequestUndock() *dbus.Error
- type AppEntryMenu
- type AppInfo
- type Daemon
- type DisplayModeType
- type ExportWindowInfo
- type HideModeType
- type HideStateType
- type IdentifyWindowFunc
- type Manager
- func (m *Manager) ActivateWindow(win uint32) *dbus.Error
- func (m *Manager) CancelPreviewWindow() *dbus.Error
- func (m *Manager) CloseWindow(win uint32) *dbus.Error
- func (m *Manager) GetDockedAppsDesktopFiles() ([]string, *dbus.Error)
- func (m *Manager) GetEntryIDs() ([]string, *dbus.Error)
- func (m *Manager) GetInterfaceName() string
- func (m *Manager) GetPluginSettings() (string, *dbus.Error)
- func (m *Manager) IsDocked(desktopFile string) (bool, *dbus.Error)
- func (m *Manager) IsOnDock(desktopFile string) (bool, *dbus.Error)
- func (m *Manager) MakeWindowAbove(win uint32) *dbus.Error
- func (m *Manager) MaximizeWindow(win uint32) *dbus.Error
- func (m *Manager) MergePluginSettings(jsonStr string) *dbus.Error
- func (m *Manager) MinimizeWindow(win uint32) *dbus.Error
- func (m *Manager) MoveEntry(index, newIndex int32) *dbus.Error
- func (m *Manager) MoveWindow(win uint32) *dbus.Error
- func (m *Manager) PreviewWindow(win uint32) *dbus.Error
- func (m *Manager) QueryWindowIdentifyMethod(wid uint32) (string, *dbus.Error)
- func (m *Manager) RemovePluginSettings(key1 string, key2List []string) *dbus.Error
- func (m *Manager) RequestDock(desktopFile string, index int32) (bool, *dbus.Error)
- func (m *Manager) RequestUndock(desktopFile string) (bool, *dbus.Error)
- func (m *Manager) SetFrontendWindowRect(x, y int32, width, height uint32) *dbus.Error
- func (m *Manager) SetPluginSettings(jsonStr string) *dbus.Error
- type Menu
- type MenuItem
- type MotifWmHints
- type ProcessInfo
- type Rect
- type RuleMatchFunc
- type RuleValueParsed
- type RuleValueParsedFlag
- type WindowInfo
- type WindowPattern
- type WindowPatterns
- type WindowRule
- type WindowRuleParsed
Constants ¶
View Source
const ( MotifHintFunctions = 1 << iota MotifHintDecorations MotifHintInputMode MotifHintStatus )
View Source
const ( MotifFunctionAll = 1 << iota MotifFunctionResize MotifFunctionMove MotifFunctionMinimize MotifFunctionMaximize MotifFunctionClose MotifFunctionNone = 0 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppEntries ¶
type AppEntries struct {
// contains filtered or unexported fields
}
func (*AppEntries) Append ¶
func (entries *AppEntries) Append(entry *AppEntry)
func (*AppEntries) FilterDocked ¶
func (entries *AppEntries) FilterDocked() (dockedEntries []*AppEntry)
func (*AppEntries) GetByDesktopFilePath ¶
func (entries *AppEntries) GetByDesktopFilePath(desktopFilePath string) (*AppEntry, error)
func (*AppEntries) GetByInnerId ¶
func (entries *AppEntries) GetByInnerId(id string) *AppEntry
func (*AppEntries) GetByWindowPid ¶
func (entries *AppEntries) GetByWindowPid(pid uint) *AppEntry
func (*AppEntries) GetType ¶
func (entries *AppEntries) GetType() reflect.Type
func (*AppEntries) GetValue ¶
func (entries *AppEntries) GetValue() (val interface{}, err *dbus.Error)
func (*AppEntries) IndexOf ¶
func (entries *AppEntries) IndexOf(entry *AppEntry) int
func (*AppEntries) Insert ¶
func (entries *AppEntries) Insert(entry *AppEntry, index int)
func (*AppEntries) Move ¶
func (entries *AppEntries) Move(index, newIndex int) error
func (*AppEntries) Remove ¶
func (entries *AppEntries) Remove(entry *AppEntry)
func (*AppEntries) SetNotifyChangedFunc ¶
func (entries *AppEntries) SetNotifyChangedFunc(func(val interface{}))
func (*AppEntries) SetValue ¶
func (entries *AppEntries) SetValue(val interface{}) (changed bool, err *dbus.Error)
type AppEntry ¶
type AppEntry struct {
PropsMu sync.RWMutex
Id string
IsActive bool
Name string
Icon string
// dbusutil-gen: ignore
Menu AppEntryMenu
DesktopFile string
CurrentWindow x.Window
IsDocked bool
// dbusutil-gen: equal=method:Equal
WindowInfos windowInfosType
// contains filtered or unexported fields
}
func (*AppEntry) GetAllowedCloseWindows ¶
func (*AppEntry) GetInterfaceName ¶
func (*AppEntry) HandleDragDrop ¶
func (*AppEntry) HandleMenuItem ¶
func (*AppEntry) NewInstance ¶
func (*AppEntry) PresentWindows ¶
func (entry *AppEntry) PresentWindows() *dbus.Error
func (*AppEntry) RequestUndock ¶
func (entry *AppEntry) RequestUndock() *dbus.Error
RequestUndock 取消驻留
type AppEntryMenu ¶
type AppEntryMenu struct {
// contains filtered or unexported fields
}
func (*AppEntryMenu) GetType ¶
func (*AppEntryMenu) GetType() reflect.Type
func (*AppEntryMenu) GetValue ¶
func (m *AppEntryMenu) GetValue() (val interface{}, err *dbus.Error)
func (*AppEntryMenu) SetNotifyChangedFunc ¶
func (*AppEntryMenu) SetNotifyChangedFunc(func(val interface{}))
func (*AppEntryMenu) SetValue ¶
func (*AppEntryMenu) SetValue(val interface{}) (changed bool, err *dbus.Error)
type AppInfo ¶
type AppInfo struct {
*desktopappinfo.DesktopAppInfo
// contains filtered or unexported fields
}
func NewAppInfo ¶
func NewAppInfoFromFile ¶
func NewDockedAppInfo ¶
type DisplayModeType ¶
type DisplayModeType int32
const ( DisplayModeFashionMode DisplayModeType = iota DisplayModeEfficientMode DisplayModeClassicMode )
func (DisplayModeType) String ¶
func (t DisplayModeType) String() string
type ExportWindowInfo ¶
type HideModeType ¶
type HideModeType int32
const ( HideModeKeepShowing HideModeType = iota HideModeKeepHidden HideModeAutoHide // invalid HideModeSmartHide )
func (HideModeType) String ¶
func (t HideModeType) String() string
type HideStateType ¶
type HideStateType int32
const ( HideStateUnknown HideStateType = iota HideStateShow HideStateHide )
func (HideStateType) String ¶
func (s HideStateType) String() string
type IdentifyWindowFunc ¶
type IdentifyWindowFunc struct {
Name string
Fn _IdentifyWindowFunc
}
type Manager ¶
type Manager struct {
PropsMu sync.RWMutex
Entries AppEntries
HideMode gsprop.Enum `prop:"access:rw"`
DisplayMode gsprop.Enum `prop:"access:rw"`
Position gsprop.Enum `prop:"access:rw"`
IconSize gsprop.Uint `prop:"access:rw"`
ShowTimeout gsprop.Uint `prop:"access:rw"`
HideTimeout gsprop.Uint `prop:"access:rw"`
WindowSizeEfficient gsprop.Uint `prop:"access:rw"`
WindowSizeFashion gsprop.Uint `prop:"access:rw"`
DockedApps gsprop.Strv
Opacity gsprop.Double
HideState HideStateType
FrontendWindowRect *Rect
// contains filtered or unexported fields
}
func (*Manager) ActivateWindow ¶
ActivateWindow会激活给定id的窗口,被激活的窗口通常会成为焦点窗口。
func (*Manager) CancelPreviewWindow ¶
func (m *Manager) CancelPreviewWindow() *dbus.Error
func (*Manager) CloseWindow ¶
CloseWindow会将传入id的窗口关闭。
func (*Manager) GetDockedAppsDesktopFiles ¶
func (*Manager) GetInterfaceName ¶
func (*Manager) GetPluginSettings ¶
func (*Manager) MakeWindowAbove ¶
func (*Manager) MaximizeWindow ¶
func (*Manager) MergePluginSettings ¶
func (*Manager) MinimizeWindow ¶
func (*Manager) MoveWindow ¶
func (*Manager) PreviewWindow ¶
func (*Manager) QueryWindowIdentifyMethod ¶
func (*Manager) RemovePluginSettings ¶
func (*Manager) RequestDock ¶
func (*Manager) RequestUndock ¶
func (*Manager) SetFrontendWindowRect ¶
func (*Manager) SetPluginSettings ¶
type Menu ¶
type Menu struct {
Items []*MenuItem `json:"items"`
CheckableMenu bool `json:"checkableMenu"`
SingleCheck bool `json:"singleCheck"`
// contains filtered or unexported fields
}
func (*Menu) AppendItem ¶
func (*Menu) GenerateJSON ¶
type MenuItem ¶
type MenuItem struct {
Id string `json:"itemId"`
Text string `json:"itemText"`
IsActive bool `json:"isActive"`
IsCheckable bool `json:"isCheckable"`
Checked bool `json:"checked"`
Icon string `json:"itemIcon"`
IconHover string `json:"itemIconHover"`
IconInactive string `json:"itemIconInactive"`
ShowCheckMark bool `json:"showCheckMark"`
SubMenu *Menu `json:"itemSubMenu"`
// contains filtered or unexported fields
}
type MotifWmHints ¶
type ProcessInfo ¶
type ProcessInfo struct {
// contains filtered or unexported fields
}
func NewProcessInfo ¶
func NewProcessInfo(pid uint) (*ProcessInfo, error)
func NewProcessInfoWithCmdline ¶
func NewProcessInfoWithCmdline(cmd []string) *ProcessInfo
func (*ProcessInfo) GetOneCommandLine ¶
func (p *ProcessInfo) GetOneCommandLine() string
func (*ProcessInfo) GetShellScriptLines ¶
func (p *ProcessInfo) GetShellScriptLines() string
type RuleMatchFunc ¶
type RuleValueParsed ¶
type RuleValueParsed struct {
Fn RuleMatchFunc
Type byte
Flags RuleValueParsedFlag
Original string
Value string
}
func (*RuleValueParsed) String ¶
func (p *RuleValueParsed) String() string
type RuleValueParsedFlag ¶
type RuleValueParsedFlag uint
const ( RuleValueParsedFlagNone RuleValueParsedFlag = 1 << iota RuleValueParsedFlagNegative RuleValueParsedFlagIgnoreCase )
type WindowInfo ¶
func NewWindowInfo ¶
func NewWindowInfo(win x.Window) *WindowInfo
type WindowPattern ¶
type WindowPattern struct {
Rules []WindowRule `json:"rules"`
Result string `json:"ret"`
ParsedRules []*WindowRuleParsed
}
type WindowPatterns ¶
type WindowPatterns []WindowPattern
func (WindowPatterns) Match ¶
func (patterns WindowPatterns) Match(winInfo *WindowInfo) string
type WindowRule ¶
type WindowRule [2]string
func (*WindowRule) Parse ¶
func (rule *WindowRule) Parse() *WindowRuleParsed
type WindowRuleParsed ¶
type WindowRuleParsed struct {
Key string
ValueParsed *RuleValueParsed
}
func (*WindowRuleParsed) Match ¶
func (rule *WindowRuleParsed) Match(winInfo *WindowInfo) bool
Source Files
¶
- app_entries.go
- app_entry.go
- app_entry_ifc.go
- app_entry_menu.go
- app_info.go
- bamf.go
- daemon.go
- desktop_file_path.go
- dock_dbusutil.go
- dock_manager.go
- dock_manager_dock_app.go
- dock_manager_entries.go
- dock_manager_hide_state.go
- dock_manager_init.go
- dock_manager_xevent.go
- identify_window.go
- identify_window_pattern.go
- init.go
- menu.go
- plugin_settings.go
- process_info.go
- sync_config.go
- types.go
- util.go
- window_info.go
- window_infos.go
- window_slice.go
- xutils.go
Click to show internal directories.
Click to hide internal directories.