diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2013-05-04 09:49:11 +0100 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2013-05-04 09:49:11 +0100 |
commit | 52c5cccdeb15db5f996a661657d5eb195f930b00 (patch) | |
tree | 2fbb0cb03376e91fd6f050666dade50f81d40c70 /desktop/tree.h | |
parent | 926be456b4316012e12c05a82f56637ce920397b (diff) | |
download | netsurf-52c5cccdeb15db5f996a661657d5eb195f930b00.tar.gz netsurf-52c5cccdeb15db5f996a661657d5eb195f930b00.tar.bz2 |
cleanup tree_create_leaf_node text ownership
Diffstat (limited to 'desktop/tree.h')
-rw-r--r-- | desktop/tree.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/desktop/tree.h b/desktop/tree.h index b88108776..00ac99984 100644 --- a/desktop/tree.h +++ b/desktop/tree.h @@ -153,9 +153,23 @@ struct tree *tree_create(unsigned int flags, struct node *tree_create_folder_node(struct tree *tree, struct node *parent, const char *title, bool editable, bool retain_in_memory, bool deleted); + +/** + * Creates a leaf node with the specified title, and optionally links it into + * the tree. + * + * \param tree the owner tree of 'parent', may be NULL + * \param parent the parent node, or NULL not to link + * \param title the node title. + * \param editable if true, the node title will be editable + * \param retain_in_memory if true, the node will stay in memory after deletion + * \param deleted if true, the node is created with the deleted flag + * \return the newly created node or NULL on error. + */ struct node *tree_create_leaf_node(struct tree *tree, struct node *parent, const char *title, bool editable, bool retain_in_memory, bool deleted); + struct node_element *tree_create_node_element(struct node *parent, node_element_type type, unsigned int flag, bool editable); void tree_link_node(struct tree *tree, struct node *link, struct node *node, |