libdom
Loading...
Searching...
No Matches
include
dom
walk.h
Go to the documentation of this file.
1
/*
2
* This file is part of libdom.
3
* Licensed under the MIT License,
4
* http://www.opensource.org/licenses/mit-license.php
5
* Copyright 2021 Michael Drake <tlsa@netsurf-browser.org>
6
*/
7
12
#ifndef dom_walk_h_
13
#define dom_walk_h_
14
15
enum
dom_walk_stage
{
16
DOM_WALK_STAGE_ENTER
,
17
DOM_WALK_STAGE_LEAVE
,
18
};
19
20
enum
dom_walk_enable
{
21
DOM_WALK_ENABLE_ENTER
= (1 <<
DOM_WALK_STAGE_ENTER
),
22
DOM_WALK_ENABLE_LEAVE
= (1 <<
DOM_WALK_STAGE_LEAVE
),
23
DOM_WALK_ENABLE_ALL
=
DOM_WALK_ENABLE_ENTER
|
DOM_WALK_ENABLE_LEAVE
,
24
};
25
26
enum
dom_walk_cmd
{
27
DOM_WALK_CMD_CONTINUE
,
28
DOM_WALK_CMD_ABORT
,
29
DOM_WALK_CMD_SKIP
,
30
};
31
43
typedef
enum
dom_walk_cmd
(*
dom_walk_cb
)(
44
enum
dom_walk_stage
stage,
45
dom_node_type
type,
46
dom_node
*node,
47
void
*pw);
48
49
59
dom_exception
libdom_treewalk
(
60
enum
dom_walk_enable
mask,
61
dom_walk_cb
cb,
62
dom_node
*root,
63
void
*pw);
64
65
#endif
dom_exception
dom_exception
Definition
exceptions.h:24
dom_node_type
dom_node_type
Definition
node.h:56
dom_node
Definition
node.h:79
dom_walk_stage
dom_walk_stage
Definition
walk.h:15
DOM_WALK_STAGE_LEAVE
@ DOM_WALK_STAGE_LEAVE
Definition
walk.h:17
DOM_WALK_STAGE_ENTER
@ DOM_WALK_STAGE_ENTER
Definition
walk.h:16
libdom_treewalk
dom_exception libdom_treewalk(enum dom_walk_enable mask, dom_walk_cb cb, dom_node *root, void *pw)
Definition
walk.c:50
dom_walk_cmd
dom_walk_cmd
Definition
walk.h:26
DOM_WALK_CMD_CONTINUE
@ DOM_WALK_CMD_CONTINUE
Definition
walk.h:27
DOM_WALK_CMD_SKIP
@ DOM_WALK_CMD_SKIP
Definition
walk.h:29
DOM_WALK_CMD_ABORT
@ DOM_WALK_CMD_ABORT
Definition
walk.h:28
dom_walk_cb
enum dom_walk_cmd(* dom_walk_cb)(enum dom_walk_stage stage, dom_node_type type, dom_node *node, void *pw)
Definition
walk.h:43
dom_walk_enable
dom_walk_enable
Definition
walk.h:20
DOM_WALK_ENABLE_ALL
@ DOM_WALK_ENABLE_ALL
Definition
walk.h:23
DOM_WALK_ENABLE_ENTER
@ DOM_WALK_ENABLE_ENTER
Definition
walk.h:21
DOM_WALK_ENABLE_LEAVE
@ DOM_WALK_ENABLE_LEAVE
Definition
walk.h:22
Generated on Fri Nov 29 2024 17:49:02 for libdom by
1.12.0