1 /* 2 * Copyright (C) 2018 Alexander Borisov 3 * 4 * Author: Alexander Borisov <borisov@lexbor.com> 5 */ 6 7 #ifndef LEXBOR_DOM_SHADOW_ROOT_H 8 #define LEXBOR_DOM_SHADOW_ROOT_H 9 10 #ifdef __cplusplus 11 extern "C" { 12 #endif 13 14 #include "lexbor/dom/interfaces/document.h" 15 #include "lexbor/dom/interfaces/element.h" 16 #include "lexbor/dom/interfaces/document_fragment.h" 17 18 19 typedef enum { 20 LXB_DOM_SHADOW_ROOT_MODE_OPEN = 0x00, 21 LXB_DOM_SHADOW_ROOT_MODE_CLOSED = 0x01 22 } 23 lxb_dom_shadow_root_mode_t; 24 25 struct lxb_dom_shadow_root { 26 lxb_dom_document_fragment_t document_fragment; 27 28 lxb_dom_shadow_root_mode_t mode; 29 lxb_dom_element_t *host; 30 }; 31 32 33 LXB_API lxb_dom_shadow_root_t * 34 lxb_dom_shadow_root_interface_create(lxb_dom_document_t *document); 35 36 LXB_API lxb_dom_shadow_root_t * 37 lxb_dom_shadow_root_interface_destroy(lxb_dom_shadow_root_t *shadow_root); 38 39 40 #ifdef __cplusplus 41 } /* extern "C" */ 42 #endif 43 44 #endif /* LEXBOR_DOM_SHADOW_ROOT_H */ 45