Use correct memory functions for GG oauth.
[pidgin-git.git] / libpurple / theme-loader.h
blobc6c23c382252598e4d22b801d35ee686bba57ddf
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 #define PURPLE_TYPE_THEME_LOADER purple_theme_loader_get_type()
37 struct _PurpleThemeLoaderClass
39 GObjectClass parent_class;
41 PurpleTheme *(*purple_theme_loader_build)(const gchar *dir);
42 gboolean (*probe_directory)(const gchar *dir);
44 /*< private >*/
45 void (*purple_reserved1)(void);
46 void (*purple_reserved2)(void);
47 void (*purple_reserved3)(void);
48 void (*purple_reserved4)(void);
51 /**************************************************************************/
52 /* Purple Theme-Loader API */
53 /**************************************************************************/
54 G_BEGIN_DECLS
56 /**
57 * purple_theme_loader_get_type:
59 * Returns: The #GType for theme loader.
61 G_DECLARE_DERIVABLE_TYPE(PurpleThemeLoader, purple_theme_loader, PURPLE,
62 THEME_LOADER, GObject)
64 /**
65 * purple_theme_loader_get_type_string:
66 * @self: The theme loader
68 * Returns the string representing the type of the theme loader
70 * Returns: The string representing this type
72 const gchar *purple_theme_loader_get_type_string(PurpleThemeLoader *self);
74 /**
75 * purple_theme_loader_build:
76 * @loader: The theme loader
77 * @dir: The directory containing the theme
79 * Creates a new PurpleTheme
81 * Returns: (transfer full): A PurpleTheme containing the information from the directory
83 PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir);
85 /**
86 * purple_theme_loader_probe:
87 * @loader: The theme loader
88 * @dir: The directory that may contain the theme
90 * Probes a directory to see if it might possibly contain a theme
92 * This function might only check for obvious files or directory structure.
93 * Loading of a theme may fail for other reasons.
94 * The default prober checks for $dir/purple/$type.
96 * Returns: TRUE if the directory appears to contain a theme, FALSE otherwise.
98 gboolean purple_theme_loader_probe(PurpleThemeLoader *loader, const gchar *dir);
100 G_END_DECLS
102 #endif /* PURPLE_THEME_LOADER_H */