libpurple/theme-manager.h

Fri, 12 Feb 2021 18:37:00 -0600

author
Arkadiy Illarionov <qarkai@gmail.com>
date
Fri, 12 Feb 2021 18:37:00 -0600
changeset 40765
a5381c20e802
parent 40584
6f198a69ac48
child 41083
590d533cf290
permissions
-rw-r--r--

Use specific purple_debug_* functions

Instead of `purple_debug`. Also:

* remove `\n` at the end
* inline untar macros

Reviewed at https://reviews.imfreedom.org/r/490/

25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
1 /*
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
2 * Purple - Internet Messaging Library
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
4 *
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
7 * source distribution.
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
8 *
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
12 * (at your option) any later version.
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
13 *
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
17 * GNU General Public License for more details.
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
18 *
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
21 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
22
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 39547
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 39547
diff changeset
24 # error "only <purple.h> may be included directly"
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 39547
diff changeset
25 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 39547
diff changeset
26
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
27 #ifndef PURPLE_THEME_MANAGER_H
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
28 #define PURPLE_THEME_MANAGER_H
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
29
35442
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
30 /**
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
31 * SECTION:theme-manager
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
32 * @section_id: libpurple-theme-manager
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
33 * @short_description: <filename>theme-manager.h</filename>
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
34 * @title: Theme Manager API
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
35 *
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
36 * The theme manager manages of all the available themes and allows you to load
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
37 * them.
35442
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
38 */
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
39
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
40 #include <glib-object.h>
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
41 #include <glib.h>
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
42 #include "theme.h"
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
43 #include "theme-loader.h"
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
44
38745
f4376b1f4682 A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 38632
diff changeset
45 typedef void (*PurpleThemeFunc) (PurpleTheme *theme);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
46
40524
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
47 /**
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
48 * PURPLE_TYPE_THEME_MANAGER:
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
49 *
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
50 * The standard _get_type macro for #PurpleThemeManager.
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
51 */
a3b1cde8d2d8 Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents: 40474
diff changeset
52 #define PURPLE_TYPE_THEME_MANAGER purple_theme_manager_get_type()
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
53
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
54 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35442
diff changeset
55 /* Purple Theme Manager API */
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
56 /**************************************************************************/
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
57 G_BEGIN_DECLS
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
58
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
59 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
60 * purple_theme_manager_get_type:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
61 *
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
62 * The standard _get_type function for #GType's.
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40524
diff changeset
63 *
35474
ff5eccb9f797 Remove @internal
Ankit Vani <a@nevitus.org>
parents: 35472
diff changeset
64 * Returns: The #GType for theme manager.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
65 */
39547
5c68828a566a Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38745
diff changeset
66 G_DECLARE_FINAL_TYPE(PurpleThemeManager, purple_theme_manager, PURPLE,
5c68828a566a Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38745
diff changeset
67 THEME_MANAGER, GObject)
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
68
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
69 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
70 * purple_theme_manager_init:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
71 *
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
72 * Initalizes the theme manager.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
73 */
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
74 void purple_theme_manager_init(void);
23655
704a67a69ce0 Changed the theme_manager_init function to do less, makes it cleaner and faster (won't have to build
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23648
diff changeset
75
704a67a69ce0 Changed the theme_manager_init function to do less, makes it cleaner and faster (won't have to build
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23648
diff changeset
76 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
77 * purple_theme_manager_uninit:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
78 *
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
79 * Uninitalizes the manager then frees all the themes and loaders it is
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
80 * responsible for.
23655
704a67a69ce0 Changed the theme_manager_init function to do less, makes it cleaner and faster (won't have to build
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23648
diff changeset
81 */
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
82 void purple_theme_manager_uninit(void);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
83
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
84 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
85 * purple_theme_manager_refresh:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
86 *
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
87 * Rebuilds all the themes in the theme manager.
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
88 * (Removes all current themes but keeps the added loaders.)
23642
ea82d96e4ebd Fixed some things needed for proper gobfication (init/finalize/etc)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23635
diff changeset
89 */
ea82d96e4ebd Fixed some things needed for proper gobfication (init/finalize/etc)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23635
diff changeset
90 void purple_theme_manager_refresh(void);
ea82d96e4ebd Fixed some things needed for proper gobfication (init/finalize/etc)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23635
diff changeset
91
ea82d96e4ebd Fixed some things needed for proper gobfication (init/finalize/etc)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23635
diff changeset
92 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
93 * purple_theme_manager_find_theme:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
94 * @name: The name of the PurpleTheme.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
95 * @type: The type of the PurpleTheme.
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
96 *
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
97 * Finds the PurpleTheme object stored by the theme manager.
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
98 *
38632
4cbae4a1bac1 Add a lot of type annotations, still many more to go
Gary Kramlich <grim@reaperworld.com>
parents: 37101
diff changeset
99 * Returns: (transfer none): The PurpleTheme, or NULL if it wasn't found.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
100 */
23635
8d9926d33ff9 Fixed theme-manager to be more of a singleton and less-gobject like
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23634
diff changeset
101 PurpleTheme *purple_theme_manager_find_theme(const gchar *name, const gchar *type);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
102
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
103 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
104 * purple_theme_manager_add_theme:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
105 * @theme: The PurpleTheme to add to the manager.
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
106 *
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
107 * Adds a PurpleTheme to the theme manager. If the theme already exists
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
108 * then this function does nothing.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
109 */
23635
8d9926d33ff9 Fixed theme-manager to be more of a singleton and less-gobject like
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23634
diff changeset
110 void purple_theme_manager_add_theme(PurpleTheme *theme);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
111
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
112 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
113 * purple_theme_manager_remove_theme:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
114 * @theme: The PurpleTheme to remove from the manager.
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
115 *
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
116 * Removes a PurpleTheme from the theme manager and frees the theme.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
117 */
23635
8d9926d33ff9 Fixed theme-manager to be more of a singleton and less-gobject like
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23634
diff changeset
118 void purple_theme_manager_remove_theme(PurpleTheme *theme);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
119
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
120 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
121 * purple_theme_manager_register_type:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
122 * @loader: The PurpleThemeLoader to add.
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
123 *
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
124 * Adds a loader to the theme manager so it knows how to build themes.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
125 */
23635
8d9926d33ff9 Fixed theme-manager to be more of a singleton and less-gobject like
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23634
diff changeset
126 void purple_theme_manager_register_type(PurpleThemeLoader *loader);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
127
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
128 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
129 * purple_theme_manager_unregister_type:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
130 * @loader: The PurpleThemeLoader to be removed.
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
131 *
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
132 * Removes the loader and all themes of the same type from the loader.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
133 */
23635
8d9926d33ff9 Fixed theme-manager to be more of a singleton and less-gobject like
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23634
diff changeset
134 void purple_theme_manager_unregister_type(PurpleThemeLoader *loader);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
135
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
136 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
137 * purple_theme_manager_for_each_theme:
38632
4cbae4a1bac1 Add a lot of type annotations, still many more to go
Gary Kramlich <grim@reaperworld.com>
parents: 37101
diff changeset
138 * @func: (scope call): The PurpleThemeFunc to be applied to each theme.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
139 *
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
140 * Calls the given function on each purple theme.
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
141 */
35499
c4c5e0a670b1 Fix namespaces issues in libpurple.
Ankit Vani <a@nevitus.org>
parents: 35487
diff changeset
142 void purple_theme_manager_for_each_theme(PurpleThemeFunc func);
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
143
27445
b8bbf88abd0f Allow drag-and-drop of all sorts of themes.
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 26385
diff changeset
144 /**
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
145 * purple_theme_manager_load_theme:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
146 * @theme_dir: the directory of the theme to load
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
147 * @type: the type of theme to load
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
148 *
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
149 * Loads a theme of the given type without adding it to the manager
38632
4cbae4a1bac1 Add a lot of type annotations, still many more to go
Gary Kramlich <grim@reaperworld.com>
parents: 37101
diff changeset
150 *
4cbae4a1bac1 Add a lot of type annotations, still many more to go
Gary Kramlich <grim@reaperworld.com>
parents: 37101
diff changeset
151 * Returns: (transfer full): The newly loaded theme.
27445
b8bbf88abd0f Allow drag-and-drop of all sorts of themes.
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 26385
diff changeset
152 */
b8bbf88abd0f Allow drag-and-drop of all sorts of themes.
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 26385
diff changeset
153 PurpleTheme *purple_theme_manager_load_theme(const gchar *theme_dir, const gchar *type);
b8bbf88abd0f Allow drag-and-drop of all sorts of themes.
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 26385
diff changeset
154
23634
cefd759a125b Added the theme-manager and basic functionality (needs to be given proper directories to find themes)
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
155 G_END_DECLS
35403
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
156
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23655
diff changeset
157 #endif /* PURPLE_THEME_MANAGER_H */

mercurial