Mercurial > audlegacy
annotate src/audacious/interface.h @ 4723:07b4e2a5eedb
commit initial version of InterfaceOps
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sun, 13 Jul 2008 12:50:31 +0200 |
parents | 48cdebc174ef |
children | 4e38324b5e9f |
rev | line source |
---|---|
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
1 /* |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
2 * Audacious2 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
3 * Copyright (c) 2008 William Pitcock <nenolod@dereferenced.org> |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
4 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
5 * This program is free software; you can redistribute it and/or modify |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
6 * it under the terms of the GNU General Public License as published by |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
7 * the Free Software Foundation; under version 3 of the License. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
8 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
9 * This program is distributed in the hope that it will be useful, |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
12 * GNU General Public License for more details. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
13 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
14 * You should have received a copy of the GNU General Public License |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
15 * along with this program. If not, see <http://www.gnu.org/licenses>. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
16 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
17 * The Audacious team does not consider modular code linking to |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
18 * Audacious or using our public API to be a derived work. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
19 */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
20 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
21 /* |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
22 * This is the Interface API. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
23 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
24 * Everything here is like totally subject to change. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
25 * --nenolod |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
26 */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
27 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
28 #ifndef __AUDACIOUS2_INTERFACE_H__ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
29 #define __AUDACIOUS2_INTERFACE_H__ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
30 |
4723
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
31 #include <gtk/gtk.h> |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
32 |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
33 typedef struct { |
4723
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
34 void (*create_prefs_window)(void); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
35 void (*show_prefs_window)(void); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
36 void (*hide_prefs_window)(void); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
37 |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
38 void (*filebrowser_show)(gboolean play_button); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
39 void (*urlopener_show)(void); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
40 } InterfaceOps; |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
41 |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
42 typedef struct _Interface { |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
43 gchar *id; /* simple ID like 'skinned' */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
44 gchar *desc; /* description like 'Skinned Interface' */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
45 gboolean (*init)(void); /* init UI */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
46 gboolean (*fini)(void); /* shutdown UI */ |
4723
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
47 |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
48 InterfaceOps *ops; |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
49 } Interface; |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
50 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
51 void interface_register(Interface *i); |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
52 void interface_deregister(Interface *i); |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
53 void interface_run(Interface *i); |
4675 | 54 void interface_destroy(Interface *i); |
55 | |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
56 Interface *interface_get(gchar *id); |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
57 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
58 #endif |