summaryrefslogtreecommitdiff
path: root/web/web_dom.h
diff options
context:
space:
mode:
Diffstat (limited to 'web/web_dom.h')
-rw-r--r--web/web_dom.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/web/web_dom.h b/web/web_dom.h
index a86d432..12205c2 100644
--- a/web/web_dom.h
+++ b/web/web_dom.h
@@ -1,6 +1,8 @@
#ifndef WEB_DOM_H
#define WEB_DOM_H
+#include <stdbool.h>
+
struct elem {
char *ns, *name, *content;
int n_attrs, size_attrs;
@@ -13,4 +15,16 @@ 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);
+char *dom_elem_get_content(char *sel);
+void dom_elem_set_content(char *sel, char *str);
+void dom_elem_set_value(char *sel, char *str);
+
+bool dom_elem_has_class(char *sel, char *class);
+void dom_elem_add_class(char *sel, char *class);
+void dom_elem_remove_class(char *sel, char *class);
+void dom_elem_toggle_class(char *sel, char *class);
+void dom_elem_set_uniq_class(char *sel, char *class, char *sel_set);
+
+void dom_elem_scroll_to_bottom(char *sel);
+
#endif