Mercurial > audlegacy
annotate src/audacious/interface.h @ 4797:9b9bcf252a10
- provide a way to query current interface.
- revive visualization when legacy interface is chosen.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Sat, 11 Oct 2008 07:43:44 +0900 |
parents | ad06ffc54c23 |
children |
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> |
4725 | 4 * Copyright (c) 2008 Tomasz Moń <desowin@gmail.com> |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
5 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
6 * 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
|
7 * 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
|
8 * the Free Software Foundation; under version 3 of the License. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
9 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
10 * 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
|
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
13 * GNU General Public License for more details. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
14 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
15 * 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
|
16 * 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
|
17 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
18 * The Audacious team does not consider modular code linking to |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
19 * Audacious or using our public API to be a derived work. |
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 /* |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
23 * This is the Interface API. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
24 * |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
25 * Everything here is like totally subject to change. |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
26 * --nenolod |
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 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
29 #ifndef __AUDACIOUS2_INTERFACE_H__ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
30 #define __AUDACIOUS2_INTERFACE_H__ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
31 |
4723
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
32 #include <gtk/gtk.h> |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
33 |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
34 typedef struct { |
4723
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
35 void (*create_prefs_window)(void); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
36 void (*show_prefs_window)(void); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
37 void (*hide_prefs_window)(void); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
38 |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
39 void (*filebrowser_show)(gboolean play_button); |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
40 void (*urlopener_show)(void); |
4726
ad06ffc54c23
add aboutwin_show and jump_to_track_show to InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4725
diff
changeset
|
41 void (*jump_to_track_show)(void); |
ad06ffc54c23
add aboutwin_show and jump_to_track_show to InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4725
diff
changeset
|
42 void (*aboutwin_show)(void); |
4723
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
43 } InterfaceOps; |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
44 |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
45 typedef struct _Interface { |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
46 gchar *id; /* simple ID like 'skinned' */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
47 gchar *desc; /* description like 'Skinned Interface' */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
48 gboolean (*init)(void); /* init UI */ |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
49 gboolean (*fini)(void); /* shutdown UI */ |
4723
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
50 |
07b4e2a5eedb
commit initial version of InterfaceOps
Tomasz Mon <desowin@gmail.com>
parents:
4675
diff
changeset
|
51 InterfaceOps *ops; |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
52 } Interface; |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
53 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
54 void interface_register(Interface *i); |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
55 void interface_deregister(Interface *i); |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
56 void interface_run(Interface *i); |
4675 | 57 void interface_destroy(Interface *i); |
58 | |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
59 Interface *interface_get(gchar *id); |
4797
9b9bcf252a10
- provide a way to query current interface.
Yoshiki Yazawa <yaz@honeyplanet.jp>
parents:
4726
diff
changeset
|
60 const Interface *interface_get_current(void); |
4666
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
61 |
742abc97b3ab
Add preliminary Interface API.
William Pitcock <nenolod@atheme.org>
parents:
diff
changeset
|
62 #endif |