Add:gui_internal:First work to make menus more configurable
[navit-package] / navit / xmlconfig.h
1 /**
2  * Navit, a modular navigation system.
3  * Copyright (C) 2005-2008 Navit Team
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public License
7  * version 2 as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA  02110-1301, USA.
18  */
19
20 #ifndef NAVIT_XMLCONFIG_H
21 #define NAVIT_XMLCONFIG_H
22
23 struct object_func {
24         enum attr_type type;
25         void *(*new)(struct attr *parent, struct attr **attrs);
26         int (*get_attr)(void *, enum attr_type type, struct attr *attr, struct attr_iter *iter);
27         struct attr_iter *(*iter_new)(void *);
28         void (*iter_destroy)(struct attr_iter *);
29         int (*set_attr)(void *, struct attr *attr);
30         int (*add_attr)(void *, struct attr *attr);
31         int (*remove_attr)(void *, struct attr *attr);
32         int (*init)(void *);
33         void (*destroy)(void *);
34 };
35
36 typedef GError xmlerror;
37
38 extern const int xml_attr_distance;
39
40 /* prototypes */
41 enum attr_type;
42 struct object_func *object_func_lookup(enum attr_type type);
43 void xml_parse_text(char *document, void *data, void (*start)(void *, const char *, const char **, const char **, void *, void *), void (*end)(void *, const char *, void *, void *), void (*text)(void *, const char *, int, void *, void *));
44 gboolean config_load(const char *filename, xmlerror **error);
45 /* end of prototypes */
46 #endif