Mercurial > audlegacy
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 3743:587eec3cee14 | 3744:e2f8feddbb19 |
|---|---|
| 91 | 91 |
| 92 #include "audacious/playlist.h" | 92 #include "audacious/playlist.h" |
| 93 #include "audacious/input.h" | 93 #include "audacious/input.h" |
| 94 #include "audacious/mime.h" | 94 #include "audacious/mime.h" |
| 95 #include "audacious/custom_uri.h" | 95 #include "audacious/custom_uri.h" |
| 96 #include "audacious/hook.h" | |
| 96 | 97 |
| 97 #define PLUGIN_COMMON_FIELDS \ | 98 #define PLUGIN_COMMON_FIELDS \ |
| 98 gpointer handle; \ | 99 gpointer handle; \ |
| 99 gchar *filename; \ | 100 gchar *filename; \ |
| 100 gchar *description; \ | 101 gchar *description; \ |
| 436 gboolean (*playlist_playlists_equal)(Playlist *p1, Playlist *p2); | 437 gboolean (*playlist_playlists_equal)(Playlist *p1, Playlist *p2); |
| 437 | 438 |
| 438 /* state vars */ | 439 /* state vars */ |
| 439 InputPluginData *ip_state; | 440 InputPluginData *ip_state; |
| 440 BmpConfig *_cfg; | 441 BmpConfig *_cfg; |
| 442 | |
| 443 /* hook API */ | |
| 444 void (*hook_register)(const gchar *name); | |
| 445 gint (*hook_associate)(const gchar *name, HookFunction func, gpointer user_data); | |
| 446 gint (*hook_dissociate)(const gchar *name, HookFunction func); | |
| 447 void (*hook_call)(const gchar *name, gpointer hook_data); | |
| 441 }; | 448 }; |
| 442 | 449 |
| 443 /* Convenience macros for accessing the public API. */ | 450 /* Convenience macros for accessing the public API. */ |
| 444 /* public name vtable mapping */ | 451 /* public name vtable mapping */ |
| 445 #define aud_vfs_fopen _audvt->vfs_fopen | 452 #define aud_vfs_fopen _audvt->vfs_fopen |
| 654 #define aud_playlist_playlists_equal _audvt->playlist_playlists_equal | 661 #define aud_playlist_playlists_equal _audvt->playlist_playlists_equal |
| 655 | 662 |
| 656 #define aud_ip_state _audvt->ip_state | 663 #define aud_ip_state _audvt->ip_state |
| 657 #define aud_cfg _audvt->_cfg | 664 #define aud_cfg _audvt->_cfg |
| 658 | 665 |
| 666 #define aud_hook_associate _audvt->hook_associate | |
| 667 #define aud_hook_dissociate _audvt->hook_dissociate | |
| 668 #define aud_hook_register _audvt->hook_register | |
| 669 #define aud_hook_call _audvt->hook_call | |
| 670 | |
| 659 /* for multi-file plugins :( */ | 671 /* for multi-file plugins :( */ |
| 660 extern struct _AudaciousFuncTableV1 *_audvt; | 672 extern struct _AudaciousFuncTableV1 *_audvt; |
| 661 | 673 |
| 662 #define DECLARE_PLUGIN(name, init, fini, ...) \ | 674 #define DECLARE_PLUGIN(name, init, fini, ...) \ |
| 663 G_BEGIN_DECLS \ | 675 G_BEGIN_DECLS \ |
