summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-12-31 14:00:57 +0100
committerGravatar waker <wakeroid@gmail.com>2010-12-31 14:00:57 +0100
commit1dec3a1551bc33f7f373286fb3e0c823f8a1467c (patch)
tree9717b99bd45bed684a5162e1b35fd93af55210b7
parente06308f8f5105f4d2d6eac3665b543ef6f360341 (diff)
removed some unnecessary functions from plugin API
-rw-r--r--deadbeef.h6
-rw-r--r--plugins.c44
-rw-r--r--plugins.h21
-rw-r--r--plugins/converter/convgui.c4
-rw-r--r--plugins/hotkeys/hotkeys.c16
5 files changed, 10 insertions, 81 deletions
diff --git a/deadbeef.h b/deadbeef.h
index b143648e..0ad79009 100644
--- a/deadbeef.h
+++ b/deadbeef.h
@@ -310,12 +310,6 @@ typedef struct {
void (*md5_finish)(DB_md5_t *s, uint8_t digest[16]);
// playback control
struct DB_output_s* (*get_output) (void);
- void (*playback_next) (void);
- void (*playback_prev) (void);
- void (*playback_pause) (void);
- void (*playback_stop) (void);
- void (*playback_play) (void);
- void (*playback_random) (void);
float (*playback_get_pos) (void); // [0..100]
void (*playback_set_pos) (float pos); // [0..100]
// streamer access
diff --git a/plugins.c b/plugins.c
index 2eb861d6..4a7e1f16 100644
--- a/plugins.c
+++ b/plugins.c
@@ -68,12 +68,6 @@ static DB_functions_t deadbeef_api = {
.md5_append = (void (*)(DB_md5_t *s, const uint8_t *daya, int nbytes))md5_append,
.md5_finish = (void (*)(DB_md5_t *s, uint8_t digest[16]))md5_finish,
.get_output = plug_get_output,
- .playback_next = plug_playback_next,
- .playback_prev = plug_playback_prev,
- .playback_pause = plug_playback_pause,
- .playback_stop = plug_playback_stop,
- .playback_play = plug_playback_play,
- .playback_random = plug_playback_random,
.playback_get_pos = plug_playback_get_pos,
.playback_set_pos = plug_playback_set_pos,
// streamer access
@@ -96,8 +90,6 @@ static DB_functions_t deadbeef_api = {
.get_doc_dir = plug_get_doc_dir,
.get_plugin_dir = plug_get_plugin_dir,
.get_pixmap_dir = plug_get_pixmap_dir,
- // process control
- .quit = plug_quit,
// threading
.thread_start = thread_start,
.thread_start_low_priority = thread_start_low_priority,
@@ -402,36 +394,6 @@ plug_ev_unsubscribe (DB_plugin_t *plugin, int ev, DB_callback_t callback, uintpt
mutex_unlock (mutex);
}
-void
-plug_playback_next (void) {
- messagepump_push (M_NEXT, 0, 0, 0);
-}
-
-void
-plug_playback_prev (void) {
- messagepump_push (M_PREV, 0, 0, 0);
-}
-
-void
-plug_playback_pause (void) {
- messagepump_push (M_TOGGLE_PAUSE, 0, 0, 0);
-}
-
-void
-plug_playback_stop (void) {
- messagepump_push (M_STOP, 0, 0, 0);
-}
-
-void
-plug_playback_play (void) {
- messagepump_push (M_PLAY_CURRENT, 0, 0, 0);
-}
-
-void
-plug_playback_random (void) {
- messagepump_push (M_PLAY_RANDOM, 0, 0, 0);
-}
-
float
plug_playback_get_pos (void) {
playItem_t *trk = streamer_get_playing_track ();
@@ -463,12 +425,6 @@ plug_playback_set_pos (float pos) {
streamer_set_seek (t);
}
-void
-plug_quit (void) {
- // FIXME progress_abort ();
- messagepump_push (M_TERMINATE, 0, 0, 0);
-}
-
/////// non-api functions (plugin support)
void
plug_event_call (DB_event_t *ev) {
diff --git a/plugins.h b/plugins.h
index 431a75a7..80d44334 100644
--- a/plugins.h
+++ b/plugins.h
@@ -66,27 +66,6 @@ plug_md5 (uint8_t sig[16], const char *in, int len);
void
plug_md5_to_str (char *str, const uint8_t sig[16]);
-void
-plug_playback_next (void);
-
-void
-plug_playback_prev (void);
-
-void
-plug_playback_pause (void);
-
-void
-plug_playback_stop (void);
-
-void
-plug_playback_play (void);
-
-void
-plug_playback_random (void);
-
-void
-plug_quit (void);
-
float
plug_playback_get_pos (void);
diff --git a/plugins/converter/convgui.c b/plugins/converter/convgui.c
index b64d5853..484eb5c2 100644
--- a/plugins/converter/convgui.c
+++ b/plugins/converter/convgui.c
@@ -282,7 +282,7 @@ on_converter_output_browse_clicked (GtkButton *button,
if (folder) {
deadbeef->conf_set_str ("filechooser.lastdir", folder);
g_free (folder);
- deadbeef->sendmessage (M_CONFIGCHANGED, 0, 0, 0);
+ deadbeef->sendmessage (M_CONFIG_CHANGED, 0, 0, 0);
}
if (response == GTK_RESPONSE_OK) {
folder = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dlg));
@@ -737,7 +737,7 @@ on_dsp_preset_plugin_configure_clicked (GtkButton *button,
.set_param = dsp_ctx_set_param,
.get_param = dsp_ctx_get_param,
};
- gtkui_plugin->gui.run_dialog (&conf, 0);
+ gtkui_plugin->gui.run_dialog (&conf, 0, NULL, NULL);
current_dsp_context = NULL;
}
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c
index 26e6a864..0cc246b0 100644
--- a/plugins/hotkeys/hotkeys.c
+++ b/plugins/hotkeys/hotkeys.c
@@ -508,31 +508,31 @@ hotkeys_reset (void) {
int
action_play_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
- deadbeef->playback_play ();
+ deadbeef->sendmessage (M_PLAY_CURRENT, 0, 0, 0);
return 0;
}
int
action_prev_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
- deadbeef->playback_prev ();
+ deadbeef->sendmessage (M_PREV, 0, 0, 0);
return 0;
}
int
action_next_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
- deadbeef->playback_next ();
+ deadbeef->sendmessage (M_NEXT, 0, 0, 0);
return 0;
}
int
action_stop_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
- deadbeef->playback_stop ();
+ deadbeef->sendmessage (M_STOP, 0, 0, 0);
return 0;
}
int
action_toggle_pause_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
- deadbeef->playback_pause ();
+ deadbeef->sendmessage (M_TOGGLE_PAUSE, 0, 0, 0);
return 0;
}
@@ -540,17 +540,17 @@ int
action_play_pause_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
int state = deadbeef->get_output ()->state ();
if (state == OUTPUT_STATE_PLAYING) {
- deadbeef->playback_pause ();
+ deadbeef->sendmessage (M_PAUSE, 0, 0, 0);
}
else {
- deadbeef->playback_play ();
+ deadbeef->sendmessage (M_PLAY_CURRENT, 0, 0, 0);
}
return 0;
}
int
action_play_random_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
- deadbeef->playback_random ();
+ deadbeef->sendmessage (M_PLAY_RANDOM, 0, 0, 0);
return 0;
}