Mercurial > pidgin
comparison libpurple/theme-loader.h @ 32728:5050da3d9c95
Add a directory probe to theme loaders. The default just checks for
$dir/purple/$type as the theme manager currently does.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 03 Mar 2012 06:39:49 +0000 |
parents | 4d92a431d0a1 |
children |
comparison
equal
deleted
inserted
replaced
32727:089acf3a8aa1 | 32728:5050da3d9c95 |
---|---|
54 | 54 |
55 struct _PurpleThemeLoaderClass | 55 struct _PurpleThemeLoaderClass |
56 { | 56 { |
57 GObjectClass parent_class; | 57 GObjectClass parent_class; |
58 PurpleTheme *((*purple_theme_loader_build)(const gchar*)); | 58 PurpleTheme *((*purple_theme_loader_build)(const gchar*)); |
59 gboolean (*probe_directory)(const gchar *); | |
59 }; | 60 }; |
60 | 61 |
61 /**************************************************************************/ | 62 /**************************************************************************/ |
62 /** @name Purple Theme-Loader API */ | 63 /** @name Purple Theme-Loader API */ |
63 /**************************************************************************/ | 64 /**************************************************************************/ |
86 * | 87 * |
87 * @returns A PurpleTheme containing the information from the directory | 88 * @returns A PurpleTheme containing the information from the directory |
88 */ | 89 */ |
89 PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir); | 90 PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir); |
90 | 91 |
92 /** | |
93 * Probes a directory to see if it might possibly contain a theme | |
94 * | |
95 * This function might only check for obvious files or directory structure. | |
96 * Loading of a theme may fail for other reasons. | |
97 * The default prober checks for $dir/purple/$type. | |
98 * | |
99 * @param loader The theme loader | |
100 * @param dir The directory that may contain the theme | |
101 * | |
102 * @returns TRUE if the directory appears to contain a theme, FALSE otherwise. | |
103 */ | |
104 gboolean purple_theme_loader_probe(PurpleThemeLoader *loader, const gchar *dir); | |
105 | |
91 G_END_DECLS | 106 G_END_DECLS |
92 #endif /* PURPLE_THEME_LOADER_H */ | 107 #endif /* PURPLE_THEME_LOADER_H */ |