libpurple/smiley-parser.h

Fri, 04 Apr 2014 20:30:07 +0200

author
Tomasz Wasilczyk <twasilczyk@pidgin.im>
date
Fri, 04 Apr 2014 20:30:07 +0200
changeset 35753
222e69060b4a
parent 35752
77cec2a188ee
child 35755
d91c44b4a8e6
permissions
-rw-r--r--

Remote smileys: display them even on the first time

35709
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
1 /* purple
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
2 *
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
5 * source distribution.
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
6 *
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
11 *
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
16 *
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
20 */
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
21
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
22 #ifndef _PURPLE_SMILEY_PARSER_H_
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
23 #define _PURPLE_SMILEY_PARSER_H_
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
24
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
25 #include "purple.h"
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
26
35747
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
27 typedef void (*PurpleSmileyParseCb)(GString *out, PurpleSmiley *smiley,
35752
77cec2a188ee Smileys: add PurpleConversation to the parser callback
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35747
diff changeset
28 PurpleConversation *conv, gpointer ui_data);
35747
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
29
35716
80bedd712883 Custom smileys: parse and display in toolbar
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35709
diff changeset
30 gboolean
80bedd712883 Custom smileys: parse and display in toolbar
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35709
diff changeset
31 purple_smiley_parse_escape(void);
80bedd712883 Custom smileys: parse and display in toolbar
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35709
diff changeset
32
35747
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
33 /* XXX: this shouldn't be a conv for incoming messages - see
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
34 * PurpleConversationPrivate#remote_smileys.
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
35 * For outgoing, we could pass conv in ui_data (or something).
35752
77cec2a188ee Smileys: add PurpleConversation to the parser callback
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35747
diff changeset
36 *
77cec2a188ee Smileys: add PurpleConversation to the parser callback
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35747
diff changeset
37 * @ui_data is passed to @cb and #purple_smiley_theme_get_smileys.
35747
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
38 */
35709
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
39 gchar *
35747
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
40 purple_smiley_parse(PurpleConversation *conv, const gchar *message,
25085b485441 Remote smileys: parse them too
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 35716
diff changeset
41 PurpleSmileyParseCb cb, gpointer ui_data);
35709
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
42
0d7a84931572 Smileys: implement and use new parser, only themes for now
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
diff changeset
43 #endif /* _PURPLE_SMILEY_PARSER_H_ */

mercurial