Convert XMPP console dialogs to popovers.
[pidgin-git.git] / libpurple / smiley-theme.h
blob3e3b8e3887f0803fe3ac032111c229273aaacb5b
1 /* purple
3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PURPLE_SMILEY_THEME_H
23 #define PURPLE_SMILEY_THEME_H
24 /**
25 * SECTION:smiley-theme
26 * @include:smiley-theme.h
27 * @section_id: libpurple-smiley-theme
28 * @short_description: a categorized set of standard smileys
29 * @title: Smiley themes
31 * A smiley theme is a set of standard smileys, that may be displayed in user's
32 * message window instead of their textual representations. It may be
33 * categorized depending on the selected protocol, as in #PidginSmileyTheme, but
34 * it's up to the UI to choose behavior.
37 #include <glib-object.h>
39 #include "smiley.h"
40 #include "smiley-list.h"
42 G_BEGIN_DECLS
44 #define PURPLE_TYPE_SMILEY_THEME purple_smiley_theme_get_type()
46 /**
47 * purple_smiley_theme_get_type:
49 * Returns: the #GType for a smiley list.
51 G_DECLARE_DERIVABLE_TYPE(PurpleSmileyTheme, purple_smiley_theme, PURPLE,
52 SMILEY_THEME, GObject)
54 /**
55 * PurpleSmileyThemeClass:
56 * @get_smileys: a callback for getting smiley list based on choosen category.
57 * The criteria for a category are being passed using the
58 * @ui_data parameter.
59 * @activate: a callback being fired after activating the @theme. It may be used
60 * for loading its contents before using @get_smileys callback.
62 * Base class for #PurpleSmileyTheme objects.
64 struct _PurpleSmileyThemeClass
66 /*< private >*/
67 GObjectClass parent_class;
69 /*< public >*/
70 PurpleSmileyList * (*get_smileys)(PurpleSmileyTheme *theme,
71 gpointer ui_data);
72 void (*activate)(PurpleSmileyTheme *theme);
74 /*< private >*/
75 void (*purple_reserved1)(void);
76 void (*purple_reserved2)(void);
77 void (*purple_reserved3)(void);
78 void (*purple_reserved4)(void);
81 /**
82 * purple_smiley_theme_get_smileys:
83 * @theme: the smiley theme.
84 * @ui_data: the UI-passed criteria to choose a smiley set.
86 * Retrieves a smiley category based on UI-provided criteria.
88 * You might want to use <link linkend="libpurple-smiley-parser">smiley
89 * parser</link> instead. It's mostly for the UI, prpls shouldn't use it.
91 * Returns: (transfer none): a #PurpleSmileyList with standard smileys to use.
93 PurpleSmileyList *
94 purple_smiley_theme_get_smileys(PurpleSmileyTheme *theme, gpointer ui_data);
96 /**
97 * purple_smiley_theme_set_current:
98 * @theme: the smiley theme to be set as currently used. May be %NULL.
100 * Sets the new smiley theme to be used for displaying messages.
102 void
103 purple_smiley_theme_set_current(PurpleSmileyTheme *theme);
106 * purple_smiley_theme_get_current:
108 * Returns the currently used smiley theme.
110 * Returns: (transfer none): the #PurpleSmileyTheme or %NULL, if none is set.
112 PurpleSmileyTheme *
113 purple_smiley_theme_get_current(void);
116 * _purple_smiley_theme_uninit: (skip)
118 * Uninitializes the smileys theme subsystem.
120 void
121 _purple_smiley_theme_uninit(void);
123 G_END_DECLS
125 #endif /* PURPLE_SMILEY_THEME_H */