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

package gldi

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

Package gldi provides Go bindings for gldi (cairo-dock). Supports version 3.4


Package Files

gldi.go icon.go


const IconLastOrder = -1e9 // CAIRO_DOCK_LAST_ORDER

IconLastOrder defines the last icon position ??


var Crypto cdglobal.Crypto = crypto{}

Crypto gives access to the dock string crypto.

func CIntPointer Uses

func CIntPointer(i int) C.gpointer

CIntPointer returns a C gpointer to an int value.

func CanSetOnWidgetLayer Uses

func CanSetOnWidgetLayer() bool

CanSetOnWidgetLayer returns whether desklets can be set on the widget layer.

func ConfFileNeedUpdate Uses

func ConfFileNeedUpdate(kf *keyfile.KeyFile, version string) bool

ConfFileNeedUpdate returns whether the config file needs update or not.

func ConfFileUpgrade Uses

func ConfFileUpgrade(current, original string, updateKeys bool) error

ConfFileUpgrade upgrades a config file (copy from default and reapply keys).

func CurrentThemeExport Uses

func CurrentThemeExport(themeName string, saveBehaviour, saveLaunchers bool) error

CurrentThemeExport loads the theme in the dock.

func CurrentThemeImport Uses

func CurrentThemeImport(themeName string, useBehaviour, useLaunchers bool) error

CurrentThemeImport loads the theme in the dock.

func CurrentThemeLoad Uses

func CurrentThemeLoad()

CurrentThemeLoad loads the theme in the dock.

func CurrentThemeNeedSave Uses

func CurrentThemeNeedSave() bool

CurrentThemeNeedSave loads the theme in the dock.

func CurrentThemePackage Uses

func CurrentThemePackage(themeName, dirPath string) error

CurrentThemePackage creates a package with the current theme of the dock.

func DbusGThreadInit Uses

func DbusGThreadInit()

DbusGThreadInit inits C threads.

func DisableContainersOpacity Uses

func DisableContainersOpacity()

DisableContainersOpacity disables the opacity ability on containers.

func DockAddConfFile Uses

func DockAddConfFile() string

DockAddConfFile adds a config file for a new root dock. Does not create the dock (use gldi_dock_new for that). Returns the unique name for the new dock, to be passed to gldi_dock_new.

func DockIsLoading Uses

func DockIsLoading() bool

DockIsLoading returns whether the dock is still loading or not.

func EmitSignalDropData Uses

func EmitSignalDropData(container *Container, data string, icon Icon, order float64)

EmitSignalDropData emits the signal on the container.

func FMForceDeskEnv Uses

func FMForceDeskEnv(env cdglobal.DeskEnvironment)

FMForceDeskEnv forces the dock to use the given desktop environment backend.

func ForceDocksAbove Uses

func ForceDocksAbove()

ForceDocksAbove forces all docks to appear on top of other windows.

func FreeAll Uses

func FreeAll()

FreeAll frees all C dock memory.

func GLBackendDeactivate Uses

func GLBackendDeactivate()

GLBackendDeactivate prevents the dock from activating the OpenGL backend.

func GLBackendForceIndirectRendering Uses

func GLBackendForceIndirectRendering()

GLBackendForceIndirectRendering forces the indirect rendering on the OpenGL backend.

func GLBackendIsSafe Uses

func GLBackendIsSafe() bool

GLBackendIsSafe returns whether the OpenGL backend is safely usable or not.

func GLBackendIsUsed Uses

func GLBackendIsUsed() bool

GLBackendIsUsed returns whether the dock use OpenGL backend or not.

func GetAllAvailableDocks Uses

func GetAllAvailableDocks(parent, subdock *CairoDock) []*CairoDock

GetAllAvailableDocks returns a filtered list of docks.

pParentDock    if not nil: exclude this dock.
pSubDock       if not nil: exclude this dock and its children.

func Init Uses

func Init(rendering RenderingMethod)

Init initialises the gldi backend with the rendering method provided.

func LockGTK Uses

func LockGTK()

LockGTK runs the gtk main loop. Use to lock the dock main thread.

func LogForceUseColor Uses

func LogForceUseColor()

LogForceUseColor sets the colored output for the C dock debug.

func LogSetLevelFromName Uses

func LogSetLevelFromName(verbosity string)

LogSetLevelFromName sets the C dock debug level.

func ManagerReload Uses

func ManagerReload(name string, b bool, keyf *keyfile.KeyFile)

ManagerReload reloads the manager matching the given name.

func MenuAddItem(menu *gtk.Menu, label, iconPath string) *gtk.MenuItem

MenuAddItem adds an item to the menu.

func MenuAddSubMenu(menu *gtk.Menu, label, iconPath string) (*gtk.Menu, *gtk.MenuItem)

MenuAddSubMenu adds a sub-menu to a given menu.

func ModulesGetNb Uses

func ModulesGetNb() int

ModulesGetNb returns the number of internal modules defined.

func ModulesNewFromDirectory Uses

func ModulesNewFromDirectory(dir string) error

ModulesNewFromDirectory loads internal modules from the given directory. Use with an empty dir to load from the default directory.

func ObjectDelete Uses

func ObjectDelete(obj IObject)

ObjectDelete deletes the given object.

func ObjectIsDock Uses

func ObjectIsDock(obj IObject) bool

ObjectIsDock returns whether the given object is a dock or not.

func ObjectIsManagerChild Uses

func ObjectIsManagerChild(obj IObject, ptr *C.GldiObjectManager) bool

ObjectIsManagerChild returns whether the given object is a manager child.

func ObjectNotify Uses

func ObjectNotify(container *Container, notif int, icon Icon, dock *CairoDock, key gdk.ModifierType)

ObjectNotify notifies the given object.

func ObjectReload Uses

func ObjectReload(obj IObject)

ObjectReload reloads the given object.

func ObjectUnref Uses

func ObjectUnref(obj IObject)

ObjectUnref unrefs the given object.

func QuickHideAllDocks Uses

func QuickHideAllDocks()

QuickHideAllDocks hides all dock at once.

func SetContainersNonSticky Uses

func SetContainersNonSticky()

SetContainersNonSticky sets the non sticky mode for containers.

func SetPaths Uses

func SetPaths(dataDir, extra, themes, current, shareTheme, distantTheme, serverTheme string)

SetPaths sets the default paths for the gldi backend.

func StyleColorsFreeze Uses

func StyleColorsFreeze()

StyleColorsFreeze TODO FIND USAGE.

func XMLCleanupParser Uses

func XMLCleanupParser()


type Animation Uses

type Animation struct {
    Ptr *C.CairoDockAnimationRecord

Animation defines a dock animation.

func NewAnimationFromNative Uses

func NewAnimationFromNative(p unsafe.Pointer) *Animation

NewAnimationFromNative wraps a dock animation from C pointer.

func (*Animation) GetDisplayedName Uses

func (dr *Animation) GetDisplayedName() string

GetDisplayedName returns the animation displayed name.

type CairoDeskletDecoration Uses

type CairoDeskletDecoration struct {
    Ptr *C.CairoDeskletDecoration

CairoDeskletDecoration defines a dock desklet decoration.

func NewCairoDeskletDecorationFromNative Uses

func NewCairoDeskletDecorationFromNative(p unsafe.Pointer) *CairoDeskletDecoration

NewCairoDeskletDecorationFromNative wraps a dock desklet decoration from C pointer.

func (*CairoDeskletDecoration) GetDisplayedName Uses

func (dr *CairoDeskletDecoration) GetDisplayedName() string

GetDisplayedName returns the desklet decoration displayed name.

type CairoDock Uses

type CairoDock struct {
    Ptr          *C.CairoDock
    RendererData interface{} // View rendering data.

CairoDock defines a gldi dock.

func DockGet Uses

func DockGet(containerName string) *CairoDock

DockGet returns the dock with the given name.

func DockNew Uses

func DockNew(name string) *CairoDock

DockNew creates a new dock with the given name.

func NewDockFromNative Uses

func NewDockFromNative(p unsafe.Pointer) *CairoDock

NewDockFromNative wraps a gldi dock from C pointer.

func (*CairoDock) Align Uses

func (o *CairoDock) Align() float64

Align returns the dock alignment (left/right or top/bottom).

func (*CairoDock) BackgroundBufferTexture Uses

func (o *CairoDock) BackgroundBufferTexture() uint32

BackgroundBufferTexture TODO FIND USAGE.

func (*CairoDock) CalculateMagnitude Uses

func (o *CairoDock) CalculateMagnitude() float64

CalculateMagnitude calculates the dock magnitude.

func (*CairoDock) CheckCanDropLinear Uses

func (o *CairoDock) CheckCanDropLinear()

CheckCanDropLinear checks if we can drop linear. TODO CHECK USAGE.

func (*CairoDock) CheckIfMouseInsideLinear Uses

func (o *CairoDock) CheckIfMouseInsideLinear()

CheckIfMouseInsideLinear checks if the mouse is inside the linear area.

func (*CairoDock) Container Uses

func (o *CairoDock) Container() *Container

Container returns the inside container ?? TODO ENSURE.

func (*CairoDock) DecorationsHeight Uses

func (o *CairoDock) DecorationsHeight() int

DecorationsHeight returns the dock decorations height.

func (*CairoDock) FirstDrawnElementLinear Uses

func (o *CairoDock) FirstDrawnElementLinear() []Icon

FirstDrawnElementLinear TODO FIND USAGE.

func (*CairoDock) GetCurrentWidthLinear Uses

func (o *CairoDock) GetCurrentWidthLinear() float64

GetCurrentWidthLinear returns the dock current width linear.

func (*CairoDock) GetDockName Uses

func (o *CairoDock) GetDockName() string

GetDockName returns the key name of the dock.

func (*CairoDock) GetNextIcon Uses

func (o *CairoDock) GetNextIcon(icon Icon) Icon

GetNextIcon returns the icon after the given one in the dock.

func (*CairoDock) GetPointedIcon Uses

func (o *CairoDock) GetPointedIcon() Icon

GetPointedIcon returns the pointed icon (mouse on the icon).

func (*CairoDock) GetPreviousIcon Uses

func (o *CairoDock) GetPreviousIcon(icon Icon) Icon

GetPreviousIcon returns the icon before the given one in the dock.

func (*CairoDock) GetReadableName Uses

func (o *CairoDock) GetReadableName() string

GetReadableName returns the readable name of the dock.

func (*CairoDock) GetRefCount Uses

func (o *CairoDock) GetRefCount() int

GetRefCount gives the number of icons pointing on the dock. 0 means it is a root dock, >0 a sub-dock.

func (*CairoDock) GlobalIconSize Uses

func (o *CairoDock) GlobalIconSize() bool

GlobalIconSize returns the global icon size.

func (*CairoDock) HasShapeBitmap Uses

func (o *CairoDock) HasShapeBitmap() bool

HasShapeBitmap returns whether the dock has shape bitmap.

func (*CairoDock) IconSize Uses

func (o *CairoDock) IconSize() int

IconSize returns the dock icon size.

func (*CairoDock) Icons Uses

func (o *CairoDock) Icons() (list []Icon)

Icons returns the list of icons in the dock.

func (*CairoDock) IsAutoHide Uses

func (o *CairoDock) IsAutoHide() bool

IsAutoHide returns whether the dock was auto hidden (TODO ensure).

func (*CairoDock) IsExtendedDock Uses

func (o *CairoDock) IsExtendedDock() bool

IsExtendedDock returns whether the dock is extended.

func (*CairoDock) IsMainDock Uses

func (o *CairoDock) IsMainDock() bool

IsMainDock returns whether the dock is a main dock or not.

func (*CairoDock) MaxDockHeight Uses

func (o *CairoDock) MaxDockHeight() int

MaxDockHeight returns the max dock height.

func (*CairoDock) MaxDockWidth Uses

func (o *CairoDock) MaxDockWidth() int

MaxDockWidth returns the max dock width.

func (*CairoDock) MaxIconHeight Uses

func (o *CairoDock) MaxIconHeight() int

MaxIconHeight returns the max icon height.

func (*CairoDock) MinDockHeight Uses

func (o *CairoDock) MinDockHeight() int

MinDockHeight returns the min dock height.

func (*CairoDock) MinDockWidth Uses

func (o *CairoDock) MinDockWidth() int

MinDockWidth returns the min dock width.

func (*CairoDock) ScreenNumber Uses

func (o *CairoDock) ScreenNumber() int


func (*CairoDock) ScreenWidth Uses

func (o *CairoDock) ScreenWidth() int

ScreenWidth returns the dock allocated screen width.


func (*CairoDock) SearchIconPointingOnDock Uses

func (o *CairoDock) SearchIconPointingOnDock(unknown interface{}) Icon


func (*CairoDock) SetActiveHeight Uses

func (o *CairoDock) SetActiveHeight(val int)

SetActiveHeight sets the dock active height.

func (*CairoDock) SetActiveWidth Uses

func (o *CairoDock) SetActiveWidth(val int)

SetActiveWidth sets the dock active width.

func (*CairoDock) SetDecorationsHeight Uses

func (o *CairoDock) SetDecorationsHeight(i int)

SetDecorationsHeight sets decorations height.

func (*CairoDock) SetDecorationsWidth Uses

func (o *CairoDock) SetDecorationsWidth(val int)

SetDecorationsWidth sets decorations width.

func (*CairoDock) SetFlatDockWidth Uses

func (o *CairoDock) SetFlatDockWidth(val float64)

SetFlatDockWidth sets the dock flat width.

func (*CairoDock) SetMagnitudeMax Uses

func (o *CairoDock) SetMagnitudeMax(val float64)

SetMagnitudeMax sets the max dock magnitude.

func (*CairoDock) SetMaxDockHeight Uses

func (o *CairoDock) SetMaxDockHeight(val int)

SetMaxDockHeight sets the dock max height.

func (*CairoDock) SetMaxDockWidth Uses

func (o *CairoDock) SetMaxDockWidth(val int)

SetMaxDockWidth sets the max dock width.

func (*CairoDock) SetMinDockHeight Uses

func (o *CairoDock) SetMinDockHeight(val int)

SetMinDockHeight sets the dock min height.

func (*CairoDock) SetMinDockWidth Uses

func (o *CairoDock) SetMinDockWidth(val int)

SetMinDockWidth sets the min dock width.

func (*CairoDock) ShapeBitmapSubstractRectangleInt Uses

func (o *CairoDock) ShapeBitmapSubstractRectangleInt(x, y, w, h int)

ShapeBitmapSubstractRectangleInt TODO FIND USAGE

func (*CairoDock) ToContainer Uses

func (o *CairoDock) ToContainer() *Container

ToContainer returns the dock as a Container object.

func (*CairoDock) ToNative Uses

func (o *CairoDock) ToNative() unsafe.Pointer

ToNative returns the pointer to the native object.

type CairoDockRenderer Uses

type CairoDockRenderer struct {
    Ptr *C.CairoDockRenderer

CairoDockRenderer defines a dock renderer, AKA views.

func NewCairoDockRenderer Uses

func NewCairoDockRenderer(title, readmePath, previewPath string) *CairoDockRenderer

NewCairoDockRenderer creates a new dock renderer.

func NewCairoDockRendererFromNative Uses

func NewCairoDockRendererFromNative(p unsafe.Pointer) *CairoDockRenderer

NewCairoDockRendererFromNative wraps a dock renderer from C pointer.

func (*CairoDockRenderer) GetDisplayedName Uses

func (dr *CairoDockRenderer) GetDisplayedName() string

GetDisplayedName returns the dock renderer displayed name.

func (*CairoDockRenderer) GetPreviewFilePath Uses

func (dr *CairoDockRenderer) GetPreviewFilePath() string

GetPreviewFilePath returns the dock renderer preview file path.

func (*CairoDockRenderer) GetReadmeFilePath Uses

func (dr *CairoDockRenderer) GetReadmeFilePath() string

GetReadmeFilePath returns the dock renderer readme file path.

func (*CairoDockRenderer) Register Uses

func (dr *CairoDockRenderer) Register(name string)

Register registers the dock renderer in the dock.

func (*CairoDockRenderer) ToNative Uses

func (dr *CairoDockRenderer) ToNative() unsafe.Pointer

ToNative returns the pointer to the native object.

type Container Uses

type Container struct {
    Ptr *C.GldiContainer

Container defines a gldi container.

func NewContainerFromNative Uses

func NewContainerFromNative(p unsafe.Pointer) *Container

NewContainerFromNative wraps a gldi container from C pointer.

func (*Container) Height Uses

func (o *Container) Height() int

Height returns the container height.

func (*Container) IsDesklet Uses

func (o *Container) IsDesklet() bool

IsDesklet returns whether the container is a desklet or not.

func (*Container) IsDialog Uses

func (o *Container) IsDialog() bool

IsDialog returns whether the container is a dialog or not.

func (*Container) IsDirectionUp Uses

func (o *Container) IsDirectionUp() bool

IsDirectionUp returns if the dock is positioned on top or bottom.

func (*Container) IsFlyingContainer Uses

func (o *Container) IsFlyingContainer() bool

IsFlyingContainer returns whether the container is a flying container or not.

func (*Container) IsHorizontal Uses

func (o *Container) IsHorizontal() bool

IsHorizontal returns if the container orientation is horizontal.

func (*Container) MouseX Uses

func (o *Container) MouseX() int

MouseX returns the mouse horizontal position on the container.

func (*Container) MouseY Uses

func (o *Container) MouseY() int

MouseY returns the mouse vertical position on the container.

func (*Container) Ratio Uses

func (o *Container) Ratio() float64

Ratio returns the container ratio.

func (*Container) ScreenBorder Uses

func (o *Container) ScreenBorder() cdtype.ContainerPosition

ScreenBorder returns the border of the screen where the dock is attached.

func (*Container) ToCairoDock Uses

func (o *Container) ToCairoDock() *CairoDock

ToCairoDock returns the container as a dock if possible.

func (*Container) ToDesklet Uses

func (o *Container) ToDesklet() *Desklet

ToDesklet returns the container as a desklet if possible.

func (*Container) ToNative Uses

func (o *Container) ToNative() unsafe.Pointer

ToNative returns the pointer to the native object.

func (*Container) Type Uses

func (o *Container) Type() cdtype.ContainerType

Type returns the type of container.

func (*Container) Width Uses

func (o *Container) Width() int

Width returns the container width.

func (*Container) WindowPositionX Uses

func (o *Container) WindowPositionX() int

WindowPositionX TODO usage.

func (*Container) WindowPositionY Uses

func (o *Container) WindowPositionY() int

WindowPositionY TODO usage.

type DataRendererAttributeCommon Uses

type DataRendererAttributeCommon struct {
    ModelName    string
    LatencyTime  int
    NbValues     int
    WriteValues  bool
    UpdateMinMax bool // for graph
    MemorySize   int  // for graph
    RotateTheme  int  // for gauge
    // contains filtered or unexported fields

DataRendererAttributeCommon defines the base for a data renderer attribute.

func (*DataRendererAttributeCommon) Free Uses

func (o *DataRendererAttributeCommon) Free()

Free frees the renderer object.

type DataRendererAttributeGauge Uses

type DataRendererAttributeGauge struct {
    Theme string

DataRendererAttributeGauge defines a gauge data renderer attribute.

func NewDataRendererAttributeGauge Uses

func NewDataRendererAttributeGauge() *DataRendererAttributeGauge

NewDataRendererAttributeGauge creates a gauge data renderer attribute.

func (*DataRendererAttributeGauge) ToAttribute Uses

func (o *DataRendererAttributeGauge) ToAttribute() (*C.CairoDataRendererAttribute, func())

ToAttribute converts the renderer to C attribute.

type DataRendererAttributeGraph Uses

type DataRendererAttributeGraph struct {
    Type            cdtype.RendererGraphType
    MixGraphs       bool
    HighColor       []float64
    LowColor        []float64
    BackGroundColor [4]float64

DataRendererAttributeGraph defines a graph data renderer attribute.

func NewDataRendererAttributeGraph Uses

func NewDataRendererAttributeGraph() *DataRendererAttributeGraph

NewDataRendererAttributeGraph creates a graph data renderer attribute.

func (*DataRendererAttributeGraph) ToAttribute Uses

func (o *DataRendererAttributeGraph) ToAttribute() (*C.CairoDataRendererAttribute, func())

ToAttribute converts the renderer to C attribute.

type DataRendererAttributeProgressBar Uses

type DataRendererAttributeProgressBar struct {

DataRendererAttributeProgressBar defines a progress bar data renderer attribute.

func NewDataRendererAttributeProgressBar Uses

func NewDataRendererAttributeProgressBar() *DataRendererAttributeProgressBar

NewDataRendererAttributeProgressBar creates a progress bar data renderer attribute.

func (*DataRendererAttributeProgressBar) ToAttribute Uses

func (o *DataRendererAttributeProgressBar) ToAttribute() (*C.CairoDataRendererAttribute, func())

ToAttribute converts the renderer to C attribute.

type DataRendererAttributer Uses

type DataRendererAttributer interface {
    ToAttribute() (attr *C.CairoDataRendererAttribute, free func())

DataRendererAttributer defines the data renderer attribute interface.

type DataRendererTextFunc Uses

type DataRendererTextFunc func(...float64) []string

DataRendererTextFunc defines a data renderer text format func.

type Desklet Uses

type Desklet struct {
    Ptr *C.CairoDesklet

Desklet defines a gldi desklet.

func NewDeskletFromNative Uses

func NewDeskletFromNative(p unsafe.Pointer) *Desklet

NewDeskletFromNative wraps a gldi desklet from C pointer.

func (*Desklet) GetIcon Uses

func (o *Desklet) GetIcon() Icon

GetIcon gets the icon behind the desklet.

func (*Desklet) HasIcons Uses

func (o *Desklet) HasIcons() bool

HasIcons returns whether the desklet has icons or not.

func (*Desklet) Icons Uses

func (o *Desklet) Icons() []Icon

Icons returns the list of icons in the desklet.

func (*Desklet) IsSticky Uses

func (o *Desklet) IsSticky() bool

IsSticky returns whether the desklet is sticky.

func (*Desklet) LockPosition Uses

func (o *Desklet) LockPosition(b bool)

LockPosition sets the locked position state.

func (*Desklet) PositionLocked Uses

func (o *Desklet) PositionLocked() bool

PositionLocked gets the locked position state.

func (*Desklet) RemoveIcons Uses

func (o *Desklet) RemoveIcons()

RemoveIcons removes icons from the desklet.

func (*Desklet) SetRendererByName Uses

func (o *Desklet) SetRendererByName(name string)

SetRendererByName sets the desklet renderer.

func (*Desklet) SetRendererByNameData Uses

func (o *Desklet) SetRendererByNameData(name string, unk1, unk2 bool)

SetRendererByNameData sets the desklet renderer with TODO usage.

func (*Desklet) SetSticky Uses

func (o *Desklet) SetSticky(b bool)

SetSticky sets the desklet sticky state.

func (*Desklet) SetVisibility Uses

func (o *Desklet) SetVisibility(vis cdtype.DeskletVisibility, save bool)

SetVisibility sets the desklet visibility. Can save to conf file.

func (*Desklet) ToNative Uses

func (o *Desklet) ToNative() unsafe.Pointer

ToNative returns the pointer to the native object.

func (*Desklet) Visibility Uses

func (o *Desklet) Visibility() cdtype.DeskletVisibility

Visibility gets the desklet visibility state.

type DialogDecorator Uses

type DialogDecorator struct {
    Ptr *C.CairoDialogDecorator

DialogDecorator defines a dock dialog decorator.

func NewDialogDecoratorFromNative Uses

func NewDialogDecoratorFromNative(p unsafe.Pointer) *DialogDecorator

NewDialogDecoratorFromNative wraps a dock dialog decorator from C pointer.

func (*DialogDecorator) GetDisplayedName Uses

func (dr *DialogDecorator) GetDisplayedName() string

GetDisplayedName returns the dialog decorator displayed name.

type IObject Uses

type IObject interface {
    ToNative() unsafe.Pointer

IObject represents a basic dock object.

type Icon Uses

type Icon interface {

    // ToNative returns the pointer to the native object.
    ToNative() unsafe.Pointer

    // DefaultNameIcon returns improved name and image for the icon if possible.
    DefaultNameIcon() (name, img string)
    HasClass() bool
    GetClass() desktopclass.Info
    GetName() string
    GetInitialName() string
    GetFileName() string
    GetDesktopFileName() string
    GetParentDockName() string
    GetCommand() string
    GetContainer() *Container

    // ConfigPath gives the full path to the icon config file.
    ConfigPath() string
    GetIgnoreQuickList() bool

    X() float64
    Y() float64
    DrawX() float64
    DrawY() float64
    Width() float64
    Height() float64
    RequestedWidth() int
    RequestedHeight() int
    RequestedDisplayWidth() int
    RequestedDisplayHeight() int
    IsPointed() bool
    SetPointed(val bool)
    SetWidth(val float64)

    SetHeight(val float64)
    SetScale(val float64)
    InsertRemoveFactor() float64
    Scale() float64
    XAtRest() float64
    SetX(f float64)
    SetY(f float64)
    SetDrawX(f float64)
    SetDrawY(f float64)
    SetXAtRest(f float64)
    SetAllocatedSize(w, h int)
    SetWidthFactor(f float64)
    SetHeightFactor(f float64)
    SetOrientation(f float64)
    SetAlpha(f float64)
    Order() float64
    IconExtent() (int, int)
    IsApplet() bool

    // IsAppli returns whether the icon manages an application. CAIRO_DOCK_IS_APPLI
    IsAppli() bool

    // IsClassIcon returns whether the icon .
    IsClassIcon() bool

    IsDetachableApplet() bool

    // IsMultiAppli returns whether the icon manages multiple applications. CAIRO_DOCK_IS_MULTI_APPLI
    IsMultiAppli() bool

    // IsTaskbar returns whether the icon belongs to the taskbar or not.
    IsTaskbar() bool
    IsSeparator() bool
    IsSeparatorAuto() bool
    IsLauncher() bool

    WriteContainerNameInConfFile(newdock string)
    ModuleInstance() *ModuleInstance
    GetSubDock() *CairoDock

    // SubDockIsVisible returns whether the subdock is visible or not.
    SubDockIsVisible() bool

    // LaunchCommand starts the command associated with the icon.
    LaunchCommand(log cdtype.Logger, args ...string) bool

    // ShowSubdock shows the icon subdock.
    ShowSubdock(parentDock *CairoDock)

    // DesktopPresentClass can use scale applet to show class windows.
    DesktopPresentClass() bool


    IsDemandingAttention() bool

    RequestAttention(animation string, nbRounds int)


    ClassIsInhibited() bool

    InhibiteClass(class string)


    Window() cdglobal.Window

    // GetInhibitor returns the icon that inhibits the current one (has registered the class).
    GetInhibitor(b bool) Icon

    RemoveIconsFromSubdock(dest *CairoDock)

    // TODO: may have to move.
    SubDockIcons() []Icon

    // SetLabel sets the label of an icon.
    // If it has a sub-dock, it is renamed (the name is possibly altered to stay unique).
    // The label buffer is updated too.
    SetLabel(str string)

    // SetQuickInfo sets the quick-info of an icon.
    // This is a small text (a few characters) that is superimposed on the icon.
    SetQuickInfo(str string)

    SetIcon(str string) error

    AddNewDataRenderer(attr DataRendererAttributer)

    AddDataRendererWithText(attr DataRendererAttributer, dataRendererText DataRendererTextFunc)

    Render(values ...float64) error

    DataRendererTextFuncPercent(values ...float64) []string


    // AddOverlayFromImage adds an overlay on the icon.
    AddOverlayFromImage(iconPath string, position cdtype.EmblemPosition)

    // RemoveOverlayAtPosition removes an overlay on the icon.
    RemoveOverlayAtPosition(position cdtype.EmblemPosition)

    RequestAnimation(animation string, rounds int)


    // MoveAfterIcon moves the icon position after the given icon.
    MoveAfterIcon(container *CairoDock, target Icon)

    // CallbackActionWindow returns a func to use as gtk callback.
    // On event, it will test if the icon still has a valid window and launch the
    // provided action on this window.
    CallbackActionWindow(call func(cdglobal.Window)) func()

    // CallbackActionSubWindows is the same as CallbackActionWindow but launch the
    // action on all subdock windows.
    CallbackActionSubWindows(call func(cdglobal.Window)) func()

    CallbackActionWindowToggle(call func(cdglobal.Window, bool), getvalue func(cdglobal.Window) bool) func()

    GetPrevNextClassMateIcon(next bool) Icon

Icon defines the dock icon interface.

func CreateDummyLauncher Uses

func CreateDummyLauncher(name, iconPath, command, quickinfo string, order float64) Icon

CreateDummyLauncher creates an empty icon.

func GetAppliIcon Uses

func GetAppliIcon(win cdglobal.Window) Icon

GetAppliIcon returns the icon managing the window.

func IconsGetAnyWithoutDialog Uses

func IconsGetAnyWithoutDialog() Icon

IconsGetAnyWithoutDialog finds an icon usable to display a dialog.

func LauncherAddNew Uses

func LauncherAddNew(uri string, dock *CairoDock, order float64) Icon

LauncherAddNew adds a new launcher to the dock.

func NewIconFromNative Uses

func NewIconFromNative(p unsafe.Pointer) Icon

NewIconFromNative wraps a gldi icon from C pointer.

func SeparatorIconAddNew Uses

func SeparatorIconAddNew(dock *CairoDock, order float64) Icon

SeparatorIconAddNew adds a separator to the dock.

func StackIconAddNew Uses

func StackIconAddNew(dock *CairoDock, order float64) Icon

StackIconAddNew adds a stack icon to the dock (subdock).

type Manager Uses

type Manager struct {
    Ptr *C.GldiManager

Manager defines a dock manager.

func ManagerGet Uses

func ManagerGet(name string) *Manager

ManagerGet gets the manager with the given name.

func NewManagerFromNative Uses

func NewManagerFromNative(p unsafe.Pointer) *Manager

NewManagerFromNative wraps a dock manager from C pointer.

type Module Uses

type Module struct {
    Ptr *C.GldiModule

Module defines a gldi module.

func ModuleGet Uses

func ModuleGet(name string) *Module

ModuleGet gets the module for the given name.

func NewModuleFromNative Uses

func NewModuleFromNative(p unsafe.Pointer) *Module

NewModuleFromNative wraps a gldi module from C pointer.

func (*Module) Activate Uses

func (m *Module) Activate()

Activate activates the module.

func (*Module) AddInstance Uses

func (m *Module) AddInstance()

AddInstance creates a new instance for the module.

func (*Module) ConfFileUpgrade Uses

func (m *Module) ConfFileUpgrade() []string

ConfFileUpgrade upgrades the config file for active instances of the module. The file is renewed from default, and current values are reapplied.

func (*Module) Deactivate Uses

func (m *Module) Deactivate()

Deactivate deactivates the module.

func (*Module) InstancesList Uses

func (m *Module) InstancesList() (list []*ModuleInstance)

InstancesList returns the list of active instances for the module.

func (*Module) IsAutoLoaded Uses

func (m *Module) IsAutoLoaded() bool

IsAutoLoaded returns whether the module was auto loaded or not.

func (*Module) ToNative Uses

func (m *Module) ToNative() unsafe.Pointer

ToNative returns the pointer to the native object.

func (*Module) VisitCard Uses

func (m *Module) VisitCard() *VisitCard

VisitCard returns the module visit card.

type ModuleInstance Uses

type ModuleInstance struct {
    Ptr *C.GldiModuleInstance
    // contains filtered or unexported fields

ModuleInstance defines a gldi module instance.

func NewModuleInstanceFromNative Uses

func NewModuleInstanceFromNative(p unsafe.Pointer) *ModuleInstance

NewModuleInstanceFromNative wraps a gldi module instance from C pointer.

func (*ModuleInstance) Desklet Uses

func (mi *ModuleInstance) Desklet() *Desklet

Desklet returns the instance as a desklet if possible.

func (*ModuleInstance) Detach Uses

func (mi *ModuleInstance) Detach()

Detach detaches the applet from the dock to a desklet.

func (*ModuleInstance) Dock Uses

func (mi *ModuleInstance) Dock() *CairoDock

Dock returns the applet parent dock.

func (*ModuleInstance) GetConfFilePath Uses

func (mi *ModuleInstance) GetConfFilePath() string

GetConfFilePath returns the path to the config file of the instance.

func (*ModuleInstance) Icon Uses

func (mi *ModuleInstance) Icon() Icon

Icon returns the icon holding the instance.

func (*ModuleInstance) InsertIcons Uses

func (mi *ModuleInstance) InsertIcons(clist *C.GList, dockRenderer, deskletRenderer string)

InsertIcons insert subdock icons in the applet.

func (*ModuleInstance) Module Uses

func (mi *ModuleInstance) Module() *Module

Module returns the module for the instance.

func (*ModuleInstance) NewShortkey Uses

func (mi *ModuleInstance) NewShortkey(group, key, desc, shortkey string, call func(string)) cdglobal.Shortkeyer

NewShortkey is a helper to create a shortkey related to a module instance.

func (*ModuleInstance) PopupAboutApplet Uses

func (mi *ModuleInstance) PopupAboutApplet()

PopupAboutApplet opens the applet info dialog.

func (*ModuleInstance) PrepareNewIcons Uses

func (mi *ModuleInstance) PrepareNewIcons(fields []string) (map[string]Icon, *C.GList)

PrepareNewIcons prepares icons to add in the subdock.

func (*ModuleInstance) RemoveAllIcons Uses

func (mi *ModuleInstance) RemoveAllIcons()

RemoveAllIcons removes all subdock icons in the applet.

func (*ModuleInstance) ToNative Uses

func (mi *ModuleInstance) ToNative() unsafe.Pointer

ToNative returns the pointer to the native object.

type RenderingMethod Uses

type RenderingMethod int

RenderingMethod represents a screen display backend.

const (
    RenderingDefault RenderingMethod = C.GLDI_DEFAULT
    RenderingOpenGL  RenderingMethod = C.GLDI_OPENGL
    RenderingCairo   RenderingMethod = C.GLDI_CAIRO

Screen display backends.

type VisitCard Uses

type VisitCard struct {
    Ptr *C.GldiVisitCard

VisitCard defines a dock visit card.

func NewVisitCardFromNative Uses

func NewVisitCardFromNative(p unsafe.Pointer) *VisitCard

NewVisitCardFromNative wraps a dock visit card from C pointer.

func NewVisitCardFromPackage Uses

func NewVisitCardFromPackage(pack *packages.AppletPackage) *VisitCard

NewVisitCardFromPackage wraps a dock visit card from an applet package.

func (*VisitCard) GetAuthor Uses

func (vc *VisitCard) GetAuthor() string

GetAuthor returns the module author name.

func (*VisitCard) GetCategory Uses

func (vc *VisitCard) GetCategory() cdtype.CategoryType

GetCategory returns the module category.

func (*VisitCard) GetConfFileName Uses

func (vc *VisitCard) GetConfFileName() string

GetConfFileName returns the module container file name.

func (*VisitCard) GetContainerType Uses

func (vc *VisitCard) GetContainerType() int

GetContainerType returns the module icon file path.

func (*VisitCard) GetDescription Uses

func (vc *VisitCard) GetDescription() string

GetDescription returns the module description text translated.

func (*VisitCard) GetGettextDomain Uses

func (vc *VisitCard) GetGettextDomain() string

GetGettextDomain returns the module gettext domain.

func (*VisitCard) GetIconFilePath Uses

func (vc *VisitCard) GetIconFilePath() string

GetIconFilePath returns the module icon file path.

func (*VisitCard) GetModuleName Uses

func (vc *VisitCard) GetModuleName() string

GetModuleName returns the module name (real one)

func (*VisitCard) GetModuleVersion Uses

func (vc *VisitCard) GetModuleVersion() string

GetModuleVersion returns the module version.

func (*VisitCard) GetName Uses

func (vc *VisitCard) GetName() string

GetName returns the module name used as identifier.

func (*VisitCard) GetPreviewFilePath Uses

func (vc *VisitCard) GetPreviewFilePath() string

GetPreviewFilePath returns the module preview file path.

func (*VisitCard) GetShareDataDir Uses

func (vc *VisitCard) GetShareDataDir() string

GetShareDataDir returns the module share data dir.

func (*VisitCard) GetTitle Uses

func (vc *VisitCard) GetTitle() string

GetTitle returns the module name translated (as seen by the user).

func (*VisitCard) IsMultiInstance Uses

func (vc *VisitCard) IsMultiInstance() bool

IsMultiInstance returns whether the module can be activated multiple times or not.


appgldiPackage appgldi implements the dock applet API for go internal applets.
backendguiPackage backendgui provides a GUI interface to interact with the dock GUI.
backendmenuPackage backendmenu provides menu events and widgets to build the menu.
confdataPackage confdata provides a data source for the config, based on the gldi backend.
currentPackage current provides access to the dock current theme variables.
desktopclassPackage desktopclass defines a desktop class informations source.
desktopsPackage desktops manages and get desktop and screens info.
dialogPackage dialog provides access to gldi dialogs.
globalsPackage globals provides access to the dock global variables.
mgrgldiPackage mgrgldi manages go applets as internal applets.
notifPackage notif registers dock notifications.
shortkeysPackage shortkeys manages keyboard shortkeys.
windowPackage window manages desktop windows.

Package gldi imports 21 packages (graph) and is imported by 13 packages. Updated 2017-10-02. Refresh now. Tools for package owners.