|
Cairo-Dock 2.4.0~1
|
Data Structures | |
| struct | _CairoDockGuiBackend |
| Definition of the GUI interface for modules. More... | |
Defines | |
| #define | cairo_dock_reload_current_module_widget(pModuleInstance) |
| #define | cairo_dock_build_generic_gui(cConfFilePath, cGettextDomain, cTitle, iWidth, iHeight, pAction, pUserData, pFreeUserData) |
Typedefs | |
| typedef gboolean(* | CairoDockApplyConfigFunc )(gpointer data) |
| Definition of the callback called when the user apply the config panel. | |
Functions | |
| CairoDockGroupKeyWidget * | cairo_dock_get_group_key_widget_from_name (CairoDockModuleInstance *pModuleInstance, const gchar *cGroupName, const gchar *cKeyName) |
| GtkWidget * | cairo_dock_get_widget_from_name (CairoDockModuleInstance *pModuleInstance, const gchar *cGroupName, const gchar *cKeyName) |
| void | cairo_dock_set_status_message (GtkWidget *pWindow, const gchar *cMessage) |
| void | cairo_dock_set_status_message_printf (GtkWidget *pWindow, const gchar *cFormat,...) G_GNUC_PRINTF(2 |
| void GtkWidget * | cairo_dock_build_generic_gui_window (const gchar *cTitle, int iWidth, int iHeight, CairoDockApplyConfigFunc pAction, gpointer pUserData, GFreeFunc pFreeUserData) |
| void | cairo_dock_reload_generic_gui (GtkWidget *pWindow) |
This class provides useful functions to build config panels from keyfiles.
GUIs are built from a .conf file; .conf files are normal group/key files, but with some special indications in the comments. Each key will be represented by a pre-defined widget, that is defined by the first caracter of its comment. The comment also contains a description of the key, and an optionnal tooltip. See cairo-dock-gui-factory.h for the list of pre-defined widgets and a short explanation on how to use them inside a conf file. The file 'cairo-dock.conf' can be an useful example.
The class defines the interface that a backend to the main GUI of Cairo-Dock should implement. It also provides a useful function to easily build a window from a conf file : cairo_dock_build_generic_gui
| #define cairo_dock_reload_current_module_widget | ( | pModuleInstance | ) |
Reload the widget of a given module instance if it is currently opened (the current page is displayed). This is useful if the module has modified its conf file and wishes to display the changes.
| pInstance | an instance of a module. |
| #define cairo_dock_build_generic_gui | ( | cConfFilePath, | |
| cGettextDomain, | |||
| cTitle, | |||
| iWidth, | |||
| iHeight, | |||
| pAction, | |||
| pUserData, | |||
| pFreeUserData | |||
| ) |
Load a conf file into a generic window, that contains 2 buttons apply and quit, and a statusbar. If no callback is provided, the window is blocking, until the user press one of the button; in this case, TRUE is returned if ok was pressed.
| cConfFilePath | conf file to load into the window. |
| cGettextDomain | translation domain. |
| cTitle | title to set to the window. |
| iWidth | width of the window. |
| iHeight | height of the window. |
| pAction | callback to be called when the apply button is pressed, or NULL. |
| pUserData | data passed to the previous callback, or NULL. |
| pFreeUserData | callback called when the window is destroyed, to free the previous data, or NULL. |
| CairoDockGroupKeyWidget* cairo_dock_get_group_key_widget_from_name | ( | CairoDockModuleInstance * | pModuleInstance, |
| const gchar * | cGroupName, | ||
| const gchar * | cKeyName | ||
| ) |
Retrieve the group-key widget in the current config panel, corresponding to the (group,key) pair in its conf file.
| cGroupName | name of the group in the conf file. |
| cKeyName | name of the key in the conf file. |
| GtkWidget* cairo_dock_get_widget_from_name | ( | CairoDockModuleInstance * | pModuleInstance, |
| const gchar * | cGroupName, | ||
| const gchar * | cKeyName | ||
| ) |
A mere wrapper around the previous function, that returns directly the GTK widget corresponding to the (group,key). Note that empty widgets will return NULL, so you can't you can't distinguish between an empty widget and an inexisant widget.
| cGroupName | name of the group in the conf file. |
| cKeyName | name of the key in the conf file. |
| void cairo_dock_set_status_message | ( | GtkWidget * | pWindow, |
| const gchar * | cMessage | ||
| ) |
Display a message on a given window that has a status-bar. If no window is provided, the current config panel will be used.
| pWindow | window where the message should be displayed, or NULL to target the config panel. |
| cMessage | the message. |
| void cairo_dock_set_status_message_printf | ( | GtkWidget * | pWindow, |
| const gchar * | cFormat, | ||
| ... | |||
| ) |
Display a message on a given window that has a status-bar. If no window is provided, the current config panel will be used.
| pWindow | window where the message should be displayed, or NULL to target the config panel. |
| cFormat | the message, in a printf-like format |
| ... | arguments of the format. |
| void GtkWidget* cairo_dock_build_generic_gui_window | ( | const gchar * | cTitle, |
| int | iWidth, | ||
| int | iHeight, | ||
| CairoDockApplyConfigFunc | pAction, | ||
| gpointer | pUserData, | ||
| GFreeFunc | pFreeUserData | ||
| ) |
Build a generic GUI window, that contains 2 buttons apply and quit, and a statusbar.
| cTitle | title to set to the window. |
| iWidth | width of the window. |
| iHeight | height of the window. |
| pAction | callback to be called when the apply button is pressed, or NULL. |
| pUserData | data passed to the previous callback, or NULL. |
| pFreeUserData | callback called when the window is destroyed, to free the previous data, or NULL. |
| void cairo_dock_reload_generic_gui | ( | GtkWidget * | pWindow | ) |
Reload a generic window built upon a conf file, by parsing again the conf file.
| pWindow | the window. |