libpurple/theme-loader.h

Fri, 13 Mar 2020 22:11:34 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Fri, 13 Mar 2020 22:11:34 -0500
changeset 40311
b28beec32e25
parent 39547
5c68828a566a
child 40474
1341be8e3402
permissions
-rw-r--r--

Remove stringref from the docs.

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 /* 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
2 *
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 * 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
4 * 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
5 * 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
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 * 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
8 * 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
9 * 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
10 * (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
11 *
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 * 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
13 * 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
14 * 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
15 * 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
16 *
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 * 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
18 * 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
19 * 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
20 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
21
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
22 #ifndef PURPLE_THEME_LOADER_H
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35474
diff changeset
23 #define PURPLE_THEME_LOADER_H
35442
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
24 /**
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
25 * SECTION:theme-loader
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
26 * @section_id: libpurple-theme-loader
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
27 * @short_description: <filename>theme-loader.h</filename>
35444
a4ece5a5565a Use upper-case first letters
Ankit Vani <a@nevitus.org>
parents: 35442
diff changeset
28 * @title: Theme Loader Abstact Class
35442
84e906df98dd Add section blocks for purple-socket.h to xmlnode.h
Ankit Vani <a@nevitus.org>
parents: 35403
diff changeset
29 */
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
30
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 <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
32 #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
33 #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
34
39547
5c68828a566a Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38745
diff changeset
35 #define PURPLE_TYPE_THEME_LOADER purple_theme_loader_get_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
36
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 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
38 {
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
39 GObjectClass parent_class;
34691
3acdd397a9c1 Removed reserved fields from instance structs.
Ankit Vani <a@nevitus.org>
parents: 34530
diff changeset
40
38745
f4376b1f4682 A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 38632
diff changeset
41 PurpleTheme *(*purple_theme_loader_build)(const gchar *dir);
f4376b1f4682 A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 38632
diff changeset
42 gboolean (*probe_directory)(const gchar *dir);
34530
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
43
35024
eb3afb7643ce Added /*< private >*/ for padding members, clean them up and add missing ones
Ankit Vani <a@nevitus.org>
parents: 34994
diff changeset
44 /*< private >*/
34530
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
45 void (*purple_reserved1)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
46 void (*purple_reserved2)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
47 void (*purple_reserved3)(void);
a2471041078b Added missing padding members to theme components
Ankit Vani <a@nevitus.org>
parents: 32955
diff changeset
48 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
49 };
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
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 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35465
diff changeset
52 /* Purple Theme-Loader 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
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 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
55
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 /**
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
57 * purple_theme_loader_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
58 *
35474
ff5eccb9f797 Remove @internal
Ankit Vani <a@nevitus.org>
parents: 35472
diff changeset
59 * Returns: The #GType for 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
60 */
39547
5c68828a566a Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38745
diff changeset
61 G_DECLARE_DERIVABLE_TYPE(PurpleThemeLoader, purple_theme_loader, PURPLE,
5c68828a566a Use G_DECLARE* in themes.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38745
diff changeset
62 THEME_LOADER, GObject)
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
63
b7d99d231b93 Added theme loader class abstract whose only (current/planned) function is to build themes
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents:
diff changeset
64 /**
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
65 * purple_theme_loader_get_type_string:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
66 * @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
67 *
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
68 * 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
69 *
35395
bf3f004adbf1 Fix 'Returns:'
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
70 * Returns: 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
71 */
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
72 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
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 /**
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
75 * purple_theme_loader_build:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
76 * @loader: The theme loader
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35024
diff changeset
77 * @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
78 *
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
79 * Creates a new PurpleTheme
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
80 *
38632
4cbae4a1bac1 Add a lot of type annotations, still many more to go
Gary Kramlich <grim@reaperworld.com>
parents: 37094
diff changeset
81 * Returns: (transfer full): 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
82 */
23971
9764690b14f2 Changed PurpleTheme build function to only return PurpleTheme*
Justin Rodriguez <ffdragon@soc.pidgin.im>
parents: 23653
diff changeset
83 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
84
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
85 /**
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
86 * purple_theme_loader_probe:
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
87 * @loader: The theme loader
9282701d7aa9 Convert docs from doxygen to gtk-doc format for sound-theme-loader to xmlnode
Ankit Vani <a@nevitus.org>
parents: 35395
diff changeset
88 * @dir: The directory that may contain the 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
89 *
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
90 * 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
91 *
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
92 * 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
93 * 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
94 * 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
95 *
35395
bf3f004adbf1 Fix 'Returns:'
Ankit Vani <a@nevitus.org>
parents: 35393
diff changeset
96 * Returns: 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
97 */
e984f8b98a19 Add a directory probe to theme loaders. The default just checks for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32438
diff changeset
98 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
99
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
100 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
101
25875
a98b16817658 Lots of minor whitespace and comment changes:
Mark Doliner <markdoliner@pidgin.im>
parents: 23971
diff changeset
102 #endif /* PURPLE_THEME_LOADER_H */

mercurial