2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef __CAIRO_DOCK_GUI_SWITCH__
21
#define __CAIRO_DOCK_GUI_SWITCH__
26
// Definition of the main GUI interface.
27
struct _CairoDockMainGuiBackend {
28
// Show the main config panel, build it if necessary.
29
GtkWidget * (*show_main_gui) (void);
30
// Show the config panel of a given module (internal or external), reload it if it was already opened.
31
void (*show_module_gui) (const gchar *cModuleName);
32
// Show the config panel of a given module instance, reload it if it was already opened. iShowPage is the page that should be displayed in case the module has several pages, -1 means to keep the current page.
33
//void (*show_module_instance_gui) (CairoDockModuleInstance *pModuleInstance, int iShowPage);
34
// close the config panels.
35
void (*close_gui) (void);
36
// update the GUI to mark a module as '(in)active'.
37
void (*update_module_state) (const gchar *cModuleName, gboolean bActive);
38
void (*update_module_instance_container) (CairoDockModuleInstance *pInstance, gboolean bDetached);
39
void (*update_desklet_params) (CairoDesklet *pDesklet);
40
void (*update_desklet_visibility_params) (CairoDesklet *pDesklet);
41
void (*update_modules_list) (void);
42
gboolean bCanManageThemes;
43
const gchar *cDisplayedName;
44
const gchar *cTooltip;
46
typedef struct _CairoDockMainGuiBackend CairoDockMainGuiBackend;
48
// Definition of the icons GUI interface.
49
struct _CairoDockItemsGuiBackend {
50
// Show the config panel on a given icon/container, build or reload it if necessary.
51
GtkWidget * (*show_gui) (Icon *pIcon, CairoContainer *pContainer, CairoDockModuleInstance *pModuleInstance, int iShowPage);
52
// reload the gui and its content, for the case a launcher has changed (image, order, new container, etc).
53
void (*reload_items) (void);
55
typedef struct _CairoDockItemsGuiBackend CairoDockItemsGuiBackend;
58
void cairo_dock_load_user_gui_backend (int iMode);
60
GtkWidget *cairo_dock_make_switch_gui_button (void);
62
gboolean cairo_dock_theme_manager_is_integrated (void);
66
void cairo_dock_gui_trigger_update_desklet_params (CairoDesklet *pDesklet);
68
void cairo_dock_gui_trigger_update_desklet_visibility (CairoDesklet *pDesklet);
70
void cairo_dock_gui_trigger_reload_items (void);
72
void cairo_dock_gui_trigger_update_module_state (const gchar *cModuleName);
74
void cairo_dock_gui_trigger_update_modules_list (void);
76
void cairo_dock_gui_trigger_update_module_container (CairoDockModuleInstance *pInstance, gboolean bIsDetached);
79
void cairo_dock_register_config_gui_backend (CairoDockMainGuiBackend *pBackend);
81
void cairo_dock_register_items_gui_backend (CairoDockItemsGuiBackend *pBackend);
84
GtkWidget *cairo_dock_show_main_gui (void);
86
//void cairo_dock_show_module_instance_gui (CairoDockModuleInstance *pModuleInstance, int iShowPage);
88
void cairo_dock_show_module_gui (const gchar *cModuleName);
90
void cairo_dock_close_gui (void);
92
void cairo_dock_show_items_gui (Icon *pIcon, CairoContainer *pContainer, CairoDockModuleInstance *pModuleInstance, int iShowPage);