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

« back to all changes in this revision

Viewing changes to src/icon-factory/cairo-dock-desktop-file-factory.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_DESKTOP_FILE_FACTORY__
 
22
#define  __CAIRO_DOCK_DESKTOP_FILE_FACTORY__
 
23
 
 
24
#include <glib.h>
 
25
 
 
26
#include "cairo-dock-icons.h"
 
27
G_BEGIN_DECLS
 
28
 
 
29
/**
 
30
*@file cairo-dock-desktop-file-factory.h This class handles the creation of desktop files, which are group/key pair files used by Cairo-Dock to store information about icons : launchers and files, separators, sub-docks.
 
31
*/
 
32
 
 
33
typedef enum {
 
34
        CAIRO_DOCK_DESKTOP_FILE_FOR_LAUNCHER = 0,
 
35
        CAIRO_DOCK_DESKTOP_FILE_FOR_CONTAINER,
 
36
        CAIRO_DOCK_DESKTOP_FILE_FOR_SEPARATOR,
 
37
        CAIRO_DOCK_DESKTOP_FILE_FOR_FILE,
 
38
        CAIRO_DOCK_NB_DESKTOP_FILES
 
39
        } CairoDockDesktopFileType;
 
40
 
 
41
/** Replace the %20 by normal spaces into the string. The string is directly modified.
 
42
*@param cString the string (it can't be a constant string)
 
43
*/
 
44
void cairo_dock_remove_html_spaces (gchar *cString);
 
45
 
 
46
/** Create, add and fill a desktop file for a given URI. The URI can be either a common desktop file, a script, or a file/folder/mounting point.
 
47
*@param cURI URI of a file defining the launcher.
 
48
*@param cDockName name of the dock the separator will be added.
 
49
*@param fOrder order of the icon inside the dock.
 
50
*@param iGroup group of the icon.
 
51
*@param erreur an error filled if something went wrong.
 
52
*/
 
53
gchar *cairo_dock_add_desktop_file_from_uri (const gchar *cURI, const gchar *cDockName, double fOrder, CairoDockIconType iGroup, GError **erreur);
 
54
 
 
55
/** Create and add an empty default desktop file for a given type.
 
56
*@param iLauncherType type of the icon it will represent : launcher, file, container icon, separator.
 
57
*@param cDockName name of the dock the separator will be added.
 
58
*@param fOrder order of the icon inside the dock.
 
59
*@param iGroup group of the icon.
 
60
*@param erreur an error filled if something went wrong.
 
61
*/
 
62
gchar *cairo_dock_add_desktop_file_from_type (CairoDockDesktopFileType iLauncherType, const gchar *cDockName, double fOrder, CairoDockIconType iGroup, GError **erreur);
 
63
 
 
64
 
 
65
void cairo_dock_update_launcher_desktop_file (gchar *cDesktopFilePath, CairoDockDesktopFileType iLauncherType);
 
66
 
 
67
 
 
68
void cairo_dock_write_container_name_in_conf_file (Icon *pIcon, const gchar *cParentDockName);
 
69
 
 
70
void cairo_dock_write_order_in_conf_file (Icon *pIcon, double fOrder);
 
71
 
 
72
 
 
73
G_END_DECLS
 
74
#endif
 
75