diff options
author | Vincent Sanders <vince@netsurf-browser.org> | 2013-05-03 21:17:11 +0100 |
---|---|---|
committer | Vincent Sanders <vince@netsurf-browser.org> | 2013-05-03 21:17:11 +0100 |
commit | 5c57a30047b4c9330110e5de9f5f406571f9baf1 (patch) | |
tree | 019aa80504701b34e2cca51913c5625c0999b6fc /desktop/tree.h | |
parent | 6c7ca26bdc88ac95feb53b647c1c3b33f602f04c (diff) | |
download | netsurf-5c57a30047b4c9330110e5de9f5f406571f9baf1.tar.gz netsurf-5c57a30047b4c9330110e5de9f5f406571f9baf1.tar.bz2 |
cleanup title string ownership madness in the tree_create_folder_node() API
Diffstat (limited to 'desktop/tree.h')
-rw-r--r-- | desktop/tree.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop/tree.h b/desktop/tree.h index 8ac505783..b88108776 100644 --- a/desktop/tree.h +++ b/desktop/tree.h @@ -137,6 +137,19 @@ void tree_setup_colours(void); struct tree *tree_create(unsigned int flags, const struct treeview_table *callbacks, void *client_data); + +/** + * Creates a folder 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_folder_node(struct tree *tree, struct node *parent, const char *title, bool editable, bool retain_in_memory, bool deleted); |