Mercurial > audlegacy
changeset 3699:ddde4794b4e2
Export tuple formatter API.
author | William Pitcock <nenolod@atheme.org> |
---|---|
date | Sun, 07 Oct 2007 00:16:35 -0500 |
parents | 0ef1a18a5583 |
children | 81026451b455 |
files | src/audacious/plugin.h src/audacious/pluginenum.c |
diffstat | 2 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/audacious/plugin.h Sun Oct 07 00:04:09 2007 -0500 +++ b/src/audacious/plugin.h Sun Oct 07 00:16:35 2007 -0500 @@ -257,6 +257,19 @@ const gint nfield, const gchar *field); + /* tuple formatter API */ + gchar *(*tuple_formatter_process_string)(Tuple *tuple, const gchar *string); + gchar *(*tuple_formatter_make_title_string)(Tuple *tuple, const gchar *string); + void (*tuple_formatter_register_expression)(const gchar *keyword, + gboolean (*func)(Tuple *tuple, const gchar *argument)); + void (*tuple_formatter_register_function)(const gchar *keyword, + gchar *(*func)(Tuple *tuple, gchar **argument)); + gchar *(*tuple_formatter_process_expr)(Tuple *tuple, const gchar *expression, + const gchar *argument); + gchar *(*tuple_formatter_process_function)(Tuple *tuple, const gchar *expression, + const gchar *argument); + gchar *(*tuple_formatter_process_construct)(Tuple *tuple, const gchar *string); + }; /* Convenience macros for accessing the public API. */ @@ -330,6 +343,14 @@ #define aud_tuple_get_int _audvt->tuple_get_int #define aud_tuple_free mowgli_object_unref +#define aud_tuple_formatter_process_string _audvt->tuple_formatter_process_string +#define aud_tuple_formatter_make_title_string _audvt->tuple_formatter_make_title_string +#define aud_tuple_formatter_register_expression _audvt->tuple_formatter_register_expression +#define aud_tuple_formatter_register_function _audvt->tuple_formatter_register_function +#define aud_tuple_formatter_process_expr _audvt->tuple_formatter_process_expr +#define aud_tuple_formatter_process_function _audvt->tuple_formatter_process_function +#define aud_tuple_formatter_process_construct _audvt->tuple_formatter_process_construct + /* for multi-file plugins :( */ extern struct _AudaciousFuncTableV1 *_audvt;
--- a/src/audacious/pluginenum.c Sun Oct 07 00:04:09 2007 -0500 +++ b/src/audacious/pluginenum.c Sun Oct 07 00:16:35 2007 -0500 @@ -118,6 +118,14 @@ .tuple_get_value_type = tuple_get_value_type, .tuple_get_string = tuple_get_string, .tuple_get_int = tuple_get_int, + + .tuple_formatter_process_string = tuple_formatter_process_string, + .tuple_formatter_process_function = tuple_formatter_process_function, + .tuple_formatter_process_construct = tuple_formatter_process_construct, + .tuple_formatter_process_expr = tuple_formatter_process_expr, + .tuple_formatter_register_function = tuple_formatter_register_function, + .tuple_formatter_register_expression = tuple_formatter_register_expression, + .tuple_formatter_make_title_string = tuple_formatter_make_title_string, }; /*****************************************************************/