summaryrefslogtreecommitdiff
path: root/navit/menu.c
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-05-18 10:01:53 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2008-05-18 10:01:53 +0000
commit0b74d7f4ee6d448ac811e2741e8cb1ed04f5ce76 (patch)
treebe7bb1cb1020f4022e41c004e2fa9d561ea3580d /navit/menu.c
parentf46eb419c46011d6d103b7f06cb2c842a2cbe6c9 (diff)
downloadnavit-0b74d7f4ee6d448ac811e2741e8cb1ed04f5ce76.tar.gz
Fix:Core:Renamed src to navit for cleanup of includes
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@1059 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/menu.c')
-rw-r--r--navit/menu.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/navit/menu.c b/navit/menu.c
new file mode 100644
index 000000000..a2f0581fc
--- /dev/null
+++ b/navit/menu.c
@@ -0,0 +1,26 @@
+#include <glib.h>
+#include "menu.h"
+#include "debug.h"
+
+struct menu *
+menu_add(struct menu *menu, char *name, enum menu_type type, struct callback *cb)
+{
+ struct menu *this;
+ this=g_new0(struct menu, 1);
+ this->priv=(*menu->meth.add)(menu->priv, &this->meth, name, type, cb);
+ if (! this->priv) {
+ g_free(this);
+ return NULL;
+ }
+
+ return this;
+}
+
+void
+menu_popup(struct menu *menu)
+{
+ if (! menu || ! menu->meth.popup)
+ return;
+ (*menu->meth.popup)(menu->priv);
+
+}