Mercurial > audlegacy
annotate audacious/playlist.h @ 864:9d393eabf984 trunk
[svn] now modplug uses xmms_show_message for its aboutbox
author | giacomo |
---|---|
date | Fri, 24 Mar 2006 07:02:57 -0800 |
parents | bcff46a2558d |
children | bcd1ebd0a7c1 |
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); | |
86 void playlist_eof_reached(void); | |
87 void playlist_set_position(guint pos); | |
88 gint playlist_get_length(void); | |
89 gint playlist_get_length_nolock(void); | |
90 gint playlist_get_position(void); | |
91 gint playlist_get_position_nolock(void); | |
92 gchar *playlist_get_info_text(void); | |
93 gint playlist_get_current_length(void); | |
94 | |
95 gboolean playlist_save(const gchar * filename, PlaylistFormat format); | |
96 gboolean playlist_load(const gchar * filename); | |
97 | |
98 GList *playlist_get(void); | |
99 | |
100 void playlist_start_get_info_thread(void); | |
101 void playlist_stop_get_info_thread(); | |
102 void playlist_start_get_info_scan(void); | |
103 | |
104 void playlist_sort(PlaylistSortType type); | |
105 void playlist_sort_selected(PlaylistSortType type); | |
106 | |
107 void playlist_reverse(void); | |
108 void playlist_random(void); | |
852
bcff46a2558d
[svn] added multiple 'remove duplicates' (by title, by filename, by path+filename)
giacomo
parents:
840
diff
changeset
|
109 void playlist_remove_duplicates(PlaylistDupsType); |
0 | 110 void playlist_remove_dead_files(void); |
111 | |
112 void playlist_fileinfo_current(void); | |
113 void playlist_fileinfo(guint pos); | |
114 | |
115 void playlist_delete_index(guint pos); | |
116 void playlist_delete_filenames(GList * filenames); | |
117 | |
398
f908bcd87c3d
[svn] Generate cache content on demand if it was not previously there.
nenolod
parents:
356
diff
changeset
|
118 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
|
119 |
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
120 /* XXX this is for reverse compatibility --nenolod */ |
0 | 121 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
|
122 |
0 | 123 gchar *playlist_get_filename(guint pos); |
124 gchar *playlist_get_songtitle(guint pos); | |
125 gint playlist_get_songtime(guint pos); | |
126 | |
127 GList *playlist_get_selected(void); | |
128 GList *playlist_get_selected_list(void); | |
129 int playlist_get_num_selected(void); | |
130 | |
131 void playlist_get_total_time(gulong * total_time, gulong * selection_time, | |
132 gboolean * total_more, | |
133 gboolean * selection_more); | |
134 | |
135 void playlist_select_all(gboolean set); | |
136 void playlist_select_range(gint min, gint max, gboolean sel); | |
137 void playlist_select_invert_all(void); | |
138 gboolean playlist_select_invert(guint pos); | |
139 | |
140 gboolean playlist_read_info_selection(void); | |
141 void playlist_read_info(guint pos); | |
142 | |
143 void playlist_set_shuffle(gboolean shuffle); | |
144 | |
145 void playlist_clear_selected(void); | |
146 | |
147 GList *get_playlist_nth(guint); | |
148 gboolean playlist_set_current_name(const gchar * filename); | |
149 const gchar *playlist_get_current_name(void); | |
150 void playlist_new(void); | |
151 | |
152 PlaylistFormat playlist_format_get_from_name(const gchar * filename); | |
153 gboolean is_playlist_name(const gchar * filename); | |
154 | |
155 #define PLAYLIST_LOCK() G_LOCK(playlist) | |
156 #define PLAYLIST_UNLOCK() G_UNLOCK(playlist) | |
157 | |
158 G_LOCK_EXTERN(playlist); | |
159 | |
356
99928e1275a1
[svn] This commit reduces the amount of times we probe a source down to ONE
nenolod
parents:
355
diff
changeset
|
160 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
|
161 |
0 | 162 #endif |