libpurple/theme-loader.h

Fri, 31 Jan 2014 18:14:33 +0530

author
Ankit Vani <a@nevitus.org>
date
Fri, 31 Jan 2014 18:14:33 +0530
branch
gtkdoc-conversion
changeset 35393
00f876b129bc
parent 35024
eb3afb7643ce
child 35395
bf3f004adbf1
child 37023
d9bcdc9a91e6
permissions
-rw-r--r--

Initial replacements for gtk-doc style comments

23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
1 /**
23640
0d64f321a266 Added skeleton (non-working) sound loader class
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23633
diff changeset
2 * @file theme-loader.h Purple Theme Loader Abstact Class API
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
3 */
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
4
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
5 /* purple
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
6 *
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
7 * Purple is the legal property of its developers, whose names are too numerous
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
9 * source distribution.
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
10 *
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
12 * it under the terms of the GNU General Public License as published by
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
13 * the Free Software Foundation; either version 2 of the License, or
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
14 * (at your option) any later version.
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
15 *
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
19 * GNU General Public License for more details.
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
20 *
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
24 */
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
25
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
26 #ifndef PURPLE_THEME_LOADER_H
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
27 #define PURPLE_THEME_LOADER_H
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
28
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
29 #include <glib.h>
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
30 #include <glib-object.h>
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
31 #include "theme.h"
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
32
34994
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
33 /** @copydoc _PurpleThemeLoader */
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
34 typedef struct _PurpleThemeLoader PurpleThemeLoader;
34994
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
35 /** @copydoc _PurpleThemeLoaderClass */
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
36 typedef struct _PurpleThemeLoaderClass PurpleThemeLoaderClass;
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
37
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
38 #define PURPLE_TYPE_THEME_LOADER (purple_theme_loader_get_type())
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
39 #define PURPLE_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoader))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
40 #define PURPLE_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
41 #define PURPLE_IS_THEME_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_THEME_LOADER))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
42 #define PURPLE_IS_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_THEME_LOADER))
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
43 #define PURPLE_THEME_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass))
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
44
34994
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
45 /**
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
46 * A purple theme loader.
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
47 * This is an abstract class for Purple to use with the Purple theme manager.
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
48 * The loader is responsible for building each type of theme
dfcc9f64f58c Move media/theme GObject docs to appropriate places
Ankit Vani <a@nevitus.org>
parents: 34691
diff changeset
49 */
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
50 struct _PurpleThemeLoader
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
51 {
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
52 GObject parent;
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
53 };
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
54
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
55 struct _PurpleThemeLoaderClass
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
56 {
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
57 GObjectClass parent_class;
34691
3acdd397a9c1 Removed reserved fields from instance structs.
Ankit Vani <a@nevitus.org>
parents: 34530
diff changeset
58
23971
9764690b14f2 Changed PurpleTheme build function to only return PurpleTheme*
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23653
diff changeset
59 PurpleTheme *((*purple_theme_loader_build)(const gchar*));
32955
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
60 gboolean (*probe_directory)(const gchar *);
34530
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
61
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
62 /*< private >*/
34530
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
63 void (*purple_reserved1)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
64 void (*purple_reserved2)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
65 void (*purple_reserved3)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
66 void (*purple_reserved4)(void);
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
67 };
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
68
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
69 /**************************************************************************/
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
70 /** @name Purple Theme-Loader API */
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
71 /**************************************************************************/
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
72 G_BEGIN_DECLS
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
73
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
74 /**
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
75 * GObject foo.
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
76 * @internal.
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
77 */
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
78 GType purple_theme_loader_get_type(void);
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
79
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
80 /**
28448
c5ca106a9c74 Fix some typos.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26385
diff changeset
81 * Returns the string representing the type of the theme loader
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
82 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
83 * @self: The theme loader
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
84 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
85 * Returns:s The string representing this type
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
86 */
23653
79934bf9a349 Fixed up a few typos, readability, leaks, and bugs, all minor and mostly in theme and theme loader classes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23644
diff changeset
87 const gchar *purple_theme_loader_get_type_string(PurpleThemeLoader *self);
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
88
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
89 /**
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
90 * Creates a new PurpleTheme
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
91 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
92 * @loader: The theme loader
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
93 * @dir: The directory containing the theme
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
94 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
95 * Returns:s A PurpleTheme containing the information from the directory
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
96 */
23971
9764690b14f2 Changed PurpleTheme build function to only return PurpleTheme*
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23653
diff changeset
97 PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir);
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
98
32955
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
99 /**
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
100 * Probes a directory to see if it might possibly contain a theme
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
101 *
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
102 * This function might only check for obvious files or directory structure.
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
103 * Loading of a theme may fail for other reasons.
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
104 * The default prober checks for $dir/purple/$type.
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
105 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
106 * @loader: The theme loader
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
107 * @dir: The directory that may contain the theme
32955
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
108 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
109 * Returns:s TRUE if the directory appears to contain a theme, FALSE otherwise.
32955
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
110 */
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
111 gboolean purple_theme_loader_probe(PurpleThemeLoader *loader, const gchar *dir);
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
112
23633
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
113 G_END_DECLS
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
114 #endif /* PURPLE_THEME_LOADER_H */

mercurial