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
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
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, but it's up to the UI to
37 #include <glib-object.h>
40 #include "smiley-list.h"
44 #define PURPLE_TYPE_SMILEY_THEME purple_smiley_theme_get_type()
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
)
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
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
67 GObjectClass parent_class
;
70 PurpleSmileyList
* (*get_smileys
)(PurpleSmileyTheme
*theme
,
72 void (*activate
)(PurpleSmileyTheme
*theme
);
75 void (*purple_reserved1
)(void);
76 void (*purple_reserved2
)(void);
77 void (*purple_reserved3
)(void);
78 void (*purple_reserved4
)(void);
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.
94 purple_smiley_theme_get_smileys(PurpleSmileyTheme
*theme
, gpointer ui_data
);
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.
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.
113 purple_smiley_theme_get_current(void);
116 * _purple_smiley_theme_uninit: (skip)
118 * Uninitializes the smileys theme subsystem.
121 _purple_smiley_theme_uninit(void);
125 #endif /* PURPLE_SMILEY_THEME_H */