pidgin/gtksmiley-theme.c

changeset 35704
aa22dcef8913
child 35705
3203e0f1b1bd
equal deleted inserted replaced
35703:238e0042049a 35704:aa22dcef8913
1 /* pidgin
2 *
3 * Pidgin 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.
6 *
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.
11 *
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.
16 *
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
20 */
21
22 #include "gtksmiley-theme.h"
23
24 #define PIDGIN_SMILEY_THEME_GET_PRIVATE(obj) \
25 (G_TYPE_INSTANCE_GET_PRIVATE((obj), PIDGIN_TYPE_SMILEY_THEME, \
26 PurpleSmileyThemePrivate))
27
28 typedef struct
29 {
30 } PurpleSmileyThemePrivate;
31
32 static GObjectClass *parent_class;
33
34 /*******************************************************************************
35 * API implementation
36 ******************************************************************************/
37
38 static PurpleSmileyList *
39 pidgin_smiley_theme_get_smileys_impl(PurpleSmileyTheme *theme, gpointer ui_data)
40 {
41 return NULL;
42 }
43
44 void
45 pidgin_smiley_theme_init(void)
46 {
47 }
48
49
50 /*******************************************************************************
51 * Object stuff
52 ******************************************************************************/
53
54 static void
55 pidgin_smiley_theme_finalize(GObject *obj)
56 {
57 G_OBJECT_CLASS(parent_class)->finalize(obj);
58 }
59
60 static void
61 pidgin_smiley_theme_class_init(PurpleSmileyListClass *klass)
62 {
63 GObjectClass *gobj_class = G_OBJECT_CLASS(klass);
64 PurpleSmileyThemeClass *pst_class = PURPLE_SMILEY_THEME_CLASS(klass);
65
66 parent_class = g_type_class_peek_parent(klass);
67
68 g_type_class_add_private(klass, sizeof(PurpleSmileyThemePrivate));
69
70 gobj_class->finalize = pidgin_smiley_theme_finalize;
71
72 pst_class->get_smileys = pidgin_smiley_theme_get_smileys_impl;
73 }
74
75 GType
76 purple_smiley_theme_get_type(void)
77 {
78 static GType type = 0;
79
80 if (G_UNLIKELY(type == 0)) {
81 static const GTypeInfo info = {
82 .class_size = sizeof(PurpleSmileyThemeClass),
83 .class_init = (GClassInitFunc)pidgin_smiley_theme_class_init,
84 .instance_size = sizeof(PurpleSmileyTheme),
85 };
86
87 type = g_type_register_static(G_TYPE_OBJECT,
88 "PurpleSmileyTheme", &info, G_TYPE_FLAG_ABSTRACT);
89 }
90
91 return type;
92 }

mercurial