appgldi

package
v0.0.0-...-0caaa62 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2017 License: GPL-3.0-or-later Imports: 9 Imported by: 0

Documentation

Overview

Package appgldi implements the dock applet API for go internal applets.

Its goal is to connect the main Cairo-Dock Golang applet object, godock/libs/cdapplet, to its parent, the dock.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppGldi

type AppGldi struct {
	*IconBase // extend subIcon methods and dock Icon object to benefit from all its magic.
	// contains filtered or unexported fields
}

AppGldi is an applet connection to Cairo-Dock using the gldi backend.

func New

func New(mi *gldi.ModuleInstance) *AppGldi

New creates a AppGldi connection.

func (*AppGldi) AddSubIcon

func (o *AppGldi) AddSubIcon(fields ...string) error

AddSubIcon adds subicons by pack of 3 strings : label, icon, ID. See cdtype.AppIcon.

func (*AppGldi) BindShortkey

func (o *AppGldi) BindShortkey(shortkeys ...*cdtype.Shortkey) error

BindShortkey binds any number of keyboard shortcuts to your applet. See cdtype.Shortkey.

func (*AppGldi) DataRenderer

func (o *AppGldi) DataRenderer() cdtype.IconRenderer

DataRenderer manages the graphic data renderer of the icon.

func (*AppGldi) DemandsAttention

func (o *AppGldi) DemandsAttention(start bool, animation string) error

DemandsAttention is an endless Animate method. See cdtype.AppIcon.

func (*AppGldi) IconProperties

func (o *AppGldi) IconProperties() (cdtype.IconProperties, error)

IconProperties gets all applet icon properties at once.

func (*AppGldi) IconProperty

func (o *AppGldi) IconProperty() cdtype.IconProperty

IconProperty gets applet icon properties one by one.

func (*AppGldi) PopupDialog

func (o *AppGldi) PopupDialog(data cdtype.DialogData) error

PopupDialog opens a dialog box. See cdtype.AppIcon.

func (*AppGldi) RemoveSubIcon

func (o *AppGldi) RemoveSubIcon(id string) error

RemoveSubIcon only need the ID to remove the SubIcon. See cdtype.AppIcon.

func (*AppGldi) RemoveSubIcons

func (o *AppGldi) RemoveSubIcons() error

RemoveSubIcons removes all subicons from the subdock.

func (*AppGldi) SetOnEvent

func (o *AppGldi) SetOnEvent(onEvent func(string, ...interface{}) bool)

SetOnEvent sets the OnEvent callback to forwards events.

func (*AppGldi) SubIcon

func (o *AppGldi) SubIcon(key string) cdtype.IconBase

SubIcon returns the subicon object you can act on for the given key.

func (*AppGldi) Window

func (o *AppGldi) Window() cdtype.IconWindow

Window gives access to actions on the controlled window.

type IconBase

type IconBase struct {
	gldi.Icon
	// contains filtered or unexported fields
}

IconBase defines common actions for icons and subdock icons.

func (*IconBase) Animate

func (o *IconBase) Animate(animation string, rounds int) error

Animate animates the icon for a given number of rounds.

func (*IconBase) SetEmblem

func (o *IconBase) SetEmblem(iconPath string, position cdtype.EmblemPosition) error

SetEmblem set an emblem image on the icon. See cdtype.AppIcon.

func (*IconBase) SetIcon

func (o *IconBase) SetIcon(icon string) error

SetIcon set the image of the icon, overwriting the previous one. See cdtype.AppIcon.

func (*IconBase) SetLabel

func (o *IconBase) SetLabel(label string) error

SetLabel change the text label next to the subicon.

func (*IconBase) SetQuickInfo

func (o *IconBase) SetQuickInfo(info string) error

SetQuickInfo change the quickinfo text displayed on the subicon.

func (*IconBase) ShowDialog

func (o *IconBase) ShowDialog(message string, duration int) error

ShowDialog pops up a simple dialog bubble on the icon. See cdtype.AppIcon.

Jump to

Keyboard shortcuts

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