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/>.
21
#ifndef __CAIRO_DOCK_MANAGER__
22
#define __CAIRO_DOCK_MANAGER__
26
#include "cairo-dock-struct.h"
27
#include "cairo-dock-icons.h"
28
#include "cairo-dock-dock-factory.h"
33
*@file cairo-dock-dock-manager.h This class manages all the Docks.
34
* Each Dock has a name that is unique. A Dock can be a sub-dock or a root-dock, whether there exists an icon that points on it or not, but there is no fundamental difference between both.
37
void cairo_dock_initialize_dock_manager (void);
39
CairoDock *cairo_dock_register_dock (const gchar *cDockName, CairoDock *pDock);
41
void cairo_dock_unregister_dock (const gchar *cDockName);
43
void cairo_dock_reset_docks_table (void);
46
/** Search the name of a Dock. It does a linear search in the table of Docks.
47
* @param pDock the dock.
48
* @return the name of the dock, or NULL if not found.
50
const gchar *cairo_dock_search_dock_name (CairoDock *pDock);
52
/** Search a Dock from a given name. It does a fast search in the table of Docks.
53
* @param cDockName the name of the dock.
54
* @return the dock that has been registerd under this name, or NULL if none exists.
56
CairoDock *cairo_dock_search_dock_from_name (const gchar *cDockName);
58
/** Search an icon pointing on a dock. If several icons point on it, the first one will be returned.
59
* @param pDock the dock.
60
* @param pParentDock if not NULL, this will be filled with the dock containing the icon.
61
* @return the icon pointing on the dock.
63
Icon *cairo_dock_search_icon_pointing_on_dock (CairoDock *pDock, CairoDock **pParentDock);
66
void cairo_dock_search_max_decorations_size (int *iWidth, int *iHeight);
68
/** Recursively hides all the parent docks of a sub-dock.
69
*@param pDock the (sub)dock.
71
void cairo_dock_hide_parent_dock (CairoDock *pDock);
73
/** Recursively hides all the sub-docks of a given dock.
74
*@param pDock the dock.
76
gboolean cairo_dock_hide_child_docks (CairoDock *pDock);
78
/** (Re)load all buffers of all icons in all docks.
79
*@param bReloadAppletsToo TRUE to reload applet icons too.
81
void cairo_dock_reload_buffers_in_all_docks (gboolean bReloadAppletsToo);
83
void cairo_dock_draw_subdock_icons (void);
85
CairoDock *cairo_dock_alter_dock_name (const gchar *cDockName, CairoDock *pDock, const gchar *cNewName);
87
/** Rename a dock. Update the container's name of all of its icons.
88
*@param cDockName name of the dock.
89
*@param pDock the dock (optional).
90
*@param cNewName the new name.
92
void cairo_dock_rename_dock (const gchar *cDockName, CairoDock *pDock, const gchar *cNewName);
94
void cairo_dock_reset_all_views (void);
95
void cairo_dock_set_all_views_to_default (int iDockType);
98
/* Ecrit les ecarts en x et en y d'un dock racine dans son fichier de conf.
99
*@param pDock the dock.
101
void cairo_dock_write_root_dock_gaps (CairoDock *pDock);
103
/* Recupere le positionnement complet d'un dock racine a partir de son fichier de conf.
104
*@param cDockName nom du dock.
105
*@param pDock the dock.
106
*@return TRUE si la position a ete mise a jour.
108
gboolean cairo_dock_get_root_dock_position (const gchar *cDockName, CairoDock *pDock);
111
* Supprime le fichier de conf d'un dock racine.
112
*@param cDockName le nom du dock.
114
void cairo_dock_remove_root_dock_config (const gchar *cDockName);
116
void cairo_dock_redraw_root_docks (gboolean bExceptMainDock);
118
void cairo_dock_reposition_root_docks (gboolean bExceptMainDock);
121
void cairo_dock_activate_temporary_auto_hide (void);
122
void cairo_dock_quick_hide_all_docks (void);
123
void cairo_dock_deactivate_temporary_auto_hide (void);
124
void cairo_dock_stop_quick_hide (void);
125
void cairo_dock_allow_entrance (CairoDock *pDock);
126
void cairo_dock_disable_entrance (CairoDock *pDock);
127
gboolean cairo_dock_entrance_is_allowed (CairoDock *pDock);
128
gboolean cairo_dock_quick_hide_is_activated (void);
131
void cairo_dock_synchronize_one_sub_dock_position (CairoDock *pSubDock, CairoDock *pDock, gboolean bReloadBuffersIfNecessary);
132
void cairo_dock_synchronize_sub_docks_position (CairoDock *pDock, gboolean bReloadBuffersIfNecessary);
134
void cairo_dock_start_polling_screen_edge (CairoDock *pMainDock);
135
void cairo_dock_stop_polling_screen_edge (void);
136
void cairo_dock_pop_up_root_docks_on_screen_edge (CairoDockPositionType iScreenBorder);
137
void cairo_dock_set_docks_on_top_layer (gboolean bRootDocksOnly);
139
void cairo_dock_reserve_space_for_all_root_docks (gboolean bReserve);
142
// renvoie un nom de dock unique; cPrefix peut etre NULL.
143
gchar *cairo_dock_get_unique_dock_name (const gchar *cPrefix);
144
gboolean cairo_dock_check_unique_subdock_name (Icon *pIcon);
146
/** Execute an action on all icons.
147
*@param pFunction the action.
148
*@param pUserData data passed to the callback.
150
void cairo_dock_foreach_icons (CairoDockForeachIconFunc pFunction, gpointer pUserData);
152
/** Execute an action on all icons being inside a dock.
153
*@param pFunction the action.
154
*@param pUserData data passed to the callback.
156
void cairo_dock_foreach_icons_in_docks (CairoDockForeachIconFunc pFunction, gpointer pUserData);
158
/** Execute an action on all icons being inside a desklet.
159
*@param pFunction the action.
160
*@param pUserData data passed to the callback.
162
void cairo_dock_foreach_icons_in_desklets (CairoDockForeachIconFunc pFunction, gpointer pUserData);
164
/** Execute an action on all docks.
165
*@param pFunction the action.
166
*@param pUserData data passed to the callback.
168
void cairo_dock_foreach_docks (GHFunc pFunction, gpointer pUserData);