1 /*
2 *
3 * Author: Giacomo Lozito <james@develia.org>, (C) 2005-2007
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
18 *
19 */
20 
21 #include <libaudcore/i18n.h>
22 
23 #include "aosd.h"
24 #include "aosd_osd.h"
25 #include "aosd_cfg.h"
26 #include "aosd_trigger.h"
27 
28 EXPORT AOSD aud_plugin_instance;
29 
30 const char AOSD::about[] =
31  N_("Audacious OSD\n"
32     "http://www.develia.org/projects.php?p=audacious#aosd\n\n"
33     "Written by Giacomo Lozito <james@develia.org>\n\n"
34     "Based in part on Evan Martin's Ghosd library:\n"
35     "http://neugierig.org/software/ghosd/");
36 
37 aosd_cfg_t global_config = aosd_cfg_t ();
38 
39 
40 /* ***************** */
41 /* plug-in functions */
42 
init()43 bool AOSD::init ()
44 {
45   aosd_cfg_load (global_config);
46   aosd_osd_init (global_config.misc.transparency_mode);
47   aosd_trigger_start (global_config.trigger);
48   return true;
49 }
50 
51 
cleanup()52 void AOSD::cleanup ()
53 {
54   aosd_trigger_stop (global_config.trigger);
55   aosd_osd_shutdown ();
56   aosd_osd_cleanup ();
57   global_config = aosd_cfg_t ();
58 }
59