annotate src/skins/ui_playlist_evlisteners.c @ 3168:7e58928783b3

alsa-ng: Set thread handles to NULL when threads exit.
author William Pitcock <nenolod@atheme.org>
date Fri, 15 May 2009 00:05:48 -0500
parents 1ffcad5f406c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2620
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1 /*
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2 * Audacious
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
3 * Copyright (c) 2006-2007 Audacious development team.
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
4 *
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
7 * the Free Software Foundation; under version 3 of the License.
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
8 *
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
9 * This program is distributed in the hope that it will be useful,
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
12 * GNU General Public License for more details.
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
13 *
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
15 * along with this program. If not, see <http://www.gnu.org/licenses>.
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
16 *
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
17 * The Audacious team does not consider modular code linking to
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
18 * Audacious or using our public API to be a derived work.
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
19 */
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
20
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
21 #include "ui_playlist_evlisteners.h"
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
22
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
23 #include <glib.h>
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
24 #if 0
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
25 #include "hook.h"
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
26 #include "playlist.h"
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
27 #endif
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
28 #include "ui_playlist.h"
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
29 #if 0
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
30 #include "ui_playlist_manager.h"
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
31 #endif
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
32 static void
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
33 ui_playlist_evlistener_playlist_update(gpointer hook_data, gpointer user_data)
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
34 {
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
35 Playlist *playlist = (Playlist *) hook_data;
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
36 if (playlist != NULL)
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
37 playlistwin_update_list(playlist);
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
38 #if 0
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
39 playlist_manager_update();
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
40 #endif
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
41 }
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
42
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
43 static void
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
44 ui_playlist_evlistener_playlistwin_show(gpointer hook_data, gpointer user_data)
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
45 {
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
46 gboolean *show = (gboolean*)hook_data;
3159
1ffcad5f406c import new skins plugin
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents: 2633
diff changeset
47 playlistwin_show (* show);
2620
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
48 }
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
49
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
50 void ui_playlist_evlistener_init(void)
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
51 {
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
52 aud_hook_associate("playlist update", ui_playlist_evlistener_playlist_update, NULL);
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
53 aud_hook_associate("playlistwin show", ui_playlist_evlistener_playlistwin_show, NULL);
2d6e08c81c09 add playlistwindow
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
54 }
2633
8e4af29f7e17 dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents: 2620
diff changeset
55
8e4af29f7e17 dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents: 2620
diff changeset
56 void ui_playlist_evlistener_dissociate(void)
8e4af29f7e17 dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents: 2620
diff changeset
57 {
8e4af29f7e17 dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents: 2620
diff changeset
58 aud_hook_dissociate("playlist update", ui_playlist_evlistener_playlist_update);
8e4af29f7e17 dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents: 2620
diff changeset
59 aud_hook_dissociate("playlistwin show", ui_playlist_evlistener_playlistwin_show);
8e4af29f7e17 dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents: 2620
diff changeset
60 }
8e4af29f7e17 dissociate hooks at plugin cleanup
Tomasz Mon <desowin@gmail.com>
parents: 2620
diff changeset
61