diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-03 15:40:09 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-03 15:40:09 -0700 |
commit | e091cdb3187b60a9901bd14d475eebc481c9a299 (patch) | |
tree | 0c559ff47821c6868ec29dc1078993d4ff9c008c /web/web_dom.h | |
parent | 12e0680e13e3b00fe085ff419abcef88dd512b23 (diff) | |
download | dartboat-e091cdb3187b60a9901bd14d475eebc481c9a299.tar.gz dartboat-e091cdb3187b60a9901bd14d475eebc481c9a299.tar.xz |
web: move elem construction to shared dom file
Diffstat (limited to 'web/web_dom.h')
-rw-r--r-- | web/web_dom.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web/web_dom.h b/web/web_dom.h new file mode 100644 index 0000000..a86d432 --- /dev/null +++ b/web/web_dom.h @@ -0,0 +1,16 @@ +#ifndef WEB_DOM_H +#define WEB_DOM_H + +struct elem { + char *ns, *name, *content; + int n_attrs, size_attrs; + char **attr_names, **attr_vals; +}; + +struct elem *elem_init(char *ns, char *name, int size_attrs); +void elem_free(struct elem *e); +void elem_add_attr(struct elem *e, char *name, char *val); +void elem_add_attr_double(struct elem *e, char *name, double val); +void append_elemv(char *sel, int elemc, struct elem **elemv); + +#endif |