pidgin  2.14.10
theme-manager.h
Go to the documentation of this file.
1 
5 /*
6  * purple
7  *
8  * Purple is the legal property of its developers, whose names are too numerous
9  * to list here. Please refer to the COPYRIGHT file distributed with this
10  * source distribution.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 
27 #ifndef PURPLE_THEME_MANAGER_H
28 #define PURPLE_THEME_MANAGER_H
29 
30 #include <glib-object.h>
31 #include <glib.h>
32 #include "theme.h"
33 #include "theme-loader.h"
34 
35 typedef void (*PTFunc) (PurpleTheme *);
36 
39 
40 #define PURPLE_TYPE_THEME_MANAGER (purple_theme_manager_get_type())
41 #define PURPLE_THEME_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManager))
42 #define PURPLE_THEME_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))
43 #define PURPLE_IS_THEME_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_THEME_MANAGER))
44 #define PURPLE_IS_THEME_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_THEME_MANAGER))
45 #define PURPLE_GET_THEME_MANAGER_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))
46 
48  GObject parent;
49 };
50 
52  GObjectClass parent_class;
53 };
54 
55 /**************************************************************************/
57 /**************************************************************************/
58 G_BEGIN_DECLS
59 
66 
71 
77 
83 
92 PurpleTheme *purple_theme_manager_find_theme(const gchar *name, const gchar *type);
93 
101 
108 
115 
122 
129 
136 PurpleTheme *purple_theme_manager_load_theme(const gchar *theme_dir, const gchar *type);
137 
138 G_END_DECLS
139 #endif /* PURPLE_THEME_MANAGER_H */
Purple Theme Loader Abstact Class API.
void purple_theme_manager_add_theme(PurpleTheme *theme)
Adds a PurpleTheme to the theme manager.
void purple_theme_manager_remove_theme(PurpleTheme *theme)
Removes a PurpleTheme from the theme manager and frees the theme.
void purple_theme_manager_uninit(void)
Uninitalizes the manager then frees all the themes and loaders it is responsible for.
void purple_theme_manager_refresh(void)
Rebuilds all the themes in the theme manager.
void purple_theme_manager_for_each_theme(PTFunc func)
Calls the given function on each purple theme.
void purple_theme_manager_unregister_type(PurpleThemeLoader *loader)
Removes the loader and all themes of the same type from the loader.
void purple_theme_manager_init(void)
Initalizes the theme manager.
PurpleTheme * purple_theme_manager_load_theme(const gchar *theme_dir, const gchar *type)
Loads a theme of the given type without adding it to the manager.
void purple_theme_manager_register_type(PurpleThemeLoader *loader)
Adds a loader to the theme manager so it knows how to build themes.
PurpleTheme * purple_theme_manager_find_theme(const gchar *name, const gchar *type)
Finds the PurpleTheme object stored by the theme manager.
G_BEGIN_DECLS GType purple_theme_manager_get_type(void)
GObject foo.
Purple Theme Abstact Class API.