Package cdapplet is the Cairo-Dock applet base object, using DBus or Gldi backend.
Start starts an instance of the given applet name.
CDApplet is the base Cairo-Dock applet manager that will handle all your communications with the dock and provide some methods commonly needed by applets.
New creates a new applet manager.
Action returns a manager of launchable actions for applets
Command returns a manager of launchable commands for applets
FileDataDir returns the path to the config root dir (~/.config/cairo-dock).
FileLocation return the full path to a file in the applet data dir.
LoadConfig will try to create and fill the given config struct with data from the configuration file. Log error and crash if something went wrong. Won't do anything if loadConf is false.
Log gives access to the applet logger.
Name returns the applet name as known by the dock. As an external app = dir name.
OnEvent forward the received event to the registered event callback. Return true if the signal was quit applet.
Poller return the applet poller if any.
SetBackend sets the applet backend and connects its OnEvent callback to the OnEvent method provided here.
Before After ------------- ------------- | | | |<==\ | -------| | -------| | | | | | | back | | OnEvent | | | | | end |===/ ------------- -------------
SetBase sets the name, conf and dirs for the applet.
SetConfig sets the applet config pointer and can add actions.
SetDefaults set basic defaults icon settings in one call. Empty fields will be reset, so this is better used in the Init() call.
SetEvents connects events defined by the applet to the dock.
Returns the first init call func.
Translate translates a string in the applet domain.
UpdateConfig opens the applet config file for edition.
You must ensure that Save or Cancel is called, and fast to prevent memory leaks and deadlocks.
|action||Package action provides actions management for applets.|