Mercurial > pidgin.yaz
annotate libpurple/smiley.h @ 29751:55515a760e87
propagate from branch 'im.pidgin.pidgin' (head 0085c32abf29d034d30feef1ffb1d483e316a9a8)
to branch 'im.pidgin.pidgin.next.minor' (head 2bbe60cf7bc2495f5e36d078796c57690c1e402b)
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 10 Feb 2010 03:43:55 +0000 |
parents | 63cb8c4f3c66 |
children | 02a2e8183b1d |
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 |
23170
d7e66b6137f9
Update changelogs and some of the docs for the new API. Preparing to merge with i.p.p
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23136
diff
changeset
|
4 * @since 2.5.0 |
22874
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 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
7 /* purple |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
8 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
9 * 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
|
10 * 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
|
11 * source distribution. |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
12 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
13 * 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
|
14 * 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
|
15 * 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
|
16 * (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
|
17 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
18 * 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
|
19 * 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
|
20 * 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
|
21 * 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
|
22 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
23 * 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
|
24 * 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
|
25 * 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
|
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 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
29 #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
|
30 #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
|
31 |
23136
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
32 #include <glib-object.h> |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
33 |
22874
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
34 #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
|
35 #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
|
36 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
37 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
38 * 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 * 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
|
40 * Everything. |
23136
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
41 * |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
42 * 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
|
43 */ |
23136
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
44 typedef struct _PurpleSmiley PurpleSmiley; |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
45 typedef struct _PurpleSmileyClass PurpleSmileyClass; |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
46 |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
47 #define PURPLE_TYPE_SMILEY (purple_smiley_get_type ()) |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
48 #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
|
49 #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
|
50 #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
|
51 #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
|
52 #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
|
53 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
54 #ifdef __cplusplus |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
55 extern "C" { |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
56 #endif |
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 /**************************************************************************/ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
59 /** @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
|
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 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
63 /** |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
64 * GObject-fu. |
23136
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
65 * @internal. |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
66 */ |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
67 GType purple_smiley_get_type(void); |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
68 |
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
69 /** |
26755 | 70 * 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
|
71 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
72 * 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
|
73 * 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
|
74 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
75 * @param img The image associated with the smiley. |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
76 * @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
|
77 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
78 * @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
|
79 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
80 PurpleSmiley * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
81 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
|
82 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
83 /** |
26755 | 84 * 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
|
85 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
86 * 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
|
87 * 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
|
88 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
89 * @param shortcut The associated shortcut (e.g. "(homer)"). |
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
90 * @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
|
91 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
92 * @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
|
93 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
94 PurpleSmiley * |
23127
3da84b370eda
Remove undocumented and [apparently] unnecessary parameter from
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22881
diff
changeset
|
95 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
|
96 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
97 /** |
28416
54efb427b91a
Minor comment cleanup stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26764
diff
changeset
|
98 * 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
|
99 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
100 * @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
|
101 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
102 void |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
103 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
|
104 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
105 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
106 * 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
|
107 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
108 * @param smiley The custom smiley. |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
109 * @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
|
110 * 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
|
111 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
112 * @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
|
113 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
114 gboolean |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
115 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
|
116 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
117 /** |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
118 * 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
|
119 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
120 * @param smiley The custom smiley. |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
121 * @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
|
122 * takes ownership of and will free. |
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
123 * @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
|
124 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
125 void |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
126 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
|
127 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
|
128 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
129 /** |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
130 * 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
|
131 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
132 * @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
|
133 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
134 * @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
|
135 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
136 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
|
137 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
138 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
139 * 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
|
140 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
141 * @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
|
142 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
143 * @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
|
144 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
145 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
|
146 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
147 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
148 * 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
|
149 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
150 * The returned PurpleStoredImage reference counter must be decremented |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
151 * 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
|
152 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
153 * @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
|
154 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
155 * @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
|
156 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
157 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
|
158 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
159 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
160 * 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
|
161 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
162 * @param smiley The custom smiley. |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
163 * @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
|
164 * 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
|
165 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
166 * @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
|
167 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
168 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
|
169 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
170 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
171 * 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
|
172 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
173 * @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
|
174 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
175 * @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
|
176 * 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
|
177 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
178 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
|
179 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
180 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
181 * 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
|
182 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
183 * 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
|
184 * 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
|
185 * |
28416
54efb427b91a
Minor comment cleanup stuff.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
26764
diff
changeset
|
186 * 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
|
187 * 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
|
188 * 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
|
189 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
190 * Think some more. |
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
191 * |
22874
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
192 * @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
|
193 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
194 * @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
|
195 * 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
|
196 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
197 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
|
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 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
202 /**************************************************************************/ |
23136
6c4f47b9d201
Make PurpleSmiley a GObject.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
23127
diff
changeset
|
203 /** @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
|
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 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
207 /** |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
208 * 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
|
209 * 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
|
210 * |
22881
d1bcb54920f8
Fix a leak, and correct the docs.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22880
diff
changeset
|
211 * @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
|
212 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
213 GList * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
214 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
|
215 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
216 /** |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
217 * 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
|
218 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
219 * @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
|
220 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
221 * @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
|
222 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
223 PurpleSmiley * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
224 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
|
225 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
226 /** |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
227 * 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
|
228 * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
229 * @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
|
230 * |
26752
f22ecddd3eba
Clean up the PurpleSmiley documentation.
Paul Aurich <paul@darkrain42.org>
parents:
23185
diff
changeset
|
231 * @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
|
232 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
233 PurpleSmiley * |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
234 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
|
235 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
236 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
237 * 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
|
238 * |
26764
0c4976fb5f57
There is no way to change the custom smiley storage directory
Paul Aurich <paul@darkrain42.org>
parents:
26760
diff
changeset
|
239 * 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
|
240 * |
26760
78ef23551355
merge of '18a763ca3d80ae60e586ade3456b8d59196a7b8f'
Paul Aurich <paul@darkrain42.org>
diff
changeset
|
241 * @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
|
242 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
243 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
|
244 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
245 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
246 * 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
|
247 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
248 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
|
249 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
250 /** |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
251 * 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
|
252 */ |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
253 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
|
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 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
257 #ifdef __cplusplus |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
258 } |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
259 #endif |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
260 |
02eda4bd2b22
Apply the custom smiley patches from #1187, from Jorge Villaseo (Masca) and
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
diff
changeset
|
261 #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
|
262 |