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