]> git.decadent.org.uk Git - ion3.git/blob - mod_menu/main.c
[svn-upgrade] Integrating new upstream version, ion3 (20070203)
[ion3.git] / mod_menu / main.c
1 /*
2  * ion/mod_menu/main.c
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #include <libextl/readconfig.h>
13 #include <ioncore/saveload.h>
14 #include <ioncore/bindmaps.h>
15
16 #include "menu.h"
17 #include "exports.h"
18
19
20 /*{{{ Module information */
21
22
23 #include "../version.h"
24
25 char mod_menu_ion_api_version[]=ION_API_VERSION;
26
27
28 /*}}}*/
29
30
31 /*{{{ Bindmaps */
32
33
34 WBindmap *mod_menu_menu_bindmap=NULL;
35
36
37 /*}}}*/
38
39
40 /*{{{ Init & deinit */
41
42
43 void mod_menu_deinit()
44 {
45     if(mod_menu_menu_bindmap!=NULL){
46         ioncore_free_bindmap("WMenu", mod_menu_menu_bindmap);
47         mod_menu_menu_bindmap=NULL;
48     }
49
50     mod_menu_unregister_exports();
51 }
52
53
54 bool mod_menu_init()
55 {
56     mod_menu_menu_bindmap=ioncore_alloc_bindmap("WMenu", NULL);
57     
58     if(mod_menu_menu_bindmap==NULL)
59         return FALSE;
60
61     if(!mod_menu_register_exports()){
62         mod_menu_deinit();
63         return FALSE;
64     }
65     
66     /*ioncore_read_config("cfg_menu", NULL, TRUE);*/
67     
68     return TRUE;
69 }
70
71
72 /*}}}*/
73