comparison src/audacious/hook.h @ 2404:60f1bc20c19c trunk

[svn] - hooking implementation. example: hook_register("playback begin"); hook_call("playback begin", <PlaylistEntry>);
author nenolod
date Thu, 25 Jan 2007 20:23:16 -0800
parents
children b7f77224ea03
comparison
equal deleted inserted replaced
2403:55f92225cd20 2404:60f1bc20c19c
1 /* Audacious
2 * Copyright (c) 2006-2007 William Pitcock
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; under version 2 of the License.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 */
17
18 #ifndef __AUDACIOUS_HOOK_H__
19 #define __AUDACIOUS_HOOK_H__
20
21 typedef void (*HookFunction)(gpointer user_data);
22
23 typedef struct {
24 const gchar *name;
25 GSList *funcs;
26 } Hook;
27
28 void hook_register(const gchar *name);
29 void hook_associate(const gchar *name, HookFunction func);
30 void hook_dissociate(const gchar *name, HookFunction func);
31 void hook_call(const gchar *name, gpointer user_data);
32
33 #endif