Mercurial > audlegacy
annotate src/audacious/hook.h @ 2597:4ce36bfe9cf7 trunk
[svn] - correct a keyboard shortcut collision. closes #824.
author | nenolod |
---|---|
date | Thu, 01 Mar 2007 08:22:32 -0800 |
parents | b7f77224ea03 |
children | d226b83fa329 |
rev | line source |
---|---|
2404 | 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 | |
2457
b7f77224ea03
[svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents:
2404
diff
changeset
|
21 #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
|
22 |
b7f77224ea03
[svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents:
2404
diff
changeset
|
23 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
|
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 struct { |
b7f77224ea03
[svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents:
2404
diff
changeset
|
26 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
|
27 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
|
28 } HookItem; |
2404 | 29 |
30 typedef struct { | |
31 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
|
32 GSList *items; |
2404 | 33 } Hook; |
34 | |
35 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
|
36 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
|
37 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
|
38 void hook_call(const gchar *name, gpointer hook_data); |
2404 | 39 |
40 #endif |