Mercurial > audlegacy
comparison src/audacious/interface.c @ 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 |
comparison
equal
deleted
inserted
replaced
| 4722:1a13d88b72f3 | 4723:07b4e2a5eedb |
|---|---|
| 20 | 20 |
| 21 #include <glib.h> | 21 #include <glib.h> |
| 22 #include <mowgli.h> | 22 #include <mowgli.h> |
| 23 | 23 |
| 24 #include "interface.h" | 24 #include "interface.h" |
| 25 #include "ui_fileopener.h" | |
| 26 #include "ui_urlopener.h" | |
| 27 #include "ui_preferences.h" | |
| 25 | 28 |
| 26 static mowgli_dictionary_t *interface_dict_ = NULL; | 29 static mowgli_dictionary_t *interface_dict_ = NULL; |
| 30 | |
| 31 static InterfaceOps interface_ops = { | |
| 32 .create_prefs_window = create_prefs_window, | |
| 33 .show_prefs_window = show_prefs_window, | |
| 34 .hide_prefs_window = hide_prefs_window, | |
| 35 | |
| 36 .filebrowser_show = run_filebrowser, | |
| 37 .urlopener_show = show_add_url_window, | |
| 38 }; | |
| 27 | 39 |
| 28 void | 40 void |
| 29 interface_register(Interface *i) | 41 interface_register(Interface *i) |
| 30 { | 42 { |
| 31 if (interface_dict_ == NULL) | 43 if (interface_dict_ == NULL) |
| 40 g_return_if_fail(interface_dict_ != NULL); | 52 g_return_if_fail(interface_dict_ != NULL); |
| 41 | 53 |
| 42 mowgli_dictionary_delete(interface_dict_, i->id); | 54 mowgli_dictionary_delete(interface_dict_, i->id); |
| 43 } | 55 } |
| 44 | 56 |
| 45 /* | |
| 46 * TODO: | |
| 47 * - set up InterfaceOps struct for the Interface to use | |
| 48 */ | |
| 49 void | 57 void |
| 50 interface_run(Interface *i) | 58 interface_run(Interface *i) |
| 51 { | 59 { |
| 60 i->ops = &interface_ops; | |
| 52 i->init(); | 61 i->init(); |
| 53 } | 62 } |
| 54 | 63 |
| 55 void | 64 void |
| 56 interface_destroy(Interface *i) | 65 interface_destroy(Interface *i) |
