theme-manager.h

Go to the documentation of this file.
00001 
00005 /*
00006  * purple
00007  *
00008  * Purple is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 
00027 #ifndef PURPLE_THEME_MANAGER_H
00028 #define PURPLE_THEME_MANAGER_H
00029 
00030 #include <glib-object.h>
00031 #include <glib.h>
00032 #include "theme.h"
00033 #include "theme-loader.h"
00034 
00035 typedef void (*PTFunc) (PurpleTheme *);
00036 
00037 typedef struct _PurpleThemeManager PurpleThemeManager;
00038 typedef struct _PurpleThemeManagerClass PurpleThemeManagerClass;
00039 
00040 #define PURPLE_TYPE_THEME_MANAGER            (purple_theme_manager_get_type())
00041 #define PURPLE_THEME_MANAGER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManager))
00042 #define PURPLE_THEME_MANAGER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))
00043 #define PURPLE_IS_THEME_MANAGER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_THEME_MANAGER))
00044 #define PURPLE_IS_THEME_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_THEME_MANAGER))
00045 #define PURPLE_GET_THEME_MANAGER_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))
00046 
00047 struct _PurpleThemeManager {
00048     GObject parent;
00049 };
00050 
00051 struct _PurpleThemeManagerClass {
00052     GObjectClass parent_class;
00053 };
00054 
00055 /**************************************************************************/
00057 /**************************************************************************/
00058 G_BEGIN_DECLS
00059 
00065 GType purple_theme_manager_get_type(void);
00066 
00070 void purple_theme_manager_init(void);
00071 
00076 void purple_theme_manager_uninit(void);
00077 
00082 void purple_theme_manager_refresh(void);
00083 
00092 PurpleTheme *purple_theme_manager_find_theme(const gchar *name, const gchar *type);
00093 
00100 void purple_theme_manager_add_theme(PurpleTheme *theme);
00101 
00107 void purple_theme_manager_remove_theme(PurpleTheme *theme);
00108 
00114 void purple_theme_manager_register_type(PurpleThemeLoader *loader);
00115 
00121 void purple_theme_manager_unregister_type(PurpleThemeLoader *loader);
00122 
00128 void purple_theme_manager_for_each_theme(PTFunc func);
00129 
00136 PurpleTheme *purple_theme_manager_load_theme(const gchar *theme_dir, const gchar *type);
00137 
00138 G_END_DECLS
00139 #endif /* PURPLE_THEME_MANAGER_H */