Mercurial > audlegacy
annotate audacious/playlist.h @ 1067:dc9373f0186b trunk
[svn] - Don't force cfg.close_dialog_{open,add} to TRUE when opening the filechooser...
author | nhjm449 |
---|---|
date | Tue, 16 May 2006 19:56:58 -0700 |
parents | bcd1ebd0a7c1 |
children | a5d5f404b933 |
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 { | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
34 PLAYLIST_DUPS_PATH, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
35 PLAYLIST_DUPS_FILENAME, |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
36 PLAYLIST_DUPS_TITLE |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
37 } PlaylistDupsType; |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
38 |
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
39 typedef enum { |
0 | 40 PLAYLIST_FORMAT_UNKNOWN = -1, |
41 PLAYLIST_FORMAT_M3U, | |
42 PLAYLIST_FORMAT_PLS, | |
43 PLAYLIST_FORMAT_COUNT | |
44 } PlaylistFormat; | |
45 | |
46 #define PLAYLIST_ENTRY(x) ((PlaylistEntry*)(x)) | |
47 struct _PlaylistEntry { | |
48 gchar *filename; | |
49 gchar *title; | |
50 gint length; | |
51 gboolean selected; | |
355
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
52 InputPlugin *decoder; |
0 | 53 }; |
54 | |
55 typedef struct _PlaylistEntry PlaylistEntry; | |
56 | |
57 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
|
58 const gchar * title, const gint len, |
1c701dfe5098
[svn] Cache the decoder used for each PlaylistEntry. This reduces the amount
nenolod
parents:
0
diff
changeset
|
59 InputPlugin * dec); |
0 | 60 void playlist_entry_free(PlaylistEntry * entry); |
61 | |
62 void playlist_init(void); | |
63 void playlist_clear(void); | |
64 void playlist_delete(gboolean crop); | |
65 | |
66 gboolean playlist_add(const gchar * filename); | |
67 gboolean playlist_ins(const gchar * filename, gint pos); | |
68 guint playlist_add_dir(const gchar * dir); | |
69 guint playlist_ins_dir(const gchar * dir, gint pos, gboolean background); | |
70 guint playlist_add_url(const gchar * url); | |
71 guint playlist_ins_url(const gchar * string, gint pos); | |
72 | |
73 void playlist_play(void); | |
74 void playlist_set_info(const gchar * title, gint length, gint rate, | |
75 gint freq, gint nch); | |
76 void playlist_check_pos_current(void); | |
77 void playlist_next(void); | |
78 void playlist_prev(void); | |
79 void playlist_queue(void); | |
80 void playlist_queue_position(guint pos); | |
81 void playlist_queue_remove(guint pos); | |
82 gint playlist_queue_get_length(void); | |
83 gboolean playlist_is_position_queued(guint pos); | |
84 void playlist_clear_queue(void); | |
85 gint playlist_get_queue_position(PlaylistEntry * entry); | |
984 | 86 gint playlist_get_queue_position_number(guint pos); |
87 gint playlist_get_queue_qposition_number(guint pos); | |
0 | 88 void playlist_eof_reached(void); |
89 void playlist_set_position(guint pos); | |
90 gint playlist_get_length(void); | |
91 gint playlist_get_length_nolock(void); | |
92 gint playlist_get_position(void); | |
93 gint playlist_get_position_nolock(void); | |
94 gchar *playlist_get_info_text(void); | |
95 gint playlist_get_current_length(void); | |
96 | |
97 gboolean playlist_save(const gchar * filename, PlaylistFormat format); | |
98 gboolean playlist_load(const gchar * filename); | |
99 | |
100 GList *playlist_get(void); | |
101 | |
102 void playlist_start_get_info_thread(void); | |
103 void playlist_stop_get_info_thread(); | |
104 void playlist_start_get_info_scan(void); | |
105 | |
106 void playlist_sort(PlaylistSortType type); | |
107 void playlist_sort_selected(PlaylistSortType type); | |
108 | |
109 void playlist_reverse(void); | |
110 void playlist_random(void); | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
111 void playlist_remove_duplicates(PlaylistDupsType); |
0 | 112 void playlist_remove_dead_files(void); |
113 | |
114 void playlist_fileinfo_current(void); | |
115 void playlist_fileinfo(guint pos); | |
116 | |
117 void playlist_delete_index(guint pos); | |
118 void playlist_delete_filenames(GList * filenames); | |
119 | |
398
f908bcd87c3d
[svn] Generate cache content on demand if it was not previously there.
nenolod
parents:
356
diff
changeset
|
120 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
|
121 |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
122 /* XXX this is for reverse compatibility --nenolod */ |
0 | 123 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
|
124 |
0 | 125 gchar *playlist_get_filename(guint pos); |
126 gchar *playlist_get_songtitle(guint pos); | |
127 gint playlist_get_songtime(guint pos); | |
128 | |
129 GList *playlist_get_selected(void); | |
130 GList *playlist_get_selected_list(void); | |
131 int playlist_get_num_selected(void); | |
132 | |
133 void playlist_get_total_time(gulong * total_time, gulong * selection_time, | |
134 gboolean * total_more, | |
135 gboolean * selection_more); | |
136 | |
137 void playlist_select_all(gboolean set); | |
138 void playlist_select_range(gint min, gint max, gboolean sel); | |
139 void playlist_select_invert_all(void); | |
140 gboolean playlist_select_invert(guint pos); | |
141 | |
142 gboolean playlist_read_info_selection(void); | |
143 void playlist_read_info(guint pos); | |
144 | |
145 void playlist_set_shuffle(gboolean shuffle); | |
146 | |
147 void playlist_clear_selected(void); | |
148 | |
149 GList *get_playlist_nth(guint); | |
150 gboolean playlist_set_current_name(const gchar * filename); | |
151 const gchar *playlist_get_current_name(void); | |
152 void playlist_new(void); | |
153 | |
154 PlaylistFormat playlist_format_get_from_name(const gchar * filename); | |
155 gboolean is_playlist_name(const gchar * filename); | |
156 | |
157 #define PLAYLIST_LOCK() G_LOCK(playlist) | |
158 #define PLAYLIST_UNLOCK() G_UNLOCK(playlist) | |
159 | |
160 G_LOCK_EXTERN(playlist); | |
161 | |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
162 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
|
163 |
0 | 164 #endif |