annotate src/audacious/auddrct.c @ 2750:4df1d5552a4d trunk

[svn] - map to right handlers
author nenolod
date Fri, 11 May 2007 21:20:27 -0700
parents 4f2fd69771dc
children c2613269f913
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2739
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
1 /*
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
2 * Audacious: A cross-platform multimedia player
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
3 * Copyright (c) 2007 Giacomo Lozito
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
4 *
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
7 * the Free Software Foundation; under version 2 of the License.
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
8 *
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
12 * GNU General Public License for more details.
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
13 *
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
15 * along with this program; if not, write to the Free Software
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
17 * 02110-1301, USA.
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
18 */
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
19
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
20 /* audacious_drct_* provides a handy interface for player
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
21 plugins, originally intended for migration from xmms_remote_* calls */
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
22
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
23
2743
2e86136729f1 [svn] - auddrct: more calls implemented (part 2)
giacomo
parents: 2742
diff changeset
24 #include "main.h"
2739
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
25 #include "input.h"
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
26 #include "playback.h"
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
27 #include "ui_main.h"
2743
2e86136729f1 [svn] - auddrct: more calls implemented (part 2)
giacomo
parents: 2742
diff changeset
28 #include "ui_playlist.h"
2e86136729f1 [svn] - auddrct: more calls implemented (part 2)
giacomo
parents: 2742
diff changeset
29 #include "ui_equalizer.h"
2745
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
30 #include "ui_jumptotrack.h"
2739
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
31
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
32
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
33 /* player */
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
34
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
35 void
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
36 audacious_drct_quit ( void )
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
37 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
38 mainwin_quit_cb();
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
39 return;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
40 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
41
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
42 void
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
43 audacious_drct_eject ( void )
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
44 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
45 if (has_x11_connection)
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
46 mainwin_eject_pushed();
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
47 return;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
48 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
49
2745
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
50 void
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
51 audacious_drct_jtf_show ( void )
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
52 {
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
53 if (has_x11_connection)
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
54 ui_jump_to_track();
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
55 return;
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
56 }
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
57
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
58 gboolean
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
59 audacious_drct_main_win_is_visible ( void )
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
60 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
61 return cfg.player_visible;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
62 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
63
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
64 void
2744
8ab4ef180201 [svn] - auddrct: more calls implemented (part 3)
giacomo
parents: 2743
diff changeset
65 audacious_drct_main_win_toggle ( gboolean show )
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
66 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
67 if (has_x11_connection)
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
68 mainwin_show(show);
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
69 return;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
70 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
71
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
72 gboolean
2744
8ab4ef180201 [svn] - auddrct: more calls implemented (part 3)
giacomo
parents: 2743
diff changeset
73 audacious_drct_eq_win_is_visible ( void )
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
74 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
75 return cfg.equalizer_visible;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
76 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
77
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
78 void
2744
8ab4ef180201 [svn] - auddrct: more calls implemented (part 3)
giacomo
parents: 2743
diff changeset
79 audacious_drct_eq_win_toggle ( gboolean show )
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
80 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
81 if (has_x11_connection)
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
82 equalizerwin_show(show);
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
83 return;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
84 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
85
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
86 gboolean
2744
8ab4ef180201 [svn] - auddrct: more calls implemented (part 3)
giacomo
parents: 2743
diff changeset
87 audacious_drct_pl_win_is_visible ( void )
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
88 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
89 return cfg.playlist_visible;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
90 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
91
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
92 void
2744
8ab4ef180201 [svn] - auddrct: more calls implemented (part 3)
giacomo
parents: 2743
diff changeset
93 audacious_drct_pl_win_toggle ( gboolean show )
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
94 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
95 if (has_x11_connection) {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
96 if (show)
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
97 playlistwin_show();
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
98 else
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
99 playlistwin_hide();
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
100 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
101 return;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
102 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
103
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
104
2739
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
105 /* playback */
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
106
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
107 void
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
108 audacious_drct_play ( void )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
109 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
110 if (playback_get_paused())
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
111 playback_pause();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
112 else if (playlist_get_length(playlist_get_active()))
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
113 playback_initiate();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
114 else
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
115 mainwin_eject_pushed();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
116 return;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
117 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
118
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
119 void
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
120 audacious_drct_pause ( void )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
121 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
122 playback_pause();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
123 return;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
124 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
125
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
126 void
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
127 audacious_drct_stop ( void )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
128 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
129 ip_data.stop = TRUE;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
130 playback_stop();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
131 ip_data.stop = FALSE;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
132 mainwin_clear_song_info();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
133 return;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
134 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
135
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
136 gboolean
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
137 audacious_drct_get_playing ( void )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
138 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
139 return playback_get_playing();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
140 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
141
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
142 gboolean
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
143 audacious_drct_get_paused ( void )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
144 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
145 return playback_get_paused();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
146 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
147
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
148 gboolean
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
149 audacious_drct_get_stopped ( void )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
150 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
151 return !playback_get_playing();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
152 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
153
2748
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
154 void
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
155 audacious_drct_get_info( gint *rate, gint *freq, gint *nch)
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
156 {
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
157 playback_get_sample_params(rate, freq, nch);
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
158 }
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
159
2739
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
160 gint
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
161 audacious_drct_get_time ( void )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
162 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
163 gint time;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
164 if (playback_get_playing())
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
165 time = playback_get_time();
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
166 else
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
167 time = 0;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
168 return time;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
169 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
170
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
171 void
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
172 audacious_drct_seek ( guint pos )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
173 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
174 if (playlist_get_current_length(playlist_get_active()) > 0 &&
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
175 pos < (guint)playlist_get_current_length(playlist_get_active()))
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
176 playback_seek(pos / 1000);
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
177 return;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
178 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
179
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
180 void
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
181 audacious_drct_get_volume( gint *vl, gint *vr )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
182 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
183 input_get_volume(vl, vr);
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
184 return;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
185 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
186
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
187 void
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
188 audacious_drct_set_volume( gint vl, gint vr )
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
189 {
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
190 if (vl > 100)
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
191 vl = 100;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
192 if (vr > 100)
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
193 vr = 100;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
194 input_set_volume(vl, vr);
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
195 return;
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
196 }
953001c668ae [svn] - added auddrct.c/h, a migration api for plugins that once used xmms_remote; to be completed
giacomo
parents:
diff changeset
197
2742
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
198
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
199 /* playlist */
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
200
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
201 void
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
202 audacious_drct_pl_next ( void )
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
203 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
204 playlist_next(playlist_get_active());
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
205 return;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
206 }
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
207
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
208 void
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
209 audacious_drct_pl_prev ( void )
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
210 {
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
211 playlist_prev(playlist_get_active());
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
212 return;
1333d28e2c50 [svn] - auddrct: more calls implemented
giacomo
parents: 2739
diff changeset
213 }
2745
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
214
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
215 gboolean
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
216 audacious_drct_pl_repeat_is_enabled( void )
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
217 {
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
218 return cfg.repeat;
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
219 }
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
220
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
221 void
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
222 audacious_drct_pl_repeat_toggle( void )
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
223 {
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
224 mainwin_repeat_pushed(!cfg.repeat);
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
225 return;
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
226 }
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
227
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
228 gboolean
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
229 audacious_drct_pl_repeat_is_shuffled( void )
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
230 {
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
231 return cfg.shuffle;
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
232 }
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
233
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
234 void
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
235 audacious_drct_pl_shuffle_toggle( void )
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
236 {
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
237 mainwin_shuffle_pushed(!cfg.shuffle);
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
238 return;
72781ef7ece3 [svn] - auddrct: more calls implemented (part 4)
giacomo
parents: 2744
diff changeset
239 }
2748
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
240
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
241 gchar *
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
242 audacious_drct_pl_get_title( gint pos )
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
243 {
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
244 return playlist_get_songtitle(playlist_get_active(), pos);
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
245 }
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
246
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
247 gint
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
248 audacious_drct_pl_get_time( gint pos )
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
249 {
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
250 return playlist_get_songtime(playlist_get_active(), pos);
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
251 }
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
252
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
253 gint
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
254 audacious_drct_pl_get_pos( void )
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
255 {
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
256 return playlist_get_position_nolock(playlist_get_active());
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
257 }
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
258
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
259 gchar *
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
260 audacious_drct_pl_get_file( gint pos )
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
261 {
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
262 return playlist_get_filename(playlist_get_active(), pos);
4f2fd69771dc [svn] - auddrct: more calls implemented (part 5)
yaz
parents: 2745
diff changeset
263 }