Mercurial > audlegacy
annotate audacious/playlist.h @ 1609:fb2ac7c9e096 trunk
[svn] - comment out some gtk_window_set_transient_for() which hide mainwin unexpectedly.
author | yaz |
---|---|
date | Tue, 29 Aug 2006 23:15:43 -0700 |
parents | 2229b67f1b89 |
children | fed902161f2a |
rev | line source |
---|---|
1230
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
1 /* Audacious - Cross-platform multimedia player |
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
2 * Copyright (C) 2005-2006 William Pitcock, Tony Vroon, George Averill, |
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
3 * Giacomo Lozito, Derek Pomery and Yoshiki Yazawa. |
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
4 * |
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
5 * XMMS - Cross-platform multimedia player |
0 | 6 * Copyright (C) 1998-2003 Peter Alm, Mikael Alm, Olle Hallnas, |
7 * Thomas Nilsson and 4Front Technologies | |
8 * Copyright (C) 1999-2003 Haavard Kvaalen | |
9 * | |
10 * This program is free software; you can redistribute it and/or modify | |
11 * it under the terms of the GNU General Public License as published by | |
12 * the Free Software Foundation; either version 2 of the License, or | |
13 * (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, | |
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 * GNU General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program; if not, write to the Free Software | |
1459 | 22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
0 | 23 */ |
24 #ifndef PLAYLIST_H | |
25 #define PLAYLIST_H | |
26 | |
27 #include <glib.h> | |
1230
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
28 #include "libaudacious/titlestring.h" |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
29 #include "input.h" |
0 | 30 |
31 typedef enum { | |
32 PLAYLIST_SORT_PATH, | |
33 PLAYLIST_SORT_FILENAME, | |
34 PLAYLIST_SORT_TITLE, | |
1251 | 35 PLAYLIST_SORT_ARTIST, |
1415 | 36 PLAYLIST_SORT_DATE, |
1430
740c08db08d9
[svn] via Christian Birchinger <joker -at- netswarm.net>:
nenolod
parents:
1415
diff
changeset
|
37 PLAYLIST_SORT_TRACK, |
740c08db08d9
[svn] via Christian Birchinger <joker -at- netswarm.net>:
nenolod
parents:
1415
diff
changeset
|
38 PLAYLIST_SORT_PLAYLIST |
0 | 39 } PlaylistSortType; |
40 | |
41 typedef enum { | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
42 PLAYLIST_DUPS_PATH, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
43 PLAYLIST_DUPS_FILENAME, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
44 PLAYLIST_DUPS_TITLE |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
45 } PlaylistDupsType; |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
46 |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
47 typedef enum { |
0 | 48 PLAYLIST_FORMAT_UNKNOWN = -1, |
49 PLAYLIST_FORMAT_M3U, | |
50 PLAYLIST_FORMAT_PLS, | |
51 PLAYLIST_FORMAT_COUNT | |
52 } PlaylistFormat; | |
53 | |
54 #define PLAYLIST_ENTRY(x) ((PlaylistEntry*)(x)) | |
55 struct _PlaylistEntry { | |
56 gchar *filename; | |
57 gchar *title; | |
58 gint length; | |
59 gboolean selected; | |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
60 InputPlugin *decoder; |
1230
a5d5f404b933
[svn] - attach a TitleInput tuple to the PlaylistEntry class.
nenolod
parents:
984
diff
changeset
|
61 TitleInput *tuple; /* cached entry tuple, if available */ |
0 | 62 }; |
63 | |
64 typedef struct _PlaylistEntry PlaylistEntry; | |
65 | |
66 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
|
67 const gchar * title, const gint len, |
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
68 InputPlugin * dec); |
0 | 69 void playlist_entry_free(PlaylistEntry * entry); |
70 | |
71 void playlist_init(void); | |
72 void playlist_clear(void); | |
73 void playlist_delete(gboolean crop); | |
74 | |
75 gboolean playlist_add(const gchar * filename); | |
76 gboolean playlist_ins(const gchar * filename, gint pos); | |
77 guint playlist_add_dir(const gchar * dir); | |
78 guint playlist_ins_dir(const gchar * dir, gint pos, gboolean background); | |
79 guint playlist_add_url(const gchar * url); | |
80 guint playlist_ins_url(const gchar * string, gint pos); | |
81 | |
82 void playlist_play(void); | |
83 void playlist_set_info(const gchar * title, gint length, gint rate, | |
84 gint freq, gint nch); | |
85 void playlist_check_pos_current(void); | |
86 void playlist_next(void); | |
87 void playlist_prev(void); | |
88 void playlist_queue(void); | |
89 void playlist_queue_position(guint pos); | |
90 void playlist_queue_remove(guint pos); | |
91 gint playlist_queue_get_length(void); | |
92 gboolean playlist_is_position_queued(guint pos); | |
93 void playlist_clear_queue(void); | |
94 gint playlist_get_queue_position(PlaylistEntry * entry); | |
984 | 95 gint playlist_get_queue_position_number(guint pos); |
96 gint playlist_get_queue_qposition_number(guint pos); | |
0 | 97 void playlist_eof_reached(void); |
98 void playlist_set_position(guint pos); | |
99 gint playlist_get_length(void); | |
100 gint playlist_get_length_nolock(void); | |
101 gint playlist_get_position(void); | |
102 gint playlist_get_position_nolock(void); | |
103 gchar *playlist_get_info_text(void); | |
104 gint playlist_get_current_length(void); | |
105 | |
1553 | 106 gboolean playlist_save(const gchar * filename); |
0 | 107 gboolean playlist_load(const gchar * filename); |
108 | |
109 GList *playlist_get(void); | |
110 | |
111 void playlist_start_get_info_thread(void); | |
112 void playlist_stop_get_info_thread(); | |
113 void playlist_start_get_info_scan(void); | |
114 | |
115 void playlist_sort(PlaylistSortType type); | |
116 void playlist_sort_selected(PlaylistSortType type); | |
117 | |
118 void playlist_reverse(void); | |
119 void playlist_random(void); | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
120 void playlist_remove_duplicates(PlaylistDupsType); |
0 | 121 void playlist_remove_dead_files(void); |
122 | |
123 void playlist_fileinfo_current(void); | |
124 void playlist_fileinfo(guint pos); | |
125 | |
126 void playlist_delete_index(guint pos); | |
127 void playlist_delete_filenames(GList * filenames); | |
128 | |
398
f908bcd87c3d
[svn] Generate cache content on demand if it was not previously there.
nenolod
parents:
356
diff
changeset
|
129 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
|
130 |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
131 /* XXX this is for reverse compatibility --nenolod */ |
0 | 132 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
|
133 |
0 | 134 gchar *playlist_get_filename(guint pos); |
135 gchar *playlist_get_songtitle(guint pos); | |
1235 | 136 TitleInput *playlist_get_tuple(guint pos); |
0 | 137 gint playlist_get_songtime(guint pos); |
138 | |
139 GList *playlist_get_selected(void); | |
140 GList *playlist_get_selected_list(void); | |
141 int playlist_get_num_selected(void); | |
142 | |
143 void playlist_get_total_time(gulong * total_time, gulong * selection_time, | |
144 gboolean * total_more, | |
145 gboolean * selection_more); | |
146 | |
147 void playlist_select_all(gboolean set); | |
148 void playlist_select_range(gint min, gint max, gboolean sel); | |
149 void playlist_select_invert_all(void); | |
150 gboolean playlist_select_invert(guint pos); | |
151 | |
152 gboolean playlist_read_info_selection(void); | |
153 void playlist_read_info(guint pos); | |
154 | |
155 void playlist_set_shuffle(gboolean shuffle); | |
156 | |
157 void playlist_clear_selected(void); | |
158 | |
159 GList *get_playlist_nth(guint); | |
160 gboolean playlist_set_current_name(const gchar * filename); | |
161 const gchar *playlist_get_current_name(void); | |
162 void playlist_new(void); | |
163 | |
164 PlaylistFormat playlist_format_get_from_name(const gchar * filename); | |
165 gboolean is_playlist_name(const gchar * filename); | |
166 | |
167 #define PLAYLIST_LOCK() G_LOCK(playlist) | |
168 #define PLAYLIST_UNLOCK() G_UNLOCK(playlist) | |
169 | |
170 G_LOCK_EXTERN(playlist); | |
171 | |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
172 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
|
173 |
1554 | 174 extern void playlist_load_ins_file(const gchar * filename, |
175 const gchar * playlist_name, gint pos, | |
176 const gchar * title, gint len); | |
177 | |
1584 | 178 extern void playlist_load_ins_file_tuple(const gchar * filename_p, |
179 const gchar * playlist_name, gint pos, | |
180 TitleInput *tuple); | |
181 | |
182 | |
0 | 183 #endif |