godock: github.com/sqp/godock/libs/gldi/appgldi Index | Files

package appgldi

import "github.com/sqp/godock/libs/gldi/appgldi"

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.


Package Files


type AppGldi Uses

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 Uses

func New(mi *gldi.ModuleInstance) *AppGldi

New creates a AppGldi connection.

func (*AppGldi) AddSubIcon Uses

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

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

func (*AppGldi) BindShortkey Uses

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

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

func (*AppGldi) DataRenderer Uses

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

DataRenderer manages the graphic data renderer of the icon.

func (*AppGldi) DemandsAttention Uses

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

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

func (*AppGldi) IconProperties Uses

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

IconProperties gets all applet icon properties at once.

func (*AppGldi) IconProperty Uses

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

IconProperty gets applet icon properties one by one.

func (*AppGldi) PopupDialog Uses

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

PopupDialog opens a dialog box. See cdtype.AppIcon.

func (*AppGldi) RemoveSubIcon Uses

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

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

func (*AppGldi) RemoveSubIcons Uses

func (o *AppGldi) RemoveSubIcons() error

RemoveSubIcons removes all subicons from the subdock.

func (*AppGldi) SetOnEvent Uses

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

SetOnEvent sets the OnEvent callback to forwards events.

func (*AppGldi) SubIcon Uses

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

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

func (*AppGldi) Window Uses

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

Window gives access to actions on the controlled window.

type IconBase Uses

type IconBase struct {
    // contains filtered or unexported fields

IconBase defines common actions for icons and subdock icons.

func (*IconBase) Animate Uses

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

Animate animates the icon for a given number of rounds.

func (*IconBase) SetEmblem Uses

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

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

func (*IconBase) SetIcon Uses

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

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

func (*IconBase) SetLabel Uses

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

SetLabel change the text label next to the subicon.

func (*IconBase) SetQuickInfo Uses

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

SetQuickInfo change the quickinfo text displayed on the subicon.

func (*IconBase) ShowDialog Uses

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

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

Package appgldi imports 9 packages (graph) and is imported by 1 packages. Updated 2016-09-13. Refresh now. Tools for package owners.