summaryrefslogtreecommitdiff
path: root/pidgin/gtksmiley-theme.h
blob: 209210bed09469e2915a5f96b23165f790a44474 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
/* pidgin
 *
 * Pidgin is the legal property of its developers, whose names are too numerous
 * to list here.  Please refer to the COPYRIGHT file distributed with this
 * source distribution.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
 */

#ifndef _PIDGIN_SMILEY_THEME_H_
#define _PIDGIN_SMILEY_THEME_H_
/**
 * SECTION:gtksmiley-theme
 * @include:gtksmiley-theme.h
 * @section_id: pidgin-smiley-theme
 * @short_description: a per-protocol categorized sets of standard smileys
 * @title: Pidgin's smiley themes
 *
 * This class implements a per-protocol based #PurpleSmileyTheme.
 */

#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf.h>

#include "conversation.h"
#include "smiley-theme.h"

typedef struct _PidginSmileyTheme PidginSmileyTheme;
typedef struct _PidginSmileyThemeClass PidginSmileyThemeClass;

#define PIDGIN_TYPE_SMILEY_THEME            (pidgin_smiley_theme_get_type())
#define PIDGIN_SMILEY_THEME(smiley)         (G_TYPE_CHECK_INSTANCE_CAST((smiley), PIDGIN_TYPE_SMILEY_THEME, PidginSmileyTheme))
#define PIDGIN_SMILEY_THEME_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_SMILEY_THEME, PidginSmileyThemeClass))
#define PIDGIN_IS_SMILEY_THEME(smiley)      (G_TYPE_CHECK_INSTANCE_TYPE((smiley), PIDGIN_TYPE_SMILEY_THEME))
#define PIDGIN_IS_SMILEY_THEME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_SMILEY_THEME))
#define PIDGIN_SMILEY_THEME_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PIDGIN_TYPE_SMILEY_THEME, PidginSmileyThemeClass))

/**
 * PidginSmileyTheme:
 *
 * An implementation of a smiley theme.
 */
struct _PidginSmileyTheme
{
	/*< private >*/
	PurpleSmileyTheme parent;
};

/**
 * PidginSmileyThemeClass:
 *
 * Base class for #PidginSmileyTheme objects.
 */
struct _PidginSmileyThemeClass
{
	/*< private >*/
	PurpleSmileyThemeClass parent_class;

	void (*pidgin_reserved1)(void);
	void (*pidgin_reserved2)(void);
	void (*pidgin_reserved3)(void);
	void (*pidgin_reserved4)(void);
};

G_BEGIN_DECLS

/**
 * pidgin_smiley_theme_get_type:
 *
 * Returns: the #GType for a smiley list.
 */
GType
pidgin_smiley_theme_get_type(void);

/**
 * pidgin_smiley_theme_get_name:
 * @theme: the smiley theme.
 *
 * Returns the name for a @theme. Valid themes always have the name set.
 *
 * Returns: (transfer none): the name string, or %NULL if error occured.
 */
const gchar *
pidgin_smiley_theme_get_name(PidginSmileyTheme *theme);

/**
 * pidgin_smiley_theme_get_description:
 * @theme: the smiley theme.
 *
 * Returns the description for a @theme.
 *
 * Returns: (transfer none): the description string, or %NULL if it's not
 *          set or error occured.
 */
const gchar *
pidgin_smiley_theme_get_description(PidginSmileyTheme *theme);

/**
 * pidgin_smiley_theme_get_icon:
 * @theme: the smiley theme.
 *
 * Returns the @theme's icon image, possibly loading it from the disk (and
 * adding it to the cache).
 *
 * Returns: (transfer none): the @theme's icon image.
 */
GdkPixbuf *
pidgin_smiley_theme_get_icon(PidginSmileyTheme *theme);

/**
 * pidgin_smiley_theme_get_author:
 * @theme: the smiley theme.
 *
 * Returns the autor of @theme.
 *
 * Returns: (transfer none): the author string, or %NULL if it's not
 *          set or error occured.
 */
const gchar *
pidgin_smiley_theme_get_author(PidginSmileyTheme *theme);

/**
 * pidgin_smiley_theme_for_conv:
 * @conv: the conversation.
 *
 * Gets the smiley list for a @conv based on current theme.
 *
 * Returns: (transfer none): the smiley list, or %NULL if there
 *          is no smiley theme set.
 */
PurpleSmileyList *
pidgin_smiley_theme_for_conv(PurpleConversation *conv);

/**
 * pidgin_smiley_theme_get_all:
 *
 * Returns the list of currently available smiley themes.
 *
 * Returns: (transfer none): the #GList of #PidginSmileyTheme's.
 */
GList *
pidgin_smiley_theme_get_all(void);

/**
 * _pidgin_smiley_theme_init: (skip)
 *
 * Initializes the Pidgin's smiley theme subsystem.
 */
void
_pidgin_smiley_theme_init(void);

/**
 * _pidgin_smiley_theme_uninit: (skip)
 *
 * Unitializes the Pidgin's smiley theme subsystem.
 */
void
_pidgin_smiley_theme_uninit(void);

G_END_DECLS

#endif /* _PIDGIN_SMILEY_THEME_H_ */