Mercurial > audlegacy
annotate src/audacious/hook.h @ 3077:4b076ad636e6
use GdkPixmaps for doublesizing
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sat, 14 Jul 2007 12:45:03 +0200 |
parents | d226b83fa329 |
children | 4c758281fe8f |
rev | line source |
---|---|
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
1 /* |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
2 * audacious: Cross-platform multimedia player. |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
3 * hook.h: Hooking. |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
4 * |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
5 * Copyright (c) 2006-2007 William Pitcock |
2404 | 6 * |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
7 * Redistribution and use in source and binary forms, with or without |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
8 * modification, are permitted provided that the following conditions are |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
9 * met: |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
10 * |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
11 * 1. Redistributions of source code must retain the above copyright notice, |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
12 * this list of conditions and the following disclaimer. |
2404 | 13 * |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
14 * 2. Redistributions in binary form must reproduce the above copyright |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
15 * notice, this list of conditions and the following disclaimer in the |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
16 * documentation and/or other materials provided with the distribution. |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
17 * |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
18 * 3. The name of the author may not be used to endorse or promote products |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
19 * derived from this software without specific prior written permission. |
2404 | 20 * |
2865
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
24 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
25 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
26 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
27 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
29 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
30 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
d226b83fa329
BSD relicensing (pass 6).
William Pitcock <nenolod@atheme.org>
parents:
2457
diff
changeset
|
31 * POSSIBILITY OF SUCH DAMAGE. |
2404 | 32 */ |
33 | |
34 #ifndef __AUDACIOUS_HOOK_H__ | |
35 #define __AUDACIOUS_HOOK_H__ | |
36 | |
2457
b7f77224ea03
[svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents:
2404
diff
changeset
|
37 #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
|
38 |
b7f77224ea03
[svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents:
2404
diff
changeset
|
39 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
|
40 |
b7f77224ea03
[svn] - now it's possible to pass user_data along with the hook function in hook_associate
giacomo
parents:
2404
diff
changeset
|
41 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
|
42 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
|
43 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
|
44 } HookItem; |
2404 | 45 |
46 typedef struct { | |
47 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
|
48 GSList *items; |
2404 | 49 } Hook; |
50 | |
51 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
|
52 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
|
53 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
|
54 void hook_call(const gchar *name, gpointer hook_data); |
2404 | 55 |
56 #endif |