aboutsummaryrefslogtreecommitdiff
path: root/libs/libtxt/html.h
blob: c1b29f25c5a4e3e2065fcb8350e89dcfe1382ed9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// MIT License, Copyright (c) 2020 Marvin Borner
// HTML parsing is mainly based on the XML parser

#ifndef HTML_H
#define HTML_H

#include <def.h>
#include <list.h>

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