Use PtkUIXml and glade file to build a better config dialog.
[lxde/lxpanel.git] / src / ptk-ui-xml / ptk-xml-tree.h
1 /*
2 * ptk-xml-tree.h - Over-simplified mini xml dom implementation
3 *
4 * Copyright 2008 PCMan <pcman.tw@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 */
21
22 #ifndef _PTK_XML_TREE_H_
23 #define _PTK_XML_TREE_H_
24
25 #include <glib.h>
26
27 G_BEGIN_DECLS
28
29 typedef struct _XmlNode XmlNode;
30 struct _XmlNode
31 {
32 char* name;
33 char** props;
34 char** vals;
35 char* cdata;
36 XmlNode* parent;
37 GSList* children;
38 };
39
40 XmlNode* xml_tree_load( const char* filename );
41 /*
42 XmlNode* xml_node_get_from_path( XmlNode* tree, const char* path );
43 GSList* xml_node_get_elements_by_name( XmlNode* node, const char* tag_name );
44 */
45
46 void xml_node_free( XmlNode* tree );
47 #define xml_tree_free( tree ) xml_node_free( tree )
48 const char* xml_node_get_tag_name( XmlNode* node );
49 const char* xml_node_get_prop( XmlNode* node, const char* name );
50
51 G_END_DECLS
52
53 #endif