Fix some functions descriptions
[pidgin-git.git] / libpurple / theme-loader.h
blobeb5640fc4aabc8bb7cdf14b5c5bdb2029fff85e3
1 /* purple
3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (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.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PURPLE_THEME_LOADER_H
23 #define PURPLE_THEME_LOADER_H
24 /**
25 * SECTION:theme-loader
26 * @section_id: libpurple-theme-loader
27 * @short_description: <filename>theme-loader.h</filename>
28 * @title: Theme Loader Abstact Class
31 #include <glib.h>
32 #include <glib-object.h>
33 #include "theme.h"
35 typedef struct _PurpleThemeLoader PurpleThemeLoader;
36 typedef struct _PurpleThemeLoaderClass PurpleThemeLoaderClass;
38 #define PURPLE_TYPE_THEME_LOADER (purple_theme_loader_get_type())
39 #define PURPLE_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoader))
40 #define PURPLE_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass))
41 #define PURPLE_IS_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_THEME_LOADER))
42 #define PURPLE_IS_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_THEME_LOADER))
43 #define PURPLE_THEME_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass))
45 /**
46 * PurpleThemeLoader:
48 * A purple theme loader.
49 * This is an abstract class for Purple to use with the Purple theme manager.
50 * The loader is responsible for building each type of theme
52 struct _PurpleThemeLoader
54 GObject parent;
57 struct _PurpleThemeLoaderClass
59 GObjectClass parent_class;
61 PurpleTheme *(*purple_theme_loader_build)(const gchar*);
62 gboolean (*probe_directory)(const gchar *);
64 /*< private >*/
65 void (*purple_reserved1)(void);
66 void (*purple_reserved2)(void);
67 void (*purple_reserved3)(void);
68 void (*purple_reserved4)(void);
71 /**************************************************************************/
72 /* Purple Theme-Loader API */
73 /**************************************************************************/
74 G_BEGIN_DECLS
76 /**
77 * purple_theme_loader_get_type:
79 * Returns: The #GType for theme loader.
81 GType purple_theme_loader_get_type(void);
83 /**
84 * purple_theme_loader_get_type_string:
85 * @self: The theme loader
87 * Returns the string representing the type of the theme loader
89 * Returns: The string representing this type
91 const gchar *purple_theme_loader_get_type_string(PurpleThemeLoader *self);
93 /**
94 * purple_theme_loader_build:
95 * @loader: The theme loader
96 * @dir: The directory containing the theme
98 * Creates a new PurpleTheme
100 * Returns: A PurpleTheme containing the information from the directory
102 PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir);
105 * purple_theme_loader_probe:
106 * @loader: The theme loader
107 * @dir: The directory that may contain the theme
109 * Probes a directory to see if it might possibly contain a theme
111 * This function might only check for obvious files or directory structure.
112 * Loading of a theme may fail for other reasons.
113 * The default prober checks for $dir/purple/$type.
115 * Returns: TRUE if the directory appears to contain a theme, FALSE otherwise.
117 gboolean purple_theme_loader_probe(PurpleThemeLoader *loader, const gchar *dir);
119 G_END_DECLS
121 #endif /* PURPLE_THEME_LOADER_H */