summaryrefslogtreecommitdiff
path: root/web/web_dom.h
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-05 02:08:11 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-05 02:08:25 -0700
commit9ea94a3ac33559c956946a5c49aa2536b218e0fc (patch)
tree08cbe1fc490bc41eb7a700408586d9fcda21468b /web/web_dom.h
parentd5cc3a92f6fd8533b2e1b6240016a402c6fa20ff (diff)
downloaddartboat-9ea94a3ac33559c956946a5c49aa2536b218e0fc.tar.gz
dartboat-9ea94a3ac33559c956946a5c49aa2536b218e0fc.tar.xz
web: clean up scoreboard and dom functions
Diffstat (limited to 'web/web_dom.h')
-rw-r--r--web/web_dom.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/web/web_dom.h b/web/web_dom.h
index 12205c2..41ac46d 100644
--- a/web/web_dom.h
+++ b/web/web_dom.h
@@ -3,28 +3,29 @@
#include <stdbool.h>
-struct elem {
+struct dom_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);
+struct dom_elem *dom_elem_init(char *ns, char *name, int size_attrs);
+void dom_elem_free(struct dom_elem *e);
+void dom_elem_add_attr(struct dom_elem *e, char *name, char *val);
+void dom_elem_add_attrd(struct dom_elem *e, char *name, double val);
-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);
+void dom_append_elemv(char *sel, int elemc, struct dom_elem **elemv);
-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);
+char *dom_get_content(char *sel);
+void dom_set_content(char *sel, char *str);
+void dom_set_value(char *sel, char *str);
-void dom_elem_scroll_to_bottom(char *sel);
+bool dom_has_class(char *sel, char *class);
+void dom_add_class(char *sel, char *class);
+void dom_remove_class(char *sel, char *class);
+void dom_toggle_class(char *sel, char *class);
+void dom_set_uniq_class(char *sel, char *class, char *sel_set);
+
+void dom_scroll_to_bottom(char *sel);
#endif