diff libpurple/theme-loader.h @ 32819:2c6510167895 default tip

propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24) to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sat, 02 Jun 2012 02:30:49 +0000
parents 5050da3d9c95
children
line wrap: on
line diff
--- a/libpurple/theme-loader.h	Sat Jun 02 02:30:13 2012 +0000
+++ b/libpurple/theme-loader.h	Sat Jun 02 02:30:49 2012 +0000
@@ -50,13 +50,13 @@
 struct _PurpleThemeLoader
 {
 	GObject parent;
-	gpointer priv;
 };
 
 struct _PurpleThemeLoaderClass
 {
 	GObjectClass parent_class;
 	PurpleTheme *((*purple_theme_loader_build)(const gchar*));
+	gboolean (*probe_directory)(const gchar *);
 };
 
 /**************************************************************************/
@@ -89,5 +89,19 @@
  */
 PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir);
 
+/**
+ * Probes a directory to see if it might possibly contain a theme
+ *
+ * This function might only check for obvious files or directory structure.
+ * Loading of a theme may fail for other reasons.
+ * The default prober checks for $dir/purple/$type.
+ *
+ * @param loader The theme loader
+ * @param dir    The directory that may contain the theme
+ *
+ * @returns TRUE if the directory appears to contain a theme, FALSE otherwise.
+ */
+gboolean purple_theme_loader_probe(PurpleThemeLoader *loader, const gchar *dir);
+
 G_END_DECLS
 #endif /* PURPLE_THEME_LOADER_H */