Mercurial > audlegacy
annotate audacious/playlist.h @ 816:8073d8300502 trunk
[svn] display audacious version and revision in the prefs window
author | giacomo |
---|---|
date | Sat, 11 Mar 2006 16:56:50 -0800 |
parents | f908bcd87c3d |
children | ffc5ab7b4b2c |
rev | line source |
---|---|
0 | 1 /* XMMS - Cross-platform multimedia player |
2 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, | |
3 * Thomas Nilsson and 4Front Technologies | |
4 * Copyright (C) 1999-2003 Haavard Kvaalen | |
5 * | |
6 * This program is free software; you can redistribute it and/or modify | |
7 * it under the terms of the GNU General Public License as published by | |
8 * the Free Software Foundation; either version 2 of the License, or | |
9 * (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, | |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 * GNU General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 */ | |
20 #ifndef PLAYLIST_H | |
21 #define PLAYLIST_H | |
22 | |
23 #include <glib.h> | |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
24 #include "input.h" |
0 | 25 |
26 typedef enum { | |
27 PLAYLIST_SORT_PATH, | |
28 PLAYLIST_SORT_FILENAME, | |
29 PLAYLIST_SORT_TITLE, | |
30 PLAYLIST_SORT_DATE | |
31 } PlaylistSortType; | |
32 | |
33 typedef enum { | |
34 PLAYLIST_FORMAT_UNKNOWN = -1, | |
35 PLAYLIST_FORMAT_M3U, | |
36 PLAYLIST_FORMAT_PLS, | |
37 PLAYLIST_FORMAT_COUNT | |
38 } PlaylistFormat; | |
39 | |
40 #define PLAYLIST_ENTRY(x) ((PlaylistEntry*)(x)) | |
41 struct _PlaylistEntry { | |
42 gchar *filename; | |
43 gchar *title; | |
44 gint length; | |
45 gboolean selected; | |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
46 InputPlugin *decoder; |
0 | 47 }; |
48 | |
49 typedef struct _PlaylistEntry PlaylistEntry; | |
50 | |
51 PlaylistEntry *playlist_entry_new(const gchar * filename, | |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
52 const gchar * title, const gint len, |
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
53 InputPlugin * dec); |
0 | 54 void playlist_entry_free(PlaylistEntry * entry); |
55 | |
56 void playlist_init(void); | |
57 void playlist_clear(void); | |
58 void playlist_delete(gboolean crop); | |
59 | |
60 gboolean playlist_add(const gchar * filename); | |
61 gboolean playlist_ins(const gchar * filename, gint pos); | |
62 guint playlist_add_dir(const gchar * dir); | |
63 guint playlist_ins_dir(const gchar * dir, gint pos, gboolean background); | |
64 guint playlist_add_url(const gchar * url); | |
65 guint playlist_ins_url(const gchar * string, gint pos); | |
66 | |
67 void playlist_play(void); | |
68 void playlist_set_info(const gchar * title, gint length, gint rate, | |
69 gint freq, gint nch); | |
70 void playlist_check_pos_current(void); | |
71 void playlist_next(void); | |
72 void playlist_prev(void); | |
73 void playlist_queue(void); | |
74 void playlist_queue_position(guint pos); | |
75 void playlist_queue_remove(guint pos); | |
76 gint playlist_queue_get_length(void); | |
77 gboolean playlist_is_position_queued(guint pos); | |
78 void playlist_clear_queue(void); | |
79 gint playlist_get_queue_position(PlaylistEntry * entry); | |
80 void playlist_eof_reached(void); | |
81 void playlist_set_position(guint pos); | |
82 gint playlist_get_length(void); | |
83 gint playlist_get_length_nolock(void); | |
84 gint playlist_get_position(void); | |
85 gint playlist_get_position_nolock(void); | |
86 gchar *playlist_get_info_text(void); | |
87 gint playlist_get_current_length(void); | |
88 | |
89 gboolean playlist_save(const gchar * filename, PlaylistFormat format); | |
90 gboolean playlist_load(const gchar * filename); | |
91 | |
92 GList *playlist_get(void); | |
93 | |
94 void playlist_start_get_info_thread(void); | |
95 void playlist_stop_get_info_thread(); | |
96 void playlist_start_get_info_scan(void); | |
97 | |
98 void playlist_sort(PlaylistSortType type); | |
99 void playlist_sort_selected(PlaylistSortType type); | |
100 | |
101 void playlist_reverse(void); | |
102 void playlist_random(void); | |
103 void playlist_remove_dead_files(void); | |
104 | |
105 void playlist_fileinfo_current(void); | |
106 void playlist_fileinfo(guint pos); | |
107 | |
108 void playlist_delete_index(guint pos); | |
109 void playlist_delete_filenames(GList * filenames); | |
110 | |
398
f908bcd87c3d
[svn] Generate cache content on demand if it was not previously there.
nenolod
parents:
356
diff
changeset
|
111 PlaylistEntry *playlist_get_entry_to_play(); |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
112 |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
113 /* XXX this is for reverse compatibility --nenolod */ |
0 | 114 const gchar *playlist_get_filename_to_play(); |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
115 |
0 | 116 gchar *playlist_get_filename(guint pos); |
117 gchar *playlist_get_songtitle(guint pos); | |
118 gint playlist_get_songtime(guint pos); | |
119 | |
120 GList *playlist_get_selected(void); | |
121 GList *playlist_get_selected_list(void); | |
122 int playlist_get_num_selected(void); | |
123 | |
124 void playlist_get_total_time(gulong * total_time, gulong * selection_time, | |
125 gboolean * total_more, | |
126 gboolean * selection_more); | |
127 | |
128 void playlist_select_all(gboolean set); | |
129 void playlist_select_range(gint min, gint max, gboolean sel); | |
130 void playlist_select_invert_all(void); | |
131 gboolean playlist_select_invert(guint pos); | |
132 | |
133 gboolean playlist_read_info_selection(void); | |
134 void playlist_read_info(guint pos); | |
135 | |
136 void playlist_set_shuffle(gboolean shuffle); | |
137 | |
138 void playlist_clear_selected(void); | |
139 | |
140 GList *get_playlist_nth(guint); | |
141 gboolean playlist_set_current_name(const gchar * filename); | |
142 const gchar *playlist_get_current_name(void); | |
143 void playlist_new(void); | |
144 | |
145 PlaylistFormat playlist_format_get_from_name(const gchar * filename); | |
146 gboolean is_playlist_name(const gchar * filename); | |
147 | |
148 #define PLAYLIST_LOCK() G_LOCK(playlist) | |
149 #define PLAYLIST_UNLOCK() G_UNLOCK(playlist) | |
150 | |
151 G_LOCK_EXTERN(playlist); | |
152 | |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
153 extern PlaylistEntry *playlist_position; |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
154 |
0 | 155 #endif |