Mercurial > pidgin
comparison libpurple/theme-loader.h @ 25882:f8dbd57cf635
explicit merge of '448583a763dcf343f1a4392bdcdcc4c4f01f3aed'
and 'df350a99631d730a3d67255d916ee24e97f0f621'
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 02 Jan 2009 21:48:12 +0000 |
parents | b37ccfd1697b |
children | 0c7b74fc558e |
comparison
equal
deleted
inserted
replaced
24766:ce108a92fa4e | 25882:f8dbd57cf635 |
---|---|
1 /** | |
2 * @file theme-loader.h Purple Theme Loader Abstact Class API | |
3 */ | |
4 | |
5 /* purple | |
6 * | |
7 * Purple is the legal property of its developers, whose names are too numerous | |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
10 * | |
11 * This program is free software; you can redistribute it and/or modify | |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | |
24 */ | |
25 | |
26 #ifndef _PURPLE_THEME_LOADER_H_ | |
27 #define _PURPLE_THEME_LOADER_H_ | |
28 | |
29 #include <glib.h> | |
30 #include <glib-object.h> | |
31 #include "theme.h" | |
32 | |
33 /** | |
34 * A purple theme loader. | |
35 * This is an abstract class for Purple to use with the Purple theme manager. | |
36 * The loader is responsible for building each type of theme | |
37 * | |
38 * PurpleThemeLoader is a GObject. | |
39 */ | |
40 typedef struct _PurpleThemeLoader PurpleThemeLoader; | |
41 typedef struct _PurpleThemeLoaderClass PurpleThemeLoaderClass; | |
42 | |
43 #define PURPLE_TYPE_THEME_LOADER (purple_theme_loader_get_type ()) | |
44 #define PURPLE_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoader)) | |
45 #define PURPLE_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass)) | |
46 #define PURPLE_IS_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PURPLE_TYPE_THEME_LOADER)) | |
47 #define PURPLE_IS_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PURPLE_TYPE_THEME_LOADER)) | |
48 #define PURPLE_THEME_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass)) | |
49 | |
50 struct _PurpleThemeLoader | |
51 { | |
52 GObject parent; | |
53 gpointer priv; | |
54 }; | |
55 | |
56 struct _PurpleThemeLoaderClass | |
57 { | |
58 GObjectClass parent_class; | |
59 PurpleTheme *((*purple_theme_loader_build)(const gchar*)); | |
60 }; | |
61 | |
62 /**************************************************************************/ | |
63 /** @name Purple Theme-Loader API */ | |
64 /**************************************************************************/ | |
65 G_BEGIN_DECLS | |
66 | |
67 /** | |
68 * GObject foo. | |
69 * @internal. | |
70 */ | |
71 GType purple_theme_loader_get_type(void); | |
72 | |
73 /** | |
74 * Returns the string represtenting the type of the theme loader | |
75 * | |
76 * @param self the theme loader | |
77 * | |
78 * @returns the string represting this type | |
79 */ | |
80 const gchar *purple_theme_loader_get_type_string(PurpleThemeLoader *self); | |
81 | |
82 /** | |
83 * Creates a new PurpleTheme | |
84 * | |
85 * @param dir the directory containing the theme | |
86 * | |
87 * @returns PurpleTheme containing the information from the directory | |
88 */ | |
89 PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir); | |
90 | |
91 G_END_DECLS | |
92 #endif /* _PURPLE_THEME_LOADER_H_ */ |