Mon, 12 Apr 2021 20:27:47 -0500
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Testing Done:
Compiled and ran locally including docs and pot file. The pot file fails as I need to rebase on [596](https://reviews.imfreedom.org/r/596/)
Reviewed at https://reviews.imfreedom.org/r/597/
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
1 | /* purple |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
2 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
3 | * Purple is the legal property of its developers, whose names are too numerous |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
5 | * source distribution. |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
6 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
11 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
16 | * |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
20 | */ |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
21 | |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
39738
diff
changeset
|
22 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
39738
diff
changeset
|
23 | # error "only <purple.h> may be included directly" |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
39738
diff
changeset
|
24 | #endif |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
39738
diff
changeset
|
25 | |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
26 | #ifndef PURPLE_SMILEY_LIST_H |
|
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
27 | #define PURPLE_SMILEY_LIST_H |
|
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
28 | |
|
35774
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
29 | /** |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
30 | * SECTION:smiley-list |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
31 | * @include:smiley-list.h |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
32 | * @section_id: libpurple-smiley-list |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
33 | * @short_description: a collection of smileys |
|
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
34 | * @title: Smiley lists |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
35 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
36 | * A #PurpleSmileyList is a handy storage for a set of #PurpleSmiley's. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
37 | * It holds structures needed for parsing, accessing them by a shortcut, or |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
38 | * listing (either all, or by unique image). |
|
35774
9227a7757e92
Comments: PurpleSmiley
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35771
diff
changeset
|
39 | */ |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
40 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
41 | #include <glib-object.h> |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
42 | |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
43 | #include "smiley.h" |
|
35709
0d7a84931572
Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35702
diff
changeset
|
44 | #include "trie.h" |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
45 | |
|
39541
ff728cd0c5ab
Use G_DECLARE_FINAL_TYPE in smiley-list.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38716
diff
changeset
|
46 | G_BEGIN_DECLS |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
47 | |
|
40524
a3b1cde8d2d8
Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
48 | /** |
|
a3b1cde8d2d8
Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
49 | * PURPLE_TYPE_SMILEY_LIST: |
|
a3b1cde8d2d8
Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
50 | * |
|
a3b1cde8d2d8
Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
51 | * The standard _get_type macro for #PurpleSmileyList. |
|
a3b1cde8d2d8
Add documentation for all PURPLE_TYPE_ functions as well as PURPLE_TUNE_ constants
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
52 | */ |
|
39541
ff728cd0c5ab
Use G_DECLARE_FINAL_TYPE in smiley-list.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38716
diff
changeset
|
53 | #define PURPLE_TYPE_SMILEY_LIST purple_smiley_list_get_type() |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
54 | |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
55 | /** |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
56 | * purple_smiley_list_get_type: |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
57 | * |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
58 | * Returns: the #GType for a smiley list. |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
59 | */ |
|
39541
ff728cd0c5ab
Use G_DECLARE_FINAL_TYPE in smiley-list.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38716
diff
changeset
|
60 | G_DECLARE_FINAL_TYPE(PurpleSmileyList, purple_smiley_list, PURPLE, |
|
ff728cd0c5ab
Use G_DECLARE_FINAL_TYPE in smiley-list.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38716
diff
changeset
|
61 | SMILEY_LIST, GObject) |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
62 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
63 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
64 | * purple_smiley_list_new: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
65 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
66 | * Creates new #PurpleSmileyList. You might prefer using existing lists, like |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
67 | * #purple_smiley_custom_get_list or #purple_conversation_get_remote_smileys |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
68 | * (the latter is read-only, accessed with |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
69 | * #purple_conversation_add_remote_smiley and |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
70 | * #purple_conversation_get_remote_smiley). |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
71 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
72 | * Returns: newly created #PurpleSmileyList. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
73 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
74 | PurpleSmileyList *purple_smiley_list_new(void); |
|
35709
0d7a84931572
Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35702
diff
changeset
|
75 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
76 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
77 | * purple_smiley_list_add: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
78 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
79 | * @smiley: the smiley to be added. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
80 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
81 | * Adds the @smiley to the @list. A particular @smiley can only be added to |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
82 | * a single @list. Also, a @list can not contain multiple @smiley's with |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
83 | * the same shortcut. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
84 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
85 | * It increases the reference count of @smiley, if needed. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
86 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
87 | * Returns: %TRUE if the @smiley was successfully added to the list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
88 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
89 | gboolean purple_smiley_list_add(PurpleSmileyList *list, PurpleSmiley *smiley); |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
90 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
91 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
92 | * purple_smiley_list_remove: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
93 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
94 | * @smiley: the smiley to be removed. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
95 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
96 | * Removes a @smiley from the @list. If @smiley's reference count drops to zero, |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
97 | * it's destroyed. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
98 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
99 | void purple_smiley_list_remove(PurpleSmileyList *list, PurpleSmiley *smiley); |
|
35702
06a934baa610
Smiley list: add/remove
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35701
diff
changeset
|
100 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
101 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
102 | * purple_smiley_list_is_empty: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
103 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
104 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
105 | * Checks, if the smiley @list is empty. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
106 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
107 | * Returns: %TRUE if the @list is empty, %FALSE otherwise. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
108 | */ |
|
39541
ff728cd0c5ab
Use G_DECLARE_FINAL_TYPE in smiley-list.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38716
diff
changeset
|
109 | gboolean purple_smiley_list_is_empty(PurpleSmileyList *list); |
|
35738
030ce6840163
Smileys: toolbar button sensitivity
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35728
diff
changeset
|
110 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
111 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
112 | * purple_smiley_list_get_by_shortcut: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
113 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
114 | * @shortcut: the textual representation of smiley to lookup. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
115 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
116 | * Retrieves a smiley with the specified @shortcut from the @list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
117 | * |
|
39738
14d425a528ad
Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39541
diff
changeset
|
118 | * Returns: (transfer none): A #PurpleSmiley if the smiley was found, %NULL |
|
14d425a528ad
Add missing transfer annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39541
diff
changeset
|
119 | * otherwise. |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
120 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
121 | PurpleSmiley *purple_smiley_list_get_by_shortcut(PurpleSmileyList *list, const gchar *shortcut); |
|
35717
45bde03f86a6
Custom smileys: simplify storage implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35713
diff
changeset
|
122 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
123 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
124 | * purple_smiley_list_get_trie: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
125 | * @list: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
126 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
127 | * Returns the #PurpleTrie for searching of #PurpleSmiley's being kept |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
128 | * in the @list. It holds markup escaped shortcuts, so if you want to search |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
129 | * in plain message, you have to escape it first. If you don't do this, it won't |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
130 | * find smileys containing special characters. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
131 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
132 | * Returns: (transfer none): a #PurpleTrie for contained smileys. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
133 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
134 | PurpleTrie *purple_smiley_list_get_trie(PurpleSmileyList *list); |
|
35709
0d7a84931572
Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35702
diff
changeset
|
135 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
136 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
137 | * purple_smiley_list_get_unique: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
138 | * @list_: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
139 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
140 | * Returns the list of smileys with unique image file paths. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
141 | * |
|
38716
b9bed228745a
Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38281
diff
changeset
|
142 | * Returns: (element-type PurpleSmiley) (transfer container): the list of unique smileys. |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
143 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
144 | GList *purple_smiley_list_get_unique(PurpleSmileyList *list_); |
|
35713
4423f463a782
Smileys in PidginWebviewToolbar
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35709
diff
changeset
|
145 | |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
146 | /** |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
147 | * purple_smiley_list_get_all: |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
148 | * @list_: the smiley list. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
149 | * |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
150 | * Returns the list of all smileys added to the @list_. |
|
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
151 | * |
|
38716
b9bed228745a
Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38281
diff
changeset
|
152 | * Returns: (element-type PurpleSmiley) (transfer container): the list of smileys. |
|
35777
23e6e95b45d3
Comments: PurpleSmileyList
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35774
diff
changeset
|
153 | */ |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
154 | GList *purple_smiley_list_get_all(PurpleSmileyList *list_); |
|
35728
6cd9aee7f276
Smiley manager: edit, delete
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
35717
diff
changeset
|
155 | |
|
35701
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
156 | G_END_DECLS |
|
34f4a4318d19
Initial PurpleSmileyList implementation
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff
changeset
|
157 | |
|
38281
df274be2afa2
A bunch more hack and slash with a bit more design on the fly
Gary Kramlich <grim@reaperworld.com>
parents:
35777
diff
changeset
|
158 | #endif /* PURPLE_SMILEY_LIST_H */ |