xref: /php-src/ext/dom/lexbor/lexbor/html/style.h (revision f0934090)
1 /*
2  * Copyright (C) 2022-2023 Alexander Borisov
3  *
4  * Author: Alexander Borisov <borisov@lexbor.com>
5  */
6 
7 #ifndef LEXBOR_HTML_STYLE_H
8 #define LEXBOR_HTML_STYLE_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include "lexbor/core/avl.h"
15 #include "lexbor/css/selectors/selector.h"
16 #include "lexbor/html/interfaces/document.h"
17 
18 
19 typedef struct lxb_html_style_weak lxb_html_style_weak_t;
20 
21 struct lxb_html_style_weak {
22     void                           *value;
23     lxb_css_selector_specificity_t sp;
24 
25     lxb_html_style_weak_t          *next;
26 };
27 
28 typedef struct {
29     lexbor_avl_node_t              entry;
30     lxb_html_style_weak_t          *weak;
31 
32     lxb_css_selector_specificity_t sp;
33 }
34 lxb_html_style_node_t;
35 
36 
37 LXB_API uintptr_t
38 lxb_html_style_id_by_name(lxb_html_document_t *doc,
39                           const lxb_char_t *name, size_t size);
40 
41 
42 #ifdef __cplusplus
43 } /* extern "C" */
44 #endif
45 
46 #endif /* LEXBOR_HTML_STYLE_H */
47