From 05498860e8f7b1e8bb27880bc7526de026694804 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 26 Mar 2021 21:55:50 +0100 Subject: Renamed libs Cleaner and more flexible. --- libs/libtxt/html.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libs/libtxt/html.h (limited to 'libs/libtxt/html.h') diff --git a/libs/libtxt/html.h b/libs/libtxt/html.h new file mode 100644 index 0000000..c1b29f2 --- /dev/null +++ b/libs/libtxt/html.h @@ -0,0 +1,26 @@ +// MIT License, Copyright (c) 2020 Marvin Borner +// HTML parsing is mainly based on the XML parser + +#ifndef HTML_H +#define HTML_H + +#include +#include + +struct dom { + char *tag; + char *content; + struct dom *parent; + struct list *children; +}; + +struct html_element { + u32 x_offset; + u32 y_offset; + struct dom *dom; + struct element *obj; +}; + +int html_render(struct element *container, char *data, u32 length); + +#endif -- cgit v1.2.3