~cairo-dock-team/ubuntu/oneiric/cairo-dock/2.3.0-3

« back to all changes in this revision

Viewing changes to src/gldit/cairo-dock-themes-manager.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthieu Baerts (matttbe)
  • Date: 2010-08-09 23:26:12 UTC
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20100809232612-pocdxliaxjdetm37
Tags: upstream-2.2.0~0beta4
ImportĀ upstreamĀ versionĀ 2.2.0~0beta4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
* This file is a part of the Cairo-Dock project
 
3
*
 
4
* Copyright : (C) see the 'copyright' file.
 
5
* E-mail    : see the 'copyright' file.
 
6
*
 
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.
 
11
*
 
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/>.
 
18
*/
 
19
 
 
20
 
 
21
#ifndef __CAIRO_DOCK_THEMES_MANAGER__
 
22
#define  __CAIRO_DOCK_THEMES_MANAGER__
 
23
 
 
24
#include <glib.h>
 
25
#include <gtk/gtk.h>
 
26
G_BEGIN_DECLS
 
27
 
 
28
/**@file cairo-dock-themes-manager.h This class allows defines the structure of the global theme of the dock (launchers, icons, plug-ins, configuration files, etc).
 
29
* It also provides methods to manage the themes, like exporting the current theme, importing new themes, deleting themes, etc.
 
30
*/
 
31
 
 
32
void cairo_dock_mark_current_theme_as_modified (gboolean bModified);
 
33
gboolean cairo_dock_current_theme_need_save (void);
 
34
 
 
35
/** Export the current theme to a given name. Exported themes can be imported directly from the Theme Manager.
 
36
 * @param cNewThemeName name to export the theme to.
 
37
 * @param bSaveBehavior whether to save the behavior paremeters too.
 
38
 * @param bSaveLaunchers whether to save the launchers too.
 
39
 * @return TRUE if the theme could be exported succefuly.
 
40
 */
 
41
gboolean cairo_dock_export_current_theme (const gchar *cNewThemeName, gboolean bSaveBehavior, gboolean bSaveLaunchers);
 
42
 
 
43
/** Create a package of the current theme. Packages can be distributed easily, and imported into the dock by a mere drag and drop into the Theme Manager. The package is placed in the Home.
 
44
 * @param cThemeName name of the package.
 
45
 * @return TRUE if the theme could be packaged succefuly.
 
46
 */
 
47
gboolean cairo_dock_package_current_theme (const gchar *cThemeName);
 
48
 
 
49
/** Extract a package into the themes folder. Does not load it.
 
50
 * @param cPackagePath path of a package. If the package is distant, it is first downoladed.
 
51
 * @return the path of the theme folder, or NULL if anerror occured.
 
52
 */
 
53
gchar * cairo_dock_depackage_theme (const gchar *cPackagePath);
 
54
 
 
55
/** Remove some exported themes from the hard-disk.
 
56
 * @param cThemesList a list of theme names, NULL-terminated.
 
57
 * @return TRUE if the themes has been succefuly deleted.
 
58
 */
 
59
gboolean cairo_dock_delete_themes (gchar **cThemesList);
 
60
 
 
61
/** Import a theme, which can be : a local theme, a user theme, a distant theme, or even the path to a packaged theme.
 
62
 * @param cThemeName name of the theme to import.
 
63
 * @param bLoadBehavior whether to import the behavior parameters too.
 
64
 * @param bLoadLaunchers whether to import the launchers too.
 
65
 * @return TRUE if the theme could be imported succefuly.
 
66
 */
 
67
gboolean cairo_dock_import_theme (const gchar *cThemeName, gboolean bLoadBehavior, gboolean bLoadLaunchers);
 
68
 
 
69
/** Asynchronously import a theme, which can be : a local theme, a user theme, a distant theme, or even the path to a packaged theme. This function is non-blocking, you'll get a CairoTask that you can discard at any time, and you'll get the result of the import as the first argument of the callback (the second being the data you passed to this function).
 
70
 * @param cThemeName name of the theme to import.
 
71
 * @param bLoadBehavior whether to import the behavior parameters too.
 
72
 * @param bLoadLaunchers whether to import the launchers too.
 
73
 * @param pCallback function called when the download is finished. It takes the result of the import (TRUE for a successful import) and the data you've set here.
 
74
 * @param data data to be passed to the callback.
 
75
 * @return the Task that is doing the job. Keep it and use \ref cairo_dock_discard_task if you want to discard the download before it's completed (for instance if the user cancels it), or \ref cairo_dock_free_task inside your callback.
 
76
 */
 
77
CairoDockTask *cairo_dock_import_theme_async (const gchar *cThemeName, gboolean bLoadBehavior, gboolean bLoadLaunchers, GFunc pCallback, gpointer data);
 
78
 
 
79
/** Load the current theme. This will (re)load all the parameters of Cairo-Dock and all the plug-ins, as if you just started the dock.
 
80
*/
 
81
void cairo_dock_load_current_theme (void);
 
82
 
 
83
 
 
84
void cairo_dock_set_paths (gchar *cRootDataDirPath, gchar *cExtraDirPath, gchar *cThemesDirPath, gchar *cCurrentThemeDirPath, gchar *cThemeServerAdress);
 
85
 
 
86
 
 
87
G_END_DECLS
 
88
#endif