diff options
author | Xavier Claessens <xclaesse@gmail.com> | 2009-11-24 22:54:21 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2009-11-25 01:29:45 +0800 |
commit | 9c1e21c7ad3ba913ebf144b498aa2de6d22a7797 (patch) | |
tree | 6ac07a5634e6ca93cf9b7ea0edbe0a9e9cc9bb0a /libempathy-gtk/empathy-ui-utils.h | |
parent | ebaadd93adf03514e9e629b6ae7b065803b046e7 (diff) | |
download | gsoc2013-empathy-9c1e21c7ad3ba913ebf144b498aa2de6d22a7797.tar gsoc2013-empathy-9c1e21c7ad3ba913ebf144b498aa2de6d22a7797.tar.gz gsoc2013-empathy-9c1e21c7ad3ba913ebf144b498aa2de6d22a7797.tar.bz2 gsoc2013-empathy-9c1e21c7ad3ba913ebf144b498aa2de6d22a7797.tar.lz gsoc2013-empathy-9c1e21c7ad3ba913ebf144b498aa2de6d22a7797.tar.xz gsoc2013-empathy-9c1e21c7ad3ba913ebf144b498aa2de6d22a7797.tar.zst gsoc2013-empathy-9c1e21c7ad3ba913ebf144b498aa2de6d22a7797.zip |
Replace GString param with a generic gpointer user_data, and port EmpathyChatTextView to new parser API.
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.h')
-rw-r--r-- | libempathy-gtk/empathy-ui-utils.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h index f125b06dd..65fc9ac0e 100644 --- a/libempathy-gtk/empathy-ui-utils.h +++ b/libempathy-gtk/empathy-ui-utils.h @@ -118,18 +118,17 @@ gchar * empathy_make_absolute_url_len (const gchar *url, guint len); /* String parser */ - typedef struct _EmpathyStringParser EmpathyStringParser; -typedef void (*EmpathyStringReplace) (GString *string, - const gchar *text, +typedef void (*EmpathyStringReplace) (const gchar *text, gssize len, + gpointer match_data, gpointer user_data); -typedef void (*EmpathyStringMatch) (GString *string, - const gchar *text, +typedef void (*EmpathyStringMatch) (const gchar *text, gssize len, EmpathyStringReplace replace_func, - EmpathyStringParser *sub_parsers); + EmpathyStringParser *sub_parsers, + gpointer user_data); struct _EmpathyStringParser { EmpathyStringMatch match_func; @@ -137,31 +136,31 @@ struct _EmpathyStringParser { }; void -empathy_string_parser_substr (GString *string, - const gchar *text, +empathy_string_parser_substr (const gchar *text, gssize len, - EmpathyStringParser *parsers); + EmpathyStringParser *parsers, + gpointer user_data); void -empathy_string_match_link (GString *string, - const gchar *text, +empathy_string_match_link (const gchar *text, gssize len, EmpathyStringReplace replace_func, - EmpathyStringParser *sub_parsers); + EmpathyStringParser *sub_parsers, + gpointer user_data); void -empathy_string_match_smiley (GString *string, - const gchar *text, +empathy_string_match_smiley (const gchar *text, gssize len, EmpathyStringReplace replace_func, - EmpathyStringParser *sub_parsers); + EmpathyStringParser *sub_parsers, + gpointer user_data); void -empathy_string_match_escape (GString *string, - const gchar *text, - gssize len, - EmpathyStringReplace replace_func, - EmpathyStringParser *sub_parsers); +empathy_string_match_all (const gchar *text, + gssize len, + EmpathyStringReplace replace_func, + EmpathyStringParser *sub_parsers, + gpointer user_data); G_END_DECLS |