Documentation ¶
Overview ¶
Package gldi provides Go bindings for gldi (cairo-dock). Supports version 3.4
Index ¶
- Constants
- Variables
- func CIntPointer(i int) C.gpointer
- func CanSetOnWidgetLayer() bool
- func ConfFileNeedUpdate(kf *keyfile.KeyFile, version string) bool
- func ConfFileUpgrade(current, original string, updateKeys bool) error
- func CurrentThemeExport(themeName string, saveBehaviour, saveLaunchers bool) error
- func CurrentThemeImport(themeName string, useBehaviour, useLaunchers bool) error
- func CurrentThemeLoad()
- func CurrentThemeNeedSave() bool
- func CurrentThemePackage(themeName, dirPath string) error
- func DbusGThreadInit()
- func DisableContainersOpacity()
- func DockAddConfFile() string
- func DockIsLoading() bool
- func EmitSignalDropData(container *Container, data string, icon Icon, order float64)
- func FMForceDeskEnv(env cdglobal.DeskEnvironment)
- func ForceDocksAbove()
- func FreeAll()
- func GLBackendDeactivate()
- func GLBackendForceIndirectRendering()
- func GLBackendIsSafe() bool
- func GLBackendIsUsed() bool
- func Init(rendering RenderingMethod)
- func LockGTK()
- func LogForceUseColor()
- func LogSetLevelFromName(verbosity string)
- func ManagerReload(name string, b bool, keyf *keyfile.KeyFile)
- func MenuAddItem(menu *gtk.Menu, label, iconPath string) *gtk.MenuItem
- func MenuAddSubMenu(menu *gtk.Menu, label, iconPath string) (*gtk.Menu, *gtk.MenuItem)
- func ModulesGetNb() int
- func ModulesNewFromDirectory(dir string) error
- func ObjectDelete(obj IObject)
- func ObjectIsDock(obj IObject) bool
- func ObjectIsManagerChild(obj IObject, ptr *C.GldiObjectManager) bool
- func ObjectNotify(container *Container, notif int, icon Icon, dock *CairoDock, ...)
- func ObjectReload(obj IObject)
- func ObjectUnref(obj IObject)
- func QuickHideAllDocks()
- func SetContainersNonSticky()
- func SetPaths(dataDir, extra, themes, current, shareTheme, distantTheme, serverTheme string)
- func StyleColorsFreeze()
- func XMLCleanupParser()
- type Animation
- type CairoDeskletDecoration
- type CairoDock
- func (o *CairoDock) Align() float64
- func (o *CairoDock) BackgroundBufferTexture() uint32
- func (o *CairoDock) CalculateMagnitude() float64
- func (o *CairoDock) CheckCanDropLinear()
- func (o *CairoDock) CheckIfMouseInsideLinear()
- func (o *CairoDock) Container() *Container
- func (o *CairoDock) DecorationsHeight() int
- func (o *CairoDock) FirstDrawnElementLinear() []Icon
- func (o *CairoDock) GetCurrentWidthLinear() float64
- func (o *CairoDock) GetDockName() string
- func (o *CairoDock) GetNextIcon(icon Icon) Icon
- func (o *CairoDock) GetPointedIcon() Icon
- func (o *CairoDock) GetPreviousIcon(icon Icon) Icon
- func (o *CairoDock) GetReadableName() string
- func (o *CairoDock) GetRefCount() int
- func (o *CairoDock) GlobalIconSize() bool
- func (o *CairoDock) HasShapeBitmap() bool
- func (o *CairoDock) IconSize() int
- func (o *CairoDock) Icons() (list []Icon)
- func (o *CairoDock) IsAutoHide() bool
- func (o *CairoDock) IsExtendedDock() bool
- func (o *CairoDock) IsMainDock() bool
- func (o *CairoDock) MaxDockHeight() int
- func (o *CairoDock) MaxDockWidth() int
- func (o *CairoDock) MaxIconHeight() int
- func (o *CairoDock) MinDockHeight() int
- func (o *CairoDock) MinDockWidth() int
- func (o *CairoDock) ScreenNumber() int
- func (o *CairoDock) ScreenWidth() int
- func (o *CairoDock) SearchIconPointingOnDock(unknown interface{}) Icon
- func (o *CairoDock) SetActiveHeight(val int)
- func (o *CairoDock) SetActiveWidth(val int)
- func (o *CairoDock) SetDecorationsHeight(i int)
- func (o *CairoDock) SetDecorationsWidth(val int)
- func (o *CairoDock) SetFlatDockWidth(val float64)
- func (o *CairoDock) SetMagnitudeMax(val float64)
- func (o *CairoDock) SetMaxDockHeight(val int)
- func (o *CairoDock) SetMaxDockWidth(val int)
- func (o *CairoDock) SetMinDockHeight(val int)
- func (o *CairoDock) SetMinDockWidth(val int)
- func (o *CairoDock) ShapeBitmapSubstractRectangleInt(x, y, w, h int)
- func (o *CairoDock) ToContainer() *Container
- func (o *CairoDock) ToNative() unsafe.Pointer
- type CairoDockRenderer
- type Container
- func (o *Container) Height() int
- func (o *Container) IsDesklet() bool
- func (o *Container) IsDialog() bool
- func (o *Container) IsDirectionUp() bool
- func (o *Container) IsFlyingContainer() bool
- func (o *Container) IsHorizontal() bool
- func (o *Container) MouseX() int
- func (o *Container) MouseY() int
- func (o *Container) Ratio() float64
- func (o *Container) ScreenBorder() cdtype.ContainerPosition
- func (o *Container) ToCairoDock() *CairoDock
- func (o *Container) ToDesklet() *Desklet
- func (o *Container) ToNative() unsafe.Pointer
- func (o *Container) Type() cdtype.ContainerType
- func (o *Container) Width() int
- func (o *Container) WindowPositionX() int
- func (o *Container) WindowPositionY() int
- type DataRendererAttributeCommon
- type DataRendererAttributeGauge
- type DataRendererAttributeGraph
- type DataRendererAttributeProgressBar
- type DataRendererAttributer
- type DataRendererTextFunc
- type Desklet
- func (o *Desklet) GetIcon() Icon
- func (o *Desklet) HasIcons() bool
- func (o *Desklet) Icons() []Icon
- func (o *Desklet) IsSticky() bool
- func (o *Desklet) LockPosition(b bool)
- func (o *Desklet) PositionLocked() bool
- func (o *Desklet) RemoveIcons()
- func (o *Desklet) SetRendererByName(name string)
- func (o *Desklet) SetRendererByNameData(name string, unk1, unk2 bool)
- func (o *Desklet) SetSticky(b bool)
- func (o *Desklet) SetVisibility(vis cdtype.DeskletVisibility, save bool)
- func (o *Desklet) ToNative() unsafe.Pointer
- func (o *Desklet) Visibility() cdtype.DeskletVisibility
- type DialogDecorator
- type IObject
- type Icon
- func CreateDummyLauncher(name, iconPath, command, quickinfo string, order float64) Icon
- func GetAppliIcon(win cdglobal.Window) Icon
- func IconsGetAnyWithoutDialog() Icon
- func LauncherAddNew(uri string, dock *CairoDock, order float64) Icon
- func NewIconFromNative(p unsafe.Pointer) Icon
- func SeparatorIconAddNew(dock *CairoDock, order float64) Icon
- func StackIconAddNew(dock *CairoDock, order float64) Icon
- type Manager
- type Module
- func (m *Module) Activate()
- func (m *Module) AddInstance()
- func (m *Module) ConfFileUpgrade() []string
- func (m *Module) Deactivate()
- func (m *Module) InstancesList() (list []*ModuleInstance)
- func (m *Module) IsAutoLoaded() bool
- func (m *Module) ToNative() unsafe.Pointer
- func (m *Module) VisitCard() *VisitCard
- type ModuleInstance
- func (mi *ModuleInstance) Desklet() *Desklet
- func (mi *ModuleInstance) Detach()
- func (mi *ModuleInstance) Dock() *CairoDock
- func (mi *ModuleInstance) GetConfFilePath() string
- func (mi *ModuleInstance) Icon() Icon
- func (mi *ModuleInstance) InsertIcons(clist *C.GList, dockRenderer, deskletRenderer string)
- func (mi *ModuleInstance) Module() *Module
- func (mi *ModuleInstance) NewShortkey(group, key, desc, shortkey string, call func(string)) cdglobal.Shortkeyer
- func (mi *ModuleInstance) PopupAboutApplet()
- func (mi *ModuleInstance) PrepareNewIcons(fields []string) (map[string]Icon, *C.GList)
- func (mi *ModuleInstance) RemoveAllIcons()
- func (mi *ModuleInstance) ToNative() unsafe.Pointer
- type RenderingMethod
- type VisitCard
- func (vc *VisitCard) GetAuthor() string
- func (vc *VisitCard) GetCategory() cdtype.CategoryType
- func (vc *VisitCard) GetConfFileName() string
- func (vc *VisitCard) GetContainerType() int
- func (vc *VisitCard) GetDescription() string
- func (vc *VisitCard) GetGettextDomain() string
- func (vc *VisitCard) GetIconFilePath() string
- func (vc *VisitCard) GetModuleName() string
- func (vc *VisitCard) GetModuleVersion() string
- func (vc *VisitCard) GetName() string
- func (vc *VisitCard) GetPreviewFilePath() string
- func (vc *VisitCard) GetShareDataDir() string
- func (vc *VisitCard) GetTitle() string
- func (vc *VisitCard) IsMultiInstance() bool
Constants ¶
const IconLastOrder = -1e9 // CAIRO_DOCK_LAST_ORDER
IconLastOrder defines the last icon position ??
Variables ¶
var Crypto cdglobal.Crypto = crypto{}
Crypto gives access to the dock string crypto.
Functions ¶
func CIntPointer ¶
CIntPointer returns a C gpointer to an int value.
func CanSetOnWidgetLayer ¶
func CanSetOnWidgetLayer() bool
CanSetOnWidgetLayer returns whether desklets can be set on the widget layer.
func ConfFileNeedUpdate ¶
ConfFileNeedUpdate returns whether the config file needs update or not.
func ConfFileUpgrade ¶
ConfFileUpgrade upgrades a config file (copy from default and reapply keys).
func CurrentThemeExport ¶
CurrentThemeExport loads the theme in the dock.
func CurrentThemeImport ¶
CurrentThemeImport loads the theme in the dock.
func CurrentThemeNeedSave ¶
func CurrentThemeNeedSave() bool
CurrentThemeNeedSave loads the theme in the dock.
func CurrentThemePackage ¶
CurrentThemePackage creates a package with the current theme of the dock.
func DisableContainersOpacity ¶
func DisableContainersOpacity()
DisableContainersOpacity disables the opacity ability on containers.
func DockAddConfFile ¶
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 ¶
func DockIsLoading() bool
DockIsLoading returns whether the dock is still loading or not.
func EmitSignalDropData ¶
EmitSignalDropData emits the signal on the container.
func FMForceDeskEnv ¶
func FMForceDeskEnv(env cdglobal.DeskEnvironment)
FMForceDeskEnv forces the dock to use the given desktop environment backend.
func ForceDocksAbove ¶
func ForceDocksAbove()
ForceDocksAbove forces all docks to appear on top of other windows.
func GLBackendDeactivate ¶
func GLBackendDeactivate()
GLBackendDeactivate prevents the dock from activating the OpenGL backend.
func GLBackendForceIndirectRendering ¶
func GLBackendForceIndirectRendering()
GLBackendForceIndirectRendering forces the indirect rendering on the OpenGL backend.
func GLBackendIsSafe ¶
func GLBackendIsSafe() bool
GLBackendIsSafe returns whether the OpenGL backend is safely usable or not.
func GLBackendIsUsed ¶
func GLBackendIsUsed() bool
GLBackendIsUsed returns whether the dock use OpenGL backend or not.
func Init ¶
func Init(rendering RenderingMethod)
Init initialises the gldi backend with the rendering method provided.
func LogForceUseColor ¶
func LogForceUseColor()
LogForceUseColor sets the colored output for the C dock debug.
func LogSetLevelFromName ¶
func LogSetLevelFromName(verbosity string)
LogSetLevelFromName sets the C dock debug level.
func ManagerReload ¶
ManagerReload reloads the manager matching the given name.
func MenuAddItem ¶
MenuAddItem adds an item to the menu.
func MenuAddSubMenu ¶
MenuAddSubMenu adds a sub-menu to a given menu.
func ModulesGetNb ¶
func ModulesGetNb() int
ModulesGetNb returns the number of internal modules defined.
func ModulesNewFromDirectory ¶
ModulesNewFromDirectory loads internal modules from the given directory. Use with an empty dir to load from the default directory.
func ObjectIsDock ¶
ObjectIsDock returns whether the given object is a dock or not.
func ObjectIsManagerChild ¶
func ObjectIsManagerChild(obj IObject, ptr *C.GldiObjectManager) bool
ObjectIsManagerChild returns whether the given object is a manager child.
func ObjectNotify ¶
func ObjectNotify(container *Container, notif int, icon Icon, dock *CairoDock, key gdk.ModifierType)
ObjectNotify notifies the given object.
func SetContainersNonSticky ¶
func SetContainersNonSticky()
SetContainersNonSticky sets the non sticky mode for containers.
Types ¶
type Animation ¶
type Animation struct {
Ptr *C.CairoDockAnimationRecord
}
Animation defines a dock animation.
func NewAnimationFromNative ¶
NewAnimationFromNative wraps a dock animation from C pointer.
func (*Animation) GetDisplayedName ¶
GetDisplayedName returns the animation displayed name.
type CairoDeskletDecoration ¶
type CairoDeskletDecoration struct {
Ptr *C.CairoDeskletDecoration
}
CairoDeskletDecoration defines a dock desklet decoration.
func NewCairoDeskletDecorationFromNative ¶
func NewCairoDeskletDecorationFromNative(p unsafe.Pointer) *CairoDeskletDecoration
NewCairoDeskletDecorationFromNative wraps a dock desklet decoration from C pointer.
func (*CairoDeskletDecoration) GetDisplayedName ¶
func (dr *CairoDeskletDecoration) GetDisplayedName() string
GetDisplayedName returns the desklet decoration displayed name.
type CairoDock ¶
CairoDock defines a gldi dock.
func GetAllAvailableDocks ¶
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 NewDockFromNative ¶
NewDockFromNative wraps a gldi dock from C pointer.
func (*CairoDock) BackgroundBufferTexture ¶
BackgroundBufferTexture TODO FIND USAGE.
func (*CairoDock) CalculateMagnitude ¶
CalculateMagnitude calculates the dock magnitude.
func (*CairoDock) CheckCanDropLinear ¶
func (o *CairoDock) CheckCanDropLinear()
CheckCanDropLinear checks if we can drop linear. TODO CHECK USAGE.
func (*CairoDock) CheckIfMouseInsideLinear ¶
func (o *CairoDock) CheckIfMouseInsideLinear()
CheckIfMouseInsideLinear checks if the mouse is inside the linear area.
func (*CairoDock) DecorationsHeight ¶
DecorationsHeight returns the dock decorations height.
func (*CairoDock) FirstDrawnElementLinear ¶
FirstDrawnElementLinear TODO FIND USAGE.
func (*CairoDock) GetCurrentWidthLinear ¶
GetCurrentWidthLinear returns the dock current width linear.
func (*CairoDock) GetDockName ¶
GetDockName returns the key name of the dock.
func (*CairoDock) GetNextIcon ¶
GetNextIcon returns the icon after the given one in the dock.
func (*CairoDock) GetPointedIcon ¶
GetPointedIcon returns the pointed icon (mouse on the icon).
func (*CairoDock) GetPreviousIcon ¶
GetPreviousIcon returns the icon before the given one in the dock.
func (*CairoDock) GetReadableName ¶
GetReadableName returns the readable name of the dock.
func (*CairoDock) GetRefCount ¶
GetRefCount gives the number of icons pointing on the dock. 0 means it is a root dock, >0 a sub-dock.
func (*CairoDock) GlobalIconSize ¶
GlobalIconSize returns the global icon size.
func (*CairoDock) HasShapeBitmap ¶
HasShapeBitmap returns whether the dock has shape bitmap.
func (*CairoDock) IsAutoHide ¶
IsAutoHide returns whether the dock was auto hidden (TODO ensure).
func (*CairoDock) IsExtendedDock ¶
IsExtendedDock returns whether the dock is extended.
func (*CairoDock) IsMainDock ¶
IsMainDock returns whether the dock is a main dock or not.
func (*CairoDock) MaxDockHeight ¶
MaxDockHeight returns the max dock height.
func (*CairoDock) MaxDockWidth ¶
MaxDockWidth returns the max dock width.
func (*CairoDock) MaxIconHeight ¶
MaxIconHeight returns the max icon height.
func (*CairoDock) MinDockHeight ¶
MinDockHeight returns the min dock height.
func (*CairoDock) MinDockWidth ¶
MinDockWidth returns the min dock width.
func (*CairoDock) ScreenNumber ¶
ScreenNumber TODO FIND USAGE.
func (*CairoDock) ScreenWidth ¶
ScreenWidth returns the dock allocated screen width.
cairo_dock_get_max_authorized_dock_width
func (*CairoDock) SearchIconPointingOnDock ¶
SearchIconPointingOnDock TODO FIND USAGE AND COMPLETE.
func (*CairoDock) SetActiveHeight ¶
SetActiveHeight sets the dock active height.
func (*CairoDock) SetActiveWidth ¶
SetActiveWidth sets the dock active width.
func (*CairoDock) SetDecorationsHeight ¶
SetDecorationsHeight sets decorations height.
func (*CairoDock) SetDecorationsWidth ¶
SetDecorationsWidth sets decorations width.
func (*CairoDock) SetFlatDockWidth ¶
SetFlatDockWidth sets the dock flat width.
func (*CairoDock) SetMagnitudeMax ¶
SetMagnitudeMax sets the max dock magnitude.
func (*CairoDock) SetMaxDockHeight ¶
SetMaxDockHeight sets the dock max height.
func (*CairoDock) SetMaxDockWidth ¶
SetMaxDockWidth sets the max dock width.
func (*CairoDock) SetMinDockHeight ¶
SetMinDockHeight sets the dock min height.
func (*CairoDock) SetMinDockWidth ¶
SetMinDockWidth sets the min dock width.
func (*CairoDock) ShapeBitmapSubstractRectangleInt ¶
ShapeBitmapSubstractRectangleInt TODO FIND USAGE
func (*CairoDock) ToContainer ¶
ToContainer returns the dock as a Container object.
type CairoDockRenderer ¶
type CairoDockRenderer struct {
Ptr *C.CairoDockRenderer
}
CairoDockRenderer defines a dock renderer, AKA views.
func NewCairoDockRenderer ¶
func NewCairoDockRenderer(title, readmePath, previewPath string) *CairoDockRenderer
NewCairoDockRenderer creates a new dock renderer.
func NewCairoDockRendererFromNative ¶
func NewCairoDockRendererFromNative(p unsafe.Pointer) *CairoDockRenderer
NewCairoDockRendererFromNative wraps a dock renderer from C pointer.
func (*CairoDockRenderer) GetDisplayedName ¶
func (dr *CairoDockRenderer) GetDisplayedName() string
GetDisplayedName returns the dock renderer displayed name.
func (*CairoDockRenderer) GetPreviewFilePath ¶
func (dr *CairoDockRenderer) GetPreviewFilePath() string
GetPreviewFilePath returns the dock renderer preview file path.
func (*CairoDockRenderer) GetReadmeFilePath ¶
func (dr *CairoDockRenderer) GetReadmeFilePath() string
GetReadmeFilePath returns the dock renderer readme file path.
func (*CairoDockRenderer) Register ¶
func (dr *CairoDockRenderer) Register(name string)
Register registers the dock renderer in the dock.
func (*CairoDockRenderer) ToNative ¶
func (dr *CairoDockRenderer) ToNative() unsafe.Pointer
ToNative returns the pointer to the native object.
type Container ¶
type Container struct {
Ptr *C.GldiContainer
}
Container defines a gldi container.
func NewContainerFromNative ¶
NewContainerFromNative wraps a gldi container from C pointer.
func (*Container) IsDirectionUp ¶
IsDirectionUp returns if the dock is positioned on top or bottom.
func (*Container) IsFlyingContainer ¶
IsFlyingContainer returns whether the container is a flying container or not.
func (*Container) IsHorizontal ¶
IsHorizontal returns if the container orientation is horizontal.
func (*Container) ScreenBorder ¶
func (o *Container) ScreenBorder() cdtype.ContainerPosition
ScreenBorder returns the border of the screen where the dock is attached.
func (*Container) ToCairoDock ¶
ToCairoDock returns the container as a dock if possible.
func (*Container) Type ¶
func (o *Container) Type() cdtype.ContainerType
Type returns the type of container.
func (*Container) WindowPositionX ¶
WindowPositionX TODO usage.
func (*Container) WindowPositionY ¶
WindowPositionY TODO usage.
type DataRendererAttributeCommon ¶
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 ¶
func (o *DataRendererAttributeCommon) Free()
Free frees the renderer object.
type DataRendererAttributeGauge ¶
type DataRendererAttributeGauge struct { DataRendererAttributeCommon Theme string }
DataRendererAttributeGauge defines a gauge data renderer attribute.
func NewDataRendererAttributeGauge ¶
func NewDataRendererAttributeGauge() *DataRendererAttributeGauge
NewDataRendererAttributeGauge creates a gauge data renderer attribute.
func (*DataRendererAttributeGauge) ToAttribute ¶
func (o *DataRendererAttributeGauge) ToAttribute() (*C.CairoDataRendererAttribute, func())
ToAttribute converts the renderer to C attribute.
type DataRendererAttributeGraph ¶
type DataRendererAttributeGraph struct { DataRendererAttributeCommon Type cdtype.RendererGraphType MixGraphs bool HighColor []float64 LowColor []float64 BackGroundColor [4]float64 }
DataRendererAttributeGraph defines a graph data renderer attribute.
func NewDataRendererAttributeGraph ¶
func NewDataRendererAttributeGraph() *DataRendererAttributeGraph
NewDataRendererAttributeGraph creates a graph data renderer attribute.
func (*DataRendererAttributeGraph) ToAttribute ¶
func (o *DataRendererAttributeGraph) ToAttribute() (*C.CairoDataRendererAttribute, func())
ToAttribute converts the renderer to C attribute.
type DataRendererAttributeProgressBar ¶
type DataRendererAttributeProgressBar struct {
DataRendererAttributeCommon
}
DataRendererAttributeProgressBar defines a progress bar data renderer attribute.
func NewDataRendererAttributeProgressBar ¶
func NewDataRendererAttributeProgressBar() *DataRendererAttributeProgressBar
NewDataRendererAttributeProgressBar creates a progress bar data renderer attribute.
func (*DataRendererAttributeProgressBar) ToAttribute ¶
func (o *DataRendererAttributeProgressBar) ToAttribute() (*C.CairoDataRendererAttribute, func())
ToAttribute converts the renderer to C attribute.
type DataRendererAttributer ¶
type DataRendererAttributer interface {
ToAttribute() (attr *C.CairoDataRendererAttribute, free func())
}
DataRendererAttributer defines the data renderer attribute interface.
type DataRendererTextFunc ¶
DataRendererTextFunc defines a data renderer text format func.
type Desklet ¶
type Desklet struct {
Ptr *C.CairoDesklet
}
Desklet defines a gldi desklet.
func NewDeskletFromNative ¶
NewDeskletFromNative wraps a gldi desklet from C pointer.
func (*Desklet) LockPosition ¶
LockPosition sets the locked position state.
func (*Desklet) PositionLocked ¶
PositionLocked gets the locked position state.
func (*Desklet) RemoveIcons ¶
func (o *Desklet) RemoveIcons()
RemoveIcons removes icons from the desklet.
func (*Desklet) SetRendererByName ¶
SetRendererByName sets the desklet renderer.
func (*Desklet) SetRendererByNameData ¶
SetRendererByNameData sets the desklet renderer with TODO usage.
func (*Desklet) SetVisibility ¶
func (o *Desklet) SetVisibility(vis cdtype.DeskletVisibility, save bool)
SetVisibility sets the desklet visibility. Can save to conf file.
func (*Desklet) Visibility ¶
func (o *Desklet) Visibility() cdtype.DeskletVisibility
Visibility gets the desklet visibility state.
type DialogDecorator ¶
type DialogDecorator struct {
Ptr *C.CairoDialogDecorator
}
DialogDecorator defines a dock dialog decorator.
func NewDialogDecoratorFromNative ¶
func NewDialogDecoratorFromNative(p unsafe.Pointer) *DialogDecorator
NewDialogDecoratorFromNative wraps a dock dialog decorator from C pointer.
func (*DialogDecorator) GetDisplayedName ¶
func (dr *DialogDecorator) GetDisplayedName() string
GetDisplayedName returns the dialog decorator displayed name.
type Icon ¶
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 . // GLDI_OBJECT_IS_CLASS_ICON / CAIRO_DOCK_ICON_TYPE_IS_CLASS_CONTAINER // 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 IsStackIcon() bool // CAIRO_DOCK_ICON_TYPE_IS_CONTAINER RemoveFromDock() WriteContainerNameInConfFile(newdock string) ModuleInstance() *ModuleInstance GetSubDock() *CairoDock // SubDockIsVisible returns whether the subdock is visible or not. // SubDockIsVisible() bool RemoveSubdockEmpty() // 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 RemoveDialogs() IsDemandingAttention() bool RequestAttention(animation string, nbRounds int) StopAttention() ClassIsInhibited() bool InhibiteClass(class string) DeinhibiteClass() 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 RemoveDataRenderer() // 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) Redraw() // 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 ¶
CreateDummyLauncher creates an empty icon.
func GetAppliIcon ¶
GetAppliIcon returns the icon managing the window.
func IconsGetAnyWithoutDialog ¶
func IconsGetAnyWithoutDialog() Icon
IconsGetAnyWithoutDialog finds an icon usable to display a dialog.
func LauncherAddNew ¶
LauncherAddNew adds a new launcher to the dock.
func NewIconFromNative ¶
NewIconFromNative wraps a gldi icon from C pointer.
func SeparatorIconAddNew ¶
SeparatorIconAddNew adds a separator to the dock.
func StackIconAddNew ¶
StackIconAddNew adds a stack icon to the dock (subdock).
type Manager ¶
type Manager struct {
Ptr *C.GldiManager
}
Manager defines a dock manager.
func ManagerGet ¶
ManagerGet gets the manager with the given name.
func NewManagerFromNative ¶
NewManagerFromNative wraps a dock manager from C pointer.
type Module ¶
type Module struct {
Ptr *C.GldiModule
}
Module defines a gldi module.
func NewModuleFromNative ¶
NewModuleFromNative wraps a gldi module from C pointer.
func (*Module) AddInstance ¶
func (m *Module) AddInstance()
AddInstance creates a new instance for the module.
func (*Module) ConfFileUpgrade ¶
ConfFileUpgrade upgrades the config file for active instances of the module. The file is renewed from default, and current values are reapplied.
func (*Module) InstancesList ¶
func (m *Module) InstancesList() (list []*ModuleInstance)
InstancesList returns the list of active instances for the module.
func (*Module) IsAutoLoaded ¶
IsAutoLoaded returns whether the module was auto loaded or not.
type ModuleInstance ¶
type ModuleInstance struct { Ptr *C.GldiModuleInstance // contains filtered or unexported fields }
ModuleInstance defines a gldi module instance.
func NewModuleInstanceFromNative ¶
func NewModuleInstanceFromNative(p unsafe.Pointer) *ModuleInstance
NewModuleInstanceFromNative wraps a gldi module instance from C pointer.
func (*ModuleInstance) Desklet ¶
func (mi *ModuleInstance) Desklet() *Desklet
Desklet returns the instance as a desklet if possible.
func (*ModuleInstance) Detach ¶
func (mi *ModuleInstance) Detach()
Detach detaches the applet from the dock to a desklet.
func (*ModuleInstance) Dock ¶
func (mi *ModuleInstance) Dock() *CairoDock
Dock returns the applet parent dock.
func (*ModuleInstance) GetConfFilePath ¶
func (mi *ModuleInstance) GetConfFilePath() string
GetConfFilePath returns the path to the config file of the instance.
func (*ModuleInstance) Icon ¶
func (mi *ModuleInstance) Icon() Icon
Icon returns the icon holding the instance.
func (*ModuleInstance) InsertIcons ¶
func (mi *ModuleInstance) InsertIcons(clist *C.GList, dockRenderer, deskletRenderer string)
InsertIcons insert subdock icons in the applet.
func (*ModuleInstance) Module ¶
func (mi *ModuleInstance) Module() *Module
Module returns the module for the instance.
func (*ModuleInstance) NewShortkey ¶
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 ¶
func (mi *ModuleInstance) PopupAboutApplet()
PopupAboutApplet opens the applet info dialog.
func (*ModuleInstance) PrepareNewIcons ¶
PrepareNewIcons prepares icons to add in the subdock.
func (*ModuleInstance) RemoveAllIcons ¶
func (mi *ModuleInstance) RemoveAllIcons()
RemoveAllIcons removes all subdock icons in the applet.
func (*ModuleInstance) ToNative ¶
func (mi *ModuleInstance) ToNative() unsafe.Pointer
ToNative returns the pointer to the native object.
type RenderingMethod ¶
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 ¶
type VisitCard struct {
Ptr *C.GldiVisitCard
}
VisitCard defines a dock visit card.
func NewVisitCardFromNative ¶
NewVisitCardFromNative wraps a dock visit card from C pointer.
func NewVisitCardFromPackage ¶
func NewVisitCardFromPackage(pack *packages.AppletPackage) *VisitCard
NewVisitCardFromPackage wraps a dock visit card from an applet package.
func (*VisitCard) GetCategory ¶
func (vc *VisitCard) GetCategory() cdtype.CategoryType
GetCategory returns the module category.
func (*VisitCard) GetConfFileName ¶
GetConfFileName returns the module container file name.
func (*VisitCard) GetContainerType ¶
GetContainerType returns the module icon file path.
func (*VisitCard) GetDescription ¶
GetDescription returns the module description text translated.
func (*VisitCard) GetGettextDomain ¶
GetGettextDomain returns the module gettext domain.
func (*VisitCard) GetIconFilePath ¶
GetIconFilePath returns the module icon file path.
func (*VisitCard) GetModuleName ¶
GetModuleName returns the module name (real one)
func (*VisitCard) GetModuleVersion ¶
GetModuleVersion returns the module version.
func (*VisitCard) GetPreviewFilePath ¶
GetPreviewFilePath returns the module preview file path.
func (*VisitCard) GetShareDataDir ¶
GetShareDataDir returns the module share data dir.
func (*VisitCard) IsMultiInstance ¶
IsMultiInstance returns whether the module can be activated multiple times or not.
Directories ¶
Path | Synopsis |
---|---|
Package appgldi implements the dock applet API for go internal applets.
|
Package appgldi implements the dock applet API for go internal applets. |
Package backendgui provides a GUI interface to interact with the dock GUI.
|
Package backendgui provides a GUI interface to interact with the dock GUI. |
Package backendmenu provides menu events and widgets to build the menu.
|
Package backendmenu provides menu events and widgets to build the menu. |
Package confdata provides a data source for the config, based on the gldi backend.
|
Package confdata provides a data source for the config, based on the gldi backend. |
Package current provides access to the dock current theme variables.
|
Package current provides access to the dock current theme variables. |
Package desktopclass defines a desktop class informations source.
|
Package desktopclass defines a desktop class informations source. |
Package desktops manages and get desktop and screens info.
|
Package desktops manages and get desktop and screens info. |
Package dialog provides access to gldi dialogs.
|
Package dialog provides access to gldi dialogs. |
Package globals provides access to the dock global variables.
|
Package globals provides access to the dock global variables. |
Package mgrgldi manages go applets as internal applets.
|
Package mgrgldi manages go applets as internal applets. |
Package notif registers dock notifications.
|
Package notif registers dock notifications. |
Package shortkeys manages keyboard shortkeys.
|
Package shortkeys manages keyboard shortkeys. |
Package window manages desktop windows.
|
Package window manages desktop windows. |