annotate src/audacious/hook.h @ 3921:35a26116f6bd

increment playlist serial number on loading playlist file.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Fri, 09 Nov 2007 20:32:06 +0900
parents f1c756f39e6c
children 2eee464379dc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3112
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
1 /* Audacious
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
2 * Copyright (c) 2006-2007 William Pitcock
2404
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
3 *
3112
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
4 * This program is free software; you can redistribute it and/or modify
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
5 * it under the terms of the GNU General Public License as published by
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 3112
diff changeset
6 * the Free Software Foundation; under version 3 of the License.
2404
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
7 *
3112
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
8 * This program is distributed in the hope that it will be useful,
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
11 * GNU General Public License for more details.
2404
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
12 *
3112
4c758281fe8f Backed out changeset d226b83fa3298fc92f25f9519befcd754f44b0ef
William Pitcock <nenolod@atheme-project.org>
parents: 2865
diff changeset
13 * You should have received a copy of the GNU General Public License
3121
3b6d316f8b09 GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents: 3112
diff changeset
14 * along with this program. If not, see <http://www.gnu.org/licenses>.
3123
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
15 *
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
16 * The Audacious team does not consider modular code linking to
f1c756f39e6c Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents: 3121
diff changeset
17 * Audacious or using our public API to be a derived work.
2404
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
18 */
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
19
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
20 #ifndef __AUDACIOUS_HOOK_H__
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
21 #define __AUDACIOUS_HOOK_H__
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
22
2457
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
23 #include <glib.h>
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
24
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
25 typedef void (*HookFunction)(gpointer hook_data, gpointer user_data);
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
26
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
27 typedef struct {
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
28 HookFunction func;
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
29 gpointer user_data;
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
30 } HookItem;
2404
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
31
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
32 typedef struct {
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
33 const gchar *name;
2457
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
34 GSList *items;
2404
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
35 } Hook;
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
36
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
37 void hook_register(const gchar *name);
2457
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
38 gint hook_associate(const gchar *name, HookFunction func, gpointer user_data);
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
39 gint hook_dissociate(const gchar *name, HookFunction func);
b7f77224ea03 [svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents: 2404
diff changeset
40 void hook_call(const gchar *name, gpointer hook_data);
2404
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
41
60f1bc20c19c [svn] - hooking implementation.
nenolod
parents:
diff changeset
42 #endif