Mercurial > audlegacy
comparison src/audacious/auddrct.c @ 2775:7adb736cb824 trunk
[svn] - auddrct: more calls implemented (part 7)
- almost all of playlist and playqueue functions are implemented. be careful in using new functions, these are not tested yet.
author | yaz |
---|---|
date | Wed, 16 May 2007 22:50:52 -0700 |
parents | c2613269f913 |
children | 182aa34ae6c4 |
comparison
equal
deleted
inserted
replaced
2774:57363f3ded79 | 2775:7adb736cb824 |
---|---|
27 #include "ui_main.h" | 27 #include "ui_main.h" |
28 #include "ui_playlist.h" | 28 #include "ui_playlist.h" |
29 #include "ui_equalizer.h" | 29 #include "ui_equalizer.h" |
30 #include "ui_jumptotrack.h" | 30 #include "ui_jumptotrack.h" |
31 #include "auddrct.h" | 31 #include "auddrct.h" |
32 #include "playlist.h" | |
32 | 33 |
33 | 34 |
34 /* player */ | 35 /* player */ |
35 | 36 |
36 void | 37 void |
350 playlist_clear(playlist_get_active()); | 351 playlist_clear(playlist_get_active()); |
351 mainwin_clear_song_info(); | 352 mainwin_clear_song_info(); |
352 mainwin_set_info_text(); | 353 mainwin_set_info_text(); |
353 return; | 354 return; |
354 } | 355 } |
356 | |
357 | |
358 /* following functions are not tested yet. be careful. --yaz */ | |
359 void | |
360 audacious_drct_pl_delete ( gint pos ) | |
361 { | |
362 GDK_THREADS_ENTER(); | |
363 playlist_delete_index(playlist_get_active(), pos); | |
364 GDK_THREADS_LEAVE(); | |
365 } | |
366 | |
367 void | |
368 audacious_drct_pl_set_pos( gint pos ) | |
369 { | |
370 Playlist *playlist = playlist_get_active(); | |
371 if (pos < (guint)playlist_get_length(playlist)) | |
372 playlist_set_position(playlist, pos); | |
373 } | |
374 | |
375 gint | |
376 audacious_drct_pl_get_length( void ) | |
377 { | |
378 return playlist_get_length(playlist_get_active()); | |
379 } | |
380 | |
381 void | |
382 audacious_drct_pl_ins_url_string( gchar * string, gint pos ) | |
383 { | |
384 playlist_ins_url(playlist_get_active(), string, pos); | |
385 } | |
386 | |
387 void | |
388 audacious_drct_pl_add_url_string( gchar * string ) | |
389 { | |
390 GDK_THREADS_ENTER(); | |
391 playlist_add_url(playlist_get_active(), string); | |
392 GDK_THREADS_LEAVE(); | |
393 } | |
394 | |
395 void | |
396 audacious_drct_pl_enqueue_to_temp( gchar * string ) | |
397 { | |
398 Playlist *new_pl = playlist_new(); | |
399 | |
400 GDK_THREADS_ENTER(); | |
401 playlist_select_playlist(new_pl); | |
402 playlist_add_url(new_pl, string); | |
403 GDK_THREADS_LEAVE(); | |
404 } | |
405 | |
406 | |
407 /* playqueue */ | |
408 gint | |
409 audacious_drct_pq_get_length( void ) | |
410 { | |
411 return playlist_queue_get_length(playlist_get_active()); | |
412 } | |
413 | |
414 void | |
415 audacious_drct_pq_add( gint pos ) | |
416 { | |
417 Playlist *playlist = playlist_get_active(); | |
418 if (pos < (guint)playlist_get_length(playlist)) | |
419 playlist_queue_position(playlist, pos); | |
420 } | |
421 | |
422 void | |
423 audacious_drct_pq_remove( gint pos ) | |
424 { | |
425 Playlist *playlist = playlist_get_active(); | |
426 if (pos < (guint)playlist_get_length(playlist)) | |
427 playlist_queue_remove(playlist_get_active(), pos); | |
428 } | |
429 | |
430 void | |
431 audacious_drct_pq_clear( void ) | |
432 { | |
433 playlist_clear_queue(playlist_get_active()); | |
434 } | |
435 | |
436 gboolean | |
437 audacious_drct_pq_is_queued( gint pos ) | |
438 { | |
439 return playlist_is_position_queued(playlist_get_active(), pos); | |
440 } | |
441 | |
442 gint | |
443 audacious_drct_pq_get_position( gint pos ) | |
444 { | |
445 return playlist_get_queue_position_number(playlist_get_active(), pos); | |
446 } | |
447 | |
448 gint | |
449 audaciuos_drct_pq_get_queue_position( gint pos ) | |
450 { | |
451 return playlist_get_queue_position_number(playlist_get_active(), pos); | |
452 } |