Mercurial > audlegacy
annotate src/audacious/hook.h @ 3957:fed07be6b708
every other menu shows on button press..
| author | Tomasz Mon <desowin@gmail.com> |
|---|---|
| date | Fri, 16 Nov 2007 15:20:07 +0100 |
| parents | f1c756f39e6c |
| children | 2eee464379dc |
| 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 | 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 | 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 | 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 | 18 */ |
| 19 | |
| 20 #ifndef __AUDACIOUS_HOOK_H__ | |
| 21 #define __AUDACIOUS_HOOK_H__ | |
| 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 | 31 |
| 32 typedef struct { | |
| 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 | 35 } Hook; |
| 36 | |
| 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 | 41 |
| 42 #endif |
