]> Dogcows Code - chaz/openbox/blob - parser/parse.h
kill some output
[chaz/openbox] / parser / parse.h
1 #ifndef __parse_h
2 #define __parse_h
3
4 #include <libxml/parser.h>
5 #include <glib.h>
6
7 typedef void (*ParseCallback)(xmlDocPtr doc, xmlNodePtr node, void *data);
8
9 void parse_startup();
10 void parse_shutdown();
11
12 /* Loads Openbox's rc, from $HOME or $PREFIX as a fallback */
13 gboolean parse_load_rc(xmlDocPtr *doc, xmlNodePtr *root);
14
15 /* callbacks - must call parse_startup to use these */
16
17 void parse_register(const char *tag, ParseCallback func, void *data);
18 void parse_tree(xmlDocPtr doc, xmlNodePtr node, void *nothing);
19
20
21 /* open/close */
22
23 gboolean parse_load(const char *path, const char *rootname,
24 xmlDocPtr *doc, xmlNodePtr *root);
25 void parse_close(xmlDocPtr doc);
26
27
28 /* helpers */
29
30 xmlNodePtr parse_find_node(const char *tag, xmlNodePtr node);
31
32 char *parse_string(xmlDocPtr doc, xmlNodePtr node);
33 int parse_int(xmlDocPtr doc, xmlNodePtr node);
34 gboolean parse_bool(xmlDocPtr doc, xmlNodePtr node);
35
36 gboolean parse_contains(const char *val, xmlDocPtr doc, xmlNodePtr node);
37 gboolean parse_attr_contains(const char *val, xmlNodePtr node,
38 const char *name);
39
40 gboolean parse_attr_string(const char *name, xmlNodePtr node, char **value);
41 gboolean parse_attr_int(const char *name, xmlNodePtr node, int *value);
42
43 #endif
This page took 0.036393 seconds and 4 git commands to generate.