diff src/audacious/plugin.h @ 3744:e2f8feddbb19

export hook API
author William Pitcock <nenolod@atheme.org>
date Sun, 14 Oct 2007 03:08:12 -0500
parents a1b31fe5a249
children e26ac0692e8f
line wrap: on
line diff
--- a/src/audacious/plugin.h	Sun Oct 14 02:47:41 2007 -0500
+++ b/src/audacious/plugin.h	Sun Oct 14 03:08:12 2007 -0500
@@ -93,6 +93,7 @@
 #include "audacious/input.h"
 #include "audacious/mime.h"
 #include "audacious/custom_uri.h"
+#include "audacious/hook.h"
 
 #define PLUGIN_COMMON_FIELDS		\
     gpointer handle;			\
@@ -438,6 +439,12 @@
     /* state vars */
     InputPluginData *ip_state;
     BmpConfig *_cfg;
+
+    /* hook API */
+    void (*hook_register)(const gchar *name);
+    gint (*hook_associate)(const gchar *name, HookFunction func, gpointer user_data);
+    gint (*hook_dissociate)(const gchar *name, HookFunction func);
+    void (*hook_call)(const gchar *name, gpointer hook_data);
 };
 
 /* Convenience macros for accessing the public API. */
@@ -656,6 +663,11 @@
 #define aud_ip_state				_audvt->ip_state
 #define aud_cfg					_audvt->_cfg
 
+#define aud_hook_associate			_audvt->hook_associate
+#define aud_hook_dissociate			_audvt->hook_dissociate
+#define aud_hook_register			_audvt->hook_register
+#define aud_hook_call				_audvt->hook_call
+
 /* for multi-file plugins :( */
 extern struct _AudaciousFuncTableV1 *_audvt;