annotate libpurple/smiley.h @ 32827:4a34689eeb33 default tip

merged from im.pidgin.pidgin
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 19 Nov 2011 14:42:54 +0900
parents 02a2e8183b1d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
1 /**
23136
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
2 * @file smiley.h Smiley API
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
3 * @ingroup core
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
4 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
5
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
6 /* purple
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
7 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
10 * source distribution.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
11 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
15 * (at your option) any later version.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
16 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
20 * GNU General Public License for more details.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
21 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
25 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
26 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
27
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
28 #ifndef _PURPLE_SMILEY_H_
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
29 #define _PURPLE_SMILEY_H_
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
30
23136
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
31 #include <glib-object.h>
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
32
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
33 #include "imgstore.h"
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
34 #include "util.h"
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
35
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
36 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
37 * A custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
38 * This contains everything Purple will ever need to know about a custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
39 * Everything.
23136
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
40 *
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
41 * PurpleSmiley is a GObject.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
42 */
23136
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
43 typedef struct _PurpleSmiley PurpleSmiley;
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
44 typedef struct _PurpleSmileyClass PurpleSmileyClass;
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
45
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
46 #define PURPLE_TYPE_SMILEY (purple_smiley_get_type ())
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
47 #define PURPLE_SMILEY(smiley) (G_TYPE_CHECK_INSTANCE_CAST ((smiley), PURPLE_TYPE_SMILEY, PurpleSmiley))
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
48 #define PURPLE_SMILEY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PURPLE_TYPE_SMILEY, PurpleSmileyClass))
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
49 #define PURPLE_IS_SMILEY(smiley) (G_TYPE_CHECK_INSTANCE_TYPE ((smiley), PURPLE_TYPE_SMILEY))
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
50 #define PURPLE_IS_SMILEY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PURPLE_TYPE_SMILEY))
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
51 #define PURPLE_SMILEY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PURPLE_TYPE_SMILEY, PurpleSmileyClass))
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
52
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
53 #ifdef __cplusplus
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
54 extern "C" {
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
55 #endif
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
56
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
57 /**************************************************************************/
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
58 /** @name Custom Smiley API */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
59 /**************************************************************************/
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
60 /*@{*/
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
61
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
62 /**
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
63 * GObject-fu.
23136
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
64 * @internal.
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
65 */
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
66 GType purple_smiley_get_type(void);
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
67
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
68 /**
26755
1af02540d7b3 Repluralize these
Paul Aurich <paul@darkrain42.org>
parents: 26752
diff changeset
69 * Creates a new custom smiley from a PurpleStoredImage.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
70 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
71 * If a custom smiley with the given shortcut already exists, it
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
72 * will be automaticaly returned.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
73 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
74 * @param img The image associated with the smiley.
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
75 * @param shortcut The associated shortcut (e.g. "(homer)").
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
76 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
77 * @return The custom smiley.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
78 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
79 PurpleSmiley *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
80 purple_smiley_new(PurpleStoredImage *img, const char *shortcut);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
81
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
82 /**
26755
1af02540d7b3 Repluralize these
Paul Aurich <paul@darkrain42.org>
parents: 26752
diff changeset
83 * Creates a new custom smiley, reading the image data from a file.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
84 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
85 * If a custom smiley with the given shortcut already exists, it
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
86 * will be automaticaly returned.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
87 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
88 * @param shortcut The associated shortcut (e.g. "(homer)").
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
89 * @param filepath The image file.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
90 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
91 * @return The custom smiley.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
92 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
93 PurpleSmiley *
23127
3da84b370eda Remove undocumented and [apparently] unnecessary parameter from
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 22881
diff changeset
94 purple_smiley_new_from_file(const char *shortcut, const char *filepath);
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
95
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
96 /**
28416
54efb427b91a Minor comment cleanup stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26764
diff changeset
97 * Destroys the custom smiley and releases the associated resources.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
98 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
99 * @param smiley The custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
100 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
101 void
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
102 purple_smiley_delete(PurpleSmiley *smiley);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
103
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
104 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
105 * Changes the custom smiley's shortcut.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
106 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
107 * @param smiley The custom smiley.
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
108 * @param shortcut The new shortcut. A custom smiley with this shortcut
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
109 * cannot already be in use.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
110 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
111 * @return TRUE if the shortcut was changed. FALSE otherwise.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
112 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
113 gboolean
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
114 purple_smiley_set_shortcut(PurpleSmiley *smiley, const char *shortcut);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
115
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
116 /**
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
117 * Changes the custom smiley's image data.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
118 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
119 * @param smiley The custom smiley.
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
120 * @param smiley_data The custom smiley data, which the smiley code
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
121 * takes ownership of and will free.
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
122 * @param smiley_data_len The length of the data in @a smiley_data.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
123 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
124 void
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
125 purple_smiley_set_data(PurpleSmiley *smiley, guchar *smiley_data,
23185
013ec6fabd3f Always store custom smileys with hashed filenames. Closes #5913.
Marcus Lundblad <ml@update.uu.se>
parents: 23170
diff changeset
126 size_t smiley_data_len);
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
127
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
128 /**
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
129 * Returns the custom smiley's associated shortcut (e.g. "(homer)").
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
130 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
131 * @param smiley The custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
132 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
133 * @return The shortcut.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
134 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
135 const char *purple_smiley_get_shortcut(const PurpleSmiley *smiley);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
136
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
137 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
138 * Returns the custom smiley data's checksum.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
139 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
140 * @param smiley The custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
141 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
142 * @return The checksum.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
143 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
144 const char *purple_smiley_get_checksum(const PurpleSmiley *smiley);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
145
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
146 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
147 * Returns the PurpleStoredImage with the reference counter incremented.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
148 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
149 * The returned PurpleStoredImage reference counter must be decremented
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
150 * when the caller is done using it.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
151 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
152 * @param smiley The custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
153 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
154 * @return A PurpleStoredImage.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
155 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
156 PurpleStoredImage *purple_smiley_get_stored_image(const PurpleSmiley *smiley);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
157
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
158 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
159 * Returns the custom smiley's data.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
160 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
161 * @param smiley The custom smiley.
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
162 * @param len If not @c NULL, the length of the image data returned
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
163 * will be set in the location pointed to by this.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
164 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
165 * @return A pointer to the custom smiley data.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
166 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
167 gconstpointer purple_smiley_get_data(const PurpleSmiley *smiley, size_t *len);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
168
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
169 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
170 * Returns an extension corresponding to the custom smiley's file type.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
171 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
172 * @param smiley The custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
173 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
174 * @return The custom smiley's extension, "icon" if unknown, or @c NULL if
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
175 * the image data has disappeared.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
176 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
177 const char *purple_smiley_get_extension(const PurpleSmiley *smiley);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
178
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
179 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
180 * Returns a full path to an custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
181 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
182 * If the custom smiley has data and the file exists in the cache, this
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
183 * will return a full path to the cached file.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
184 *
28416
54efb427b91a Minor comment cleanup stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26764
diff changeset
185 * In general, it is not appropriate to be poking in the file cache
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
186 * directly. If you find yourself wanting to use this function, think
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
187 * very long and hard about it, and then don't.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
188 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
189 * Think some more.
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
190 *
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
191 * @param smiley The custom smiley.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
192 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
193 * @return A full path to the file, or @c NULL under various conditions.
28493
63cb8c4f3c66 Fix a bunch of doxygen warnings.
Paul Aurich <paul@darkrain42.org>
parents: 28416
diff changeset
194 * The caller should use g_free to free the returned string.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
195 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
196 char *purple_smiley_get_full_path(PurpleSmiley *smiley);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
197
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
198 /*@}*/
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
199
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
200
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
201 /**************************************************************************/
23136
6c4f47b9d201 Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 23127
diff changeset
202 /** @name Custom Smiley Subsystem API */
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
203 /**************************************************************************/
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
204 /*@{*/
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
205
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
206 /**
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
207 * Returns a list of all custom smileys. The caller is responsible for freeing
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
208 * the list.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
209 *
22881
d1bcb54920f8 Fix a leak, and correct the docs.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents: 22880
diff changeset
210 * @return A list of all custom smileys.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
211 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
212 GList *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
213 purple_smileys_get_all(void);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
214
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
215 /**
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
216 * Returns a custom smiley given its shortcut.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
217 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
218 * @param shortcut The custom smiley's shortcut.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
219 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
220 * @return The custom smiley if found, or @c NULL if not found.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
221 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
222 PurpleSmiley *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
223 purple_smileys_find_by_shortcut(const char *shortcut);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
224
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
225 /**
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
226 * Returns a custom smiley given its checksum.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
227 *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
228 * @param checksum The custom smiley's checksum.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
229 *
26752
f22ecddd3eba Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents: 23185
diff changeset
230 * @return The custom smiley if found, or @c NULL if not found.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
231 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
232 PurpleSmiley *
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
233 purple_smileys_find_by_checksum(const char *checksum);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
234
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
235 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
236 * Returns the directory used to store custom smiley cached files.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
237 *
26764
0c4976fb5f57 There is no way to change the custom smiley storage directory
Paul Aurich <paul@darkrain42.org>
parents: 26760
diff changeset
238 * The default directory is PURPLEDIR/custom_smiley.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
239 *
26760
78ef23551355 merge of '18a763ca3d80ae60e586ade3456b8d59196a7b8f'
Paul Aurich <paul@darkrain42.org>
parents: 26753 26755
diff changeset
240 * @return The directory in which to store custom smileys cached files.
22874
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
241 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
242 const char *purple_smileys_get_storing_dir(void);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
243
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
244 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
245 * Initializes the custom smiley subsystem.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
246 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
247 void purple_smileys_init(void);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
248
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
249 /**
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
250 * Uninitializes the custom smiley subsystem.
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
251 */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
252 void purple_smileys_uninit(void);
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
253
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
254 /*@}*/
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
255
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
256 #ifdef __cplusplus
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
257 }
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
258 #endif
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
259
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
260 #endif /* _PURPLE_SMILEY_H_ */
02eda4bd2b22 Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff changeset
261