summaryrefslogtreecommitdiff
path: root/plugins/hotkeys
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2012-11-05 22:36:32 +0100
committerGravatar waker <wakeroid@gmail.com>2012-11-05 22:36:32 +0100
commit53f3bffe2764be1fb34957efcb2318d7d078e52e (patch)
treed8a841d7fadcde2629623b618ecbd55e8ec745a7 /plugins/hotkeys
parent229fe9c713df897680f1256e8e9f28f5348d542e (diff)
fixed actions defined in the hotkeys plugin
Diffstat (limited to 'plugins/hotkeys')
-rw-r--r--plugins/hotkeys/hotkeys.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/plugins/hotkeys/hotkeys.c b/plugins/hotkeys/hotkeys.c
index 6236561a..c218b81b 100644
--- a/plugins/hotkeys/hotkeys.c
+++ b/plugins/hotkeys/hotkeys.c
@@ -529,37 +529,37 @@ hotkeys_reset (void) {
}
int
-action_play_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_play_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->sendmessage (DB_EV_PLAY_CURRENT, 0, 0, 0);
return 0;
}
int
-action_prev_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_prev_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->sendmessage (DB_EV_PREV, 0, 0, 0);
return 0;
}
int
-action_next_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_next_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->sendmessage (DB_EV_NEXT, 0, 0, 0);
return 0;
}
int
-action_stop_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_stop_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->sendmessage (DB_EV_STOP, 0, 0, 0);
return 0;
}
int
-action_toggle_pause_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_toggle_pause_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->sendmessage (DB_EV_TOGGLE_PAUSE, 0, 0, 0);
return 0;
}
int
-action_play_pause_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_play_pause_cb (struct DB_plugin_action_s *action, int ctx) {
int state = deadbeef->get_output ()->state ();
if (state == OUTPUT_STATE_PLAYING) {
deadbeef->sendmessage (DB_EV_PAUSE, 0, 0, 0);
@@ -571,37 +571,37 @@ action_play_pause_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
}
int
-action_play_random_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_play_random_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->sendmessage (DB_EV_PLAY_RANDOM, 0, 0, 0);
return 0;
}
int
-action_seek_forward_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_seek_forward_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->playback_set_pos (deadbeef->playback_get_pos () + 5);
return 0;
}
int
-action_seek_backward_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_seek_backward_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->playback_set_pos (deadbeef->playback_get_pos () - 5);
return 0;
}
int
-action_volume_up_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_volume_up_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->volume_set_db (deadbeef->volume_get_db () + 2);
return 0;
}
int
-action_volume_down_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_volume_down_cb (struct DB_plugin_action_s *action, int ctx) {
deadbeef->volume_set_db (deadbeef->volume_get_db () - 2);
return 0;
}
int
-action_toggle_stop_after_current_cb (struct DB_plugin_action_s *action, DB_playItem_t *it) {
+action_toggle_stop_after_current_cb (struct DB_plugin_action_s *action, int ctx) {
int var = deadbeef->conf_get_int ("playlist.stop_after_current", 0);
var = 1 - var;
deadbeef->conf_set_int ("playlist.stop_after_current", var);
@@ -613,7 +613,7 @@ static DB_plugin_action_t action_play = {
.title = "Play",
.name = "play",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK (action_play_cb),
+ .callback = action_play_cb,
.next = NULL
};
@@ -621,7 +621,7 @@ static DB_plugin_action_t action_stop = {
.title = "Stop",
.name = "stop",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_stop_cb),
+ .callback = action_stop_cb,
.next = &action_play
};
@@ -629,7 +629,7 @@ static DB_plugin_action_t action_prev = {
.title = "Previous",
.name = "prev",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_prev_cb),
+ .callback = action_prev_cb,
.next = &action_stop
};
@@ -637,7 +637,7 @@ static DB_plugin_action_t action_next = {
.title = "Next",
.name = "next",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_next_cb),
+ .callback = action_next_cb,
.next = &action_prev
};
@@ -645,7 +645,7 @@ static DB_plugin_action_t action_toggle_pause = {
.title = "Toggle Pause",
.name = "toggle_pause",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_toggle_pause_cb),
+ .callback = action_toggle_pause_cb,
.next = &action_next
};
@@ -653,7 +653,7 @@ static DB_plugin_action_t action_play_pause = {
.title = "Play\\/Pause",
.name = "play_pause",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_play_pause_cb),
+ .callback = action_play_pause_cb,
.next = &action_toggle_pause
};
@@ -661,7 +661,7 @@ static DB_plugin_action_t action_play_random = {
.title = "Play Random",
.name = "playback_random",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_play_random_cb),
+ .callback = action_play_random_cb,
.next = &action_play_pause
};
@@ -669,7 +669,7 @@ static DB_plugin_action_t action_seek_forward = {
.title = "Seek Forward",
.name = "seek_fwd",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_seek_forward_cb),
+ .callback = action_seek_forward_cb,
.next = &action_play_random
};
@@ -677,7 +677,7 @@ static DB_plugin_action_t action_seek_backward = {
.title = "Seek Backward",
.name = "seek_back",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_seek_backward_cb),
+ .callback = action_seek_backward_cb,
.next = &action_seek_forward
};
@@ -685,7 +685,7 @@ static DB_plugin_action_t action_volume_up = {
.title = "Volume Up",
.name = "volume_up",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_volume_up_cb),
+ .callback = action_volume_up_cb,
.next = &action_seek_backward
};
@@ -693,7 +693,7 @@ static DB_plugin_action_t action_volume_down = {
.title = "Volume Down",
.name = "volume_down",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_volume_down_cb),
+ .callback = action_volume_down_cb,
.next = &action_volume_up
};
@@ -701,7 +701,7 @@ static DB_plugin_action_t action_toggle_stop_after_current = {
.title = "Toggle Stop After Current",
.name = "toggle_stop_after_current",
.flags = DB_ACTION_COMMON,
- .callback = DDB_ACTION_CALLBACK(action_toggle_stop_after_current_cb),
+ .callback = action_toggle_stop_after_current_cb,
.next = &action_volume_down
};