changeset 3751:0fb35f6cc4b7

PluginMenu API is exported now. No changes required to plugins.
author William Pitcock <nenolod@atheme.org>
date Sun, 14 Oct 2007 16:58:36 -0500
parents e97cee2185ce
children 21a86c4ad40c
files src/audacious/plugin.h src/audacious/pluginenum.c src/audacious/ui_manager.c src/audacious/ui_plugin_menu.h
diffstat 4 files changed, 17 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/plugin.h	Sun Oct 14 03:57:38 2007 -0500
+++ b/src/audacious/plugin.h	Sun Oct 14 16:58:36 2007 -0500
@@ -97,6 +97,7 @@
 #include "audacious/custom_uri.h"
 #include "audacious/hook.h"
 #include "audacious/xconvert.h"
+#include "audacious/ui_plugin_menu.h"
 
 #define PLUGIN_COMMON_FIELDS		\
     gpointer handle;			\
@@ -469,6 +470,10 @@
     convert_freq_func_t (*xmms_convert_get_frequency_func)(AFormat fmt,
                                                     int channels);
 
+    /* PluginMenu API */
+    gint (*menu_plugin_item_add)(gint, GtkWidget *);
+    gint (*menu_plugin_item_remove)(gint, GtkWidget *);
+
 };
 
 /* Convenience macros for accessing the public API. */
@@ -704,6 +709,11 @@
 #define aud_convert_get_channel_func		_audvt->xmms_convert_get_channel_func
 #define aud_convert_get_frequency_func		_audvt->xmms_convert_get_frequency_func
 
+#define audacious_menu_plugin_item_add		_audvt->menu_plugin_item_add
+#define audacious_menu_plugin_item_remove	_audvt->menu_plugin_item_remove
+#define aud_menu_plugin_item_add		_audvt->menu_plugin_item_add
+#define aud_menu_plugin_item_remove		_audvt->menu_plugin_item_remove
+
 /* for multi-file plugins :( */
 extern struct _AudaciousFuncTableV1 *_audvt;
 
--- a/src/audacious/pluginenum.c	Sun Oct 14 03:57:38 2007 -0500
+++ b/src/audacious/pluginenum.c	Sun Oct 14 16:58:36 2007 -0500
@@ -279,6 +279,9 @@
     .xmms_convert_get_func = xmms_convert_get_func,
     .xmms_convert_get_channel_func = xmms_convert_get_channel_func,
     .xmms_convert_get_frequency_func = xmms_convert_get_frequency_func,
+
+    .menu_plugin_item_add = menu_plugin_item_add,
+    .menu_plugin_item_remove = menu_plugin_item_remove,
 };
 
 /*****************************************************************/
--- a/src/audacious/ui_manager.c	Sun Oct 14 03:57:38 2007 -0500
+++ b/src/audacious/ui_manager.c	Sun Oct 14 16:58:36 2007 -0500
@@ -810,7 +810,7 @@
 
 
 gint
-audacious_menu_plugin_item_add( gint menu_id , GtkWidget * item )
+menu_plugin_item_add( gint menu_id , GtkWidget * item )
 {
   if ( menu_created )
   {
@@ -840,7 +840,7 @@
 
 
 gint
-audacious_menu_plugin_item_remove( gint menu_id , GtkWidget * item )
+menu_plugin_item_remove( gint menu_id , GtkWidget * item )
 {
   if ( menu_created )
   {
--- a/src/audacious/ui_plugin_menu.h	Sun Oct 14 03:57:38 2007 -0500
+++ b/src/audacious/ui_plugin_menu.h	Sun Oct 14 16:58:36 2007 -0500
@@ -35,8 +35,8 @@
 #define AUDACIOUS_MENU_PLAYLIST_SELECT  5
 #define AUDACIOUS_MENU_PLAYLIST_MISC    6
 
-gint audacious_menu_plugin_item_add( gint , GtkWidget * );
-gint audacious_menu_plugin_item_remove( gint , GtkWidget * );
+gint menu_plugin_item_add( gint , GtkWidget * );
+gint menu_plugin_item_remove( gint , GtkWidget * );
 
 
 #endif /* AUD_UIPLUGINMENU_H */